Program: 122320
Project: 122320
Buggy source:
@Override public List<ExportFileResource> getExportResources(ExportFileResource[] process,String... codeOptions){
  boolean needSource=(Boolean)exportChoice.get(ExportChoice.needSourceCode);
  boolean needDependencies=(Boolean)exportChoice.get(ExportChoice.needDependencies);
  boolean needUserRoutines=(Boolean)exportChoice.get(ExportChoice.needUserRoutine);
  boolean generateEndpoint=PetalsTemporaryOptionsKeeper.INSTANCE.isGenerateEndpoint();
  boolean singleton=PetalsTemporaryOptionsKeeper.INSTANCE.isSingleton();
  boolean validateByWSdl=PetalsTemporaryOptionsKeeper.INSTANCE.isValidateByWsdl();
  List<ExportFileResource> resources=new ArrayList<ExportFileResource>();
  for (  ExportFileResource proces : process) {
    ProcessItem processItem=(ProcessItem)proces.getItem();
    String selectedJobVersion=processItem.getProperty().getVersion();
    String directoryName=processItem.getProperty().getLabel();
    String libPath=calculateLibraryPathFromDirectory(proces.getDirectoryName());
    String standardJars=libPath + PATH_SEPARATOR + SYSTEMROUTINE_JAR+ ProcessorUtilities.TEMP_JAVA_CLASSPATH_SEPARATOR+ libPath+ PATH_SEPARATOR+ USERROUTINE_JAR+ ProcessorUtilities.TEMP_JAVA_CLASSPATH_SEPARATOR+ "String_Node_Str";
    ProcessorUtilities.setExportConfig("String_Node_Str",standardJars,libPath);
    try {
      generateJobFiles(processItem,contextName,selectedJobVersion,statisticPort != IProcessor.NO_STATISTICS,tracePort != IProcessor.NO_TRACES,APPLY_TO_CHILDREN,this.progressMonitor);
    }
 catch (    ProcessorException e) {
      e.printStackTrace();
    }
    ExportFileResource libResource=new ExportFileResource(processItem,directoryName);
    resources.add(libResource);
    List<URL> talendLibraries=getExternalLibraries(true,process);
    libResource.addResources(talendLibraries);
    addXmlMapping(proces,isOptionChoosed(ExportChoice.needSourceCode));
    List<URL> systemRoutineList=getSystemRoutine(process);
    libResource.addResources(systemRoutineList);
    addDependencies(process,processItem,needDependencies,libResource);
    if (needUserRoutines) {
      List<URL> userRoutineList=getUserRoutine(process);
      libResource.addResources(userRoutineList);
    }
    libResource.addResources(getJobScripts(processItem,selectedJobVersion,true));
    ExportFileResource srcResource=new ExportFileResource(processItem,directoryName);
    addSourceCode(process,processItem,needSource,srcResource,selectedJobVersion);
    resources.add(srcResource);
    ExportFileResource contextResource=new ExportFileResource(processItem,directoryName);
    addContextScripts(contextResource,selectedJobVersion,NEED_CONTEXT);
    resources.add(contextResource);
    addSubJobResources(process,processItem,APPLY_TO_CHILDREN,exportChoice,libResource,contextResource,srcResource,selectedJobVersion);
    ExportFileResource jbiDescriptorFile=generateJbiDescriptorFile(processItem,generateEndpoint,singleton,validateByWSdl,contextName);
    resources.add(jbiDescriptorFile);
    ExportFileResource wsdlFile=generateWsdlFile(processItem);
    resources.add(wsdlFile);
  }
  String directoryName=ProjectManager.getInstance().getCurrentProject().getTechnicalLabel();
  ExportFileResource routinesSrcResource=new ExportFileResource();
  routinesSrcResource.setDirectoryName(directoryName);
  addDependenciesSourceCode(process,routinesSrcResource,needSource);
  resources.add(routinesSrcResource);
  return resources;
}

Fixed version (ground truth):
@Override public List<ExportFileResource> getExportResources(ExportFileResource[] process,String... codeOptions){
  boolean needSource=(Boolean)exportChoice.get(ExportChoice.needSourceCode);
  boolean needUserRoutines=(Boolean)exportChoice.get(ExportChoice.needUserRoutine);
  boolean generateEndpoint=PetalsTemporaryOptionsKeeper.INSTANCE.isGenerateEndpoint();
  boolean singleton=PetalsTemporaryOptionsKeeper.INSTANCE.isSingleton();
  boolean validateByWSdl=PetalsTemporaryOptionsKeeper.INSTANCE.isValidateByWsdl();
  List<ExportFileResource> resources=new ArrayList<ExportFileResource>();
  for (  ExportFileResource proces : process) {
    ProcessItem processItem=(ProcessItem)proces.getItem();
    String selectedJobVersion=processItem.getProperty().getVersion();
    String directoryName=processItem.getProperty().getLabel();
    String libPath=calculateLibraryPathFromDirectory(proces.getDirectoryName());
    String standardJars=libPath + PATH_SEPARATOR + SYSTEMROUTINE_JAR+ ProcessorUtilities.TEMP_JAVA_CLASSPATH_SEPARATOR+ libPath+ PATH_SEPARATOR+ USERROUTINE_JAR+ ProcessorUtilities.TEMP_JAVA_CLASSPATH_SEPARATOR+ "String_Node_Str";
    ProcessorUtilities.setExportConfig("String_Node_Str",standardJars,libPath);
    try {
      generateJobFiles(processItem,contextName,selectedJobVersion,statisticPort != IProcessor.NO_STATISTICS,tracePort != IProcessor.NO_TRACES,APPLY_TO_CHILDREN,this.progressMonitor);
    }
 catch (    ProcessorException e) {
      e.printStackTrace();
    }
    ExportFileResource libResource=new ExportFileResource(processItem,directoryName);
    resources.add(libResource);
    List<URL> talendLibraries=getExternalLibraries(true,process);
    libResource.addResources(talendLibraries);
    addXmlMapping(proces,isOptionChoosed(ExportChoice.needSourceCode));
    List<URL> systemRoutineList=getSystemRoutine(process);
    libResource.addResources(systemRoutineList);
    if (needUserRoutines) {
      List<URL> userRoutineList=getUserRoutine(process);
      libResource.addResources(userRoutineList);
    }
    libResource.addResources(getJobScripts(processItem,selectedJobVersion,true));
    ExportFileResource srcResource=new ExportFileResource(processItem,directoryName);
    addSourceCode(process,processItem,needSource,srcResource,selectedJobVersion);
    resources.add(srcResource);
    ExportFileResource contextResource=new ExportFileResource(processItem,directoryName);
    addContextScripts(contextResource,selectedJobVersion,NEED_CONTEXT);
    resources.add(contextResource);
    addSubJobResources(process,processItem,APPLY_TO_CHILDREN,exportChoice,libResource,contextResource,srcResource,selectedJobVersion);
    ExportFileResource jbiDescriptorFile=generateJbiDescriptorFile(processItem,generateEndpoint,singleton,validateByWSdl,contextName);
    resources.add(jbiDescriptorFile);
    ExportFileResource wsdlFile=generateWsdlFile(processItem);
    resources.add(wsdlFile);
  }
  String directoryName=ProjectManager.getInstance().getCurrentProject().getTechnicalLabel();
  ExportFileResource routinesSrcResource=new ExportFileResource();
  routinesSrcResource.setDirectoryName(directoryName);
  addDependenciesSourceCode(process,routinesSrcResource,needSource);
  resources.add(routinesSrcResource);
  return resources;
}