Program: 85420
Project: 85420
Buggy source:
public ModelAndView onSubmit(HttpServletRequest request,HttpServletResponse response,Object command,BindException errors) throws Exception {
  FileUpload fileUpload=(FileUpload)command;
  if (fileUpload.getFile().length == 0) {
    Object[] args=new Object[]{getText("String_Node_Str",request.getLocale())};
    errors.rejectValue("String_Node_Str","String_Node_Str",args,"String_Node_Str");
    return showForm(request,response,errors);
  }
  MultipartHttpServletRequest multipartRequest=(MultipartHttpServletRequest)request;
  CommonsMultipartFile file=(CommonsMultipartFile)multipartRequest.getFile("String_Node_Str");
  String uploadDir=getServletContext().getRealPath("String_Node_Str") + "String_Node_Str" + request.getRemoteUser()+ "String_Node_Str";
  File dirPath=new File(uploadDir);
  if (!dirPath.exists()) {
    dirPath.mkdirs();
  }
  InputStream stream=file.getInputStream();
  OutputStream bos=new FileOutputStream(uploadDir + file.getOriginalFilename());
  int bytesRead=0;
  byte[] buffer=new byte[8192];
  while ((bytesRead=stream.read(buffer,0,8192)) != -1) {
    bos.write(buffer,0,bytesRead);
  }
  bos.close();
  stream.close();
  request.setAttribute("String_Node_Str",fileUpload.getName());
  request.setAttribute("String_Node_Str",file.getOriginalFilename());
  request.setAttribute("String_Node_Str",file.getContentType());
  request.setAttribute("String_Node_Str",file.getSize() + "String_Node_Str");
  request.setAttribute("String_Node_Str",dirPath.getAbsolutePath() + Constants.FILE_SEP + file.getOriginalFilename());
  String link=request.getContextPath() + "String_Node_Str" + "String_Node_Str"+ request.getRemoteUser()+ "String_Node_Str";
  request.setAttribute("String_Node_Str",link + file.getOriginalFilename());
  return new ModelAndView(getSuccessView());
}

Fixed version (ground truth):
public ModelAndView onSubmit(HttpServletRequest request,HttpServletResponse response,Object command,BindException errors) throws Exception {
  FileUpload fileUpload=(FileUpload)command;
  if (fileUpload.getFile().length == 0) {
    Object[] args=new Object[]{getText("String_Node_Str",request.getLocale())};
    errors.rejectValue("String_Node_Str","String_Node_Str",args,"String_Node_Str");
    return showForm(request,response,errors);
  }
  MultipartHttpServletRequest multipartRequest=(MultipartHttpServletRequest)request;
  CommonsMultipartFile file=(CommonsMultipartFile)multipartRequest.getFile("String_Node_Str");
  String uploadDir=getServletContext().getRealPath("String_Node_Str") + "String_Node_Str" + request.getRemoteUser()+ "String_Node_Str";
  File dirPath=new File(uploadDir);
  if (!dirPath.exists()) {
    dirPath.mkdirs();
  }
  InputStream stream=file.getInputStream();
  OutputStream bos=new FileOutputStream(uploadDir + file.getOriginalFilename());
  int bytesRead;
  byte[] buffer=new byte[8192];
  while ((bytesRead=stream.read(buffer,0,8192)) != -1) {
    bos.write(buffer,0,bytesRead);
  }
  bos.close();
  stream.close();
  request.setAttribute("String_Node_Str",fileUpload.getName());
  request.setAttribute("String_Node_Str",file.getOriginalFilename());
  request.setAttribute("String_Node_Str",file.getContentType());
  request.setAttribute("String_Node_Str",file.getSize() + "String_Node_Str");
  request.setAttribute("String_Node_Str",dirPath.getAbsolutePath() + Constants.FILE_SEP + file.getOriginalFilename());
  String link=request.getContextPath() + "String_Node_Str" + "String_Node_Str"+ request.getRemoteUser()+ "String_Node_Str";
  request.setAttribute("String_Node_Str",link + file.getOriginalFilename());
  return new ModelAndView(getSuccessView());
}