[Demonstration 1]

[Buggy Method]
public void writeFunction(String funcName, String nLocals) {
    try {
        writeComment("function " + funcName + " " + nLocals);
        // (funcName)
        out.write("(" + funcName + ")");
        out.newLine();
        // repeat nLocals times : push 0
        // n = nLocals
        out.write("@" + nLocals);
        out.newLine();
        out.write("D = A");
        out.newLine();
        out.write("@n");
        out.newLine();
        out.write("M = D");
        out.newLine();
        // while(n > 0)
        out.write("(LOOP" + i + ")");
        out.newLine();
        out.write("@n");
        out.newLine();
        out.write("D = M");
        out.newLine();
        out.write("@END_LOOP" + i);
        out.newLine();
        out.write("D;JLE");
        out.newLine();
        // push 0
        writePushPop("C_PUSH", "constant", "0");
        // n--
        out.write("@n");
        out.newLine();
        out.write("M = M - 1");
        out.newLine();
        // goto LOOP
        out.write("@LOOP" + i);
        out.newLine();
        out.write("0;JMP");
        out.newLine();
        // (END_LOOPi)
        out.write("(END_LOOP" + i + ")");
        out.newLine();
        i++;
    } catch (IOException e) {
        System.out.println(e);
    }
}

[Buggy Hunk]
out.write("(" + funcName + ")");

[Patch]
out.write("(" + funcName.toUpperCase() + ")");

[Demonstration 2]

[Buggy Method]
public static void main(String[] args) throws Exception {
    Socket socket = new Socket("localhost", 57123);
    Scanner input = new Scanner(System.in);
    while (true) {
        System.out.println("Pick Rock, Paper, Scissors");
        String inputString = input.next();
        PrintWriter writer = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));
        writer.println(inputString);
        writer.flush();
        BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
        String serverSays = reader.readLine();
        System.out.println("Server said: " + serverSays);
        if (serverSays.equals("Server Stopped") || serverSays.contains("Winner")) {
            input.close();
            writer.close();
            socket.close();
            return;
        }
    }
}

[Buggy Hunk]
if (serverSays.equals("Server Stopped") || serverSays.contains("Winner"))

[Patch]
if (serverSays.equals("Server Stopped"))

[Demonstration 3]

[Buggy Method]
public static Result service(String ownerName, String projectName, String service, boolean isAdvertise) throws IOException, UnsupportedOperationException, ServletException {
    if (!isSupportedService(service)) {
        return forbidden(String.format("Unsupported service: '%s'", service));
    }
    Project project = Project.findByOwnerAndProjectName(ownerName, projectName);
    if (project == null) {
        return notFound();
    }
    models.User user = UserApp.currentUser();
    if (!isAllowed(project, service)) {
        if (user.isAnonymous()) {
            return BasicAuthAction.unauthorized(response());
        } else {
            // If you want the Git client showing your custom message to
            // the user, the Content-Type should be exact "text/plain"
            // without any parameter. For more details, see the code at
            // https://github.com/git/git/commit/426e70d4a11ce3b4f70636d57c6a0ab16ae08a00#diff-eea0ad565ec5903a11b6023755d491cfR154
            response().setHeader("Content-Type", "text/plain");
            return forbidden(String.format("'%s' has no permission to '%s/%s'.", user.name, ownerName, projectName));
        }
    }
    if (isAdvertise) {
        return ok(RepositoryService.gitAdvertise(project, service, response()));
    } else {
        if (request().body().isMaxSizeExceeded()) {
            return status(REQUEST_ENTITY_TOO_LARGE);
        } else {
            user.visits(project);
            return ok(RepositoryService.gitRpc(project, service, request(), response()));
        }
    }
}

[Buggy Hunk]
user.name, ownerName, projectName));

[Patch]
user.loginId, ownerName, projectName));