[Demonstration 1]

[Buggy Method]
public synchronized void println(String s) {
    if (out == null)
        return;
    try {
        out.writeBytes(s + "\n");
        log.fine(name + " >>> " + s);
    } catch (IOException ex) {
        log.warning("Write failed: " + ex.toString());
        close();
    }
}

[Buggy Hunk]
public synchronized void println(String s) {

[Patch]
synchronized void println(String s) {

[Demonstration 2]

[Buggy Method]
public void releaseAllLocks() {
    jdbcTemplate.update(SQL_DELETE_ALL_MASTER);
}

[Buggy Hunk]
jdbcTemplate.update(SQL_DELETE_ALL_MASTER);

[Patch]
jdbcTemplate.update(SQL_TRUNCATE_LOCKS);

[Demonstration 3]

[Buggy Method]
@Override
public synchronized void onTaskFailure(long taskId) {
    for (Listener<T> l : mListeners) {
        l.onExchangeOutcome(taskId, true, null);
    }
    mTasks.remove(taskId);
}

[Buggy Hunk]
l.onExchangeOutcome(taskId, true, null);

[Patch]
l.onExchangeOutcome(taskId, false, null);