Program: 95619
Project: 95619
Buggy source:
/** 
 * Save a project as JUB witch contains an info file about exportation, a project file and a result file
 * @param proj original project object
 * @param monitor loader monitor
 * @param fileName Jubula file name
 * @param includeTestResultSummaries true if project contain test result summaries
 * @throws ProjectDeletedException
 * @throws PMException
 * @throws IOException
 * @throws InterruptedException 
 */
private static void writeToFile(IProjectPO proj,IProgressMonitor monitor,String fileName,boolean includeTestResultSummaries) throws ProjectDeletedException, PMException, IOException {
  String dir=Files.createTempDirectory(IMPORT_FOLDER_NAME).toString() + File.separatorChar;
  String infoFileName=dir + NFO;
  String projectFileName=dir + PJT;
  String testResultFileName=dir + RST;
  ArrayList<String> fileList=new ArrayList<String>();
  ObjectMapper mapper=new ObjectMapper();
  mapper.setSerializationInclusion(Include.NON_EMPTY);
  ExportInfoDTO exportDTO=new ExportInfoDTO();
  exportDTO.setQualifier(ImportExportUtil.DATE_FORMATTER.format(new Date()));
  exportDTO.setEncoding(StandardCharsets.UTF_8.name());
  exportDTO.setVersion(JsonVersion.CURRENTLY_JSON_VERSION);
  try (FileWriterWithEncoding infoWriter=new FileWriterWithEncoding(infoFileName,StandardCharsets.UTF_8);FileWriterWithEncoding projectWriter=new FileWriterWithEncoding(projectFileName,StandardCharsets.UTF_8);FileWriterWithEncoding resultWriter=new FileWriterWithEncoding(testResultFileName,StandardCharsets.UTF_8)){
    mapper.writeValue(infoWriter,exportDTO);
    fileList.add(infoFileName);
    JsonExporter exporter=new JsonExporter(proj,monitor);
    ProjectDTO projectDTO=exporter.getProjectDTO();
    mapper.writeValue(projectWriter,projectDTO);
    fileList.add(projectFileName);
    if (includeTestResultSummaries) {
      exporter.writeTestResultSummariesToFile(resultWriter);
      fileList.add(testResultFileName);
    }
    monitor.subTask(Messages.ImportJsonStorageCompress);
    zipIt(fileName,fileList);
  }
 catch (  Exception e) {
    fileList.add(fileName);
    throw e;
  }
 finally {
    fileList.add(dir);
    deleteFiles(fileList);
  }
}

Fixed version (ground truth):
/** 
 * Save a project as JUB witch contains an info file about exportation, a project file and a result file
 * @param proj original project object
 * @param monitor loader monitor
 * @param fileName Jubula file name
 * @param includeTestResultSummaries true if project contain test result summaries
 * @throws ProjectDeletedException
 * @throws PMException
 * @throws IOException
 * @throws InterruptedException 
 */
private static void writeToFile(IProjectPO proj,IProgressMonitor monitor,String fileName,boolean includeTestResultSummaries) throws ProjectDeletedException, PMException, IOException {
  String dir=Files.createTempDirectory(TMP_EXCHANGE_FOLDER_NAME).toString() + File.separatorChar;
  String infoFileName=dir + NFO;
  String projectFileName=dir + PJT;
  String testResultFileName=dir + RST;
  ArrayList<String> fileList=new ArrayList<String>();
  ObjectMapper mapper=new ObjectMapper();
  mapper.setSerializationInclusion(Include.NON_EMPTY);
  ExportInfoDTO exportDTO=new ExportInfoDTO();
  exportDTO.setQualifier(ImportExportUtil.DATE_FORMATTER.format(new Date()));
  exportDTO.setEncoding(StandardCharsets.UTF_8.name());
  exportDTO.setVersion(JsonVersion.CURRENTLY_JSON_VERSION);
  try (FileWriterWithEncoding infoWriter=new FileWriterWithEncoding(infoFileName,StandardCharsets.UTF_8);FileWriterWithEncoding projectWriter=new FileWriterWithEncoding(projectFileName,StandardCharsets.UTF_8);FileWriterWithEncoding resultWriter=new FileWriterWithEncoding(testResultFileName,StandardCharsets.UTF_8)){
    mapper.writeValue(infoWriter,exportDTO);
    fileList.add(infoFileName);
    JsonExporter exporter=new JsonExporter(proj,monitor);
    ProjectDTO projectDTO=exporter.getProjectDTO();
    mapper.writeValue(projectWriter,projectDTO);
    fileList.add(projectFileName);
    if (includeTestResultSummaries) {
      exporter.writeTestResultSummariesToFile(resultWriter);
      fileList.add(testResultFileName);
    }
    monitor.subTask(Messages.ImportJsonStorageCompress);
    zipIt(fileName,fileList);
  }
 catch (  Exception e) {
    fileList.add(fileName);
    throw e;
  }
 finally {
    fileList.add(dir);
    deleteFiles(fileList);
  }
}