[Demonstration 1]

[Buggy Method]
private Class<?> resolveConcreteReturnType() {
    Class<?> type = this.method.getReturnType();
    Type genericType = this.method.getGenericReturnType();
    if (Iterable.class.isAssignableFrom(type)) {
        if (genericType instanceof ParameterizedType) {
            ParameterizedType returnType = (ParameterizedType) genericType;
            Type componentType = returnType.getActualTypeArguments()[0];
            if (componentType instanceof TypeVariable) {
                return this.getDomainClass();
            }
            return componentType instanceof ParameterizedType ? (Class<?>) ((ParameterizedType) componentType).getRawType() : (Class<?>) componentType;
        } else {
            return Object.class;
        }
    }
    return type;
}

[Buggy Hunk]
private Class<?> resolveConcreteReturnType() {

[Patch]
Class<?> resolveConcreteReturnType() {

[Demonstration 2]

[Buggy Method]
public GroupElement getLinearizedLink() {
    double[] values = new double[] { 1, -v[3], -v[6], v[3], 1, -v[7], v[6], v[7], 1, v[0], v[1], v[2], v[1], v[4], v[5], v[2], v[5], v[8] };
    return new SU3GroupElement(values);
}

[Buggy Hunk]
double[] values = new double[]{1,-v[3],-v[6],v[3],1,-v[7],v[6],v[7],1,v[0],v[1],v[2],v[1],v[4],v[5],v[2],v[5],v[8]};

[Patch]
double[] values = new double[]{1,v[3],v[6],-v[3],1,v[7],-v[6],-v[7],1,v[0],v[1],v[2],v[1],v[4],v[5],v[2],v[5],v[8]};

[Demonstration 3]

[Buggy Method]
public synchronized Type loadType(Class type) throws Exception {
    return indexer.loadType(type);
}

[Buggy Hunk]
public synchronized Type loadType(Class type) throws Exception {

[Patch]
public Type loadType(Class type) throws Exception {