Source:
<code>public static List<String> getControlledVocabulariesDisplayValueLocalized( Item item, List<MetadataValue> values, String schema, String element, String qualifier, Locale locale) throws SQLException, DCInputsReaderException { List<String> toReturn = new ArrayList<String>(); DCInput myInputs = null; boolean myInputsFound = false; String formFileName = I18nUtil.getInputFormsFileName(locale); String col_handle = ""; Collection collection = item.getOwningCollection(); if (collection == null) { col_handle = ""; } else { col_handle = collection.getHandle(); } DCInputsReader inputsReader = new DCInputsReader(formFileName); List<DCInputSet> inputSets = inputsReader.getInputsByCollectionHandle(col_handle); for (DCInputSet inputSet : inputSets) { String currentField = schema + "." + element + (qualifier == null ? "" : "." + qualifier); if (inputSet != null) { int fieldsNums = inputSet.getNumberFields(); for (int p = 0; p < fieldsNums; p++) { DCInput[] inputs = inputSet.getFields(); if (inputs != null) { for (int i = 0; i < inputs.length; i++) { String inputField = inputs[i].getSchema() + "." + inputs[i].getElement() <START> + (inputs[i].getQualifier() == null ? "" : "." + inputs[i].getQualifier()); <END> if (currentField.equals(inputField)) { myInputs = inputs[i]; myInputsFound = true; break; } } } if (myInputsFound) break; } } if (myInputsFound) { for (MetadataValue value : values) { String pairsName = myInputs.getPairsType(); String stored_value = value.getValue(); String displayVal = myInputs.getDisplayString(pairsName, stored_value); if (displayVal != null && !"".equals(displayVal)) { toReturn.add(displayVal); } } } } return toReturn; }</code><technical_language>reuse method input[i].getFullName() here</technical_language>

Target:
public static List<String> getControlledVocabulariesDisplayValueLocalized( Item item, List<MetadataValue> values, String schema, String element, String qualifier, Locale locale) throws SQLException, DCInputsReaderException { List<String> toReturn = new ArrayList<String>(); DCInput myInputs = null; boolean myInputsFound = false; String formFileName = I18nUtil.getInputFormsFileName(locale); String col_handle = ""; Collection collection = item.getOwningCollection(); if (collection == null) { col_handle = ""; } else { col_handle = collection.getHandle(); } DCInputsReader inputsReader = new DCInputsReader(formFileName); List<DCInputSet> inputSets = inputsReader.getInputsByCollectionHandle(col_handle); for (DCInputSet inputSet : inputSets) { String currentField = Utils.standardize(schema, element, qualifier, "."); if (inputSet != null) { int fieldsNums = inputSet.getNumberFields(); for (int p = 0; p < fieldsNums; p++) { DCInput[] inputs = inputSet.getFields(); if (inputs != null) { for (int i = 0; i < inputs.length; i++) { String inputField = Utils.standardize(inputs[i].getSchema(), inputs[i].getElement(), inputs[i].getQualifier(), "."); if (currentField.equals(inputField)) { myInputs = inputs[i]; myInputsFound = true; break; } } } if (myInputsFound) break; } } if (myInputsFound) { for (MetadataValue value : values) { String pairsName = myInputs.getPairsType(); String stored_value = value.getValue(); String displayVal = myInputs.getDisplayString(pairsName, stored_value); if (displayVal != null && !"".equals(displayVal)) { toReturn.add(displayVal); } } } } return toReturn; }