[Demonstration 1]

[Buggy Method]
public static OutputValue[] analyzeBG(InputReading[] readings, int bgrangelow, int bgrangehigh, Date starttime, Date endtime) {
    List<OutputValue> output = new ArrayList<>();
    for (int hour = 0; hour <= 24; hour++) {
        List<Integer> bg = new ArrayList<>();
        for (InputReading reading : readings) {
            if (isInTimeRange(reading.time, starttime, endtime) && isInHour(reading.time, hour)) {
                bg.add(reading.reading);
            } else {
                continue;
            }
        }
        if (!bg.isEmpty())
            output.add(computeOutputValue(bg, hour, bgrangelow, bgrangehigh));
        else
            System.out.println("There are no readings for hour " + hour);
    }
    return output.toArray(new OutputValue[output.size()]);
}

[Buggy Hunk]
for (int hour = 0; hour <= 24; hour++)

[Patch]
for (int hour = 0; hour < 24; hour++)

[Demonstration 2]

[Buggy Method]
private static int daysOfMonth(int year, int month) throws Exception {
    if (month < 1) {
        throw new IllegalArgumentException("Month cannot be < 1");
    }
    int februaryDays = isLeapYear(year) ? 29 : 28;
    return (month == 2) ? februaryDays : maxMonthDays[month - 1];
}

[Buggy Hunk]
return (month == 2) ? februaryDays : maxMonthDays[month - 1];

[Patch]
return (month == 2) ? februaryDays : maxMonthDays[month];

[Demonstration 3]

[Buggy Method]
public static int sumThreeAndFiveBelow(int input) {
    int sum = 0;
    for (int i = 0; i < input; i++) {
        if (i % 3 == 0 || i % 5 == 0) {
            sum += i;
        }
    }
    return sum;
}

[Buggy Hunk]
public static int sumThreeAndFiveBelow(int input) {

[Patch]
public int sumThreeAndFiveBelow(int input) {