Program: 59667
Project: 59667
Buggy source:
@Override protected void internalParseXml(Element element) throws IOException {
  Element librariesElement=XmlHelper.getDistinctElementByName(element,KEY_ELEM_LIBRARIES);
  NodeList libraries=librariesElement.getElementsByTagName(KEY_ELEM_LIBRARY);
  this.libs=new ArrayList<>();
  for (int i=0; i < libraries.getLength(); i++) {
    this.libs.add(new Library((Element)libraries.item(i),this.getOutputDir().getAbsoluteFile()));
  }
  Element pipelineElement=XmlHelper.getDistinctElementByName(element,KEY_ELEM_PIPELINE);
  Element mecqElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_MECQ);
  this.mecqArgs=mecqElement == null ? null : new Mecq.Args(mecqElement,this.rampartJobFileSystem.getMeqcDir(),this.getJobPrefix() + "String_Node_Str",this.libs);
  this.stages.setArgsIfPresent(RampartStage.MECQ,this.mecqArgs);
  Element analyseReadsElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_ANALYSE_READS);
  this.analyseReadsArgs=analyseReadsElement == null ? null : new AnalyseReads.Args(analyseReadsElement,this.libs,this.mecqArgs == null ? new ArrayList<Mecq.EcqArgs>() : this.mecqArgs.getEqcArgList(),this.getJobPrefix() + "String_Node_Str",this.rampartJobFileSystem.getMeqcDir(),this.rampartJobFileSystem.getAnalyseReadsDir(),this.getOrganism());
  this.stages.setArgsIfPresent(RampartStage.ANALYSE_READS,this.analyseReadsArgs);
  Element massElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_MASS);
  this.massArgs=massElement == null ? null : new Mass.Args(massElement,this.rampartJobFileSystem.getMassDir(),this.rampartJobFileSystem.getMeqcDir(),this.getJobPrefix() + "String_Node_Str",this.libs,this.mecqArgs == null ? new ArrayList<Mecq.EcqArgs>() : this.mecqArgs.getEqcArgList(),this.getOrganism());
  this.stages.setArgsIfPresent(RampartStage.MASS,this.massArgs);
  Element analyseMassElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_ANALYSE_MASS);
  this.analyseMassArgs=analyseMassElement == null ? null : new AnalyseMassAssemblies.Args(analyseMassElement,this.rampartJobFileSystem.getMassDir(),this.analyseReadsArgs != null ? this.rampartJobFileSystem.getAnalyseReadsDir() : null,this.rampartJobFileSystem.getAnalyseMassDir(),this.massArgs == null ? null : this.massArgs.getSingleMassArgsList(),this.getOrganism(),this.getJobPrefix() + "String_Node_Str");
  this.stages.setArgsIfPresent(RampartStage.ANALYSE_MASS,this.analyseMassArgs);
  Element ampElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_AMP);
  this.ampArgs=ampElement == null ? null : new Amp.Args(ampElement,this.rampartJobFileSystem.getAmpDir(),this.getJobPrefix() + "String_Node_Str",this.ampInput != null ? this.ampInput : this.rampartJobFileSystem.getSelectedAssemblyFile(),this.getOrganism().getPloidy() > 1 ? this.ampBubble != null ? this.ampBubble : this.rampartJobFileSystem.getSelectedBubbleFile() : null,this.libs,this.mecqArgs == null ? new ArrayList<Mecq.EcqArgs>() : this.mecqArgs.getEqcArgList(),this.getOrganism());
  this.stages.setArgsIfPresent(RampartStage.AMP,this.ampArgs);
  Element analyseAmpElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_ANALYSE_AMP);
  this.analyseAmpArgs=analyseAmpElement == null ? null : new AnalyseAmpAssemblies.Args(analyseAmpElement,this.analyseReadsArgs != null ? this.rampartJobFileSystem.getAnalyseReadsDir() : null,this.rampartJobFileSystem.getAnalyseAmpDir(),this.ampArgs == null ? null : this.ampArgs.getStageArgsList(),this.getOrganism(),this.getJobPrefix() + "String_Node_Str");
  this.stages.setArgsIfPresent(RampartStage.ANALYSE_AMP,this.analyseAmpArgs);
  File finalAssembly=this.ampArgs == null ? this.rampartJobFileSystem.getSelectedAssemblyFile() : this.ampArgs.getFinalAssembly();
  Element finaliseElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_FINALISE);
  this.finaliseArgs=finaliseElement == null ? null : new Finalise.Args(finaliseElement,finalAssembly,this.rampartJobFileSystem.getFinalDir(),this.getOrganism(),this.getInstitution());
  this.stages.setArgsIfPresent(RampartStage.FINALISE,this.finaliseArgs);
}

Fixed version (ground truth):
@Override protected void internalParseXml(Element element) throws IOException {
  Element librariesElement=XmlHelper.getDistinctElementByName(element,KEY_ELEM_LIBRARIES);
  NodeList libraries=librariesElement.getElementsByTagName(KEY_ELEM_LIBRARY);
  this.libs=new ArrayList<>();
  for (int i=0; i < libraries.getLength(); i++) {
    this.libs.add(new Library((Element)libraries.item(i),this.getOutputDir().getAbsoluteFile()));
  }
  Element pipelineElement=XmlHelper.getDistinctElementByName(element,KEY_ELEM_PIPELINE);
  Element mecqElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_MECQ);
  this.mecqArgs=mecqElement == null ? null : new Mecq.Args(mecqElement,this.rampartJobFileSystem.getMeqcDir(),this.getJobPrefix() + "String_Node_Str",this.libs);
  this.stages.setArgsIfPresent(RampartStage.MECQ,this.mecqArgs);
  Element analyseReadsElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_ANALYSE_READS);
  this.analyseReadsArgs=analyseReadsElement == null ? null : new AnalyseReads.Args(analyseReadsElement,this.libs,this.mecqArgs == null ? new ArrayList<Mecq.EcqArgs>() : this.mecqArgs.getEqcArgList(),this.getJobPrefix() + "String_Node_Str",this.rampartJobFileSystem.getMeqcDir(),this.rampartJobFileSystem.getAnalyseReadsDir(),this.getOrganism());
  this.stages.setArgsIfPresent(RampartStage.ANALYSE_READS,this.analyseReadsArgs);
  Element massElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_MASS);
  this.massArgs=massElement == null ? null : new Mass.Args(massElement,this.rampartJobFileSystem.getMassDir(),this.rampartJobFileSystem.getMeqcDir(),this.getJobPrefix() + "String_Node_Str",this.libs,this.mecqArgs == null ? new ArrayList<Mecq.EcqArgs>() : this.mecqArgs.getEqcArgList(),this.getOrganism());
  this.stages.setArgsIfPresent(RampartStage.MASS,this.massArgs);
  Element analyseMassElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_ANALYSE_MASS);
  this.analyseMassArgs=analyseMassElement == null ? null : new AnalyseMassAssemblies.Args(analyseMassElement,this.rampartJobFileSystem.getMassDir(),this.analyseReadsArgs != null ? this.rampartJobFileSystem.getAnalyseReadsDir() : null,this.rampartJobFileSystem.getAnalyseMassDir(),this.massArgs == null ? null : this.massArgs.getMassJobArgList(),this.getOrganism(),this.getJobPrefix() + "String_Node_Str");
  this.stages.setArgsIfPresent(RampartStage.ANALYSE_MASS,this.analyseMassArgs);
  Element ampElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_AMP);
  this.ampArgs=ampElement == null ? null : new Amp.Args(ampElement,this.rampartJobFileSystem.getAmpDir(),this.getJobPrefix() + "String_Node_Str",this.ampInput != null ? this.ampInput : this.rampartJobFileSystem.getSelectedAssemblyFile(),this.getOrganism().getPloidy() > 1 ? this.ampBubble != null ? this.ampBubble : this.rampartJobFileSystem.getSelectedBubbleFile() : null,this.libs,this.mecqArgs == null ? new ArrayList<Mecq.EcqArgs>() : this.mecqArgs.getEqcArgList(),this.getOrganism());
  this.stages.setArgsIfPresent(RampartStage.AMP,this.ampArgs);
  Element analyseAmpElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_ANALYSE_AMP);
  this.analyseAmpArgs=analyseAmpElement == null ? null : new AnalyseAmpAssemblies.Args(analyseAmpElement,this.analyseReadsArgs != null ? this.rampartJobFileSystem.getAnalyseReadsDir() : null,this.rampartJobFileSystem.getAnalyseAmpDir(),this.ampArgs == null ? null : this.ampArgs.getStageArgsList(),this.getOrganism(),this.getJobPrefix() + "String_Node_Str");
  this.stages.setArgsIfPresent(RampartStage.ANALYSE_AMP,this.analyseAmpArgs);
  File finalAssembly=this.ampArgs == null ? this.rampartJobFileSystem.getSelectedAssemblyFile() : this.ampArgs.getFinalAssembly();
  Element finaliseElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_FINALISE);
  this.finaliseArgs=finaliseElement == null ? null : new Finalise.Args(finaliseElement,finalAssembly,this.rampartJobFileSystem.getFinalDir(),this.getOrganism(),this.getInstitution());
  this.stages.setArgsIfPresent(RampartStage.FINALISE,this.finaliseArgs);
}