[Demonstration 1]

[Buggy Method]
public void update(Observable thing, Object notificationNumber) {
    Menus menu = new Menus();
    Displays display = new Displays();
    Project myProject = new Project();
    if (registrationNumber.compareTo((Integer) notificationNumber) == 0) {
        addToReceiverList("ListProjectsComponent");
        signalReceivers("ListProjectsComponent");
        // Next we ask them to pick a project
        myProject = menu.pickProject(CommonData.theListOfProjects.getListOfProjects());
        if (myProject != null) {
            /*
				 * If the project is valid (exists in the list), then we display
				 * the resources that are assigned to it.
				 */
            display.displayResourcesAssignedToProject(myProject);
        } else {
            System.out.println("\n\n *** Project not found ***");
        }
    }
    removeFromReceiverList("ListProjectsComponent");
}

[Buggy Hunk]
display.displayResourcesAssignedToProject(myProject);

[Patch]
display.displayRoleAssignedToProjet(myProject, CommonData.theListOfResources.getListOfResources());

[Demonstration 2]

[Buggy Method]
public Long indexPicture(BufferedImage image, Long id, Map<String, String> properties) throws AlreadyIndexedException, NoValidPictureException, PictureTooHomogeneous {
    return index.addPicture(image, id, properties, config.getNumberOfPatch(), config.getResizeMethod(), config.getSizeOfPatchResizeWidth(), config.getSizeOfPatchResizeHeight(), config.isSyncAfterImage());
}

[Buggy Hunk]
properties,

[Patch]
new HashMap<String,String>(properties),

[Demonstration 3]

[Buggy Method]
@Override
public Cursor loadInBackground() {
    Cursor result = super.loadInBackground();
    if (!mEnableCapture || !MediaStoreCompat.hasCameraFeature(getContext())) {
        return result;
    }
    MatrixCursor dummy = new MatrixCursor(PROJECTION);
    dummy.addRow(new Object[] { Item.ITEM_ID_CAPTURE, Item.ITEM_DISPLAY_NAME_CAPTURE, "", 0 });
    return new MergeCursor(new Cursor[] { dummy, result });
}

[Buggy Hunk]
dummy.addRow(new Object[]{Item.ITEM_ID_CAPTURE, Item.ITEM_DISPLAY_NAME_CAPTURE, "", 0});

[Patch]
dummy.addRow(new Object[]{Item.ITEM_ID_CAPTURE, Item.ITEM_DISPLAY_NAME_CAPTURE, "", 0, 0});