Source:
<code>public void mergeEmptyUserMetadata(ProjectMetadata metadata) { if (metadata == null) return; JSONArray userMetadataPreference = null; JSONArray jsonObjArray = metadata.getUserMetadata(); <START> initDispaly(jsonObjArray); <END> try { String userMeta = (String)_preferenceStore.get(PreferenceStore.USER_METADATA_KEY); if (userMeta == null) return; userMetadataPreference = new JSONArray(userMeta); } catch (JSONException e1) { logger.error(ExceptionUtils.getFullStackTrace(e1)); } if (userMetadataPreference == null) { logger.warn("wrong definition of userMetadata format. Please use form [{\"name\": \"client name\", \"display\":true}, {\"name\": \"progress\", \"display\":false}]"); return; } for (int index = 0; index < userMetadataPreference.length(); index++) { try { boolean found = false; JSONObject placeHolderJsonObj = userMetadataPreference.getJSONObject(index); if (!isValidUserMetadataDefinition(placeHolderJsonObj)) { logger.warn("Skipped invalid user metadata definition" + placeHolderJsonObj.toString()); continue; } for (int i = 0; i < jsonObjArray.length(); i++) { JSONObject jsonObj = jsonObjArray.getJSONObject(i); if (jsonObj.getString("name").equals(placeHolderJsonObj.getString("name"))) { found = true; jsonObj.put("display", placeHolderJsonObj.get("display")); break; } } if (!found) { placeHolderJsonObj.put("value", ""); metadata.getUserMetadata().put(placeHolderJsonObj); logger.info("Put the placeholder for project {}", placeHolderJsonObj.getString("name"), metadata.getName()); } } catch (JSONException e) { logger.warn("Exception when mergeEmptyUserMetadata",e); } } }</code><technical_language>typo Display</technical_language>

Target:
public void mergeEmptyUserMetadata(ProjectMetadata metadata) { if (metadata == null) return; JSONArray userMetadataPreference = null; JSONArray jsonObjArray = metadata.getUserMetadata(); initDisplay(jsonObjArray); try { String userMeta = (String)_preferenceStore.get(PreferenceStore.USER_METADATA_KEY); if (userMeta == null) return; userMetadataPreference = new JSONArray(userMeta); } catch (JSONException e1) { logger.warn("wrong definition of userMetadata format. Please use form [{\"name\": \"client name\", \"display\":true}, {\"name\": \"progress\", \"display\":false}]"); logger.error(ExceptionUtils.getFullStackTrace(e1)); } for (int index = 0; index < userMetadataPreference.length(); index++) { try { boolean found = false; JSONObject placeHolderJsonObj = userMetadataPreference.getJSONObject(index); if (!isValidUserMetadataDefinition(placeHolderJsonObj)) { logger.warn("Skipped invalid user metadata definition" + placeHolderJsonObj.toString()); continue; } for (int i = 0; i < jsonObjArray.length(); i++) { JSONObject jsonObj = jsonObjArray.getJSONObject(i); if (jsonObj.getString("name").equals(placeHolderJsonObj.getString("name"))) { found = true; jsonObj.put("display", placeHolderJsonObj.get("display")); break; } } if (!found) { placeHolderJsonObj.put("value", ""); metadata.getUserMetadata().put(placeHolderJsonObj); logger.info("Put the placeholder for project {}", placeHolderJsonObj.getString("name"), metadata.getName()); } } catch (JSONException e) { logger.warn("Exception when mergeEmptyUserMetadata",e); } } }