Program: 3359
Project: 3359
Buggy source:
protected void doDSGet(Context context,HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException, SQLException, AuthorizeException {
  String workspaceID=request.getParameter("String_Node_Str");
  String workflowID=request.getParameter("String_Node_Str");
  if (workspaceID != null) {
    try {
      WorkspaceItem wi=WorkspaceItem.find(context,Integer.parseInt(workspaceID));
      SubmissionInfo si=SubmissionInfo.load(request,wi);
      if (getStepReached(si) >= si.getSubmissionConfig().getNumberOfSteps()) {
        int lastStep=si.getSubmissionConfig().getNumberOfSteps() - 1;
        wi.setStageReached(lastStep);
        wi.setPageReached(AbstractProcessingStep.LAST_PAGE_REACHED);
        wi.update();
        context.commit();
        si.setSubmissionItem(wi);
      }
      setBeginningOfStep(request,true);
      doStep(context,request,response,si,FIRST_STEP);
    }
 catch (    NumberFormatException nfe) {
      log.warn(LogManager.getHeader(context,"String_Node_Str","String_Node_Str" + workspaceID));
      JSPManager.showInvalidIDError(request,response,workspaceID,-1);
    }
  }
 else   if (workflowID != null) {
    try {
      WorkflowItem wi=WorkflowItem.find(context,Integer.parseInt(workflowID));
      SubmissionInfo si=SubmissionInfo.load(request,wi);
      FIRST_STEP=0;
      setBeginningOfStep(request,true);
      doStep(context,request,response,si,FIRST_STEP);
    }
 catch (    NumberFormatException nfe) {
      log.warn(LogManager.getHeader(context,"String_Node_Str","String_Node_Str" + workflowID));
      JSPManager.showInvalidIDError(request,response,workflowID,-1);
    }
  }
 else {
    doDSPost(context,request,response);
  }
}

Fixed version (ground truth):
protected void doDSGet(Context context,HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException, SQLException, AuthorizeException {
  String workspaceID=request.getParameter("String_Node_Str");
  String workflowID=request.getParameter("String_Node_Str");
  if (workspaceID != null) {
    try {
      WorkspaceItem wi=WorkspaceItem.find(context,Integer.parseInt(workspaceID));
      SubmissionInfo si=SubmissionInfo.load(request,wi);
      if (getStepReached(si) >= si.getSubmissionConfig().getNumberOfSteps()) {
        int lastStep=si.getSubmissionConfig().getNumberOfSteps() - 1;
        wi.setStageReached(lastStep);
        wi.setPageReached(AbstractProcessingStep.LAST_PAGE_REACHED);
        wi.update();
        context.commit();
        si.setSubmissionItem(wi);
      }
      setBeginningOfStep(request,true);
      doStep(context,request,response,si,FIRST_STEP);
    }
 catch (    NumberFormatException nfe) {
      log.warn(LogManager.getHeader(context,"String_Node_Str","String_Node_Str" + workspaceID));
      JSPManager.showInvalidIDError(request,response,workspaceID,-1);
    }
  }
 else   if (workflowID != null) {
    try {
      WorkflowItem wi=WorkflowItem.find(context,Integer.parseInt(workflowID));
      SubmissionInfo si=SubmissionInfo.load(request,wi);
      setBeginningOfStep(request,true);
      doStep(context,request,response,si,WORKFLOW_FIRST_STEP);
    }
 catch (    NumberFormatException nfe) {
      log.warn(LogManager.getHeader(context,"String_Node_Str","String_Node_Str" + workflowID));
      JSPManager.showInvalidIDError(request,response,workflowID,-1);
    }
  }
 else {
    doDSPost(context,request,response);
  }
}