[Demonstration 1]

[Buggy Method]
public String getResponseMessage() {
    return responseMessage;
}

[Buggy Hunk]
public String getResponseMessage() {

[Patch]
public final String getResponseMessage() {

[Demonstration 2]

[Buggy Method]
private void generateTextFields() {
    for (int y = 0; y < size; y++) {
        for (int x = 0; x < size; x++) {
            JTextField textField = new JTextField();
            textField.addKeyListener(new CellKeyListener(this));
            cellTextFieldListeners[y][x] = new CellTextFieldListener(c, textField, y, x);
            textField.getDocument().addDocumentListener(cellTextFieldListeners[y][x]);
            textFieldCoordinates.put(textField, new Point(x, y));
            textFields[y][x] = textField;
        }
    }
    for (int y = 0; y < size; y++) {
        for (int x = 0; x < size; x++) {
            JTextField textField = textFields[y][x];
            int cageID;
            int topBorderWidth;
            int leftBorderWidth;
            int bottomBorderWidth;
            int rightBorderWidth;
            if (y == 0) {
                topBorderWidth = cageBorderWidth;
                if (cageCells[y][x] == cageCells[y + 1][x]) {
                    bottomBorderWidth = cellBorderWidth;
                } else {
                    bottomBorderWidth = cageBorderWidth;
                }
            } else if (y == size - 1) {
                bottomBorderWidth = cageBorderWidth;
                if (cageCells[y][x] == cageCells[y - 1][x]) {
                    topBorderWidth = cellBorderWidth;
                } else {
                    topBorderWidth = cageBorderWidth;
                }
            } else {
                if (cageCells[y][x] == cageCells[y + 1][x]) {
                    bottomBorderWidth = cellBorderWidth;
                } else {
                    bottomBorderWidth = cageBorderWidth;
                }
                if (cageCells[y][x] == cageCells[y - 1][x]) {
                    topBorderWidth = cellBorderWidth;
                } else {
                    topBorderWidth = cageBorderWidth;
                }
            }
            if (x == 0) {
                leftBorderWidth = cageBorderWidth;
                if (cageCells[y][x] == cageCells[y][x + 1]) {
                    rightBorderWidth = cellBorderWidth;
                } else {
                    rightBorderWidth = cageBorderWidth;
                }
            } else if (x == size - 1) {
                rightBorderWidth = cageBorderWidth;
                if (cageCells[y][x] == cageCells[y][x - 1]) {
                    leftBorderWidth = cellBorderWidth;
                } else {
                    leftBorderWidth = cageBorderWidth;
                }
            } else {
                if (cageCells[y][x] == cageCells[y][x + 1]) {
                    rightBorderWidth = cellBorderWidth;
                } else {
                    rightBorderWidth = cageBorderWidth;
                }
                if (cageCells[y][x] == cageCells[y][x - 1]) {
                    leftBorderWidth = cellBorderWidth;
                } else {
                    leftBorderWidth = cageBorderWidth;
                }
            }
            cageID = grid[y][x].getCageID();
            textField.setToolTipText(cages[cageID].getObjective());
            textField.setBorder(BorderFactory.createMatteBorder(topBorderWidth, leftBorderWidth, bottomBorderWidth, rightBorderWidth, Color.BLACK));
            textField.setFont(FONT);
            textField.setHorizontalAlignment(JTextField.CENTER);
            textField.setPreferredSize(new Dimension(cellSize, cellSize));
            JPopupMenu popupMenu = new JPopupMenu();
            for (int i = 0; i <= size; i++) {
                JMenuItem menuItem = new JMenuItem("" + i);
                popupMenu.add(menuItem);
                menuItem.addActionListener(new PopupMenuListener(textField, i));
            }
            textField.add(popupMenu);
            textField.setComponentPopupMenu(popupMenu);
        }
    }
    for (int y = 0; y < size; y++) {
        for (int x = 0; x < size; x++) {
            this.add(textFields[y][x]);
        }
    }
}

[Buggy Hunk]
for (int i = 0; i <= size; i++)

[Patch]
for (int i = 1; i <= size; i++)

[Demonstration 3]

[Buggy Method]
private static void createReservation(int i) {
    CoralAPISynchronized instance = apiPool.getConnection(member);
    try {
        Date resStartDate = new Date(stringToDate(reservationStart).getTime() + (30 * 1000 * i * 60));
        String resStart = dateToAdapterString(resStartDate);
        System.out.println("Oiaiu-Creating Reservation " + resStart);
        instance.createNewReservation(member, member, project, machine, resStart, 30);
    } catch (Exception ex) {
        System.out.println("Oiaiu-Create Reservation FAILED");
        ex.printStackTrace();
        Logger.getLogger(StressTestApi.class.getName()).log(Level.SEVERE, "Failed to create reservation", ex);
    }
}

[Buggy Hunk]
private static void createReservation(int i) {

[Patch]
private static void createReservation(int i) throws CoralConnectionException {