[Demonstration 1]

[Buggy Method]
@Test
public void tryIt() throws FileNotFoundException, XMLStreamException {
    EcrfAnalysisApplication app = new EcrfAnalysisApplication(TEST_ECRF, CSV_OUT);
    List<String> patients = Lists.newArrayList();
    List<String> fields = Lists.newArrayList();
    app.generateCsv(patients, fields);
}

[Buggy Hunk]
public void tryIt() throws FileNotFoundException, XMLStreamException {

[Patch]
public void tryIt() throws IOException, XMLStreamException {

[Demonstration 2]

[Buggy Method]
@Override
public void run() {
    int dayOfWeek;
    // check config on day
    switch(fire.get(Calendar.DAY_OF_WEEK)) {
        case Calendar.MONDAY:
            dayOfWeek = 1;
            break;
        case Calendar.TUESDAY:
            dayOfWeek = 2;
            break;
        case Calendar.WEDNESDAY:
            dayOfWeek = 3;
            break;
        case Calendar.THURSDAY:
            dayOfWeek = 4;
            break;
        case Calendar.FRIDAY:
            dayOfWeek = 5;
            break;
        case Calendar.SATURDAY:
            dayOfWeek = 6;
            break;
        case Calendar.SUNDAY:
            dayOfWeek = 0;
            break;
        default:
            dayOfWeek = 0;
    }
    File day = new File(path + "/day" + (dayOfWeek));
    if (day.exists()) {
        TouchDaemon.LOGGER.log(Level.INFO, day.getName() + " exists. Loading...");
        loadToServer(day);
        TouchDaemon.LOGGER.log(Level.INFO, "Day " + day.getName() + " uploaded.");
    } else {
        TouchDaemon.LOGGER.log(Level.INFO, day.getName() + " not exists.");
    }
    TouchDaemon.LOGGER.log(Level.INFO, "Waiting for the next upload...\n");
}

[Buggy Hunk]
switch (fire.get(Calendar.DAY_OF_WEEK)) {

[Patch]
switch (Calendar.getInstance().get(Calendar.DAY_OF_WEEK)) {

[Demonstration 3]

[Buggy Method]
public Set<Class<?>> getTypesAnnotatedWith(final Annotation annotation, boolean honorInherited) {
    Iterable<String> annotated = store.get(index(TypeAnnotationsScanner.class), annotation.annotationType().getName());
    Iterable<Class<?>> filter = filter(forNames(annotated, loaders()), withAnnotation(annotation));
    Iterable<String> classes = getAllAnnotated(names(filter), annotation.annotationType().isAnnotationPresent(Inherited.class), honorInherited);
    return Sets.newHashSet(concat(filter, forNames(filter(classes, not(in(Sets.newHashSet(annotated)))))));
}

[Buggy Hunk]
return Sets.newHashSet(concat(filter, forNames(filter(classes, not(in(Sets.newHashSet(annotated)))))));

[Patch]
return Sets.newHashSet(concat(filter, forNames(filter(classes, not(in(Sets.newHashSet(annotated)))), loaders())));