[Demonstration 1]

[Buggy Method]
private Term parseVar(Element var) throws ParseException {
    String symbolName = var.getValue().trim();
    if (symbolName.isEmpty()) {
        symbolName = "$ANON" + anonid++;
    }
    int sym = this.internVariable(symbolName);
    int typeid = parseTypeAttribute(var);
    logger.debug("Parsing variable: symbol = " + sym + " type = " + typeid);
    Vector<Integer> v;
    if (this.varClasses.containsKey(sym)) {
        v = varClasses.get(sym);
    } else {
        v = new Vector<Integer>();
        varClasses.put(sym, v);
    }
    v.add(typeid);
    logger.debug("Added Type Information");
    return new Term(sym, SymbolTable.INOROLE, typeid);
}

[Buggy Hunk]
symbolName = "$ANON" + anonid++;

[Patch]
symbolName = generateAnonymousIdentifier();

[Demonstration 2]

[Buggy Method]
private static void log_(Logger logger, Level level, String message, Throwable cause) {
    StackTraceElement[] stackTrace = new Throwable().getStackTrace();
    String sourceClass = null;
    String sourceMethod = null;
    for (StackTraceElement element : stackTrace) {
        String classname = element.getClassName();
        if (!classname.startsWith(WRAPPER_NAME) && !classname.startsWith(AbstractJDKLogger.class.getSimpleName())) {
            sourceClass = classname;
            sourceMethod = element.getMethodName();
            break;
        }
    }
    logger.logp(level, sourceClass, sourceMethod, message, cause);
}

[Buggy Hunk]
if ( !classname.startsWith(WRAPPER_NAME) && !classname.startsWith(AbstractJDKLogger.class.getSimpleName()))

[Patch]
if ( !classname.startsWith(WRAPPER_NAME) && !classname.startsWith(ABSTRACTLOGGER_NAME)  && !classname.startsWith(JDKLOGGER_NAME))

[Demonstration 3]

[Buggy Method]
public boolean isBalanced(TreeNode root) {
    if (null == root) {
        return true;
    }
    int depth = checkBalancedUsingHeihg(root);
    return (depth != -1) ? true : false;
}

[Buggy Hunk]
int depth = checkBalancedUsingHeihg(root);

[Patch]
int depth = checkBalancedUsingHeight(root);