Program: 80325
Project: 80325
Buggy source:
public Object[] adapt(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,String[] pathArgs){
  Class<?>[] argTypes=method.getParameterTypes();
  Object[] args=new Object[argTypes.length];
  if (args.length != injs.length)   throw new IllegalArgumentException("String_Node_Str");
  AdaptorErrorContext errCtx=null;
  if (argTypes.length > 0) {
    if (AdaptorErrorContext.class.isAssignableFrom(argTypes[argTypes.length - 1]))     errCtx=(AdaptorErrorContext)Mirror.me(argTypes[argTypes.length - 1]).born(argTypes.length);
  }
  Object obj;
  try {
    obj=getReferObject(sc,req,resp,pathArgs);
  }
 catch (  Throwable e) {
    if (errCtx != null) {
      if (log.isInfoEnabled())       log.info("String_Node_Str");
      errCtx.setAdaptorError(e,this);
      args[args.length - 1]=errCtx;
      return args;
    }
    throw Lang.wrapThrow(e);
  }
  int len=Math.min(args.length,null == pathArgs ? 0 : pathArgs.length);
  for (int i=0; i < args.length; i++) {
    Object value=null;
    if (i < len) {
      value=null == pathArgs ? null : pathArgs[i];
    }
 else {
      value=obj;
    }
    try {
      args[i]=injs[i].get(sc,req,resp,value);
    }
 catch (    Throwable e) {
      if (errCtx != null)       errCtx.setError(i,e,method,value,injs[i]);
 else       throw Lang.wrapThrow(e);
    }
    if (args[i] == null && argTypes[i].isPrimitive()) {
      args[i]=Lang.getPrimitiveDefaultValue(argTypes[i]);
    }
  }
  if (errCtx == null)   return args;
  for (  Throwable err : errCtx.getErrors()) {
    if (err == null)     continue;
    int lastParam=argTypes.length - 1;
    if (AdaptorErrorContext.class.equals(argTypes[lastParam])) {
      if (log.isInfoEnabled())       log.info("String_Node_Str");
      args[lastParam]=errCtx;
      return args;
    }
    throw Lang.wrapThrow(err);
  }
  return args;
}

Fixed version (ground truth):
public Object[] adapt(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,String[] pathArgs){
  Object[] args=new Object[argTypes.length];
  if (args.length != injs.length)   throw new IllegalArgumentException("String_Node_Str");
  AdaptorErrorContext errCtx=null;
  if (argTypes.length > 0) {
    if (AdaptorErrorContext.class.isAssignableFrom(argTypes[argTypes.length - 1]))     errCtx=(AdaptorErrorContext)Mirror.me(argTypes[argTypes.length - 1]).born(argTypes.length);
  }
  Object obj;
  try {
    obj=getReferObject(sc,req,resp,pathArgs);
  }
 catch (  Throwable e) {
    if (errCtx != null) {
      if (log.isInfoEnabled())       log.info("String_Node_Str",e);
      errCtx.setAdaptorError(e,this);
      args[args.length - 1]=errCtx;
      return args;
    }
    throw Lang.wrapThrow(e);
  }
  int len=Math.min(args.length,null == pathArgs ? 0 : pathArgs.length);
  for (int i=0; i < args.length; i++) {
    Object value=null;
    if (i < len) {
      value=null == pathArgs ? null : pathArgs[i];
    }
 else {
      value=obj;
    }
    try {
      args[i]=injs[i].get(sc,req,resp,value);
    }
 catch (    Throwable e) {
      if (errCtx != null) {
        log.infof("String_Node_Str",method,i,e);
        errCtx.setError(i,e,method,value,injs[i]);
      }
 else       throw Lang.wrapThrow(e);
    }
    if (args[i] == null && argTypes[i].isPrimitive()) {
      args[i]=Lang.getPrimitiveDefaultValue(argTypes[i]);
    }
  }
  if (errCtx == null)   return args;
  for (  Throwable err : errCtx.getErrors()) {
    if (err == null)     continue;
    int lastParam=argTypes.length - 1;
    if (AdaptorErrorContext.class.equals(argTypes[lastParam])) {
      if (log.isInfoEnabled())       log.info("String_Node_Str");
      args[lastParam]=errCtx;
      return args;
    }
    throw Lang.wrapThrow(err);
  }
  return args;
}