[Demonstration 1]

[Buggy Method]
public static String readFile(File file) throws IOException {
    StringBuilder text = new StringBuilder();
    BufferedReader reader = new BufferedReader(new FileReader(file.getPath()));
    try {
        String line = null;
        while ((line = reader.readLine()) != null) {
            text.append(line + System.getProperty("line.separator"));
        }
    } finally {
        reader.close();
    }
    return text.toString().replaceAll("\n", System.getProperty("line.separator"));
}

[Buggy Hunk]
return text.toString().replaceAll("\n", System.getProperty("line.separator"));

[Patch]
return text.toString();

[Demonstration 2]

[Buggy Method]
private void assign(ArrayList<String> people) {
    int done = 0;
    String one, two;
    ArrayList<String> tempParticipants = new ArrayList<>(participants);
    while (participants.size() > 0 && done <= numParticipants) {
        one = participants.get(0);
        participants.remove(one);
        two = people.get(0);
        people.remove(two);
        while (one == two) {
            people.add(two);
            two = people.get(0);
            people.remove(two);
        }
        assignments.add(one + " -> " + two + ".");
        done++;
        if (participants.size() == 0) {
            for (String assignment : assignments) {
                String[] ppl = assignment.split(" -> ");
                if (!checkValid(ppl[0], ppl[2].split(".")[0])) {
                    participants = new ArrayList<>(tempParticipants);
                    assignments = new ArrayList<>();
                    done = 0;
                    break;
                }
            }
        }
    }
}

[Buggy Hunk]
if (!checkValid(ppl[0], ppl[2].split(".")[0])) {

[Patch]
if (!checkValid(ppl[0], ppl[1].replace(".", ""))) {

[Demonstration 3]

[Buggy Method]
public boolean remainder() {
    if (one % two > 0) {
        return false;
    } else {
        return true;
    }
}

[Buggy Hunk]
if(one % two > 0)

[Patch]
if((one % two) * (two % one) > 0)