[Demonstration 1]

[Buggy Method]
@Override
public PageOutput open(final TaskSource taskSource, final Schema inputSchema, final Schema outputSchema, final PageOutput output) {
    final PluginTask task = taskSource.loadTask(PluginTask.class);
    final Map<String, Base58Column> base58ColumnMap = convertBase58ColumnListToMap(task.getColumns());
    final Map<String, Column> outputColumnMap = convertColumnListToMap(outputSchema.getColumns());
    return new PageOutput() {

        private PageReader reader = new PageReader(inputSchema);

        private PageBuilder builder = new PageBuilder(Exec.getBufferAllocator(), outputSchema, output);

        @Override
        public void add(Page page) {
            reader.setPage(page);
            while (reader.nextRecord()) {
                setValue(base58ColumnMap, outputColumnMap, reader, outputSchema, builder);
                builder.addRecord();
            }
        }

        @Override
        public void finish() {
            builder.finish();
        }

        @Override
        public void close() {
            builder.close();
        }
    };
}

[Buggy Hunk]
final Map<String, Base58Column> base58ColumnMap = convertBase58ColumnListToMap(task.getColumns());

[Patch]
final Map<String, List<Base58Column>> base58ColumnMap = convertBase58ColumnListToMap(task.getColumns());

[Demonstration 2]

[Buggy Method]
public static String printConfigHighlight(String filename, String type) {
    StringBuilder sb = new StringBuilder();
    File f = new File(filename);
    try {
        Scanner fileScanner = new Scanner(f);
        String currentLine = null;
        while (fileScanner.hasNext()) {
            currentLine = StringEscapeUtils.escapeHtml(fileScanner.nextLine());
            if (currentLine.length() >= 1) {
                if (currentLine.trim().charAt(0) == '#') {
                    sb.append("<font color=\"#929492\">" + currentLine + "</font>");
                    sb.append("</br>");
                } else if (currentLine.trim().matches("}")) {
                    sb.append("<b>" + currentLine + "</b>");
                    sb.append("</br>");
                } else if (BaculaParser.findName(type, currentLine)) {
                    sb.append("</br>");
                    sb.append("<b>" + currentLine + "</b>");
                    sb.append("</br>");
                } else {
                    String[] parts = currentLine.split("=");
                    sb.append("&nbsp;&nbsp;<i>" + parts[0] + "</i>");
                    if (parts.length > 1) {
                        if (parts[1].contains("#")) {
                            String[] commentParts = parts[1].split("#");
                            sb.append("<font color=\"#333\">" + " = " + commentParts[0] + "</font>");
                            if (commentParts.length > 1) {
                                sb.append("<font color=\"#929492\">" + " # " + commentParts[1] + "</font>");
                            } else {
                                sb.append("<font color=\"#929492\">" + " # " + "</font>");
                            }
                        } else {
                            sb.append("<font color=\"#333\">" + " = " + parts[1] + "</font>");
                        }
                    }
                    sb.append("</br>");
                }
            }
        }
        fileScanner.close();
    } catch (FileNotFoundException e) {
        e.printStackTrace();
    }
    return sb.toString();
}

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

[Patch]
if(currentLine.trim().length() >= 1){

[Demonstration 3]

[Buggy Method]
@SuppressWarnings("WeakerAccess")
public void flush() {
    // optimal short-circuit if we can
    if (this.closed || this.current == 0) {
        return;
    }
    // synchronize with the add method
    BulkOperation bulkOperation;
    synchronized (BulkOperator.this) {
        bulkOperation = this.operation.build();
        this.current = 0;
        this.operation = BulkOperation.builder();
    }
    try {
        // throttle concurrency
        this.mutex.acquire();
    } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
    }
    // create a new identifier for this execution
    long bulkId = IDENTIFIERS.incrementAndGet();
    // create request listeners and convert the payload to a HttpEntity as JSON
    ResponseListener responseListener = new BulkResponseListener(bulkId, bulkOperation);
    HttpEntity entity = new NStringEntity(bulkOperation.payload(), ContentType.APPLICATION_JSON);
    // notify before listener and begin async request
    this.lifecycle().beforeBulk(bulkId, this, bulkOperation);
    this.client().performRequestAsync("POST", "/_bulk", EMPTY_MAP, entity, responseListener, ND_JSON_HEADER);
}

[Buggy Hunk]
this.operation = BulkOperation.builder();

[Patch]
this.operation.actions(Collections.<BulkAction>emptyList());