Program: 113851
Project: 113851
Buggy source:
/** 
 * Parse request and execute method
 * @param method stagemethod to execute
 */
private void parseAndExecute(StageMethod method){
  final MRCRequest rq=method.getRq();
  final PinkyRequest theRequest=rq.getPinkyRequest();
  final String URI=theRequest.requestURI.startsWith("String_Node_Str") ? theRequest.requestURI.substring(1) : theRequest.requestURI;
  final MRCOperation op=operations.get(URI);
  if (op == null) {
    rq.setError(new ErrorRecord(ErrorRecord.ErrorClass.BAD_REQUEST,"String_Node_Str" + URI + "String_Node_Str"));
    master.requestFinished(rq);
    return;
  }
  if (op.hasArguments()) {
    if ((theRequest.requestBody == null) || (theRequest.requestBody.capacity() == 0)) {
      rq.setError(new ErrorRecord(ErrorRecord.ErrorClass.BAD_REQUEST,"String_Node_Str" + URI + "String_Node_Str"));
      master.requestFinished(rq);
      return;
    }
    List<Object> args=null;
    try {
      final JSONString jst=new JSONString(new String(theRequest.getBody(),HTTPUtils.ENC_UTF8));
      Object o=JSONParser.parseJSON(jst);
      args=(List<Object>)o;
    }
 catch (    ClassCastException ex) {
      rq.setError(new ErrorRecord(ErrorRecord.ErrorClass.BAD_REQUEST,"String_Node_Str"));
      master.requestFinished(rq);
      return;
    }
catch (    JSONException ex) {
      rq.setError(new ErrorRecord(ErrorRecord.ErrorClass.BAD_REQUEST,"String_Node_Str" + ex));
      master.requestFinished(rq);
      return;
    }
    op.parseRPCBody(rq,args);
  }
  if (op.isAuthRequired()) {
    try {
      String authHeader=theRequest.requestHeaders.getHeader(HTTPHeaders.HDR_AUTHORIZATION);
      if (authHeader == null)       throw new UserException(ErrNo.EPERM,"String_Node_Str");
      UserCredentials cred=null;
      try {
        cred=master.getAuthProvider().getEffectiveCredentials(authHeader,theRequest.getChannelIO());
        rq.getDetails().superUser=cred.isSuperUser();
        rq.getDetails().groupIds=cred.getGroupIDs();
        rq.getDetails().userId=cred.getUserID();
      }
 catch (      AuthenticationException ex) {
        throw new UserException(ErrNo.EPERM,ex.getMessage());
      }
    }
 catch (    Exception exc) {
      method.getRq().setError(new ErrorRecord(ErrorRecord.ErrorClass.BAD_REQUEST,"String_Node_Str",exc));
      master.requestFinished(method.getRq());
      return;
    }
  }
  op.startRequest(rq);
}

Fixed version (ground truth):
/** 
 * Parse request and execute method
 * @param method stagemethod to execute
 */
private void parseAndExecute(StageMethod method){
  final MRCRequest rq=method.getRq();
  final PinkyRequest theRequest=rq.getPinkyRequest();
  final String URI=theRequest.requestURI.startsWith("String_Node_Str") ? theRequest.requestURI.substring(1) : theRequest.requestURI;
  final MRCOperation op=operations.get(URI);
  if (op == null) {
    rq.setError(new ErrorRecord(ErrorRecord.ErrorClass.BAD_REQUEST,"String_Node_Str" + URI + "String_Node_Str"));
    master.requestFinished(rq);
    return;
  }
  if (op.hasArguments()) {
    if ((theRequest.requestBody == null) || (theRequest.requestBody.capacity() == 0)) {
      rq.setError(new ErrorRecord(ErrorRecord.ErrorClass.BAD_REQUEST,"String_Node_Str" + URI + "String_Node_Str"));
      master.requestFinished(rq);
      return;
    }
    List<Object> args=null;
    try {
      final JSONString jst=new JSONString(new String(theRequest.getBody(),HTTPUtils.ENC_UTF8));
      Object o=JSONParser.parseJSON(jst);
      args=(List<Object>)o;
    }
 catch (    ClassCastException ex) {
      rq.setError(new ErrorRecord(ErrorRecord.ErrorClass.BAD_REQUEST,"String_Node_Str"));
      master.requestFinished(rq);
      return;
    }
catch (    JSONException ex) {
      rq.setError(new ErrorRecord(ErrorRecord.ErrorClass.BAD_REQUEST,"String_Node_Str" + ex));
      master.requestFinished(rq);
      return;
    }
    ErrorRecord error=op.parseRPCBody(rq,args);
    if (error != null) {
      rq.setError(error);
      master.requestFinished(rq);
      return;
    }
  }
  if (op.isAuthRequired()) {
    try {
      String authHeader=theRequest.requestHeaders.getHeader(HTTPHeaders.HDR_AUTHORIZATION);
      if (authHeader == null)       throw new UserException(ErrNo.EPERM,"String_Node_Str");
      UserCredentials cred=null;
      try {
        cred=master.getAuthProvider().getEffectiveCredentials(authHeader,theRequest.getChannelIO());
        rq.getDetails().superUser=cred.isSuperUser();
        rq.getDetails().groupIds=cred.getGroupIDs();
        rq.getDetails().userId=cred.getUserID();
      }
 catch (      AuthenticationException ex) {
        throw new UserException(ErrNo.EPERM,ex.getMessage());
      }
    }
 catch (    Exception exc) {
      method.getRq().setError(new ErrorRecord(ErrorRecord.ErrorClass.BAD_REQUEST,"String_Node_Str",exc));
      master.requestFinished(method.getRq());
      return;
    }
  }
  op.startRequest(rq);
}