Program: 45869
Project: 45869
Buggy source:
/** 
 * Handles the HTTP <code>POST</code> method.
 * @param request servlet request
 * @param response servlet response
 */
@Override protected void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PrintWriter writer=response.getWriter();
  ModuleManager manager=ModuleManager.getModuleManager();
  Logger logger=ModuleManager.getLogger();
  boolean isMultipart=ServletFileUpload.isMultipartContent(request);
  if (isMultipart == false) {
    logger.warning("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    return;
  }
  ServletFileUpload upload=new ServletFileUpload();
  try {
    FileItemIterator iter=upload.getItemIterator(request);
    while (iter.hasNext() == true) {
      FileItemStream item=iter.next();
      String name=item.getFieldName();
      InputStream stream=item.openStream();
      if (item.isFormField() == false) {
        String moduleJar=item.getName();
        if (moduleJar.endsWith("String_Node_Str") == false) {
          logger.warning("String_Node_Str" + moduleJar);
          writer.println("String_Node_Str" + moduleJar + "String_Node_Str");
          writer.println("String_Node_Str");
          return;
        }
        String moduleName=moduleJar.substring(0,moduleJar.length() - 4);
        logger.info("String_Node_Str" + moduleName + "String_Node_Str"+ moduleJar);
        File tmpFile=null;
        try {
          tmpFile=File.createTempFile(moduleName,"String_Node_Str");
          tmpFile.deleteOnExit();
          RunUtil.writeToFile(stream,tmpFile);
          logger.info("String_Node_Str" + tmpFile.getAbsolutePath());
        }
 catch (        java.lang.Exception excp) {
          logger.log(Level.WARNING,"String_Node_Str",excp);
          writer.println("String_Node_Str");
          writer.println("String_Node_Str");
          writer.println(excp.toString());
          return;
        }
        Collection<File> moduleFiles=new LinkedList<File>();
        moduleFiles.add(tmpFile);
        Collection<Module> result=manager.addToInstall(moduleFiles);
        if (result.isEmpty() == true) {
          logger.warning("String_Node_Str" + moduleName);
          writer.println("String_Node_Str");
          writer.println("String_Node_Str");
          return;
        }
      }
    }
  }
 catch (  FileUploadException excp) {
    logger.log(Level.WARNING,"String_Node_Str",excp);
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    return;
  }
  manager.installAll();
  logger.info("String_Node_Str");
  writer.print("String_Node_Str");
  writer.print("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Handles the HTTP <code>POST</code> method.
 * @param request servlet request
 * @param response servlet response
 */
@Override protected void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PrintWriter writer=response.getWriter();
  ModuleManager manager=ModuleManager.getModuleManager();
  Logger logger=ModuleManager.getLogger();
  boolean isMultipart=ServletFileUpload.isMultipartContent(request);
  if (isMultipart == false) {
    logger.warning("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    return;
  }
  ServletFileUpload upload=new ServletFileUpload();
  try {
    FileItemIterator iter=upload.getItemIterator(request);
    while (iter.hasNext() == true) {
      FileItemStream item=iter.next();
      String name=item.getFieldName();
      InputStream stream=item.openStream();
      if (item.isFormField() == false) {
        String moduleJar=item.getName();
        if (moduleJar.endsWith("String_Node_Str") == false) {
          logger.warning("String_Node_Str" + moduleJar);
          writer.println("String_Node_Str" + moduleJar + "String_Node_Str");
          writer.println("String_Node_Str");
          return;
        }
        String moduleName=moduleJar.substring(0,moduleJar.length() - 4);
        logger.info("String_Node_Str" + moduleName + "String_Node_Str"+ moduleJar);
        File tmpFile=null;
        try {
          tmpFile=File.createTempFile(moduleName + "String_Node_Str","String_Node_Str");
          tmpFile.deleteOnExit();
          RunUtil.writeToFile(stream,tmpFile);
          logger.info("String_Node_Str" + tmpFile.getAbsolutePath());
        }
 catch (        java.lang.Exception excp) {
          logger.log(Level.WARNING,"String_Node_Str",excp);
          writer.println("String_Node_Str");
          writer.println("String_Node_Str");
          writer.println(excp.toString());
          return;
        }
        Collection<File> moduleFiles=new LinkedList<File>();
        moduleFiles.add(tmpFile);
        Collection<Module> result=manager.addToInstall(moduleFiles);
        if (result.isEmpty() == true) {
          logger.warning("String_Node_Str" + moduleName);
          writer.println("String_Node_Str");
          writer.println("String_Node_Str");
          return;
        }
      }
    }
  }
 catch (  FileUploadException excp) {
    logger.log(Level.WARNING,"String_Node_Str",excp);
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    return;
  }
  manager.installAll();
  logger.info("String_Node_Str");
  writer.print("String_Node_Str");
  writer.print("String_Node_Str");
}