[Demonstration 1]

[Buggy Method]
public void climberTest() {
    timer.start();
    while ((int) timer.get() < seconds) {
        climber.updateSpeed(new double[] { 0.0, 0.2, 0.0 });
        Thread.sleep(seconds / 6 * 1000);
        climber.updateSpeed(new double[] { 0.0, 0.6, 0.0 });
        Thread.sleep(seconds / 6 * 1000);
        climber.updateSpeed(new double[] { 0.0, 0.8, 0.0 });
        Thread.sleep(seconds / 6 * 1000);
        climber.updateSpeed(new double[] { 0.0, 0.6, 0.0 });
    }
}

[Buggy Hunk]
public void climberTest(){

[Patch]
public void climberTest() throws InterruptedException{

[Demonstration 2]

[Buggy Method]
private IRegion evaluateReplaceRange(Program root, NamespaceDeclaration namespace) {
    List<UseStatement> imports = root.getUseStatements(namespace);
    if (!imports.isEmpty()) {
        UseStatement first = imports.get(0);
        UseStatement last = imports.get(imports.size() - 1);
        int startPos = first.getStart();
        int endPos = root.getExtendedStartPosition(last) + root.getExtendedLength(last);
        int endLine = root.getLineNumber(endPos);
        if (endLine > 0) {
            int nextLinePos = getPosition(root, endLine + 1);
            if (nextLinePos >= 0) {
                int firstStatementPos = getFirstStatementBeginPos(root, namespace);
                if (firstStatementPos != -1 && firstStatementPos < nextLinePos) {
                    endPos = firstStatementPos;
                } else {
                    endPos = nextLinePos;
                }
            }
        }
        return new Region(startPos, endPos - startPos);
    } else {
        int start = getNamespaceNameEndPos(root, namespace);
        return new Region(start, 0);
    }
}

[Buggy Hunk]
int startPos = first.getStart();

[Patch]
int startPos = getUseStatementStart(namespace, first);

[Demonstration 3]

[Buggy Method]
@Override
public void run() {
    Stopwatch timer = new Stopwatch();
    timer.start();
    log.info("Timer task started at:" + new Date());
    AdvancedLdapGroupUserSyncCount advancedLdapGroupUserSyncCount = new AdvancedLdapGroupUserSyncCount();
    this.advancedLdapUserManager.loadGroups(advancedLdapGroupUserSyncCount);
    log.info("Timer task ended at: " + new Date());
    timer.stop();
    log.info("Timer task duration: " + timer);
    advancedLdapGroupUserSyncCount.print();
}

[Buggy Hunk]
Stopwatch timer = new Stopwatch();

[Patch]
Stopwatch timer = Stopwatch.createUnstarted();