[Demonstration 1]

[Buggy Method]
@Override
public void removeEdge(int v1, int v2) {
    validateV(this, v1);
    validateV(this, v2);
    // Remove unidirectional adjacency
    super.adjs[v1].set(v2, false);
    this.ins[v2].set(v1, false);
}

[Buggy Hunk]
public void removeEdge(int v1, int v2) {

[Patch]
public synchronized void removeEdge(int v1, int v2) {

[Demonstration 2]

[Buggy Method]
public static boolean hasEdge(int v1, int v2) {
    /*
		 * An egde exists if only one bit differs, so we do this check by
		 * determing if their xor sum is a power of two.
		 */
    return ((v1 ^ v2) & ((v1 ^ v2) - 1)) == 0;
}

[Buggy Hunk]
return ((v1 ^ v2) & ((v1 ^ v2) - 1)) == 0;

[Patch]
return (v1 ^ v2) != 0 && ((v1 ^ v2) & ((v1 ^ v2) - 1)) == 0;

[Demonstration 3]

[Buggy Method]
@Test(expected = NullPointerException.class)
public void testNullMetadataObject() throws Exception {
    System.out.println("Test : Null metadata");
    MetadataUtils.getStatements(null);
    fail("This test is execpeted to throw an error");
}

[Buggy Hunk]
System.out.println("Test : Null metadata");

[Patch]
LOGGER.info("Test : Null metadata");