Program: 117954
Project: 117954
Buggy source:
@Test public void testBuildJob() throws Exception {
  Map<ExportChoice,Object> exportChoiceMap=new HashMap<ExportChoice,Object>();
  exportChoiceMap.put(ExportChoice.needLauncher,true);
  exportChoiceMap.put(ExportChoice.needSystemRoutine,true);
  exportChoiceMap.put(ExportChoice.needUserRoutine,true);
  exportChoiceMap.put(ExportChoice.needTalendLibraries,true);
  exportChoiceMap.put(ExportChoice.needJobItem,false);
  exportChoiceMap.put(ExportChoice.needJobScript,true);
  exportChoiceMap.put(ExportChoice.needSourceCode,true);
  exportChoiceMap.put(ExportChoice.includeLibs,true);
  exportChoiceMap.put(ExportChoice.includeTestSource,false);
  exportChoiceMap.put(ExportChoice.executeTests,false);
  exportChoiceMap.put(ExportChoice.binaries,true);
  exportChoiceMap.put(ExportChoice.needContext,true);
  exportChoiceMap.put(ExportChoice.contextName,"String_Node_Str");
  exportChoiceMap.put(ExportChoice.applyToChildren,false);
  exportChoiceMap.put(ExportChoice.needLog4jLevel,false);
  exportChoiceMap.put(ExportChoice.log4jLevel,null);
  exportChoiceMap.put(ExportChoice.needDependencies,true);
  exportChoiceMap.put(ExportChoice.needParameterValues,false);
  destinationPath=ExportJobUtil.getTmpFolderPath() + "String_Node_Str";
  BuildJobManager.getInstance().buildJob(destinationPath,processItem,"String_Node_Str","String_Node_Str",exportChoiceMap,JobExportType.POJO,new NullProgressMonitor());
  assertTrue(new File(destinationPath).exists());
  ZipFile zip=new ZipFile(destinationPath);
  if (GlobalServiceRegister.getDefault().isServiceRegistered(ITransformService.class)) {
    ZipEntry tdm=zip.getEntry("String_Node_Str");
    assertTrue("String_Node_Str",tdm != null && tdm.isDirectory());
  }
  ZipEntry tdq=zip.getEntry("String_Node_Str");
  assertTrue(tdq != null && tdq.isDirectory());
  zip.close();
}

Fixed version (ground truth):
@Test public void testBuildJob() throws Exception {
  Map<ExportChoice,Object> exportChoiceMap=new HashMap<ExportChoice,Object>();
  exportChoiceMap.put(ExportChoice.needLauncher,true);
  exportChoiceMap.put(ExportChoice.needSystemRoutine,true);
  exportChoiceMap.put(ExportChoice.needUserRoutine,true);
  exportChoiceMap.put(ExportChoice.needTalendLibraries,true);
  exportChoiceMap.put(ExportChoice.needJobItem,false);
  exportChoiceMap.put(ExportChoice.needJobScript,true);
  exportChoiceMap.put(ExportChoice.needSourceCode,true);
  exportChoiceMap.put(ExportChoice.includeLibs,true);
  exportChoiceMap.put(ExportChoice.includeTestSource,false);
  exportChoiceMap.put(ExportChoice.executeTests,false);
  exportChoiceMap.put(ExportChoice.binaries,true);
  exportChoiceMap.put(ExportChoice.needContext,true);
  exportChoiceMap.put(ExportChoice.contextName,"String_Node_Str");
  exportChoiceMap.put(ExportChoice.applyToChildren,false);
  exportChoiceMap.put(ExportChoice.needLog4jLevel,false);
  exportChoiceMap.put(ExportChoice.log4jLevel,null);
  exportChoiceMap.put(ExportChoice.needDependencies,true);
  exportChoiceMap.put(ExportChoice.needParameterValues,false);
  destinationPath=ExportJobUtil.getTmpFolderPath() + "String_Node_Str";
  BuildJobManager.getInstance().buildJob(destinationPath,processItem,"String_Node_Str","String_Node_Str",exportChoiceMap,JobExportType.POJO,new NullProgressMonitor());
  assertTrue(new File(destinationPath).exists());
  ZipFile zip=null;
  try {
    zip=new ZipFile(destinationPath);
    ZipEntry jobInfoEntry=zip.getEntry("String_Node_Str");
    assertNotNull("String_Node_Str",jobInfoEntry);
    final InputStream jobInfoStream=zip.getInputStream(jobInfoEntry);
    Properties jobInfoProp=new Properties();
    jobInfoProp.load(jobInfoStream);
    assertEquals("String_Node_Str",jobInfoProp.getProperty("String_Node_Str"));
    assertEquals("String_Node_Str",jobInfoProp.getProperty("String_Node_Str"));
    assertEquals("String_Node_Str",jobInfoProp.getProperty("String_Node_Str"));
    assertEquals("String_Node_Str",jobInfoProp.getProperty("String_Node_Str"));
    assertEquals("String_Node_Str",jobInfoProp.getProperty("String_Node_Str"));
    final String technicalLabel=ProjectManager.getInstance().getCurrentProject().getTechnicalLabel();
    assertEquals(technicalLabel,jobInfoProp.getProperty("String_Node_Str"));
    ZipEntry libEntry=zip.getEntry("String_Node_Str");
    assertNotNull("String_Node_Str",libEntry);
    ZipEntry log4jXmlEntry=zip.getEntry("String_Node_Str");
    assertNotNull("String_Node_Str",log4jXmlEntry);
    ZipEntry batEntry=zip.getEntry("String_Node_Str");
    assertNotNull("String_Node_Str",batEntry);
    ZipEntry shEntry=zip.getEntry("String_Node_Str");
    assertNotNull("String_Node_Str",shEntry);
    ZipEntry jarEntry=zip.getEntry("String_Node_Str");
    assertNotNull("String_Node_Str",jarEntry);
    ZipEntry javaEntry=zip.getEntry("String_Node_Str" + technicalLabel.toLowerCase() + "String_Node_Str");
    assertNotNull("String_Node_Str",javaEntry);
    ZipEntry routinesEntry=zip.getEntry("String_Node_Str");
    assertNotNull("String_Node_Str",routinesEntry);
    assertTrue(routinesEntry.isDirectory());
    ZipEntry contextEntry=zip.getEntry("String_Node_Str" + technicalLabel.toLowerCase() + "String_Node_Str");
    assertNotNull("String_Node_Str",contextEntry);
    ZipEntry tdq=zip.getEntry("String_Node_Str");
    assertNotNull("String_Node_Str",tdq);
    assertTrue(tdq.isDirectory());
    if (GlobalServiceRegister.getDefault().isServiceRegistered(ITransformService.class)) {
      ITransformService tdmService=(ITransformService)GlobalServiceRegister.getDefault().getService(ITransformService.class);
      if (tdmService.isTransformItem(processItem)) {
        ZipEntry tdmSettingEntry=zip.getEntry("String_Node_Str" + technicalLabel.toLowerCase() + "String_Node_Str");
        assertNotNull("String_Node_Str",tdmSettingEntry);
        final JarInputStream jarStream=new JarInputStream(zip.getInputStream(jarEntry));
        boolean found=false;
        JarEntry entry;
        while ((entry=jarStream.getNextJarEntry()) != null) {
          final String name=entry.getName();
          if (name.contains("String_Node_Str") && name.endsWith(technicalLabel + "String_Node_Str")) {
            found=true;
          }
        }
        jarStream.close();
        assertTrue("String_Node_Str",found);
      }
    }
  }
  finally {
    if (zip != null) {
      zip.close();
    }
  }
}