Source:
<code>private ConfigurationMetadata.InjectionPointMetaData findOperativeInjectionPoint(AttributeMetadata attribute, String prefix, Problems problems) throws ConfigurationException { ConfigurationMetadata.InjectionPointMetaData operativeInjectionPoint = attribute.getInjectionPoint(); String operativeName = null; String operativeValue = null; if (operativeInjectionPoint != null) { operativeName = prefix + operativeInjectionPoint.getProperty(); operativeValue = properties.get(operativeName); } for (ConfigurationMetadata.InjectionPointMetaData injectionPoint : attribute.getLegacyInjectionPoints()) { String fullName = prefix + injectionPoint.getProperty(); String value = properties.get(fullName); if (value != null) { String replacement = "deprecated."; if (attribute.getInjectionPoint() != null) { replacement = format("replaced. Use '%s' instead.", prefix + attribute.getInjectionPoint().getProperty()); } problems.addWarning("Configuration property '%s' has been " + replacement, fullName); if (operativeValue == null) { operativeInjectionPoint = injectionPoint; operativeValue = value; operativeName = fullName; } else if (!value.equals(operativeValue)) { if (attribute.isSecuritySensitive()) { problems.addError("Value for property '%s' (=[REDACTED]) conflicts with property '%s' (=[REDACTED])", fullName, operativeName); } else { problems.addError("Value for property '%s' (=%s) conflicts with property '%s' (=%s)", fullName, value, operativeName, operativeValue); <START> } <END> } } } problems.throwIfHasErrors(); if (operativeValue == null) { return null; } return operativeInjectionPoint; }</code><technical_language>a fan of duplication here, is original code printableValue approach</technical_language>

Target:
private ConfigurationMetadata.InjectionPointMetaData findOperativeInjectionPoint(AttributeMetadata attribute, String prefix, Problems problems) throws ConfigurationException { ConfigurationMetadata.InjectionPointMetaData operativeInjectionPoint = attribute.getInjectionPoint(); String operativeName = null; String operativeValue = null; if (operativeInjectionPoint != null) { operativeName = prefix + operativeInjectionPoint.getProperty(); operativeValue = properties.get(operativeName); } String printableOperativeValue = operativeValue; if (attribute.isSecuritySensitive()) { printableOperativeValue = "[REDACTED]"; } for (ConfigurationMetadata.InjectionPointMetaData injectionPoint : attribute.getLegacyInjectionPoints()) { String fullName = prefix + injectionPoint.getProperty(); String value = properties.get(fullName); String printableValue = value; if (attribute.isSecuritySensitive()) { printableValue = "[REDACTED]"; } if (value != null) { String replacement = "deprecated."; if (attribute.getInjectionPoint() != null) { replacement = format("replaced. Use '%s' instead.", prefix + attribute.getInjectionPoint().getProperty()); } problems.addWarning("Configuration property '%s' has been " + replacement, fullName); if (operativeValue == null) { operativeInjectionPoint = injectionPoint; operativeValue = value; printableOperativeValue = printableValue; operativeName = fullName; } else { problems.addError("Configuration property '%s' (=%s) conflicts with property '%s' (=%s)", fullName, printableValue, operativeName, printableOperativeValue); } } } problems.throwIfHasErrors(); if (operativeValue == null) { return null; } return operativeInjectionPoint; }