[Demonstration 1]

[Buggy Method]
public List<Map<String, String>> getContactsList() {
    Uri uri = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;
    String[] projection = null;
    String selection = null;
    Map<String, String> itemList = new HashMap<>();
    String[] selectionArgs = null;
    String sortOrder = null;
    itemList.put("id", ContactsContract.CommonDataKinds.Phone.CONTACT_ID);
    itemList.put("name", ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME);
    itemList.put("number", ContactsContract.CommonDataKinds.Phone.NUMBER);
    return Util.ContentResolverSearch(contentResolver, uri, projection, itemList, selection, selectionArgs, sortOrder);
}

[Buggy Hunk]
String sortOrder = null;

[Patch]
String sortOrder = ContactsContract.CommonDataKinds.Phone.CONTACT_ID;

[Demonstration 2]

[Buggy Method]
public Entry getEntry(String entryId) {
    Cursor cursor = SQLdb.query(ENTRIES_TABLE, ENTRIES_TABLE_COLUMNS, "?=?", new String[] { ENTRIES_TABLE_COL_ID, entryId }, null, null, null);
    cursor.moveToFirst();
    String authorName = cursor.getString(1);
    String title = cursor.getString(2);
    String content = cursor.getString(3);
    Date publishDate = new Date(cursor.getLong(4));
    Date lastUpdated = new Date(cursor.getLong(5));
    cursor.close();
    ArrayList<String> categories = getCategories(entryId);
    String bloggerLink = getBloggerLink(entryId);
    return new Entry(entryId, publishDate, lastUpdated, categories, authorName, bloggerLink, title, content);
}

[Buggy Hunk]
"?=?", new String[] {ENTRIES_TABLE_COL_ID, entryId}, null, null, null);

[Patch]
ENTRIES_TABLE_COL_ID + "=?", new String[] {entryId}, null, null, null);

[Demonstration 3]

[Buggy Method]
@Test
public void testCaulk() {
    int choice = 2;
    Player player = new Player();
    Party party = new Party();
    River river = new River();
    river.crossRiver(choice, player, party);
    Assert.assertEquals(caulkRiver(player, party), river.crossRiver(choice, player, party));
}

[Buggy Hunk]
Assert.assertEquals(caulkRiver(player, party), river.crossRiver(choice, player, party));

[Patch]
Assert.assertEquals(river.caulkRiver(player, party), river.crossRiver(choice, player, party));