[Demonstration 1]

[Buggy Method]
private void goToLastChild() {
    ArrayList<ThoughtNode> children = _curr.children;
    if (children.size() == 0) {
        if (getCurrentThought().equals("")) {
            growChild();
        }
        return;
    }
    if (_curr.lastVisitedChild != null) {
        _curr = _curr.lastVisitedChild;
    } else {
        _curr = children.get(0);
    }
}

[Buggy Hunk]
if(getCurrentThought().equals("")) {

[Patch]
if(!getCurrentThought().equals("")) {

[Demonstration 2]

[Buggy Method]
private static ResponseInfo updateClient(String clientId, JSONObject receivedData) throws IOException, Exception {
    ResponseInfo responseInfo = null;
    try {
        String requestUrl = ClientController.URL_QUERY_UPDATE_CLIENT + clientId;
        requestUrl = requestUrl.replace(ClientController.PARAM_CLIENT_ID, clientId);
        responseInfo = Util.sendRequest(Util.REQUEST_TYPE_PUT, requestUrl, receivedData, null);
        if (responseInfo.responseCode == 200) {
            responseInfo.output = receivedData.toString();
        }
        Util.processResponseMsg(responseInfo, "");
    } catch (Exception ex) {
        System.out.println("Exception: " + ex.toString());
    }
    return responseInfo;
}

[Buggy Hunk]
String requestUrl = ClientController.URL_QUERY_UPDATE_CLIENT + clientId;

[Patch]
String requestUrl = ClientController.URL_QUERY_UPDATE_CLIENT;

[Demonstration 3]

[Buggy Method]
static public Schedule createSchedule() {
    Schedule schedule = new Schedule();
    String[] daysOfTheWeek = new String[7];
    daysOfTheWeek[0] = "monday";
    daysOfTheWeek[1] = "tuesday";
    daysOfTheWeek[2] = "wednesday";
    daysOfTheWeek[3] = "thursday";
    daysOfTheWeek[4] = "friday";
    daysOfTheWeek[5] = "saturday";
    daysOfTheWeek[6] = "sunday";
    int i = 0;
    System.out.println("Please enter your working hours");
    while (i < 8) {
        try {
            String iDay = Scanner.getString("Enter your starting hour on " + daysOfTheWeek[i] + " (HH:mm): ");
            String fDay = Scanner.getString("Enter your finish hour on " + daysOfTheWeek[i] + " (HH:mm): ");
            schedule.setHoursPerDay(iDay, fDay, daysOfTheWeek[i]);
            i++;
        } catch (IllegalArgumentException exc) {
            System.out.println("Please enter the time in the following format (HH:mm)");
        }
    }
    return schedule;
}

[Buggy Hunk]
while (i < 8) {

[Patch]
while (i < 7) {