[Demonstration 1]

[Buggy Method]
protected void mkdir(final IFileSystem fs, final TCFFileStore fileStore, final DoneMkDir callback) {
    stat(fs, fileStore, new DoneStat() {

        @Override
        public void doneStat(IToken token, FileSystemException error, FileAttrs attrs) {
            if (error == null) {
                fileStore.setAttributes(attrs);
            }
            if (error == null && attrs.isDirectory()) {
                // Directory exists, ok.
                callback.doneMkDir(token, error);
            } else if (error != null && error.getStatus() != IFileSystem.STATUS_NO_SUCH_FILE) {
                // Error and file exists
                callback.doneMkDir(token, error);
            } else {
                // Directory does not exist
                final IFileStore parent = fShallow ? null : fileStore.getParent();
                if (parent instanceof TCFFileStore) {
                    mkdir(fs, (TCFFileStore) parent, new DoneMkDir() {

                        @Override
                        public void doneMkDir(IToken token, FileSystemException error) {
                            if (error != null) {
                                callback.doneMkDir(token, error);
                            } else {
                                fs.mkdir(fileStore.getPath().toString(), null, callback);
                            }
                        }
                    });
                } else {
                    fs.mkdir(fileStore.getPath().toString(), null, callback);
                }
            }
        }
    });
}

[Buggy Hunk]
callback.doneMkDir(token, error);

[Patch]
callback.doneMkDir(token, null);

[Demonstration 2]

[Buggy Method]
public void handleEvent(Event event) {
    GalleryItem item = (GalleryItem) event.item;
    GalleryItem parentItem = item.getParentItem();
    if (parentItem == null) {
        int index = gallery.indexOf(item);
        ItemGroup itemGroup = (ItemGroup) images.get(index);
        item.setText(itemGroup.getName());
        item.setData((Object) itemGroup);
        item.setItemCount(itemGroup.getChildCount());
    } else {
        int indexOf = parentItem.indexOf(item);
        ItemGroup ga = (ItemGroup) parentItem.getData();
        item.setItemCount(0);
        IImageEntry image = ga.getImage(indexOf);
        item.setText(image.getName());
        item.setData((Object) image);
    }
}

[Buggy Hunk]
ItemGroup itemGroup = (ItemGroup)images.get(index);

[Patch]
ItemGroup itemGroup = (ItemGroup)imageGroups.get(index);

[Demonstration 3]

[Buggy Method]
private int toInteger(JawaObjectRef o) throws JawascriptRuntimeException {
    if (o.object instanceof Double) {
        int magnitude = (int) (long) Math.floor(Math.abs((Double) o.object));
        int sign = ((Double) o.object) > 0 ? 1 : -1;
        return magnitude * sign;
    }
    throw new JawascriptRuntimeException("Not yet implemented conversion.");
}

[Buggy Hunk]
int sign = ((Double) o.object) > 0 ? 1 : -1;

[Patch]
int sign = ((Double) o.object) >= 0 ? 1 : -1;