[Demonstration 1]

[Buggy Method]
public String getFlights(String from, String to, String date, int tickets) throws InterruptedException, ExecutionException, TimeoutException {
    executor = Executors.newFixedThreadPool(4);
    List listAirline = af.getActiveAirlines();
    System.out.println("number of airlines in the database: " + listAirline.size());
    List<Future> futures = new ArrayList();
    for (Object a : listAirline) {
        AirlineEntity ae = (AirlineEntity) a;
        Callable c = new SearchCaller(ae.getUrl(), from, to, date, tickets);
        Future<String> fut = executor.submit(c);
        futures.add(fut);
    }
    int countResults = 0;
    for (Future<String> future : futures) {
        String tmp = future.get(5, TimeUnit.DAYS);
        if (tmp.length() > 1) {
            sb.append(future.get(5, TimeUnit.SECONDS));
            sb.append(",\n");
        }
    }
    String result = sb.toString();
    if (result.endsWith(",\n")) {
        result = result.substring(0, result.lastIndexOf(","));
    }
    result = "[\n" + result + "\n]";
    return result;
}

[Buggy Hunk]
if (tmp.length() > 1) {

[Patch]
if (tmp.length() < 1) {

[Demonstration 2]

[Buggy Method]
public boolean takeBackBorrowable(Medium toTake) {
    try {
        tryIncrementStock(toTake);
        log.createEntry(Event.SUCCESSFUL_HANDBACK, toTake);
        return true;
    } catch (LibraryException le) {
        LIBLOG.log(Level.SEVERE, le.getMessage(), le);
    }
    return true;
}

[Buggy Hunk]
LIBLOG.log(Level.SEVERE, le.getMessage(), le);

[Patch]
LOGGER.log(Level.SEVERE, le.getMessage(), le);

[Demonstration 3]

[Buggy Method]
public void start() {
    gameTime.schedule(play, 5000, 5000);
}

[Buggy Hunk]
gameTime.schedule(play, 5000, 5000);

[Patch]
gameTime.schedule(test, 5000, 5000);