Program: 113865
Project: 113865
Buggy source:
protected ErrorRecord parseMethod(OSDRequest rq){
  final PinkyRequest pr=rq.getPinkyRequest();
  if (pr.requestMethod.equals(HTTPUtils.GET_TOKEN)) {
    if (pr.requestURI == null)     return new ErrorRecord(ErrorClass.USER_EXCEPTION,ErrorCodes.INVALID_FILEID,"String_Node_Str");
    if (pr.requestURI.equals("String_Node_Str")) {
      rq.setType(OSDRequest.Type.STATUS_PAGE);
      rq.setOperation(master.getOperation(RequestDispatcher.Operations.STATUS_PAGE));
    }
 else {
      rq.setType(OSDRequest.Type.READ);
      final String fileId=parseFileIdFromURI(pr);
      if (fileId == null) {
        return new ErrorRecord(ErrorClass.USER_EXCEPTION,ErrorCodes.INVALID_FILEID,"String_Node_Str");
      }
      rq.getDetails().setFileId(fileId);
      rq.setOperation(master.getOperation(RequestDispatcher.Operations.READ));
    }
  }
 else   if (pr.requestMethod.equals(HTTPUtils.PUT_TOKEN)) {
    rq.setType(OSDRequest.Type.WRITE);
    final String fileId=parseFileIdFromURI(pr);
    if (fileId == null) {
      return new ErrorRecord(ErrorClass.USER_EXCEPTION,ErrorCodes.INVALID_FILEID,"String_Node_Str");
    }
    if (rq.getData() == null) {
      return new ErrorRecord(ErrorClass.BAD_REQUEST,ErrorCodes.INVALID_PARAMS,"String_Node_Str");
    }
    rq.getDetails().setFileId(fileId);
    rq.setOperation(master.getOperation(RequestDispatcher.Operations.WRITE));
  }
 else   if (pr.requestMethod.equals(HTTPUtils.DELETE_TOKEN)) {
    rq.setType(OSDRequest.Type.DELETE);
    final String fileId=parseFileIdFromURI(pr);
    if (fileId == null) {
      return new ErrorRecord(ErrorClass.USER_EXCEPTION,ErrorCodes.INVALID_FILEID,"String_Node_Str");
    }
    rq.getDetails().setFileId(fileId);
    rq.setOperation(master.getOperation(RequestDispatcher.Operations.DELETE));
  }
 else   if (pr.requestMethod.equals(HTTPUtils.POST_TOKEN)) {
    rq.setType(OSDRequest.Type.RPC);
    assert(pr.requestURI != null);
    if (pr.requestURI.length() == 0) {
      return new ErrorRecord(ErrorClass.USER_EXCEPTION,ErrorCodes.METHOD_NOT_IMPLEMENTED,"String_Node_Str");
    }
    ErrorRecord result=parseRPC(rq);
    if (result != null)     return result;
  }
 else {
    return new ErrorRecord(ErrorClass.USER_EXCEPTION,ErrorCodes.METHOD_NOT_IMPLEMENTED,pr.requestMethod + "String_Node_Str");
  }
  final ErrorRecord hdrResult=parseHeaders(rq);
  if (hdrResult != null) {
    return hdrResult;
  }
  return null;
}

Fixed version (ground truth):
protected ErrorRecord parseMethod(OSDRequest rq){
  final PinkyRequest pr=rq.getPinkyRequest();
  if (pr.requestMethod.equals(HTTPUtils.GET_TOKEN)) {
    if (pr.requestURI == null)     return new ErrorRecord(ErrorClass.USER_EXCEPTION,ErrorCodes.INVALID_FILEID,"String_Node_Str");
    if (pr.requestURI.equals("String_Node_Str")) {
      rq.setType(OSDRequest.Type.STATUS_PAGE);
      rq.setOperation(master.getOperation(RequestDispatcher.Operations.STATUS_PAGE));
    }
 else {
      rq.setType(OSDRequest.Type.READ);
      final String fileId=parseFileIdFromURI(pr);
      if (fileId == null) {
        return new ErrorRecord(ErrorClass.USER_EXCEPTION,ErrorCodes.INVALID_FILEID,"String_Node_Str");
      }
      rq.getDetails().setFileId(fileId);
      rq.setOperation(master.getOperation(RequestDispatcher.Operations.READ));
    }
  }
 else   if (pr.requestMethod.equals(HTTPUtils.PUT_TOKEN)) {
    rq.setType(OSDRequest.Type.WRITE);
    final String fileId=parseFileIdFromURI(pr);
    if (fileId == null) {
      return new ErrorRecord(ErrorClass.USER_EXCEPTION,ErrorCodes.INVALID_FILEID,"String_Node_Str");
    }
    if (pr.requestBody == null) {
      return new ErrorRecord(ErrorClass.USER_EXCEPTION,ErrorCodes.INVALID_PARAMS,"String_Node_Str");
    }
    rq.getDetails().setFileId(fileId);
    rq.setOperation(master.getOperation(RequestDispatcher.Operations.WRITE));
  }
 else   if (pr.requestMethod.equals(HTTPUtils.DELETE_TOKEN)) {
    rq.setType(OSDRequest.Type.DELETE);
    final String fileId=parseFileIdFromURI(pr);
    if (fileId == null) {
      return new ErrorRecord(ErrorClass.USER_EXCEPTION,ErrorCodes.INVALID_FILEID,"String_Node_Str");
    }
    rq.getDetails().setFileId(fileId);
    rq.setOperation(master.getOperation(RequestDispatcher.Operations.DELETE));
  }
 else   if (pr.requestMethod.equals(HTTPUtils.POST_TOKEN)) {
    rq.setType(OSDRequest.Type.RPC);
    assert(pr.requestURI != null);
    if (pr.requestURI.length() == 0) {
      return new ErrorRecord(ErrorClass.USER_EXCEPTION,ErrorCodes.METHOD_NOT_IMPLEMENTED,"String_Node_Str");
    }
    ErrorRecord result=parseRPC(rq);
    if (result != null)     return result;
  }
 else {
    return new ErrorRecord(ErrorClass.USER_EXCEPTION,ErrorCodes.METHOD_NOT_IMPLEMENTED,pr.requestMethod + "String_Node_Str");
  }
  final ErrorRecord hdrResult=parseHeaders(rq);
  if (hdrResult != null) {
    return hdrResult;
  }
  return null;
}