[Demonstration 1]

[Buggy Method]
public void solve() throws PuzzleNotLoadedException, PuzzleUnsolvableException {
    if (loadedBoard != null) {
        try {
            resultBoard = new SudokuBoard(Solver.depthFirstSearch(loadedBoard));
        } catch (PuzzleUnsolvableException pue) {
            throw pue;
        }
    } else {
        throw new PuzzleNotLoadedException();
    }
}

[Buggy Hunk]
resultBoard = new SudokuBoard(Solver.depthFirstSearch(loadedBoard));

[Patch]
resultBoard = Solver.depthFirstSearch(loadedBoard);

[Demonstration 2]

[Buggy Method]
@Override
public void solveLP() {
    solver.solve();
}

[Buggy Hunk]
solver.solve();

[Patch]
status = solver.solve();

[Demonstration 3]

[Buggy Method]
private List<MethodSpec> buildMethods(Class clazz) {
    final List<MethodSpec> methods = new ArrayList<>();
    for (Method method : clazz.getDeclaredMethods()) {
        final Class<?> returnType = method.getReturnType();
        final String returnTypeDefault = getDefaultValue(returnType.getSimpleName());
        final MethodSpec.Builder builder = MethodSpec.methodBuilder(method.getName()).addModifiers(Modifier.PUBLIC).returns(method.getReturnType());
        final boolean isStatic = java.lang.reflect.Modifier.isStatic(method.getModifiers());
        if (isStatic) {
            builder.addModifiers(Modifier.STATIC);
        }
        int parameterIndex = 0;
        String combinedParameters = "";
        String combinedParameterTypes = "";
        for (Class<?> parameterType : method.getParameterTypes()) {
            final String parameterName = "param" + parameterIndex;
            builder.addParameter(parameterType, parameterName);
            combinedParameters += ", " + parameterName;
            combinedParameterTypes += ", " + parameterType.getName() + ".class";
            parameterIndex++;
        }
        builder.addStatement("$T method = getMethod($S$N)", Method.class, method.getName(), combinedParameterTypes);
        final String instance = isStatic ? "null" : "mInstance";
        final boolean hasReturn = !returnType.getSimpleName().equals("void");
        if (hasReturn) {
            builder.addStatement("$T result = $N", returnType, returnTypeDefault).beginControlFlow("try").addStatement("result = ($T) method.invoke($N$N)", returnType, instance, combinedParameters).endControlFlow();
        } else {
            builder.beginControlFlow("try").addStatement("method.invoke($N$N)", instance, combinedParameters).endControlFlow();
        }
        builder.beginControlFlow("catch ($T e)", InvocationTargetException.class).addStatement("Throwable cause = e.getCause()");
        for (Class<?> exception : method.getExceptionTypes()) {
            builder.beginControlFlow("if (cause instanceof $T)", exception).addStatement("throw new $T(cause.getMessage())", exception).endControlFlow().addException(exception);
        }
        builder.endControlFlow();
        builder.beginControlFlow("catch ($T e)", IllegalAccessException.class).endControlFlow();
        if (hasReturn) {
            builder.addStatement("return result");
        }
        methods.add(builder.build());
    }
    return methods;
}

[Buggy Hunk]
combinedParameterTypes += ", " + parameterType.getName() + ".class";

[Patch]
combinedParameterTypes += ", " + parameterType.getSimpleName() + ".class";