[Demonstration 1]

[Buggy Method]
public static void main(String[] args) {
    Foo foo = (Foo) Proxy.newProxyInstance(Foo.class.getClassLoader(), new Class[] { FooImpl.class }, new FooInvocationHandler(new FooImpl()));
    foo.fooDo();
}

[Buggy Hunk]
new Class[] {FooImpl.class},

[Patch]
new Class[] {Foo.class},

[Demonstration 2]

[Buggy Method]
private void createBenchmarkProxy() {
    Class<?> beanType = bean.getClass();
    Object newBean = bean;
    bean = Proxy.newProxyInstance(beanType.getClassLoader(), beanType.getInterfaces(), new InvocationHandler() {

        @Override
        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
            Method m = beanType.getMethod(method.getName(), method.getParameterTypes());
            if (m.isAnnotationPresent(Benchmark.class)) {
                Long start = System.nanoTime();
                Object result = method.invoke(newBean, args);
                Long stop = System.nanoTime();
                System.out.println("Duration: " + (stop - start));
                return result;
            } else {
                return method.invoke(bean, args);
            }
        }
    });
}

[Buggy Hunk]
return method.invoke(bean, args);

[Patch]
return method.invoke(newBean, args);

[Demonstration 3]

[Buggy Method]
public static String getNetmaskStringForm(int prefix) throws KuraException {
    if (prefix >= 0 && prefix <= 32) {
        int mask = ~((1 << 32 - prefix) - 1);
        return dottedQuad(mask);
    } else {
        throw new KuraException(KuraErrorCode.INTERNAL_ERROR, "invalid prefix ");
    }
}

[Buggy Hunk]
if (prefix >= 0 && prefix <= 32) {

[Patch]
if (prefix >= 1 && prefix <= 32) {