Mistři v programování na #hovnokod

Java #77

if(isRegKeyRequired) {
            keyItems = new XItem [4];
            valueItems = new XItem [4][];
            totalItems = 4;

            keyItems[0] = new XItem();
            keyItems[0].setLabel(TextUtils.getText(280),XItem.LABEL_CONSTRAINT_CENTER);
            values = getValueItems(countryBox_rp);
            totalItems += setValues(valueItems, values,0);
            keyItems[1] = new XItem();
            keyItems[1].setLabel(TextUtils.getText(281),XItem.LABEL_CONSTRAINT_CENTER);
            values = getValueItems(phoneNoBox_rp);
            totalItems += setValues(valueItems, values,1);
            keyItems[2] = new XItem();
            keyItems[2].setLabel(TextUtils.getText(282),XItem.LABEL_CONSTRAINT_CENTER);
            values = getValueItems(regKeyBox_rp);
            totalItems += setValues(valueItems, values,2);
            keyItems[3] = new XItem();
            keyItems[3].setLabel(TextUtils.getText(283),XItem.LABEL_CONSTRAINT_CENTER);
            values = getValueItems(emailBox_rp);
            totalItems += setValues(valueItems, values,3);
        }
        else {
            keyItems = new XItem [3];
            valueItems = new XItem [3][];
            totalItems = 3;

            keyItems[0] = new XItem();
            keyItems[0].setLabel(TextUtils.getText(280),XItem.LABEL_CONSTRAINT_CENTER);
            values = getValueItems(countryBox_rp);
            totalItems += setValues(valueItems, values,0);
            keyItems[1] = new XItem();
            keyItems[1].setLabel(TextUtils.getText(281),XItem.LABEL_CONSTRAINT_CENTER);
            values = getValueItems(phoneNoBox_rp);
            totalItems += setValues(valueItems, values,1);
            keyItems[2] = new XItem();
            keyItems[2].setLabel(TextUtils.getText(283),XItem.LABEL_CONSTRAINT_CENTER);
            values = getValueItems(emailBox_rp);
            totalItems += setValues(valueItems, values,2);
        }

Anonymous,