[Demonstration 1]

[Buggy Method]
private Optional<String> resolveName(String clazz) {
    if (clazz.equals(entity))
        Optional.of("Entity");
    ClassNode entityTypesNode = classes.get(entityTypes);
    InvokeClassStringExtractor extractor = new InvokeClassStringExtractor(clazz, entityTypes);
    entityTypesNode.accept(extractor);
    if (extractor.getFoundName() == null)
        return Optional.empty();
    return Optional.of(extractor.getFoundName());
}

[Buggy Hunk]
if (clazz.equals(entity)) Optional.of("Entity");

[Patch]
if (clazz.equals(entity)) return Optional.of("Entity");

[Demonstration 2]

[Buggy Method]
public String scrambleTextWords(String aString) {
    StringBuilder result = new StringBuilder("");
    // current word to be scrambled when complete
    StringBuilder aWord = new StringBuilder("");
    for (int i = 0; i < aString.length(); i++) {
        // if there is a space it means a new word may have ended (or heading space case)
        if (aString.charAt(i) == ' ') {
            // if a word had started it is now ended
            if (!(aWord.toString().equals(""))) {
                // append the scrambled word to the result
                result.append(scrambleString(aWord.toString())).append(" ");
                // the current word is emptied
                aWord.delete(0, aWord.length() - 1);
            } else {
                // the space is added to the result (no current word)
                result.append(' ');
            }
        } else {
            // the current word is appended with the current character
            aWord.append(aString.charAt(i));
        }
    }
    // if there is still a current word (string not finishing by space)
    if (!(aWord.toString().equals(""))) {
        // append the scrambled word to the result
        result.append(scrambleString(aWord.toString()));
    }
    return result.toString();
}

[Buggy Hunk]
aWord.delete(0, aWord.length() - 1);

[Patch]
aWord.delete(0, aWord.length());