[Demonstration 1]

[Buggy Method]
private HashMap<String, Annotation> processOWLSTC(String owlstcDirectory) {
    System.out.println("Processing OWLS-TC through the default pipeline");
    long startTime = System.nanoTime();
    HashMap<String, Annotation> result = new HashMap<>();
    File directory = new File(getClass().getResource(owlstcDirectory).getFile());
    Collection<File> files = FileUtils.listFiles(directory, OWLSExtractor.EXTENSIONS, false);
    for (File file : files) {
        Annotation current = new Annotation(OWLSExtractor.getTextDescription(file));
        pipeline.annotate(current);
        result.put(file.getName(), current);
        System.out.println("File annotated : " + file.getName());
    }
    long endTime = System.nanoTime();
    System.out.println("Processing complete in " + (endTime - startTime) / 1000000 + " Milliseconds");
    return result;
}

[Buggy Hunk]
File directory = new File(getClass().getResource(owlstcDirectory).getFile());

[Patch]
File directory = new File(owlstcDirectory);

[Demonstration 2]

[Buggy Method]
public static <T extends Index> Finder<T> finder(Class<T> from, Consumer<XContentBuilder> consumer) {
    Finder<T> finder = new Finder(from, client.getClient(), client.indexName());
    XContentBuilder builder = null;
    try {
        builder = jsonBuilder().startObject();
        builder.startObject(finder.getType());
        consumer.accept(builder);
        builder.endObject();
        builder.endObject();
        finder.setMapping(builder);
    } catch (IOException e) {
        e.printStackTrace();
    }
    return finder;
}

[Buggy Hunk]
public static <T extends Index> Finder<T> finder(Class<T> from, Consumer<XContentBuilder> consumer) {

[Patch]
public static <T extends Indexable> Finder<T> finder(Class<T> from, Consumer<XContentBuilder> consumer) {

[Demonstration 3]

[Buggy Method]
public Object[] formatRow(Object[] arrString) {
    ArrayList<Object> sl = new ArrayList<Object>();
    if (arrString != null) {
        for (int i = 0; i < arrString.length; i++) {
            if (isNumeric(arrString[i]))
                sl.add(arrString[i]);
            else
                sl.add("\"" + arrString[i] + "\"");
        }
    }
    return sl.toArray(new String[sl.size()]);
}

[Buggy Hunk]
if(isNumeric(arrString[i])) sl.add(arrString[i]);

[Patch]
if(isNumeric(arrString[i].toString())) sl.add(arrString[i]);