Program: 118239
Project: 118239
Buggy source:
public boolean buildJobs(String destinationPath,List<? extends IRepositoryNode> nodes,String version,String context,Map<ExportChoice,Object> exportChoiceMap,JobExportType jobExportType,IProgressMonitor monitor) throws Exception {
  IProgressMonitor pMonitor=new NullProgressMonitor();
  if (monitor != null) {
    pMonitor=monitor;
  }
  final List<ProcessItem> processes=getProcesses(nodes);
  if (processes.size() == 1) {
    ProcessItem item=processes.get(0);
    buildJob(destinationPath,item,version,context,exportChoiceMap,jobExportType,pMonitor);
  }
 else {
    int scale=1000;
    int steps=3;
    pMonitor.beginTask(Messages.getString("String_Node_Str",jobExportType),steps * scale * nodes.size());
    String projectLabel=ProjectManager.getInstance().getCurrentProject().getLabel();
    File desFile=new File(destinationPath);
    File tempFolder=new File(desFile.getParent() + File.separator + File.createTempFile("String_Node_Str","String_Node_Str").getName());
    if (tempFolder.exists()) {
      tempFolder.delete();
    }
    File tempProFolder=new File(tempFolder,projectLabel);
    tempProFolder.mkdirs();
    for (int i=0; i < processes.size(); i++) {
      ProcessItem processItem=processes.get(i);
      pMonitor.setTaskName(Messages.getString("String_Node_Str",processItem.getProperty().getLabel()));
      IBuildJobHandler buildJobHandler=BuildJobFactory.createBuildJobHandler(processItem,context,processItem.getProperty().getVersion(),exportChoiceMap,jobExportType);
      buildJobHandler.generateItemFiles(true,new SubProgressMonitor(pMonitor,scale));
      buildJobHandler.generateJobFiles(new SubProgressMonitor(pMonitor,scale));
      buildJobHandler.build(new SubProgressMonitor(pMonitor,scale));
      IFile jobTargetFile=buildJobHandler.getJobTargetFile();
      if (jobTargetFile != null && jobTargetFile.exists()) {
        FilesUtils.unzip(jobTargetFile.getLocation().toPortableString(),tempProFolder.getAbsolutePath());
        String zipPath=jobTargetFile.getLocation().toPortableString();
        if (needClasspathJar(exportChoiceMap)) {
          JavaJobExportReArchieveCreator creator=new JavaJobExportReArchieveCreator(zipPath,processItem.getProperty().getLabel());
          creator.setTempFolder(tempFolder.getAbsolutePath());
          creator.buildNewJar();
        }
      }
      pMonitor.worked(scale);
    }
    FilesUtils.zip(tempFolder.getAbsolutePath(),destinationPath);
    FilesUtils.deleteFile(tempFolder,true);
    pMonitor.done();
  }
  return true;
}

Fixed version (ground truth):
public boolean buildJobs(String destinationPath,List<? extends IRepositoryNode> nodes,List<String> topNames,String version,String context,Map<ExportChoice,Object> exportChoiceMap,JobExportType jobExportType,IProgressMonitor monitor) throws Exception {
  IProgressMonitor pMonitor=new NullProgressMonitor();
  if (monitor != null) {
    pMonitor=monitor;
  }
  final List<ProcessItem> processes=getProcesses(nodes);
  if (processes.size() == 1) {
    ProcessItem item=processes.get(0);
    buildJob(destinationPath,item,version,context,exportChoiceMap,jobExportType,pMonitor);
  }
 else {
    int scale=1000;
    int steps=3;
    pMonitor.beginTask(Messages.getString("String_Node_Str",jobExportType),steps * scale * nodes.size());
    String topName=null;
    if (topNames != null && !topNames.isEmpty()) {
      topName=topNames.get(0);
    }
 else {
      topName=ProjectManager.getInstance().getCurrentProject().getLabel();
    }
    File desFile=new File(destinationPath);
    File tempFolder=new File(desFile.getParent() + File.separator + File.createTempFile("String_Node_Str","String_Node_Str").getName());
    if (tempFolder.exists()) {
      tempFolder.delete();
    }
    File tempProFolder=new File(tempFolder,topName);
    tempProFolder.mkdirs();
    for (int i=0; i < processes.size(); i++) {
      ProcessItem processItem=processes.get(i);
      pMonitor.setTaskName(Messages.getString("String_Node_Str",processItem.getProperty().getLabel()));
      IBuildJobHandler buildJobHandler=BuildJobFactory.createBuildJobHandler(processItem,context,processItem.getProperty().getVersion(),exportChoiceMap,jobExportType);
      buildJobHandler.generateItemFiles(true,new SubProgressMonitor(pMonitor,scale));
      buildJobHandler.generateJobFiles(new SubProgressMonitor(pMonitor,scale));
      buildJobHandler.build(new SubProgressMonitor(pMonitor,scale));
      IFile jobTargetFile=buildJobHandler.getJobTargetFile();
      if (jobTargetFile != null && jobTargetFile.exists()) {
        FilesUtils.unzip(jobTargetFile.getLocation().toPortableString(),tempProFolder.getAbsolutePath());
        String zipPath=jobTargetFile.getLocation().toPortableString();
        if (needClasspathJar(exportChoiceMap)) {
          JavaJobExportReArchieveCreator creator=new JavaJobExportReArchieveCreator(zipPath,processItem.getProperty().getLabel());
          creator.setTempFolder(tempFolder.getAbsolutePath());
          creator.buildNewJar();
        }
      }
      pMonitor.worked(scale);
    }
    FilesUtils.zip(tempFolder.getAbsolutePath(),destinationPath);
    FilesUtils.deleteFile(tempFolder,true);
    pMonitor.done();
  }
  return true;
}