Program: 3541
Project: 3541
Buggy source:
/** 
 * Do any processing of the information input by the user, and/or perform step processing (if no user interaction required) <P> It is this method's job to save any data to the underlying database, as necessary, and return error messages (if any) which can then be processed by the appropriate user interface (JSP-UI or XML-UI) <P> NOTE: If this step is a non-interactive step (i.e. requires no UI), then it should perform *all* of its processing in this method!
 * @param context current DSpace context
 * @param request current servlet request object
 * @param response current servlet response object
 * @param subInfo submission info object
 * @return Status or error flag which will be processed bydoPostProcessing() below! (if STATUS_COMPLETE or 0 is returned, no errors occurred!)
 */
public int doProcessing(Context context,HttpServletRequest request,HttpServletResponse response,SubmissionInfo subInfo) throws ServletException, IOException, SQLException, AuthorizeException {
  String buttonPressed=Util.getSubmitButton(request,NEXT_BUTTON);
  FileUploadRequest wrapper=null;
  String filePath=null;
  InputStream fileInputStream=null;
  String contentType=request.getContentType();
  if (buttonPressed.equalsIgnoreCase(SUBMIT_UPLOAD_BUTTON)) {
    if ((contentType != null) && (contentType.indexOf("String_Node_Str") != -1)) {
      try {
        if (Class.forName("String_Node_Str").isInstance(request)) {
          wrapper=(FileUploadRequest)request;
        }
 else {
          wrapper=new FileUploadRequest(request);
        }
        File temp=wrapper.getFile("String_Node_Str");
        if (temp != null && temp.length() > 0) {
          fileInputStream=new BufferedInputStream(new FileInputStream(temp));
          filePath=wrapper.getFilesystemName("String_Node_Str");
        }
        temp.delete();
        request.setAttribute("String_Node_Str",filePath);
        request.setAttribute("String_Node_Str",fileInputStream);
        request.setAttribute("String_Node_Str",wrapper.getParameter("String_Node_Str"));
      }
 catch (      IOException ie) {
        log.warn(LogManager.getHeader(context,"String_Node_Str","String_Node_Str"),ie);
      }
catch (      Exception e) {
        throw new ServletException(e);
      }
    }
  }
  return super.doProcessing(context,request,response,subInfo);
}

Fixed version (ground truth):
/** 
 * Do any processing of the information input by the user, and/or perform step processing (if no user interaction required) <P> It is this method's job to save any data to the underlying database, as necessary, and return error messages (if any) which can then be processed by the appropriate user interface (JSP-UI or XML-UI) <P> NOTE: If this step is a non-interactive step (i.e. requires no UI), then it should perform *all* of its processing in this method!
 * @param context current DSpace context
 * @param request current servlet request object
 * @param response current servlet response object
 * @param subInfo submission info object
 * @return Status or error flag which will be processed bydoPostProcessing() below! (if STATUS_COMPLETE or 0 is returned, no errors occurred!)
 */
public int doProcessing(Context context,HttpServletRequest request,HttpServletResponse response,SubmissionInfo subInfo) throws ServletException, IOException, SQLException, AuthorizeException {
  String buttonPressed=Util.getSubmitButton(request,NEXT_BUTTON);
  FileUploadRequest wrapper=null;
  String filePath=null;
  InputStream fileInputStream=null;
  String contentType=request.getContentType();
  if (buttonPressed.equalsIgnoreCase(SUBMIT_UPLOAD_BUTTON)) {
    if ((contentType != null) && (contentType.indexOf("String_Node_Str") != -1)) {
      try {
        if (Class.forName("String_Node_Str").isInstance(request)) {
          wrapper=(FileUploadRequest)request;
        }
 else {
          wrapper=new FileUploadRequest(request);
        }
        File temp=wrapper.getFile("String_Node_Str");
        if (temp != null && temp.length() > 0) {
          fileInputStream=new BufferedInputStream(new FileInputStream(temp));
          filePath=wrapper.getFilesystemName("String_Node_Str");
          temp.delete();
        }
        request.setAttribute("String_Node_Str",filePath);
        request.setAttribute("String_Node_Str",fileInputStream);
        request.setAttribute("String_Node_Str",wrapper.getParameter("String_Node_Str"));
      }
 catch (      IOException ie) {
        log.warn(LogManager.getHeader(context,"String_Node_Str","String_Node_Str"),ie);
      }
catch (      Exception e) {
        throw new ServletException(e);
      }
    }
  }
  return super.doProcessing(context,request,response,subInfo);
}