[Demonstration 1]

[Buggy Method]
private static Options createOptions() {
    final Options options = new Options();
    options.addOption("dir", true, "analysis result direcotry");
    options.addOption("host", false, "host for mongod instance");
    return options;
}

[Buggy Hunk]
options.addOption("host", false, "host for mongod instance");

[Patch]
options.addOption("h", true, "host for mongod instance");

[Demonstration 2]

[Buggy Method]
public Home loginOtherUser(String userName, String password) {
    Home homePage;
    try {
        DriverManager.getInstance().setUpdateWait(TIME_WAIT_DURATION);
        homePage = new Home();
        homePage = verifyCorrectUser(userName, password, homePage);
        homePage.clickHomeLink();
    } catch (WebDriverException e) {
        LOGGER.error("WebDriverException");
        LOGGER.error(e.getMessage());
        DriverManager.getInstance().getDriver().get(URL);
        homePage = loginAs(userName, password);
    } finally {
        DriverManager.getInstance().backPreviousWait();
    }
    return homePage;
}

[Buggy Hunk]
LOGGER.error(e.getMessage());

[Patch]
LOGGER.info(e);

[Demonstration 3]

[Buggy Method]
public static void main(String[] args) throws Exception {
    ObjectLockTest t = new ObjectLockTest();
    Thread r1 = new Thread() {

        @Override
        public void run() {
            t.test1();
        }
    };
    Thread r2 = new Thread() {

        @Override
        public void run() {
            try {
                t.test2();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    };
    Thread r3 = new Thread() {

        @Override
        public void run() {
            try {
                t.test3();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    };
    Thread r4 = new Thread() {

        @Override
        public void run() {
            t.test4();
        }
    };
    r2.start();
    r3.start();
    Thread.sleep(3000);
    r1.start();
    r4.start();
}

[Buggy Hunk]
ObjectLockTest t = new ObjectLockTest();

[Patch]
final ObjectLockTest t = new ObjectLockTest();