Program: 47545
Project: 47545
Buggy source:
/** 
 * @param uploadDir: JCR Directory to which the zip structure or single file will be uploaded to.
 * @param fileIS:    Input stream for the file.
 * @param fileInfo:  Info about he file (
 * @return http ok response of everything went well... some other error otherwise<p/> This REST method takes multi-part form data and imports it to a JCR repository.
 */
@POST @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.TEXT_HTML) public Response doPostImport(@FormDataParam("String_Node_Str") String uploadDir,@FormDataParam("String_Node_Str") InputStream fileIS,@FormDataParam("String_Node_Str") FormDataContentDisposition fileInfo){
  Map<String,Converter> converters=new HashMap<String,Converter>();
  StreamConverter streamConverter=new StreamConverter();
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  try {
    final ImportProcessor importProcessor=new SimpleImportProcessor(uploadDir,null);
    importProcessor.addImportHandler(new MondrianImportHandler(repository));
    importProcessor.addImportHandler(new MetadataImportHandler(repository));
    importProcessor.addImportHandler(new DefaultImportHandler(repository));
    if (fileInfo.getFileName().toLowerCase().endsWith("String_Node_Str")) {
      importProcessor.setImportSource(new ZipSolutionRepositoryImportSource(new ZipInputStream(fileIS),"String_Node_Str"));
    }
 else {
      final File outFile=File.createTempFile("String_Node_Str",null);
      outFile.deleteOnExit();
      importProcessor.setImportSource(new FileSolutionRepositoryImportSource(outFile,fileInfo.getFileName(),"String_Node_Str"));
    }
    importProcessor.performImport();
  }
 catch (  ImportException e) {
    return Response.serverError().entity(e.toString()).build();
  }
catch (  IOException e) {
    return Response.serverError().entity(e.toString()).build();
  }
  return Response.ok(Messages.getInstance().getString("String_Node_Str")).build();
}

Fixed version (ground truth):
/** 
 * @param uploadDir: JCR Directory to which the zip structure or single file will be uploaded to.
 * @param fileIS:    Input stream for the file.
 * @param fileInfo:  Info about he file (
 * @return http ok response of everything went well... some other error otherwise<p/> This REST method takes multi-part form data and imports it to a JCR repository.
 */
@POST @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.TEXT_HTML) public Response doPostImport(@FormDataParam("String_Node_Str") String uploadDir,@FormDataParam("String_Node_Str") InputStream fileIS,@FormDataParam("String_Node_Str") FormDataContentDisposition fileInfo){
  Map<String,Converter> converters=new HashMap<String,Converter>();
  StreamConverter streamConverter=new StreamConverter();
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  converters.put("String_Node_Str",streamConverter);
  try {
    final ImportProcessor importProcessor=new SimpleImportProcessor(uploadDir,null);
    importProcessor.addImportHandler(new MondrianImportHandler(repository));
    importProcessor.addImportHandler(new MetadataImportHandler(repository));
    importProcessor.addImportHandler(new DefaultImportHandler(repository));
    if (fileInfo.getFileName().toLowerCase().endsWith("String_Node_Str")) {
      importProcessor.setImportSource(new ZipSolutionRepositoryImportSource(new ZipInputStream(fileIS),"String_Node_Str"));
    }
 else {
      final File outFile=File.createTempFile("String_Node_Str",null);
      outFile.deleteOnExit();
      importProcessor.setImportSource(new FileSolutionRepositoryImportSource(outFile,fileInfo.getFileName(),"String_Node_Str"));
    }
    importProcessor.performImport();
  }
 catch (  ImportException e) {
    return Response.serverError().entity(e.toString()).build();
  }
catch (  InitializationException e) {
    return Response.serverError().entity(e.toString()).build();
  }
catch (  IOException e) {
    return Response.serverError().entity(e.toString()).build();
  }
  return Response.ok(Messages.getInstance().getString("String_Node_Str")).build();
}