[Demonstration 1]

[Buggy Method]
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    Log.v("DB", "onUpgrade");
    db.execSQL("DROP TABLE IF EXISTS " + DATABASE_NAME);
    onCreate(db);
}

[Buggy Hunk]
Log.v("DB", "onUpgrade");

[Patch]
Log.v(TAG, "onUpgrade");

[Demonstration 2]

[Buggy Method]
private EngineValue createOutputValue(Object outputs, Field field) {
    Action.Output property = field.getAnnotation(Action.Output.class);
    AccessController.doPrivileged((PrivilegedAction) () -> {
        field.setAccessible(true);
        return null;
    });
    try {
        return valueBuilder.from(property.name(), property.contentType(), field.get(outputs));
    } catch (IllegalAccessException e) {
        throw new RuntimeException("Unable to get the value of the output for the field " + field.getName());
    }
}

[Buggy Hunk]
private EngineValue createOutputValue(Object outputs, Field field) {

[Patch]
public EngineValue createOutputValue(Object outputs, Field field) {

[Demonstration 3]

[Buggy Method]
public static void cloneMapValueToBean(Map<String, Object> m, Object bean, Map<String, Class> childDescriptor) {
    if (m == null) {
        throw new IllegalArgumentException();
    }
    List<Field> fields = getPrivateFields(bean.getClass());
    Map<String, Field> mapper = new HashMap<>();
    for (Field f : fields) {
        mapper.put(f.getName(), f);
    }
    for (Map.Entry<String, Object> entry : m.entrySet()) {
        String key = entry.getKey().contains("_") ? ReflectionUtil.getFieldNameByColumnName(entry.getKey()) : entry.getKey();
        Object value = entry.getValue();
        if (mapper.get(key) == null || value == null) {
            continue;
        }
        Field field = mapper.get(key);
        try {
            field.setAccessible(true);
            if (field.getType().equals(java.util.Date.class) && (value instanceof Long)) {
                field.set(bean, new java.util.Date((long) value));
            } else if (field.getType().equals(java.util.Date.class) && (value instanceof String)) {
                field.set(bean, DateUtil.parse(value.toString(), "yyyy-MM-dd HH:mm:ss"));
            } else if (field.getType().equals(java.lang.Integer.class)) {
                field.set(bean, Integer.valueOf(value.toString()));
            } else if ((field.getType().equals(java.lang.Double.class) || field.getType().equals(double.class))) {
                field.set(bean, Double.valueOf(value.toString()));
            } else if (field.getType().equals(java.lang.Float.class) || field.getType().equals(float.class)) {
                field.set(bean, Float.valueOf(value.toString()));
            } else if (null != childDescriptor && field.getType().isAssignableFrom(Collection.class) && entry.getValue() != null) {
                recursionSetChilds(entry, bean, field, childDescriptor);
            } else {
                field.set(bean, value);
            }
        } catch (IllegalAccessException e) {
            LOG.error("set value, fieldName:[{}]", e, field.getName());
        } catch (Exception e) {
            LOG.error("转型有问题, field name is:[{}]", e, field.getName());
        }
    }
}

[Buggy Hunk]
} else if (null != childDescriptor && field.getType().isAssignableFrom(Collection.class) && entry.getValue() != null) {

[Patch]
} else if (null != childDescriptor && Collection.class.isAssignableFrom(field.getType()) && entry.getValue() != null) {