[Demonstration 1]

[Buggy Method]
static void enforceParameterContentCharacterRestrictions(final Set<String> parametersToCheck, final Set<Character> charactersToForbid, final Map parameterMap) {
    if (charactersToForbid.isEmpty()) {
        // short circuit
        return;
    }
    for (final String parameterToCheck : parametersToCheck) {
        final String[] parameterValues = (String[]) parameterMap.get(parameterToCheck);
        if (null != parameterValues) {
            for (final String parameterValue : parameterValues) {
                for (final Character forbiddenCharacter : charactersToForbid) {
                    final StringBuilder characterAsStringBuilder = new StringBuilder();
                    characterAsStringBuilder.append(forbiddenCharacter);
                    if (parameterValue.contains(characterAsStringBuilder)) {
                        FilterUtils.logExceptionAndThrow(new IllegalArgumentException("Disallowed character [" + forbiddenCharacter + "] found in value [" + parameterValue + "] of parameter named [" + parameterToCheck + "]"));
                    }
                    // that forbiddenCharacter was not in this parameterValue
                }
                // none of the charactersToForbid were in this parameterValue
            }
            // none of the values of this parameterToCheck had a forbidden character
        }
        // or this parameterToCheck had null value
    }
    // none of the values of any of the parametersToCheck had a forbidden character
    // hurray! allow flow to continue without throwing an Exception.
}

[Buggy Hunk]
FilterUtils.logExceptionAndThrow(new IllegalArgumentException("Disallowed character [" + forbiddenCharacter

[Patch]
FilterUtils.logException(LOGGER, new IllegalArgumentException("Disallowed character [" + forbiddenCharacter

[Demonstration 2]

[Buggy Method]
public static void main(String[] args) {
    System.out.println("Hello World!");
}

[Buggy Hunk]
System.out.println("Hello World!");

[Patch]
new Frame().init();