Program: 56306
Project: 56306
Buggy source:
/** 
 * Builds a Router from an annotated Java Object
 */
public static Router from(Object... objs){
  Router router=new Router();
  for (  Object o : objs) {
    for (    final Method m : o.getClass().getMethods()) {
      Annotation[] annotations=m.getAnnotations();
      if (annotations == null) {
        continue;
      }
      Class[] paramTypes=m.getParameterTypes();
      int type=0;
      if (paramTypes != null) {
        if (paramTypes.length == 1 && paramTypes[0].equals(YokeRequest.class)) {
          type=1;
        }
        if (paramTypes.length == 2 && paramTypes[0].equals(YokeRequest.class) && paramTypes[0].equals(Handler.class)) {
          type=2;
        }
      }
      if (type == 0) {
        continue;
      }
      String path=getPath(o,m);
      for (      Annotation a : annotations) {
        if (a instanceof GET) {
          router.get(path,wrap(o,m,type == 1));
        }
        if (a instanceof PUT) {
          router.put(path,wrap(o,m,type == 1));
        }
        if (a instanceof POST) {
          router.post(path,wrap(o,m,type == 1));
        }
        if (a instanceof DELETE) {
          router.delete(path,wrap(o,m,type == 1));
        }
        if (a instanceof OPTIONS) {
          router.options(path,wrap(o,m,type == 1));
        }
        if (a instanceof HEAD) {
          router.head(path,wrap(o,m,type == 1));
        }
        if (a instanceof TRACE) {
          router.trace(path,wrap(o,m,type == 1));
        }
        if (a instanceof PATCH) {
          router.patch(path,wrap(o,m,type == 1));
        }
        if (a instanceof CONNECT) {
          router.connect(path,wrap(o,m,type == 1));
        }
        if (a instanceof ALL) {
          router.all(path,wrap(o,m,type == 1));
        }
      }
    }
  }
  return router;
}

Fixed version (ground truth):
/** 
 * Builds a Router from an annotated Java Object
 */
public static Router from(Object... objs){
  Router router=new Router();
  for (  Object o : objs) {
    for (    final Method m : o.getClass().getMethods()) {
      Annotation[] annotations=m.getAnnotations();
      if (annotations == null) {
        continue;
      }
      Class[] paramTypes=m.getParameterTypes();
      int type=0;
      if (paramTypes != null) {
        if (paramTypes.length == 1 && paramTypes[0].equals(YokeRequest.class)) {
          type=1;
        }
        if (paramTypes.length == 2 && paramTypes[0].equals(YokeRequest.class) && paramTypes[1].equals(Handler.class)) {
          type=2;
        }
      }
      if (type == 0) {
        continue;
      }
      String path=getPath(o,m);
      for (      Annotation a : annotations) {
        if (a instanceof GET) {
          router.get(path,wrap(o,m,type == 1));
        }
        if (a instanceof PUT) {
          router.put(path,wrap(o,m,type == 1));
        }
        if (a instanceof POST) {
          router.post(path,wrap(o,m,type == 1));
        }
        if (a instanceof DELETE) {
          router.delete(path,wrap(o,m,type == 1));
        }
        if (a instanceof OPTIONS) {
          router.options(path,wrap(o,m,type == 1));
        }
        if (a instanceof HEAD) {
          router.head(path,wrap(o,m,type == 1));
        }
        if (a instanceof TRACE) {
          router.trace(path,wrap(o,m,type == 1));
        }
        if (a instanceof PATCH) {
          router.patch(path,wrap(o,m,type == 1));
        }
        if (a instanceof CONNECT) {
          router.connect(path,wrap(o,m,type == 1));
        }
        if (a instanceof ALL) {
          router.all(path,wrap(o,m,type == 1));
        }
      }
    }
  }
  return router;
}