[Demonstration 1]

[Buggy Method]
public void changeParamObject(Integer testID) {
    Test test = (Test) HibernateUtil.get(Test.class, testID, getCurrentSession());
    paramObject = test.getParamObject();
}

[Buggy Hunk]
Test test = (Test) HibernateUtil.get(Test.class, testID, getCurrentSession());

[Patch]
Test test = (Test) HibernateUtil.get(Test.class, testID);

[Demonstration 2]

[Buggy Method]
@Test
public void multiple4Mbwrites() throws IOException {
    Assume.assumeTrue(testsEnabled);
    String filename = directory + "/" + "Sdk.multiple4Mbwrites.txt";
    // do three 4mb writes
    ADLFileInfo f = client.getFileInfo(filename);
    byte[] contents = HelperUtils.getRandom4mbBuffer();
    OutputStream out = f.createFromStream(true);
    ByteArrayOutputStream bos = new ByteArrayOutputStream(contents.length * 3);
    for (int i = 0; i < 3; i++) {
        out.write(contents);
        bos.write(contents);
    }
    out.close();
    bos.close();
    byte[] b1 = bos.toByteArray();
    // read file contents
    InputStream in = f.getReadStream();
    // double the size, to account for possible bloat due to bug in upload
    byte[] b2 = new byte[b1.length * 2];
    int bytesRead;
    int count = 0;
    while ((bytesRead = in.read(b2, count, b2.length - count)) >= 0 && count <= b2.length) {
        count += bytesRead;
    }
    // verify what was read is identical to what was written
    assertTrue("file length should match what was written", b1.length == count);
    byte[] b3 = Arrays.copyOfRange(b2, 0, count);
    assertTrue("file contents should match", Arrays.equals(b1, b3));
}

[Buggy Hunk]
Assume.assumeTrue(testsEnabled);

[Patch]
Assume.assumeTrue(false);

[Demonstration 3]

[Buggy Method]
@Override
public void dumbTo(StringBuffer compound) {
    compound.append("");
}

[Buggy Hunk]
compound.append("");

[Patch]
super.dumbTo(compound);