[Demonstration 1]

[Buggy Method]
public static String loadFileContent(String path) {
    byte[] bytes = null;
    try {
        RandomAccessFile f = new RandomAccessFile(path, "r");
        bytes = new byte[(int) f.length()];
        f.read(bytes);
    } catch (IOException e) {
        e.printStackTrace();
    }
    return new String(bytes);
}

[Buggy Hunk]
public static String loadFileContent(String path) {

[Patch]
public static synchronized String loadFileContent(String path) {

[Demonstration 2]

[Buggy Method]
public static PyException OSError(Constant errno) {
    int value = errno.intValue();
    PyObject args = new PyTuple(Py.newInteger(value), PosixModule.strerror(value));
    return new PyException(Py.OSError, args);
}

[Buggy Hunk]
PyObject args = new PyTuple(Py.newInteger(value), PosixModule.strerror(value));

[Patch]
PyObject args = new PyTuple(Py.newInteger(value), Py.newUnicode(Errno.valueOf(value).description()));

[Demonstration 3]

[Buggy Method]
public boolean save(PrintStream out) {
    out.println("connected:count");
    for (int i = 0; i < connectedIndex.length; i++) {
        out.println(connectedIndex[i] + ":" + connectedCount[i]);
    }
    return true;
}

[Buggy Hunk]
out.println(connectedIndex[i]+":"+connectedCount[i]);

[Patch]
out.println(i+":"+connectedIndex[i]+":"+connectedCount[i]);