Program: 146552
Project: 146552
Buggy source:
public void run(){
  BamMetadataGeneration metadata=new BamMetadataGeneration(checkRG);
  metadata.ScanFile(input,samplimit);
  final Map<String,Integer[]> values=metadata.getThresholds(maxdist);
  Map<String,DivetOutputHandle> divets=metadata.generateDivetOuts(outbase);
  Map<String,SplitOutputHandle> splits=metadata.generateSplitOuts(outbase);
  System.err.println("String_Node_Str");
  metadata.getSampleIDs().stream().forEach((s) -> {
    System.err.println("String_Node_Str" + s + "String_Node_Str"+ metadata.getSampleInsSize(s)+ "String_Node_Str"+ metadata.getSampleInsStd(s));
  }
);
  final SAMFileReader reader=new SAMFileReader(new File(input));
  reader.setValidationStringency(SAMFileReader.ValidationStringency.SILENT);
  SAMFileHeader h=reader.getFileHeader();
  List<BedSimple> coords=this.getSamIntervals(h);
  List<SamRecordMatcher> collect=coords.parallelStream().map((b) -> {
    SamRecordMatcher w=new SamRecordMatcher(samplimit,checkRG,utilities.GetBaseName.getBaseName(outbase) + "String_Node_Str",values,debug);
    try {
      SAMFileReader temp=new SAMFileReader(new File(input));
      temp.setValidationStringency(SAMFileReader.ValidationStringency.SILENT);
      SAMRecordIterator itr=temp.queryContained(b.Chr(),b.Start(),b.End());
      itr.forEachRemaining((k) -> w.bufferedAdd(k));
      temp.close();
      System.out.print("String_Node_Str");
      System.out.print("String_Node_Str" + b.Chr() + "String_Node_Str"+ b.Start()+ "String_Node_Str"+ b.End()+ "String_Node_Str");
    }
 catch (    Exception ex) {
      System.err.println("String_Node_Str" + b.Chr() + "String_Node_Str"+ b.Start()+ "String_Node_Str"+ b.End());
      ex.printStackTrace();
    }
    return w;
  }
).collect(Collectors.toList());
  SamRecordMatcher worker=new SamRecordMatcher(samplimit,checkRG,utilities.GetBaseName.getBaseName(outbase) + "String_Node_Str",values,debug);
  collect.stream().forEachOrdered((s) -> {
    worker.combineRecordMatcher(s);
  }
);
  reader.close();
  System.out.println(System.lineSeparator() + "String_Node_Str");
  SAMFileReader next=new SAMFileReader(new File(input));
  next.setValidationStringency(SAMFileReader.ValidationStringency.SILENT);
  worker.convertToVariant(divets,splits);
  worker.RetrieveMissingAnchors(splits,next.iterator());
  System.err.println("String_Node_Str");
  MrsFastRuntimeFactory mfact=new MrsFastRuntimeFactory(threads,metadata.getSamFileHeader());
  mfact.ProcessSplitFastqs(splits,reference,outbase);
  Map<String,String> bams=mfact.getBams();
  try (BufferedWriter out=Files.newBufferedWriter(Paths.get(outbase + "String_Node_Str"),Charset.defaultCharset())){
    for (    String s : values.keySet()) {
      out.write(bams.get(s) + "String_Node_Str" + divets.get(s).getDivetFileStr()+ "String_Node_Str");
      out.write(splits.get(s).getAnchorFileStr() + "String_Node_Str" + String.valueOf(metadata.getSampleInsSize(s))+ "String_Node_Str");
      out.write(String.valueOf(metadata.getSampleInsStd(s)));
      out.newLine();
    }
  }
 catch (  IOException ex) {
    ex.printStackTrace();
  }
  System.err.println("String_Node_Str");
  splits.keySet().stream().forEach((s) -> {
    try {
      Files.deleteIfExists(Paths.get(splits.get(s).fq1File()));
    }
 catch (    IOException ex) {
      ex.printStackTrace();
    }
  }
);
  mfact.getSams().keySet().stream().forEach((s) -> {
    try {
      Files.deleteIfExists(Paths.get(s));
    }
 catch (    IOException ex) {
      ex.printStackTrace();
    }
  }
);
}

Fixed version (ground truth):
public void run(){
  log.log(Level.FINE,"String_Node_Str");
  BamMetadataGeneration metadata=new BamMetadataGeneration(checkRG);
  metadata.ScanFile(input,samplimit);
  final Map<String,Integer[]> values=metadata.getThresholds(maxdist);
  Map<String,DivetOutputHandle> divets=metadata.generateDivetOuts(outbase);
  Map<String,SplitOutputHandle> splits=metadata.generateSplitOuts(outbase);
  System.err.println("String_Node_Str");
  metadata.getSampleIDs().stream().forEach((s) -> {
    System.err.println("String_Node_Str" + s + "String_Node_Str"+ metadata.getSampleInsSize(s)+ "String_Node_Str"+ metadata.getSampleInsStd(s));
    log.log(Level.INFO,"String_Node_Str" + s + "String_Node_Str"+ metadata.getSampleInsSize(s)+ "String_Node_Str"+ metadata.getSampleInsStd(s));
  }
);
  final SAMFileReader reader=new SAMFileReader(new File(input));
  reader.setValidationStringency(SAMFileReader.ValidationStringency.SILENT);
  SAMFileHeader h=reader.getFileHeader();
  List<BedSimple> coords=this.getSamIntervals(h);
  List<SamRecordMatcher> collect=coords.parallelStream().map((b) -> {
    SamRecordMatcher w=new SamRecordMatcher(samplimit,checkRG,utilities.GetBaseName.getBaseName(outbase) + "String_Node_Str",values,debug);
    try {
      SAMFileReader temp=new SAMFileReader(new File(input));
      temp.setValidationStringency(SAMFileReader.ValidationStringency.SILENT);
      SAMRecordIterator itr=temp.queryContained(b.Chr(),b.Start(),b.End());
      itr.forEachRemaining((k) -> w.bufferedAdd(k));
      temp.close();
      System.out.print("String_Node_Str");
      System.out.print("String_Node_Str" + b.Chr() + "String_Node_Str"+ b.Start()+ "String_Node_Str"+ b.End()+ "String_Node_Str");
      log.log(Level.INFO,"String_Node_Str" + b.Chr() + "String_Node_Str"+ b.Start()+ "String_Node_Str"+ b.End());
    }
 catch (    Exception ex) {
      System.err.println("String_Node_Str" + b.Chr() + "String_Node_Str"+ b.Start()+ "String_Node_Str"+ b.End());
      log.log(Level.SEVERE,"String_Node_Str" + b.Chr() + "String_Node_Str"+ b.Start()+ "String_Node_Str"+ b.End());
      ex.printStackTrace();
    }
    return w;
  }
).collect(Collectors.toList());
  SamRecordMatcher worker=new SamRecordMatcher(samplimit,checkRG,utilities.GetBaseName.getBaseName(outbase) + "String_Node_Str",values,debug);
  collect.stream().forEachOrdered((s) -> {
    worker.combineRecordMatcher(s);
  }
);
  reader.close();
  System.out.println(System.lineSeparator() + "String_Node_Str");
  SAMFileReader next=new SAMFileReader(new File(input));
  next.setValidationStringency(SAMFileReader.ValidationStringency.SILENT);
  worker.convertToVariant(divets,splits);
  worker.RetrieveMissingAnchors(splits,next.iterator());
  System.err.println("String_Node_Str");
  log.log(Level.INFO,"String_Node_Str");
  MrsFastRuntimeFactory mfact=new MrsFastRuntimeFactory(threads,metadata.getSamFileHeader());
  mfact.ProcessSplitFastqs(splits,reference,outbase);
  Map<String,String> bams=mfact.getBams();
  try (BufferedWriter out=Files.newBufferedWriter(Paths.get(outbase + "String_Node_Str"),Charset.defaultCharset())){
    for (    String s : values.keySet()) {
      out.write(bams.get(s) + "String_Node_Str" + divets.get(s).getDivetFileStr()+ "String_Node_Str");
      out.write(splits.get(s).getAnchorFileStr() + "String_Node_Str" + String.valueOf(metadata.getSampleInsSize(s))+ "String_Node_Str");
      out.write(String.valueOf(metadata.getSampleInsStd(s)));
      out.newLine();
    }
  }
 catch (  IOException ex) {
    ex.printStackTrace();
  }
  System.err.println("String_Node_Str");
  log.log(Level.INFO,"String_Node_Str");
  splits.keySet().stream().forEach((s) -> {
    try {
      Files.deleteIfExists(Paths.get(splits.get(s).fq1File()));
      log.log(Level.FINE,"String_Node_Str" + splits.get(s).fq1File().toString());
    }
 catch (    IOException ex) {
      log.log(Level.SEVERE,"String_Node_Str" + splits.get(s).fq1File().toString(),ex);
    }
  }
);
  mfact.getSams().keySet().stream().forEach((s) -> {
    try {
      Files.deleteIfExists(Paths.get(s));
      log.log(Level.FINE,"String_Node_Str" + s);
    }
 catch (    IOException ex) {
      log.log(Level.SEVERE,"String_Node_Str" + s,ex);
    }
  }
);
}