[Demonstration 1]

[Buggy Method]
private static HTableDescriptor buildGiraffaTable(GiraffaConfiguration conf) throws IOException {
    String tableName = getGiraffaTableName(conf);
    HTableDescriptor htd = new HTableDescriptor(TableName.valueOf(tableName));
    htd.addFamily(new HColumnDescriptor(FileField.getFileAttributes()));
    htd.addFamily(new HColumnDescriptor(FileField.getFileExtenedAttributes()));
    String coprocClass = conf.get(GRFA_COPROCESSOR_KEY, GRFA_COPROCESSOR_DEFAULT);
    htd.addCoprocessor(coprocClass, null, Coprocessor.PRIORITY_SYSTEM, null);
    LOG.info("Block management processor is set to: " + coprocClass);
    String nsProcClass = conf.get(GRFA_NAMESPACE_PROCESSOR_KEY, GRFA_NAMESPACE_PROCESSOR_DEFAULT);
    htd.addCoprocessor(nsProcClass, null, Coprocessor.PRIORITY_SYSTEM, null);
    LOG.info("Namespace processor is set to: " + nsProcClass);
    return htd;
}

[Buggy Hunk]
htd.addFamily(new HColumnDescriptor(FileField.getFileExtenedAttributes()));

[Patch]
htd.addFamily(new HColumnDescriptor(FileField.getFileExtendedAttributes()));

[Demonstration 2]

[Buggy Method]
public void runAndOutput() {
    ensureCTreeList();
    if (cTreeList.size() == 0) {
        if (projectDirString != null) {
            output = projectDirString;
        } else if (output != null) {
            LOG.warn("no --project given; using --output");
            projectDirString = output;
        } else {
            LOG.warn("No --project or --output; running help");
            printHelp();
            return;
        }
        LOG.trace("treating as CTree creation under project " + projectDirString);
        runRunMethodsOnChosenArgOptions();
    } else {
        for (int i = 0; i < cTreeList.size(); i++) {
            currentCTree = cTreeList.get(i);
            coreLog.info("running: " + currentCTree.getDirectory());
            cTreeLog = currentCTree.getOrCreateCTreeLog(this, logfileName);
            TREE_LOG().info("TEST LOG");
            currentCTree.ensureContentProcessor(this);
            try {
                runInitMethodsOnChosenArgOptions();
                runRunMethodsOnChosenArgOptions();
                runOutputMethodsOnChosenArgOptions();
                if (cTreeLog != null) {
                    cTreeLog.writeLog();
                }
            } catch (Exception e) {
                coreLog.error("error in running, terminated: " + e);
                continue;
            }
            if (i % 10 == 0)
                System.out.print(".");
            LOG.trace(coreLog.toXML());
        }
    }
    runFinalMethodsOnChosenArgOptions();
    writeLog();
}

[Buggy Hunk]
TREE_LOG().info("TEST LOG");

[Patch]
TREE_LOG().info("TEST LOG "+this.hashCode());

[Demonstration 3]

[Buggy Method]
public void waitForLayout(long timeout) throws Throwable {
    waitForLayout(timeout * (mDebug ? 10000 : 1), TimeUnit.SECONDS);
}

[Buggy Hunk]
waitForLayout(timeout * (mDebug ? 10000 : 1), TimeUnit.SECONDS);

[Patch]
waitForLayout(timeout * (mDebug ? 10000 : 1), TimeUnit.SECONDS, true);