[Demonstration 1]

[Buggy Method]
private boolean isCore(Dependency left, Dependency right) {
    final String leftName = left.getFileName().toLowerCase();
    final String rightName = right.getFileName().toLowerCase();
    final boolean returnVal;
    if (rightName.contains("core") && !leftName.contains("core")) {
        returnVal = false;
    } else if (!rightName.contains("core") && leftName.contains("core")) {
        returnVal = true;
    } else {
        /*
             * considered splitting the names up and comparing the components,
             * but decided that the file name length should be sufficient as the
             * "core" component, if this follows a normal namming protocol should
             * be shorter:
             * axis2-saaj-1.4.1.jar
             * axis2-1.4.1.jar       <-----
             * axis2-kernal-1.4.1.jar
             */
        if (leftName.length() > rightName.length()) {
            returnVal = false;
        } else {
            returnVal = true;
        }
    }
    if (LogUtils.isVerboseLoggingEnabled()) {
        final String msg = String.format("IsCore=%s (%s, %s)", returnVal, left.getFileName(), right.getFileName());
        Logger.getLogger(DependencyBundlingAnalyzer.class.getName()).log(Level.FINE, "currentVersion and nextVersion are both null?");
    }
    return returnVal;
}

[Buggy Hunk]
Logger.getLogger(DependencyBundlingAnalyzer.class.getName()).log(Level.FINE, "currentVersion and nextVersion are both null?");

[Patch]
Logger.getLogger(DependencyBundlingAnalyzer.class.getName()).log(Level.FINE, msg);

[Demonstration 2]

[Buggy Method]
@Test
public void testImportWithMap() throws Exception {
    Configuration config = Configuration.fromJson("src/test/resources/test-config-with-map.json");
    config.getCsvOptions().setEscapeChar((char) 0);
    Importer importer = new Importer(config, 1);
    Connection connection = importer.createConnection();
    dropTableIfExists(connection);
    connection.createStatement().executeUpdate("create table companies_house_records (" + "id timestamp not null," + "company_name varchar(160)," + "company_number varchar(8)," + "generated_value varchar(8)" + ")");
    importer.performImport("src/test/resources/test-data.csv");
    List<Object[]> dataset = getExpectedDataset(false);
    List<Object[]> expectedData = new ArrayList<Object[]>();
    for (Object[] row : dataset) {
        expectedData.add(new Object[] { row[0].toString().toLowerCase(), row[1].toString(), StringUtils.reverse(row[1].toString()) });
        //  map function will call emit(nameValues) twice
        expectedData.add(new Object[] { row[0].toString().toLowerCase(), row[1].toString(), StringUtils.reverse(row[1].toString()) });
    }
    assertRecordCount(connection, expectedData, false);
    connection.close();
}

[Buggy Hunk]
Importer importer = new Importer(config, 1);

[Patch]
Importer importer = new Importer(config, 2);

[Demonstration 3]

[Buggy Method]
public static void main(String[] args) throws Exception {
    System.out.println(Lexer.lexFile("C:\\Users\\aaron\\Documents\\GitHub\\MiniJavac\\test\\input\\testcase82_04.java"));
}

[Buggy Hunk]
System.out.println(Lexer.lexFile("C:\\Users\\aaron\\Documents\\GitHub\\MiniJavac\\test\\input\\testcase82_04.java"));

[Patch]
System.out.println(Parser.parseFile("test/parser/input/testcase00_01.java"));