[Demonstration 1]

[Buggy Method]
private void compilePropertyAccess(Expr<TypedPlan> expr, TypedPlan instance, GenericClass cls, String propertyName) {
    GenericField field = navigator.getField(cls, propertyName);
    boolean isStatic = instance == null;
    if (field != null) {
        if (isStatic == field.getDescriber().isStatic()) {
            expr.setAttribute(new TypedPlan(new FieldPlan(instance != null ? instance.plan : null, field.getDescriber().getOwner().getName(), field.getDescriber().getName(), "()" + typeToString(field.getDescriber().getRawType())), field.getActualType()));
            return;
        } else {
            error(expr, "Field " + propertyName + " should " + (!isStatic ? "not " : "") + "be static");
        }
    } else {
        GenericMethod getter = findGetter(cls, propertyName);
        if (getter != null) {
            if (isStatic == getter.getDescriber().isStatic()) {
                String desc = "()" + typeToString(getter.getDescriber().getRawReturnType());
                expr.setAttribute(new TypedPlan(new InvocationPlan(getter.getDescriber().getOwner().getName(), getter.getDescriber().getName(), desc, instance != null ? instance.plan : null), getter.getActualReturnType()));
                return;
            } else {
                error(expr, "Method " + getter.getDescriber().getName() + " should " + (!isStatic ? "not " : "") + "be static");
            }
        } else {
            if (instance.plan instanceof ThisPlan) {
                error(expr, "Variable " + propertyName + " was not found");
            } else {
                error(expr, "Property " + propertyName + " was not found");
            }
        }
    }
    expr.setAttribute(new TypedPlan(new ConstantPlan(null), nullTypeRef));
}

[Buggy Hunk]
"()" + typeToString(field.getDescriber().getRawType())), field.getActualType()));

[Patch]
typeToString(field.getDescriber().getRawType())), field.getActualType()));

[Demonstration 2]

[Buggy Method]
void assignConfiguration(Object obj, Field field, Map<String, String> contextOverrides) throws Exception {
    Configuration configuration = field.getAnnotation(Configuration.class);
    String configurationName = configuration.value();
    ConfigurationKey key = new ConfigurationKey(configurationName, KeyParser.parse(configurationName, contextOverrides));
    Object value = null;
    boolean has = configurationProvider.has(key);
    if (has) {
        try {
            if (Supplier.class.isAssignableFrom(field.getType())) {
                ParameterizedType type = (ParameterizedType) field.getGenericType();
                Type actualType = type.getActualTypeArguments()[0];
                Class<?> actualClass;
                if (actualType instanceof Class) {
                    actualClass = (Class<?>) actualType;
                } else if (actualType instanceof ParameterizedType) {
                    actualClass = (Class<?>) ((ParameterizedType) actualType).getRawType();
                } else {
                    throw new UnsupportedOperationException("Supplier parameter type " + actualType + " not supported (" + field.getName() + ")");
                }
                Supplier<?> current = LifecycleMethods.fieldGet(field, obj);
                value = getConfigurationSupplier(field, key, actualClass, current);
                if (value == null) {
                    log.error("Field type not supported: " + actualClass + " (" + field.getName() + ")");
                    field = null;
                }
            } else if (Property.class.isAssignableFrom(field.getType())) {
                ParameterizedType type = (ParameterizedType) field.getGenericType();
                Type actualType = type.getActualTypeArguments()[0];
                Class<?> actualClass;
                if (actualType instanceof Class) {
                    actualClass = (Class<?>) actualType;
                } else if (actualType instanceof ParameterizedType) {
                    actualClass = (Class<?>) ((ParameterizedType) actualType).getRawType();
                } else {
                    throw new UnsupportedOperationException("Supplier parameter type " + actualType + " not supported (" + field.getName() + ")");
                }
                Property<?> current = LifecycleMethods.fieldGet(field, obj);
                value = getConfigurationProperty(field, key, actualClass, current);
                if (value == null) {
                    log.error("Field type not supported: " + actualClass + " (" + field.getName() + ")");
                    field = null;
                }
            } else {
                Supplier<?> supplier = getConfigurationSupplier(field, key, field.getType(), Suppliers.ofInstance(LifecycleMethods.fieldGet(field, obj)));
                if (supplier == null) {
                    log.error("Field type not supported: " + field.getType() + " (" + field.getName() + ")");
                    field = null;
                } else {
                    value = supplier.get();
                }
            }
        } catch (IllegalArgumentException e) {
            ignoreTypeMismtachIfConfigured(configuration, configurationName, e);
            field = null;
        }
        //            catch ( ConversionException e )
        //            {
        //                ignoreTypeMismtachIfConfigured(configuration, configurationName, e);
        //                field = null;
        //            }
    }
    if (field != null) {
        String defaultValue;
        if (Supplier.class.isAssignableFrom(field.getType())) {
            Supplier<?> supplier = LifecycleMethods.fieldGet(field, obj);
            defaultValue = String.valueOf(supplier.get());
        } else {
            defaultValue = String.valueOf(LifecycleMethods.fieldGet(field, obj));
        }
        String documentationValue;
        if (has) {
            LifecycleMethods.fieldSet(field, obj, value);
            documentationValue = String.valueOf(value);
            if (Supplier.class.isAssignableFrom(field.getType())) {
                documentationValue = String.valueOf(((Supplier<?>) value).get());
            } else {
                documentationValue = String.valueOf(documentationValue);
            }
        } else {
            documentationValue = "";
        }
        configurationDocumentation.registerConfiguration(field, configurationName, has, defaultValue, documentationValue, configuration.documentation());
    }
}

[Buggy Hunk]
defaultValue = String.valueOf(LifecycleMethods.fieldGet(field, obj));

[Patch]
defaultValue = String.valueOf((Object)LifecycleMethods.fieldGet(field, obj));

[Demonstration 3]

[Buggy Method]
private void oldStyleListFilter() {
    List<Integer> filterable = getIntegers();
    List<Integer> filtered = new ArrayList<>();
    for (int element : filterable) {
        if (element % 2 == 0) {
            filtered.add(element);
        }
    }
    System.out.println(filtered);
}

[Buggy Hunk]
for (int element : filterable) {

[Patch]
for (Integer element : filterable) {