[Demonstration 1]

[Buggy Method]
public void stopRecording() {
    if (activeRecorder != null)
        activeRecorder.stop();
    videoOverlay.setRecording(false);
}

[Buggy Hunk]
if (activeRecorder != null) activeRecorder.stop();

[Patch]
if (activeRecorder != null && activeRecorder.getIsRecording()) activeRecorder.stop();

[Demonstration 2]

[Buggy Method]
public static AceMethod parseMethodDeclaration(AceConfig aceConfig, Class<?> mapperInterface, SqlSessionFactory sqlSessionFactory, Method method) {
    Configuration config = sqlSessionFactory.getConfiguration();
    MapperMethod mapperMethod = new MapperMethod(mapperInterface, method, config);
    MapperMethod.SqlCommand command = new MapperMethod.SqlCommand(config, mapperInterface, method);
    MapperMethod.MethodSignature methodSignature = new MapperMethod.MethodSignature(config, mapperInterface, method);
    Optional<AceMethod> parsedMethod;
    if (methodSignature.getReturnType().equals(ChangeCollector.class)) {
        return new CollectorMethod(resolveChangeFunction(command.getType()), method, aceConfig);
    }
    if (command.getType() == SqlCommandType.SELECT) {
        parsedMethod = parseSelect(methodSignature, config, method, aceConfig);
    } else {
        parsedMethod = parseChange(methodSignature, method, aceConfig, command.getType());
    }
    return parsedMethod.orElse(new DelegateMethodImpl(mapperMethod));
}

[Buggy Hunk]
if (methodSignature.getReturnType().equals(ChangeCollector.class)) {

[Patch]
if (CHANGE_COMMANDS.contains(command.getType()) && methodSignature.getReturnType().equals(ChangeCollector.class)) {

[Demonstration 3]

[Buggy Method]
public void stopRecording() {
    mVideoRender.stopRecording();
}

[Buggy Hunk]
mVideoRender.stopRecording();

[Patch]
((VideoRecordRender) mBaseRender).stopRecording();