Program: 52120
Project: 52120
Buggy source:
/** 
 * Respond to a post request for metadata bulk importing via csv
 * @param context a DSpace Context object
 * @param request the HTTP request
 * @param response the HTTP response
 * @throws ServletException
 * @throws IOException
 * @throws SQLException
 * @throws AuthorizeException
 */
protected void doDSPost(Context context,HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException, SQLException, AuthorizeException {
  String contentType=request.getContentType();
  if ((contentType != null) && (contentType.indexOf("String_Node_Str") != -1)) {
    String message=null;
    try {
      FileUploadRequest wrapper=new FileUploadRequest(request);
      File f=wrapper.getFile("String_Node_Str");
      int colId=Integer.parseInt(wrapper.getParameter("String_Node_Str"));
      Collection collection=Collection.find(context,colId);
      String inputType=wrapper.getParameter("String_Node_Str");
      try {
        ItemImport.processUploadableImport(f,new Collection[]{collection},inputType,context);
        request.setAttribute("String_Node_Str","String_Node_Str");
      }
 catch (      Exception e) {
        request.setAttribute("String_Node_Str","String_Node_Str");
        message=e.getMessage();
        e.printStackTrace();
      }
    }
 catch (    FileSizeLimitExceededException e) {
      request.setAttribute("String_Node_Str","String_Node_Str");
      message=e.getMessage();
      e.printStackTrace();
    }
catch (    Exception e) {
      request.setAttribute("String_Node_Str","String_Node_Str");
      message=e.getMessage();
      e.printStackTrace();
    }
    DataLoaderService dls=new DSpace().getSingletonService(DataLoaderService.class);
    List<String> inputTypes=Lists.newArrayList(dls.getDataLoaders().keySet());
    request.setAttribute("String_Node_Str",inputTypes);
    List<Collection> collections=null;
    String colIdS=request.getParameter("String_Node_Str");
    if (colIdS != null) {
      collections=new ArrayList<Collection>();
      collections.add(Collection.find(context,Integer.parseInt(colIdS)));
    }
 else {
      collections=Arrays.asList(Collection.findAll(context));
    }
    request.setAttribute("String_Node_Str",collections);
    request.setAttribute("String_Node_Str",message);
    JSPManager.showJSP(request,response,"String_Node_Str");
  }
 else {
    request.setAttribute("String_Node_Str","String_Node_Str");
    JSPManager.showJSP(request,response,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Respond to a post request for metadata bulk importing via csv
 * @param context a DSpace Context object
 * @param request the HTTP request
 * @param response the HTTP response
 * @throws ServletException
 * @throws IOException
 * @throws SQLException
 * @throws AuthorizeException
 */
protected void doDSPost(Context context,HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException, SQLException, AuthorizeException {
  String contentType=request.getContentType();
  if ((contentType != null) && (contentType.indexOf("String_Node_Str") != -1)) {
    String message=null;
    try {
      FileUploadRequest wrapper=new FileUploadRequest(request);
      File f=wrapper.getFile("String_Node_Str");
      int colId=Integer.parseInt(wrapper.getParameter("String_Node_Str"));
      Collection collection=Collection.find(context,colId);
      String inputType=wrapper.getParameter("String_Node_Str");
      try {
        ItemImport.processUploadableImport(f,new Collection[]{collection},inputType,context);
        request.setAttribute("String_Node_Str","String_Node_Str");
      }
 catch (      Exception e) {
        request.setAttribute("String_Node_Str","String_Node_Str");
        message=e.getMessage();
        e.printStackTrace();
      }
    }
 catch (    FileSizeLimitExceededException e) {
      request.setAttribute("String_Node_Str","String_Node_Str");
      message=e.getMessage();
      e.printStackTrace();
    }
catch (    Exception e) {
      request.setAttribute("String_Node_Str","String_Node_Str");
      message=e.getMessage();
      e.printStackTrace();
    }
    BTEBatchImportService dls=new DSpace().getSingletonService(BTEBatchImportService.class);
    List<String> inputTypes=Lists.newArrayList(dls.getDataLoaders().keySet());
    request.setAttribute("String_Node_Str",inputTypes);
    List<Collection> collections=null;
    String colIdS=request.getParameter("String_Node_Str");
    if (colIdS != null) {
      collections=new ArrayList<Collection>();
      collections.add(Collection.find(context,Integer.parseInt(colIdS)));
    }
 else {
      collections=Arrays.asList(Collection.findAll(context));
    }
    request.setAttribute("String_Node_Str",collections);
    request.setAttribute("String_Node_Str",message);
    JSPManager.showJSP(request,response,"String_Node_Str");
  }
 else {
    request.setAttribute("String_Node_Str","String_Node_Str");
    JSPManager.showJSP(request,response,"String_Node_Str");
  }
}