Program: 3262
Project: 3262
Buggy source:
/** 
 * Load necessary information to build the Progress Bar for the Item Submission Progress. This information is returned in the form of a HashMap (which is then stored as a part of the SubmissionInfo). The HashMap takes the following form: Keys - the number of the step, followed by the number of the page within the step (e.g. "2.1" = The first page of Step 2) (e.g. "5.2" = The second page of Step 5) Values - the headings to display for each step (e.g. "Describe", "Verify")
 * @param request The HTTP Servlet Request object
 * @param subInfo the SubmissionInfo object we are loading into
 * @param forceReload If true, this method reloads from stratch (and overwrites cached progress bar info)
 */
private static void loadProgressBar(HttpServletRequest request,SubmissionInfo subInfo,boolean forceReload){
  LinkedHashMap progressBarInfo=null;
  log.debug("String_Node_Str");
  if (!forceReload) {
    progressBarInfo=(LinkedHashMap)loadProgressBarFromCache(request.getSession());
  }
  if (progressBarInfo != null && log.isDebugEnabled()) {
    log.debug("String_Node_Str" + progressBarInfo.size() + "String_Node_Str");
  }
 else {
    progressBarInfo=new LinkedHashMap();
    for (int i=0; i < subInfo.submissionConfig.getNumberOfSteps(); i++) {
      SubmissionStepConfig currentStep=subInfo.submissionConfig.getStep(i);
      String stepNumber=Integer.toString(currentStep.getStepNumber());
      String stepHeading=currentStep.getHeading();
      if (currentStep.isVisible()) {
        int numPages=1;
        try {
          ClassLoader loader=subInfo.getClass().getClassLoader();
          Class stepClass=loader.loadClass(currentStep.getProcessingClassName());
          AbstractProcessingStep step=(AbstractProcessingStep)stepClass.newInstance();
          numPages=step.getNumberOfPages(request,subInfo);
        }
 catch (        Exception e) {
          log.error("String_Node_Str" + currentStep.getProcessingClassName() + "String_Node_Str",e);
        }
        for (int j=1; j <= numPages; j++) {
          String pageNumber=Integer.toString(j);
          progressBarInfo.put(stepNumber + "String_Node_Str" + pageNumber,stepHeading);
        }
      }
    }
    log.debug("String_Node_Str" + progressBarInfo.size() + "String_Node_Str");
    saveProgressBarToCache(request.getSession(),progressBarInfo);
  }
  subInfo.progressBar=progressBarInfo;
}

Fixed version (ground truth):
/** 
 * Load necessary information to build the Progress Bar for the Item Submission Progress. This information is returned in the form of a HashMap (which is then stored as a part of the SubmissionInfo). The HashMap takes the following form: Keys - the number of the step, followed by the number of the page within the step (e.g. "2.1" = The first page of Step 2) (e.g. "5.2" = The second page of Step 5) Values - the headings to display for each step (e.g. "Describe", "Verify")
 * @param request The HTTP Servlet Request object
 * @param subInfo the SubmissionInfo object we are loading into
 * @param forceReload If true, this method reloads from scratch (and overwrites cached progress bar info)
 */
private static void loadProgressBar(HttpServletRequest request,SubmissionInfo subInfo,boolean forceReload){
  LinkedHashMap progressBarInfo=null;
  log.debug("String_Node_Str");
  if (!forceReload) {
    progressBarInfo=(LinkedHashMap)loadProgressBarFromCache(request.getSession());
  }
  if (progressBarInfo != null && log.isDebugEnabled()) {
    log.debug("String_Node_Str" + progressBarInfo.size() + "String_Node_Str");
  }
 else {
    progressBarInfo=new LinkedHashMap();
    for (int i=0; i < subInfo.submissionConfig.getNumberOfSteps(); i++) {
      SubmissionStepConfig currentStep=subInfo.submissionConfig.getStep(i);
      String stepNumber=Integer.toString(currentStep.getStepNumber());
      String stepHeading=currentStep.getHeading();
      if (currentStep.isVisible()) {
        int numPages=1;
        try {
          ClassLoader loader=subInfo.getClass().getClassLoader();
          Class stepClass=loader.loadClass(currentStep.getProcessingClassName());
          AbstractProcessingStep step=(AbstractProcessingStep)stepClass.newInstance();
          numPages=step.getNumberOfPages(request,subInfo);
        }
 catch (        Exception e) {
          log.error("String_Node_Str" + currentStep.getProcessingClassName() + "String_Node_Str",e);
        }
        for (int j=1; j <= numPages; j++) {
          String pageNumber=Integer.toString(j);
          progressBarInfo.put(stepNumber + "String_Node_Str" + pageNumber,stepHeading);
        }
      }
    }
    log.debug("String_Node_Str" + progressBarInfo.size() + "String_Node_Str");
    saveProgressBarToCache(request.getSession(),progressBarInfo);
  }
  subInfo.progressBar=progressBarInfo;
}