[Demonstration 1]

[Buggy Method]
private void createReminderService() {
    Intent intent = new Intent(MainActivity.this, ReminderService.class);
    intent.putExtra("Task", tasks);
    ServiceConnection mConnection = new ServiceConnection() {

        @Override
        public void onServiceConnected(ComponentName name, IBinder service) {
            mReminder = ((ReminderService.ReminderBinder) service).getService();
        }

        @Override
        public void onServiceDisconnected(ComponentName name) {
        }
    };
    bindService(intent, mConnection, BIND_AUTO_CREATE);
    startService(intent);
}

[Buggy Hunk]
ServiceConnection mConnection = new ServiceConnection() {

[Patch]
mConnection = new ServiceConnection() {

[Demonstration 2]

[Buggy Method]
@Override
public boolean prepareNewConnection() {
    return this.mConnection.updateState();
}

[Buggy Hunk]
return this.mConnection.updateState();

[Patch]
return mConnection.updateState();

[Demonstration 3]

[Buggy Method]
public static <T extends Annotation> Optional<T> getTypeAnnotation(Class<T> annotationClass, MethodInvocationContext mic) {
    log.trace("getTypeAnnotation()");
    Method method = mic.getMethod();
    Class<?> type = method.getDeclaringClass();
    log.debug("Type class: {}", type.getName());
    return getOptionalAnnotation(annotationClass, method);
}

[Buggy Hunk]
return getOptionalAnnotation(annotationClass, method);

[Patch]
return getOptionalAnnotation(annotationClass, type);