Program: 84905
Project: 84905
Buggy source:
@Override public String processCall(String payload) throws SerializationException {
  String responsePayload=null;
  RPCRequest rpcRequest=null;
  Object targetObject=null;
  if (responsePayload == null) {
    try {
      rpcRequest=RPC.decodeRequest(payload,null,this);
    }
 catch (    NullPointerException ex) {
      Log LOG=LogFactory.getLog(GWTServlet.class);
      LOG.info("String_Node_Str");
      throw new RuntimeException("String_Node_Str");
    }
  }
  Object retval=null;
  if (responsePayload == null) {
    try {
      targetObject=retrieveTargetObject(this.getThreadLocalRequest());
      if (targetObject == null) {
        Log log=LogFactory.getLog(GWTServlet.class);
        log.info("String_Node_Str");
        throw new RuntimeException("String_Node_Str");
      }
      Method method=rpcRequest.getMethod();
      Object[] params=rpcRequest.getParameters();
      Method targetMethod=findTargetMethod(targetObject,method,params);
      Class<?> methodParameterTypes[]=method.getParameterTypes();
      Class<?> targetMethodParameterTypes[]=targetMethod.getParameterTypes();
      UserServerContext userContext=null;
      if (authApiProvider_ != null) {
        HttpSession session=getThreadLocalRequest().getSession(false);
        Object o=session.getAttribute("String_Node_Str");
        if (o == null) {
          userContext=authApiProvider_.getAnonimousContext();
        }
 else {
          if (o instanceof UserServerContext) {
            userContext=(UserServerContext)o;
          }
 else           if (o instanceof String) {
            userContext=authApiProvider_.findContextById((String)o);
          }
 else {
            throw new RuntimeException("String_Node_Str");
          }
        }
      }
      Object[] targetParams;
      int copyOffset=0;
      boolean copy=false;
      boolean eraseIdParam=false;
      int userIdParamIndex=-1;
      UserIdParameter uidAnn=targetMethod.getAnnotation(UserIdParameter.class);
      if (uidAnn != null) {
        userIdParamIndex=uidAnn.value();
      }
      if (targetMethodParameterTypes.length > methodParameterTypes.length) {
        targetParams=new Object[targetMethodParameterTypes.length];
        copy=true;
        copyOffset=1;
        if (authApiProvider_ != null) {
          targetParams[0]=userContext;
        }
 else {
          throw new RuntimeException("String_Node_Str" + targetMethod.toString());
        }
      }
 else       if (targetMethodParameterTypes.length == methodParameterTypes.length) {
        if (inputParametersReplicator_ != null) {
          targetParams=new Object[targetMethodParameterTypes.length];
          copy=true;
        }
 else {
          copy=false;
          targetParams=params;
        }
      }
 else       if (targetMethodParameterTypes.length < methodParameterTypes.length) {
        targetParams=new Object[targetMethodParameterTypes.length];
        copy=true;
        eraseIdParam=true;
      }
 else {
        throw new IllegalStateException("String_Node_Str");
      }
      if (copy) {
        if (inputParametersReplicator_ != null) {
          for (int i=copyOffset; i < targetMethodParameterTypes.length; ++i) {
            if (i - copyOffset == userIdParamIndex) {
              if (!eraseIdParam) {
                Object o=params[i - copyOffset];
                if (o != null) {
                  targetParams[i]=authApiProvider_.findContextById(o.toString());
                }
 else {
                  targetParams[i]=authApiProvider_.getAnonimousContext();
                }
                continue;
              }
 else {
                --copyOffset;
              }
            }
            targetParams[i]=inputParametersReplicator_.replicateBean(params[i - copyOffset]);
          }
        }
 else {
          for (int i=copyOffset; i < targetMethodParameterTypes.length; ++i) {
            if (i - copyOffset == userIdParamIndex) {
              if (!eraseIdParam) {
                Object o=params[i - copyOffset];
                if (o != null) {
                  targetParams[i]=authApiProvider_.findContextById(o.toString());
                }
 else {
                  targetParams[i]=authApiProvider_.getAnonimousContext();
                }
                continue;
              }
 else {
                --copyOffset;
              }
            }
            targetParams[i]=params[i - copyOffset];
          }
        }
      }
      if (authApiProvider_ != null) {
        if (!AuthServerApiHelper.checkMethodPermissions(targetMethod,targetParams,userContext)) {
          throw new RuntimeException("String_Node_Str");
        }
      }
      retval=targetMethod.invoke(targetObject,targetParams);
    }
 catch (    RuntimeException ex) {
      Log log=LogFactory.getLog(GWTServlet.class);
      log.info("String_Node_Str",ex);
      responsePayload=RPC.encodeResponseForFailure(null,ex,rpcRequest.getSerializationPolicy());
    }
catch (    Exception ex) {
      boolean toLog=((!(ex instanceof Serializable)) || debug_);
      if (toLog) {
        Log log=LogFactory.getLog(GWTServlet.class);
        log.info("String_Node_Str",ex);
      }
      responsePayload=RPC.encodeResponseForFailure(null,ex,rpcRequest.getSerializationPolicy());
    }
  }
  if (responsePayload == null) {
    if (resultReplicator_ != null) {
      retval=resultReplicator_.replicateBean(retval);
    }
 else     if (resultHibernateBeanReplicator_ != null) {
      retval=resultHibernateBeanReplicator_.deepCopy(retval);
    }
    try {
      responsePayload=RPC.encodeResponseForSuccess(rpcRequest.getMethod(),retval,rpcRequest.getSerializationPolicy());
    }
 catch (    IllegalArgumentException ex) {
      Log log=LogFactory.getLog(GWTServlet.class);
      log.error("String_Node_Str",ex);
      responsePayload=RPC.encodeResponseForFailure(rpcRequest.getMethod(),ex);
    }
  }
  return responsePayload;
}

Fixed version (ground truth):
@Override public String processCall(String payload) throws SerializationException {
  String responsePayload=null;
  RPCRequest rpcRequest=null;
  Object targetObject=null;
  if (responsePayload == null) {
    try {
      rpcRequest=RPC.decodeRequest(payload,null,this);
    }
 catch (    NullPointerException ex) {
      Log LOG=LogFactory.getLog(GWTServlet.class);
      LOG.info("String_Node_Str");
      throw new RuntimeException("String_Node_Str");
    }
  }
  Object retval=null;
  if (responsePayload == null) {
    try {
      targetObject=retrieveTargetObject(this.getThreadLocalRequest());
      if (targetObject == null) {
        Log log=LogFactory.getLog(GWTServlet.class);
        log.info("String_Node_Str");
        throw new RuntimeException("String_Node_Str");
      }
      Method method=rpcRequest.getMethod();
      Object[] params=rpcRequest.getParameters();
      Method targetMethod=findTargetMethod(targetObject,method,params);
      Class<?> methodParameterTypes[]=method.getParameterTypes();
      Class<?> targetMethodParameterTypes[]=targetMethod.getParameterTypes();
      UserServerContext userContext=null;
      if (authApiProvider_ != null) {
        HttpSession session=getThreadLocalRequest().getSession(true);
        Object o=session.getAttribute("String_Node_Str");
        if (o == null) {
          userContext=authApiProvider_.getAnonimousContext();
        }
 else {
          if (o instanceof UserServerContext) {
            userContext=(UserServerContext)o;
          }
 else           if (o instanceof String) {
            userContext=authApiProvider_.findContextById((String)o);
          }
 else {
            throw new RuntimeException("String_Node_Str");
          }
        }
      }
      Object[] targetParams;
      int copyOffset=0;
      boolean copy=false;
      boolean eraseIdParam=false;
      int userIdParamIndex=-1;
      UserIdParameter uidAnn=targetMethod.getAnnotation(UserIdParameter.class);
      if (uidAnn != null) {
        userIdParamIndex=uidAnn.value();
      }
      if (targetMethodParameterTypes.length > methodParameterTypes.length) {
        targetParams=new Object[targetMethodParameterTypes.length];
        copy=true;
        copyOffset=1;
        if (authApiProvider_ != null) {
          targetParams[0]=userContext;
        }
 else {
          throw new RuntimeException("String_Node_Str" + targetMethod.toString());
        }
      }
 else       if (targetMethodParameterTypes.length == methodParameterTypes.length) {
        if (inputParametersReplicator_ != null) {
          targetParams=new Object[targetMethodParameterTypes.length];
          copy=true;
        }
 else {
          copy=false;
          targetParams=params;
        }
      }
 else       if (targetMethodParameterTypes.length < methodParameterTypes.length) {
        targetParams=new Object[targetMethodParameterTypes.length];
        copy=true;
        eraseIdParam=true;
      }
 else {
        throw new IllegalStateException("String_Node_Str");
      }
      if (copy) {
        if (inputParametersReplicator_ != null) {
          for (int i=copyOffset; i < targetMethodParameterTypes.length; ++i) {
            if (i - copyOffset == userIdParamIndex) {
              if (!eraseIdParam) {
                Object o=params[i - copyOffset];
                if (o != null) {
                  targetParams[i]=authApiProvider_.findContextById(o.toString());
                }
 else {
                  targetParams[i]=authApiProvider_.getAnonimousContext();
                }
                continue;
              }
 else {
                --copyOffset;
              }
            }
            targetParams[i]=inputParametersReplicator_.replicateBean(params[i - copyOffset]);
          }
        }
 else {
          for (int i=copyOffset; i < targetMethodParameterTypes.length; ++i) {
            if (i - copyOffset == userIdParamIndex) {
              if (!eraseIdParam) {
                Object o=params[i - copyOffset];
                if (o != null) {
                  targetParams[i]=authApiProvider_.findContextById(o.toString());
                }
 else {
                  targetParams[i]=authApiProvider_.getAnonimousContext();
                }
                continue;
              }
 else {
                --copyOffset;
              }
            }
            targetParams[i]=params[i - copyOffset];
          }
        }
      }
      if (authApiProvider_ != null) {
        if (!AuthServerApiHelper.checkMethodPermissions(targetMethod,targetParams,userContext)) {
          throw new RuntimeException("String_Node_Str");
        }
      }
      retval=targetMethod.invoke(targetObject,targetParams);
    }
 catch (    RuntimeException ex) {
      Log log=LogFactory.getLog(GWTServlet.class);
      log.info("String_Node_Str",ex);
      responsePayload=RPC.encodeResponseForFailure(null,ex,rpcRequest.getSerializationPolicy());
    }
catch (    Exception ex) {
      boolean toLog=((!(ex instanceof Serializable)) || debug_);
      if (toLog) {
        Log log=LogFactory.getLog(GWTServlet.class);
        log.info("String_Node_Str",ex);
      }
      responsePayload=RPC.encodeResponseForFailure(null,ex,rpcRequest.getSerializationPolicy());
    }
  }
  if (responsePayload == null) {
    if (resultReplicator_ != null) {
      retval=resultReplicator_.replicateBean(retval);
    }
 else     if (resultHibernateBeanReplicator_ != null) {
      retval=resultHibernateBeanReplicator_.deepCopy(retval);
    }
    try {
      responsePayload=RPC.encodeResponseForSuccess(rpcRequest.getMethod(),retval,rpcRequest.getSerializationPolicy());
    }
 catch (    IllegalArgumentException ex) {
      Log log=LogFactory.getLog(GWTServlet.class);
      log.error("String_Node_Str",ex);
      responsePayload=RPC.encodeResponseForFailure(rpcRequest.getMethod(),ex);
    }
  }
  return responsePayload;
}