Program: 36660
Project: 36660
Buggy source:
private Response forward(Context ctx,List<Extension> exts){
  Matcher m;
  for (  Extension ext : exts) {
    if (ext.getRequestMethod() != null && ext.getRequestMethod() != ctx.getRequest().getRequestMethod()) {
      continue;
    }
    if (ext.getPattern() == null) {
      m=null;
    }
 else     if (!(m=ext.getPattern().matcher(ctx.getRequest().getPath())).matches()) {
      continue;
    }
    if (ext.getRoute() != null) {
      Route route=ext.getRoute();
      Object[] args=new Object[route.getParameters().size() + 1];
      args[0]=ctx;
      for (int i=1; i < args.length; i++) {
        RouteParameter mp=route.getParameters().get(i - 1);
        if (mp.getType() == RouteParameter.ParameterType.CAPTURE_GROUP) {
          args[i]=mp.cast(m.group(mp.getCaptureGroup()));
        }
 else {
          args[i]=mp.cast();
        }
      }
      try {
        Response resp=(Response)route.getMethod().invoke(null,args);
        if (resp != null) {
          return resp;
        }
      }
 catch (      IllegalAccessException|IllegalArgumentException|InvocationTargetException ex) {
        log.catching(ex);
        Throwable cause=ex.getCause();
        if (cause == null) {
          return DefaultController.exception(ctx,ex);
        }
 else         if (cause instanceof Exception) {
          return DefaultController.exception(ctx,(Exception)cause);
        }
 else {
          return DefaultController.exception(ctx,ex);
        }
      }
    }
 else     if (ext.getNodes() != null && !ext.getNodes().isEmpty()) {
      Response resp=(Response)forward(ctx,ext.getNodes());
      if (resp != null) {
        return resp;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
private Response forward(Context ctx,List<Extension> exts) throws RoutesMapException {
  if (exts == null) {
    throw new RoutesMapException("String_Node_Str");
  }
  Matcher m;
  for (  Extension ext : exts) {
    if (ext.getRequestMethod() != null && ext.getRequestMethod() != ctx.getRequest().getRequestMethod()) {
      continue;
    }
    if (ext.getPattern() == null) {
      m=null;
    }
 else     if (!(m=ext.getPattern().matcher(ctx.getRequest().getPath())).matches()) {
      continue;
    }
    if (ext.getRoute() != null) {
      Route route=ext.getRoute();
      Object[] args=new Object[route.getParameters().size() + 1];
      args[0]=ctx;
      for (int i=1; i < args.length; i++) {
        RouteParameter mp=route.getParameters().get(i - 1);
        if (mp.getType() == RouteParameter.ParameterType.CAPTURE_GROUP) {
          args[i]=mp.cast(m.group(mp.getCaptureGroup()));
        }
 else {
          args[i]=mp.cast();
        }
      }
      try {
        Response resp=(Response)route.getMethod().invoke(null,args);
        if (resp != null) {
          return resp;
        }
      }
 catch (      IllegalAccessException|IllegalArgumentException|InvocationTargetException ex) {
        log.catching(ex);
        Throwable cause=ex.getCause();
        if (cause == null) {
          return DefaultController.exception(ctx,ex);
        }
 else         if (cause instanceof Exception) {
          return DefaultController.exception(ctx,(Exception)cause);
        }
 else {
          return DefaultController.exception(ctx,ex);
        }
      }
    }
 else     if (ext.getNodes() != null && !ext.getNodes().isEmpty()) {
      Response resp=(Response)forward(ctx,ext.getNodes());
      if (resp != null) {
        return resp;
      }
    }
  }
  return null;
}