[Demonstration 1]

[Buggy Method]
private void mousePressed(final MouseState mouseState) {
    refresh = true;
    taskManager.update(new Callable<Object>() {

        @Override
        public Object call() {
            if (zoomLock)
                return null;
            System.out.println("OPERATION: " + operation);
            if (operation == Operation.SELECT || operation == Operation.RESIZE || operation == Operation.ROTATE || operation == Operation.DRAW_ROOF_GABLE) {
                if (selectedHousePart == null || selectedHousePart.isDrawCompleted()) {
                    final HousePart previousSelectedHousePart = selectedHousePart;
                    final PickedHousePart selectHousePart = SelectUtil.selectHousePart(mouseState.getX(), mouseState.getY(), true);
                    final UserData pick = selectHousePart == null ? null : selectHousePart.getUserData();
                    if (pick == null)
                        selectedHousePart = null;
                    else
                        selectedHousePart = pick.getHousePart();
                    if (selectedHousePart != null && selectedHousePart.isFrozen())
                        selectedHousePart = null;
                    System.out.println("Clicked on: " + pick);
                    if (pick != null && pick.isEditPoint()) {
                        cameraControl.setLeftMouseButtonEnabled(false);
                    }
                    if (operation == Operation.RESIZE && selectedHousePart != null) {
                        if (!(selectedHousePart instanceof Foundation)) {
                            selectedHousePart.setEditPointsVisible(false);
                            selectedHousePart = selectedHousePart.getTopContainer();
                        }
                    }
                    if (selectedHousePart instanceof Window || selectedHousePart instanceof Tree || selectedHousePart instanceof Foundation) {
                        cameraControl.setLeftMouseButtonEnabled(false);
                        houseMoveStartPoint = selectHousePart.getPoint().clone();
                        collisionLand.setTranslation(0, 0, houseMoveStartPoint.getZ());
                        final ArrayList<Vector3> points = selectedHousePart.getPoints();
                        houseMovePoints = new ArrayList<Vector3>(points.size());
                        for (final Vector3 p : points) houseMovePoints.add(p.clone());
                    }
                    if (previousSelectedHousePart != null && previousSelectedHousePart != selectedHousePart) {
                        previousSelectedHousePart.setEditPointsVisible(false);
                        previousSelectedHousePart.setGridsVisible(false);
                    }
                    if (selectedHousePart != null && !PrintController.getInstance().isPrintPreview()) {
                        selectedHousePart.setEditPointsVisible(true);
                        if (pick.isEditPoint() && pick.getIndex() != -1 || operation == Operation.RESIZE || selectedHousePart instanceof Window || selectedHousePart instanceof Tree || selectedHousePart instanceof Foundation) {
                            selectedHousePart.setGridsVisible(true);
                            if (selectedHousePart instanceof Foundation)
                                editHousePartCommand = new EditFoundationCommand((Foundation) selectedHousePart, !pick.isEditPoint());
                            else
                                editHousePartCommand = new EditPartCommand(selectedHousePart);
                        }
                    }
                    SelectUtil.nextPickLayer();
                    if (operation == Operation.DRAW_ROOF_GABLE && selectedHousePart instanceof Roof) {
                        System.out.println(selectedHousePart);
                        System.out.println("deleting roof #" + pick.getIndex());
                        final int roofPartIndex = pick.getIndex();
                        final Roof roof = (Roof) selectedHousePart;
                        roof.setGable(roofPartIndex, true, undoManager);
                    }
                }
            } else {
                selectedHousePart.addPoint(mouseState.getX(), mouseState.getY());
            }
            return null;
        }
    });
}

[Buggy Hunk]
if (previousSelectedHousePart != null && previousSelectedHousePart != selectedHousePart) {

[Patch]
if (previousSelectedHousePart != null && previousSelectedHousePart != selectedHousePart && operation != Operation.RESIZE) {

[Demonstration 2]

[Buggy Method]
public static Map<String, String> getObjectDumpedCollections(File... files) {
    Map<String, String> map = new HashMap<String, String>(files.length);
    for (File file : files) {
        if (file.isDirectory())
            getObjectDumpedCollectionsInDirectory(file, map);
        else if (isExportedObjectCollection(file.getName()))
            map.put(timExportedObjectCollectionFileName(file.getName()), file.getAbsolutePath());
    }
    return map;
}

[Buggy Hunk]
else if (isExportedObjectCollection(file.getName())) map.put(timExportedObjectCollectionFileName(file.getName()), file.getAbsolutePath());

[Patch]
else if (isExportedObjectCollection(file.getName())) map.put(trimExportedObjectCollectionFileName(file.getName()), file.getAbsolutePath());

[Demonstration 3]

[Buggy Method]
public List<Item> getCurrentActivities() throws IOException {
    List<Item> items = new ArrayList<Item>();
    Document document = Jsoup.connect(ENDPOINT).userAgent(Playground.class.getName()).get();
    Element activityStream = document.body().getElementById("activitylist");
    for (Element node : activityStream.children()) {
        //This is an unnecessary UI component
        if (node.id().equals("olderactivity")) {
            continue;
        }
        Item current = new Item();
        current.setLink(extractLink(node));
        current.setTitle(extractTitle(node));
        current.setDescription(extractDescription(node));
        items.add(current);
    }
    return items;
}

[Buggy Hunk]
.userAgent(Playground.class.getName()).get();

[Patch]
.userAgent(getClass().getName()).get();