[Demonstration 1]

[Buggy Method]
public boolean canEqual(Object other) {
    return (other instanceof Position);
}

[Buggy Hunk]
return (other instanceof Position);

[Patch]
return (other instanceof MatchResult);

[Demonstration 2]

[Buggy Method]
public Map<String, Class<?>> compileAll() throws Exception {
    Collection<SourceCode> compilationUnits = clazzCode.values();
    CompiledCode[] code;
    code = new CompiledCode[compilationUnits.size()];
    Iterator<SourceCode> iter = compilationUnits.iterator();
    for (int i = 0; i < code.length; i++) {
        code[i] = new CompiledCode(iter.next().getClassName());
    }
    ExtendedStandardJavaFileManager fileManager = new ExtendedStandardJavaFileManager(javac.getStandardFileManager(null, null, null), classLoader, code);
    JavaCompiler.CompilationTask task = javac.getTask(null, fileManager, null, null, null, compilationUnits);
    boolean result = task.call();
    if (!result)
        throw new RuntimeException("Unknown error during compilation.");
    Map<String, Class<?>> classes = new HashMap<String, Class<?>>();
    for (String className : clazzCode.keySet()) {
        classes.put(className, classLoader.loadClass(className));
    }
    return classes;
}

[Buggy Hunk]
javac.getStandardFileManager(null, null, null), classLoader, code);

[Patch]
javac.getStandardFileManager(null, null, null), classLoader);

[Demonstration 3]

[Buggy Method]
protected JCMethodDecl generateConstructor(List<JCVariableDecl> fieldsToBeInitialize, int modifiers) {
    List<JCTypeParameter> typeParameters = List.nil();
    ListBuffer<JCVariableDecl> parameters = new ListBuffer<JCVariableDecl>();
    List<JCExpression> thrown = List.nil();
    ListBuffer<JCStatement> statements = new ListBuffer<JCStatement>();
    for (JCVariableDecl fieldToBeInitialize : fieldsToBeInitialize) {
        String argumentName = NameResolver.resolvePropertyName(sourceNode.getAst(), fieldToBeInitialize.name.toString());
        JCExpression argumentReference = maker.Ident(sourceNode.toName(argumentName));
        JCExpression fieldReference = generateFieldReference(fieldToBeInitialize);
        JCVariableDecl argument = maker.VarDef(maker.Modifiers(Flags.PARAMETER), fieldToBeInitialize.name, fieldToBeInitialize.vartype, null);
        parameters.append(argument);
        JCAssign assignment = maker.Assign(fieldReference, argumentReference);
        statements.append(maker.Exec(assignment));
    }
    return maker.MethodDef(maker.Modifiers(modifiers), sourceNode.toName("<init>"), null, typeParameters, parameters.toList(), thrown, maker.Block(0, statements.toList()), null);
}

[Buggy Hunk]
JCVariableDecl argument = maker.VarDef(maker.Modifiers(Flags.PARAMETER), fieldToBeInitialize.name,

[Patch]
JCVariableDecl argument = maker.VarDef(maker.Modifiers(Flags.PARAMETER), sourceNode.toName(argumentName),