Program: 125711
Project: 125711
Buggy source:
@SuppressWarnings("String_Node_Str") protected void addChildrenJobsInAssembly(IProgressMonitor monitor,IFile assemblyFile) throws Exception {
  if (!assemblyFile.exists()) {
    return;
  }
  final File file=assemblyFile.getLocation().toFile();
  DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
  DocumentBuilder db=dbf.newDocumentBuilder();
  Document document=db.parse(file);
  if (document == null) {
    throw new IOException("String_Node_Str" + file);
  }
  Node filesElem=getElement(document.getDocumentElement(),"String_Node_Str",1);
  Node fileSetsElem=getElement(document.getDocumentElement(),"String_Node_Str",1);
  if (fileSetsElem == null) {
    fileSetsElem=document.createElement("String_Node_Str");
    document.appendChild(fileSetsElem);
  }
  List<String> childrenPomsIncludes=new ArrayList<String>();
  List<String> childrenFolderResourcesIncludes=new ArrayList<String>();
  final Set<JobInfo> clonedChildrenJobInfors=getJobProcessor().getBuildChildrenJobs();
  for (  JobInfo child : clonedChildrenJobInfors) {
    if (child.getFatherJobInfo() != null) {
      String jobClassPackageFolder=null;
      if (child.getProcessItem() != null) {
        jobClassPackageFolder=JavaResourcesHelper.getJobClassPackageFolder(child.getProcessItem());
      }
 else {
        String projectName=null;
        String jobId=child.getJobId();
        if (jobId != null) {
          IProxyRepositoryFactory proxyRepositoryFactory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
          IRepositoryViewObject lastVersion=proxyRepositoryFactory.getLastVersion(jobId);
          if (lastVersion != null) {
            Property property=lastVersion.getProperty();
            if (property != null) {
              Project project=ProjectManager.getInstance().getProject(property.getItem());
              projectName=project.getTechnicalLabel();
            }
          }
        }
        if (projectName == null) {
          projectName=ProjectManager.getInstance().getCurrentProject().getTechnicalLabel();
        }
        jobClassPackageFolder=JavaResourcesHelper.getJobClassPackageFolder(projectName,child.getJobName(),child.getJobVersion());
      }
      childrenPomsIncludes.add(PomUtil.getPomFileName(child.getJobName(),child.getJobVersion()));
      if (!child.isTestContainer()) {
        childrenFolderResourcesIncludes.add(jobClassPackageFolder + "String_Node_Str");
      }
    }
  }
  if (!clonedChildrenJobInfors.isEmpty()) {
    addAssemblyFileSets(fileSetsElem,"String_Node_Str","String_Node_Str",false,childrenPomsIncludes,null,null,null,null,false,"String_Node_Str");
    if (!childrenFolderResourcesIncludes.isEmpty()) {
      addAssemblyFileSets(fileSetsElem,"String_Node_Str","String_Node_Str",false,childrenFolderResourcesIncludes,null,null,null,null,false,"String_Node_Str");
      addAssemblyFileSets(fileSetsElem,"String_Node_Str","String_Node_Str",false,childrenFolderResourcesIncludes,null,null,null,null,false,"String_Node_Str");
      addAssemblyFileSets(fileSetsElem,"String_Node_Str","String_Node_Str",false,childrenFolderResourcesIncludes,null,null,null,null,false,"String_Node_Str");
    }
    TransformerFactory transFactory=TransformerFactory.newInstance();
    Transformer transFormer=transFactory.newTransformer();
    transFormer.setOutputProperty(OutputKeys.INDENT,"String_Node_Str");
    transFormer.transform(new DOMSource(document),new StreamResult(new FileOutputStream(file)));
    cleanChildrenPomSettings(monitor,childrenPomsIncludes);
    assemblyFile.getProject().refreshLocal(IResource.DEPTH_ONE,monitor);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") protected void addChildrenJobsInAssembly(IProgressMonitor monitor,IFile assemblyFile) throws Exception {
  if (!assemblyFile.exists()) {
    return;
  }
  final File file=assemblyFile.getLocation().toFile();
  DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
  DocumentBuilder db=dbf.newDocumentBuilder();
  Document document=db.parse(file);
  if (document == null) {
    throw new IOException("String_Node_Str" + file);
  }
  Node filesElem=getElement(document.getDocumentElement(),"String_Node_Str",1);
  Node fileSetsElem=getElement(document.getDocumentElement(),"String_Node_Str",1);
  if (fileSetsElem == null) {
    fileSetsElem=document.createElement("String_Node_Str");
    document.appendChild(fileSetsElem);
  }
  List<String> childrenPomsIncludes=new ArrayList<String>();
  List<String> childrenFolderResourcesIncludes=new ArrayList<String>();
  final Set<JobInfo> clonedChildrenJobInfors=getJobProcessor().getBuildChildrenJobs();
  clonedChildrenJobInfors.remove(LastGenerationInfo.getInstance().getLastMainJob());
  for (  JobInfo child : clonedChildrenJobInfors) {
    if (child.getFatherJobInfo() != null) {
      String jobClassPackageFolder=null;
      if (child.getProcessItem() != null) {
        jobClassPackageFolder=JavaResourcesHelper.getJobClassPackageFolder(child.getProcessItem());
      }
 else {
        String projectName=null;
        String jobId=child.getJobId();
        if (jobId != null) {
          IProxyRepositoryFactory proxyRepositoryFactory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
          IRepositoryViewObject lastVersion=proxyRepositoryFactory.getLastVersion(jobId);
          if (lastVersion != null) {
            Property property=lastVersion.getProperty();
            if (property != null) {
              Project project=ProjectManager.getInstance().getProject(property.getItem());
              projectName=project.getTechnicalLabel();
            }
          }
        }
        if (projectName == null) {
          projectName=ProjectManager.getInstance().getCurrentProject().getTechnicalLabel();
        }
        jobClassPackageFolder=JavaResourcesHelper.getJobClassPackageFolder(projectName,child.getJobName(),child.getJobVersion());
      }
      childrenPomsIncludes.add(PomUtil.getPomFileName(child.getJobName(),child.getJobVersion()));
      if (!child.isTestContainer()) {
        childrenFolderResourcesIncludes.add(jobClassPackageFolder + "String_Node_Str");
      }
    }
  }
  if (!clonedChildrenJobInfors.isEmpty()) {
    addAssemblyFileSets(fileSetsElem,"String_Node_Str","String_Node_Str",false,childrenPomsIncludes,null,null,null,null,false,"String_Node_Str");
    if (!childrenFolderResourcesIncludes.isEmpty()) {
      addAssemblyFileSets(fileSetsElem,"String_Node_Str","String_Node_Str",false,childrenFolderResourcesIncludes,null,null,null,null,false,"String_Node_Str");
      addAssemblyFileSets(fileSetsElem,"String_Node_Str","String_Node_Str",false,childrenFolderResourcesIncludes,null,null,null,null,false,"String_Node_Str");
      addAssemblyFileSets(fileSetsElem,"String_Node_Str","String_Node_Str",false,childrenFolderResourcesIncludes,null,null,null,null,false,"String_Node_Str");
    }
    TransformerFactory transFactory=TransformerFactory.newInstance();
    Transformer transFormer=transFactory.newTransformer();
    transFormer.setOutputProperty(OutputKeys.INDENT,"String_Node_Str");
    transFormer.transform(new DOMSource(document),new StreamResult(new FileOutputStream(file)));
    cleanChildrenPomSettings(monitor,childrenPomsIncludes);
    assemblyFile.getProject().refreshLocal(IResource.DEPTH_ONE,monitor);
  }
}