[Demonstration 1]

[Buggy Method]
@Override
@WebMethod
public int[][] getRecDate() {
    return recordDAO.getRecordDate();
}

[Buggy Hunk]
public int[][] getRecDate() {

[Patch]
public String[][] getRecDate() {

[Demonstration 2]

[Buggy Method]
public void run() {
    String message;
    while (!this.stopFlag.getFlag()) {
        Calendar cal = Calendar.getInstance();
        SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
        try {
            if (this.in.ready()) {
                message = this.in.readLine();
                String intro = "\n>>>>>> " + languagesController.getWord("RECEIVED_AT") + " " + sdf.format(cal.getTime()) + "\n";
                if (mh.isTerminationMessage(message)) {
                    this.stop();
                } else if (mh.isFileTransmission(message)) {
                    try {
                        int i;
                        String[] messageParts = mh.getContentFromMessage(message);
                        message = intro + mh.messageToFile(messageParts[1], messageParts[2], this.chatManager.getSavedFilesDirectory()) + "\n";
                        this.chatManager.receivedFile(((i = messageParts[1].lastIndexOf(File.separator)) > 0) ? messageParts[1].substring(i + 1) : messageParts[1]);
                    } catch (IOException e) {
                        message = e.getMessage();
                    }
                } else {
                    message = intro + message + "\n";
                }
                this.chatManager.receivedMessage(message);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    try {
        this.in.close();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

[Buggy Hunk]
this.chatManager.receivedFile(((i = messageParts[1].lastIndexOf(File.separator)) > 0) ? messageParts[1].substring(i+1) : messageParts[1]);

[Patch]
this.chatManager.receivedFile(((i = messageParts[1].lastIndexOf(File.separator.replace("\\", "\\\\"))) > 0) ? messageParts[1].substring(i+1) : messageParts[1]);

[Demonstration 3]

[Buggy Method]
public Integer getMenuChoice(List<Integer> options) {
    int choice = validateChoice();
    if (options.contains(choice)) {
        return choice;
    }
    return null;
}

[Buggy Hunk]
int choice =  validateChoice();

[Patch]
Integer choice =  validateChoice();