[Demonstration 1]

[Buggy Method]
public Observable<List<File>> asListObservable(Scheduler scheduler) {
    checkNotNull(mFileList, "the image list cannot be null, please call .load() before this method!");
    List<Observable<File>> observables = new ArrayList<>();
    for (File file : mFileList) {
        observables.add(Observable.just(file).map(new Func1<File, File>() {

            @Override
            public File call(File file) {
                return compressImage(gear, file);
            }
        }));
    }
    return Observable.zip(observables, new FuncN<List<File>>() {

        @Override
        public List<File> call(Object... args) {
            List<File> images = new ArrayList<>();
            for (Object o : args) {
                if (o instanceof File) {
                    images.add((File) o);
                }
            }
            return images;
        }
    }).subscribeOn(scheduler);
}

[Buggy Hunk]
}));

[Patch]
}).subscribeOn(scheduler));

[Demonstration 2]

[Buggy Method]
private boolean defaultCheckActionAfterCallNeeded() {
    if (botActionHistory != null) {
        String botLastAction = botActionHistory.get(botActionHistory.size() - 1);
        if (botLastAction.contains("call")) {
            return true;
        }
    }
    return false;
}

[Buggy Hunk]
if(botLastAction.contains("call")) {

[Patch]
if(botLastAction.contains("call") && !botIsButton) {

[Demonstration 3]

[Buggy Method]
@Test(expected = IllegalStateException.class)
public void shouldFailIfRootFlowDoesntExist() {
    ScreenConfiguration sc1 = new ScreenConfiguration("screen1", "controllerClass", "interfaceConstructor");
    ScreenConfiguration sc2 = new ScreenConfiguration("screen2", "controllerClass2", "interfaceConstructor2");
    ScreenConfiguration sc3 = new ScreenConfiguration("screen3", "controllerClass", "interfaceConstructor2");
    tested.addScreenConfiguration(sc1);
    tested.addScreenConfiguration(sc2);
    tested.addScreenConfiguration(sc3);
    FlowDefinition flowDefinition = new FlowDefinition("flow1", newArrayList("screen1", "screen2"));
    tested.addFlowDefinition(flowDefinition);
    fail();
}

[Buggy Hunk]
FlowDefinition flowDefinition = new FlowDefinition("flow1", newArrayList("screen1", "screen2"));

[Patch]
FlowDefinition flowDefinition = new FlowDefinition("flow1", Optional.<String>absent(), newArrayList("screen1", "screen2"));