nus-yam/ex-repair huggingface dataset:
Program: 13716
Project: 13716
Buggy source:
public void runUnifiedGenotyper(String input,String output,double scc,double sec,String ref,String[] knownSites,String region) throws InterruptedException {
  ArrayList<String> command=new ArrayList<String>();
  String[] gatkcmd={java,mem,"String_Node_Str",gatk,"String_Node_Str","String_Node_Str",multiThreadingTypes[threadingType],"String_Node_Str" + threads,"String_Node_Str",ref,"String_Node_Str",input,"String_Node_Str",output,"String_Node_Str",roundOneDecimal(scc),"String_Node_Str",roundOneDecimal(sec),"String_Node_Str",region,NO_CMD_HEADER,DISABLE_VCF_LOCKING};
  command.addAll(Arrays.asList(gatkcmd));
  if (knownSites != null) {
    for (    String knownSite : knownSites) {
      command.add("String_Node_Str");
      command.add(knownSite);
    }
  }
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  command=CommandGenerator.addToCommand(command,customArgs);
  Object[] objectList=command.toArray();
  long estimatedTime=runProcessAndWait("String_Node_Str",Arrays.copyOf(objectList,objectList.length,String[].class));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_GATK_VARIANT_CALLER).increment(estimatedTime);
}

Fixed version (ground truth):
public void runUnifiedGenotyper(String input,String output,double scc,double sec,String ref,String[] knownSites,String region) throws InterruptedException {
  ArrayList<String> command=new ArrayList<String>();
  command.addAll(java);
  String[] gatkcmd={mem,"String_Node_Str",gatk,"String_Node_Str","String_Node_Str",multiThreadingTypes[threadingType],"String_Node_Str" + threads,"String_Node_Str",ref,"String_Node_Str",input,"String_Node_Str",output,"String_Node_Str",roundOneDecimal(scc),"String_Node_Str",roundOneDecimal(sec),"String_Node_Str",region,NO_CMD_HEADER,DISABLE_VCF_LOCKING};
  command.addAll(Arrays.asList(gatkcmd));
  if (knownSites != null) {
    for (    String knownSite : knownSites) {
      command.add("String_Node_Str");
      command.add(knownSite);
    }
  }
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  command=CommandGenerator.addToCommand(command,customArgs);
  Object[] objectList=command.toArray();
  long estimatedTime=runProcessAndWait("String_Node_Str",Arrays.copyOf(objectList,objectList.length,String[].class));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_GATK_VARIANT_CALLER).increment(estimatedTime);
}
Program: 13717
Project: 13717
Buggy source:
public GATKTools(String reference,String bin){
  this.reference=reference;
  this.bin=bin;
  this.java="String_Node_Str";
  this.gatk=bin + "String_Node_Str";
  onedec=new DecimalFormat("String_Node_Str");
}

Fixed version (ground truth):
public GATKTools(String reference,String bin){
  this.reference=reference;
  this.bin=bin;
  java=new ArrayList<>();
  java.add("String_Node_Str");
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  java.add(customArgs);
  this.gatk=bin + "String_Node_Str";
  onedec=new DecimalFormat("String_Node_Str");
}
Program: 13718
Project: 13718
Buggy source:
public void setJava(String java){
  this.java=java;
}

Fixed version (ground truth):
public void setJava(String java){
  this.java.set(0,java);
}
Program: 13719
Project: 13719
Buggy source:
public void runVariantAnnotator(String input,String output,String ref,String region) throws InterruptedException {
  String[] command={java,mem,"String_Node_Str",gatk,"String_Node_Str","String_Node_Str",multiThreadingTypes[0],"String_Node_Str" + threads,"String_Node_Str",ref,"String_Node_Str",input,"String_Node_Str",output,"String_Node_Str",region};
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  long estimatedTime=runProcessAndWait("String_Node_Str",AddCustomArguments(command,customArgs));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_GATK_INDEL_REALN).increment(estimatedTime);
}

Fixed version (ground truth):
public void runVariantAnnotator(String input,String output,String ref,String region) throws InterruptedException {
  String[] command={mem,"String_Node_Str",gatk,"String_Node_Str","String_Node_Str",multiThreadingTypes[0],"String_Node_Str" + threads,"String_Node_Str",ref,"String_Node_Str",input,"String_Node_Str",output,"String_Node_Str",region};
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  long estimatedTime=runProcessAndWait("String_Node_Str",AddCustomArguments(command,customArgs));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_GATK_INDEL_REALN).increment(estimatedTime);
}
Program: 13720
Project: 13720
Buggy source:
public void runPrintReads(String input,String output,String ref,String table,String region) throws InterruptedException {
  String[] command={java,mem,"String_Node_Str",gatk,"String_Node_Str","String_Node_Str","String_Node_Str",ref,"String_Node_Str",input,"String_Node_Str",output,"String_Node_Str",table,"String_Node_Str",region};
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  long estimatedTime=runProcessAndWait("String_Node_Str",AddCustomArguments(command,customArgs));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_GATK_PRINT_READS).increment(estimatedTime);
}

Fixed version (ground truth):
public void runPrintReads(String input,String output,String ref,String table,String region) throws InterruptedException {
  String[] command={mem,"String_Node_Str",gatk,"String_Node_Str","String_Node_Str","String_Node_Str",ref,"String_Node_Str",input,"String_Node_Str",output,"String_Node_Str",table,"String_Node_Str",region};
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  long estimatedTime=runProcessAndWait("String_Node_Str",AddCustomArguments(command,customArgs));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_GATK_PRINT_READS).increment(estimatedTime);
}
Program: 13721
Project: 13721
Buggy source:
private static String[] AddCustomArguments(String[] command,String customArgs){
  if (customArgs == null || customArgs.isEmpty())   return command;
  ArrayList<String> tmp=new ArrayList(Arrays.asList(command));
  tmp=CommandGenerator.addToCommand(tmp,customArgs);
  Object[] ObjectList=tmp.toArray();
  return Arrays.copyOf(ObjectList,ObjectList.length,String[].class);
}

Fixed version (ground truth):
private String[] AddCustomArguments(String[] args,String customArgs){
  ArrayList<String> command=new ArrayList<>();
  command.addAll(java);
  Collections.addAll(command,args);
  command=CommandGenerator.addToCommand(command,customArgs);
  Object[] ObjectList=command.toArray();
  return Arrays.copyOf(ObjectList,ObjectList.length,String[].class);
}
Program: 13722
Project: 13722
Buggy source:
public String getJava(){
  return java;
}

Fixed version (ground truth):
public String getJava(){
  return java.get(0);
}
Program: 13723
Project: 13723
Buggy source:
public void runIndelRealigner(String input,String targets,String output,String ref,String region) throws InterruptedException {
  String[] command={java,mem,"String_Node_Str",gatk,"String_Node_Str","String_Node_Str","String_Node_Str",ref,"String_Node_Str",input,"String_Node_Str",targets,"String_Node_Str",output,"String_Node_Str",region};
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  long estimatedTime=runProcessAndWait("String_Node_Str",AddCustomArguments(command,customArgs));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_GATK_INDEL_REALN).increment(estimatedTime);
}

Fixed version (ground truth):
public void runIndelRealigner(String input,String targets,String output,String ref,String region) throws InterruptedException {
  String[] command={mem,"String_Node_Str",gatk,"String_Node_Str","String_Node_Str","String_Node_Str",ref,"String_Node_Str",input,"String_Node_Str",targets,"String_Node_Str",output,"String_Node_Str",region};
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  long estimatedTime=runProcessAndWait("String_Node_Str",AddCustomArguments(command,customArgs));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_GATK_INDEL_REALN).increment(estimatedTime);
}
Program: 13724
Project: 13724
Buggy source:
public void runRealignerTargetCreator(String input,String targets,String ref,String region) throws InterruptedException {
  String[] command={java,mem,"String_Node_Str",gatk,"String_Node_Str","String_Node_Str",multiThreadingTypes[0],"String_Node_Str" + threads,"String_Node_Str",ref,"String_Node_Str",input,"String_Node_Str",targets,"String_Node_Str",region};
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  long estimatedTime=runProcessAndWait("String_Node_Str",AddCustomArguments(command,customArgs));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_GATK_TARGET_CREATOR).increment(estimatedTime);
}

Fixed version (ground truth):
public void runRealignerTargetCreator(String input,String targets,String ref,String region) throws InterruptedException {
  String[] command={mem,"String_Node_Str",gatk,"String_Node_Str","String_Node_Str",multiThreadingTypes[0],"String_Node_Str" + threads,"String_Node_Str",ref,"String_Node_Str",input,"String_Node_Str",targets,"String_Node_Str",region};
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  long estimatedTime=runProcessAndWait("String_Node_Str",AddCustomArguments(command,customArgs));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_GATK_TARGET_CREATOR).increment(estimatedTime);
}
Program: 13725
Project: 13725
Buggy source:
public void runBaseRecalibrator(String input,String table,String ref,String[] knownSites,String region) throws InterruptedException {
  ArrayList<String> command=new ArrayList<>();
  String[] gatkcmd={java,mem,"String_Node_Str",gatk,"String_Node_Str","String_Node_Str",multiThreadingTypes[1],"String_Node_Str" + threads,"String_Node_Str",ref,"String_Node_Str",input,"String_Node_Str",table,"String_Node_Str",region,DISABLE_VCF_LOCKING};
  command.addAll(Arrays.asList(gatkcmd));
  for (  String knownSite : knownSites) {
    command.add("String_Node_Str");
    command.add(knownSite);
  }
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  command=CommandGenerator.addToCommand(command,customArgs);
  Object[] objectList=command.toArray();
  long estimatedTime=runProcessAndWait("String_Node_Str",Arrays.copyOf(objectList,objectList.length,String[].class));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_GATK_RECAL).increment(estimatedTime);
}

Fixed version (ground truth):
public void runBaseRecalibrator(String input,String table,String ref,String[] knownSites,String region) throws InterruptedException {
  ArrayList<String> command=new ArrayList<>();
  command.addAll(java);
  String[] gatkcmd={mem,"String_Node_Str",gatk,"String_Node_Str","String_Node_Str",multiThreadingTypes[1],"String_Node_Str" + threads,"String_Node_Str",ref,"String_Node_Str",input,"String_Node_Str",table,"String_Node_Str",region,DISABLE_VCF_LOCKING};
  command.addAll(Arrays.asList(gatkcmd));
  for (  String knownSite : knownSites) {
    command.add("String_Node_Str");
    command.add(knownSite);
  }
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  command=CommandGenerator.addToCommand(command,customArgs);
  Object[] objectList=command.toArray();
  long estimatedTime=runProcessAndWait("String_Node_Str",Arrays.copyOf(objectList,objectList.length,String[].class));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_GATK_RECAL).increment(estimatedTime);
}
Program: 13726
Project: 13726
Buggy source:
public void runHaplotypeCaller(String input,String output,boolean disableSoftClipping,double scc,double sec,String ref,String[] knownSites,String region) throws InterruptedException {
  ArrayList<String> command=new ArrayList<String>();
  String[] gatkcmd={java,mem,"String_Node_Str",gatk,"String_Node_Str","String_Node_Str",multiThreadingTypes[1],"String_Node_Str" + threads,"String_Node_Str",ref,"String_Node_Str",input,"String_Node_Str",output,"String_Node_Str",roundOneDecimal(scc),"String_Node_Str",roundOneDecimal(sec),"String_Node_Str",region,NO_CMD_HEADER,DISABLE_VCF_LOCKING};
  command.addAll(Arrays.asList(gatkcmd));
  if (disableSoftClipping) {
    command.add("String_Node_Str");
  }
  if (knownSites != null) {
    for (    String knownSite : knownSites) {
      command.add("String_Node_Str");
      command.add(knownSite);
    }
  }
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  command=CommandGenerator.addToCommand(command,customArgs);
  Object[] objectList=command.toArray();
  long estimatedTime=runProcessAndWait("String_Node_Str",Arrays.copyOf(objectList,objectList.length,String[].class));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_GATK_VARIANT_CALLER).increment(estimatedTime);
}

Fixed version (ground truth):
public void runHaplotypeCaller(String input,String output,boolean disableSoftClipping,double scc,double sec,String ref,String[] knownSites,String region) throws InterruptedException {
  ArrayList<String> command=new ArrayList<String>();
  command.addAll(java);
  String[] gatkcmd={mem,"String_Node_Str",gatk,"String_Node_Str","String_Node_Str",multiThreadingTypes[1],"String_Node_Str" + threads,"String_Node_Str",ref,"String_Node_Str",input,"String_Node_Str",output,"String_Node_Str",roundOneDecimal(scc),"String_Node_Str",roundOneDecimal(sec),"String_Node_Str",region,NO_CMD_HEADER,DISABLE_VCF_LOCKING};
  command.addAll(Arrays.asList(gatkcmd));
  if (disableSoftClipping) {
    command.add("String_Node_Str");
  }
  if (knownSites != null) {
    for (    String knownSite : knownSites) {
      command.add("String_Node_Str");
      command.add(knownSite);
    }
  }
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  command=CommandGenerator.addToCommand(command,customArgs);
  Object[] objectList=command.toArray();
  long estimatedTime=runProcessAndWait("String_Node_Str",Arrays.copyOf(objectList,objectList.length,String[].class));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_GATK_VARIANT_CALLER).increment(estimatedTime);
}
Program: 13727
Project: 13727
Buggy source:
public int runCleanSam(String input,String output) throws InterruptedException {
  String tool;
  if (bin.endsWith("String_Node_Str"))   tool=bin + PicardTools[3];
 else   tool=bin + "String_Node_Str" + PicardTools[3];
  ArrayList<String> command=new ArrayList<>();
  command.add(java);
  command.add(mem);
  command.add("String_Node_Str");
  command.add(tool);
  command.add("String_Node_Str" + input);
  command.add("String_Node_Str" + output);
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  command=CommandGenerator.addToCommand(command,customArgs);
  long estimatedTime=runProcessAndWait("String_Node_Str",GetStringVector(command));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_PICARD_CLEANSAM).increment(estimatedTime);
  return 0;
}

Fixed version (ground truth):
public int runCleanSam(String input,String output) throws InterruptedException {
  String tool;
  if (bin.endsWith("String_Node_Str"))   tool=bin + PicardTools[3];
 else   tool=bin + "String_Node_Str" + PicardTools[3];
  ArrayList<String> command=new ArrayList<>();
  command.addAll(java);
  command.add(mem);
  command.add("String_Node_Str");
  command.add(tool);
  command.add("String_Node_Str" + input);
  command.add("String_Node_Str" + output);
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  command=CommandGenerator.addToCommand(command,customArgs);
  long estimatedTime=runProcessAndWait("String_Node_Str",GetStringVector(command));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_PICARD_CLEANSAM).increment(estimatedTime);
  return 0;
}
Program: 13728
Project: 13728
Buggy source:
public int runAddOrReplaceReadGroups(String input,String output,String RGID,String RGLB,String RGPL,String RGPU,String RGSM) throws InterruptedException {
  String tool;
  if (bin.endsWith("String_Node_Str"))   tool=bin + PicardTools[1];
 else   tool=bin + "String_Node_Str" + PicardTools[1];
  ArrayList<String> command=new ArrayList<>();
  command.add(java);
  command.add(mem);
  command.add("String_Node_Str");
  command.add(tool);
  command.add("String_Node_Str" + input);
  command.add("String_Node_Str" + output);
  command.add("String_Node_Str" + RGID);
  command.add("String_Node_Str" + RGLB);
  command.add("String_Node_Str" + RGPL);
  command.add("String_Node_Str" + RGPU);
  command.add("String_Node_Str" + RGSM);
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  command=CommandGenerator.addToCommand(command,customArgs);
  long estimatedTime=runProcessAndWait("String_Node_Str",GetStringVector(command));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_PICARD_ADDGRP).increment(estimatedTime);
  return 0;
}

Fixed version (ground truth):
public int runAddOrReplaceReadGroups(String input,String output,String RGID,String RGLB,String RGPL,String RGPU,String RGSM) throws InterruptedException {
  String tool;
  if (bin.endsWith("String_Node_Str"))   tool=bin + PicardTools[1];
 else   tool=bin + "String_Node_Str" + PicardTools[1];
  ArrayList<String> command=new ArrayList<>();
  command.addAll(java);
  command.add(mem);
  command.add("String_Node_Str");
  command.add(tool);
  command.add("String_Node_Str" + input);
  command.add("String_Node_Str" + output);
  command.add("String_Node_Str" + RGID);
  command.add("String_Node_Str" + RGLB);
  command.add("String_Node_Str" + RGPL);
  command.add("String_Node_Str" + RGPU);
  command.add("String_Node_Str" + RGSM);
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  command=CommandGenerator.addToCommand(command,customArgs);
  long estimatedTime=runProcessAndWait("String_Node_Str",GetStringVector(command));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_PICARD_ADDGRP).increment(estimatedTime);
  return 0;
}
Program: 13729
Project: 13729
Buggy source:
public PreprocessingTools(String bin){
  this.bin=bin;
  this.java="String_Node_Str";
}

Fixed version (ground truth):
public PreprocessingTools(String bin){
  this.bin=bin;
  java=new ArrayList<>();
  java.add("String_Node_Str");
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  java.add(customArgs);
}
Program: 13730
Project: 13730
Buggy source:
public void setJava(String java){
  this.java=java;
}

Fixed version (ground truth):
public void setJava(String java){
  this.java.set(0,java);
}
Program: 13731
Project: 13731
Buggy source:
public int runBuildBamIndex(String input) throws InterruptedException {
  String tool;
  if (bin.endsWith("String_Node_Str"))   tool=bin + PicardTools[0];
 else   tool=bin + "String_Node_Str" + PicardTools[0];
  ArrayList<String> command=new ArrayList<>();
  command.add(java);
  command.add(mem);
  command.add("String_Node_Str");
  command.add(tool);
  command.add("String_Node_Str" + input);
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  command=CommandGenerator.addToCommand(command,customArgs);
  long estimatedTime=runProcessAndWait("String_Node_Str",GetStringVector(command));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_PICARD_BAI).increment(estimatedTime);
  return 0;
}

Fixed version (ground truth):
public int runBuildBamIndex(String input) throws InterruptedException {
  String tool;
  if (bin.endsWith("String_Node_Str"))   tool=bin + PicardTools[0];
 else   tool=bin + "String_Node_Str" + PicardTools[0];
  ArrayList<String> command=new ArrayList<>();
  command.addAll(java);
  command.add(mem);
  command.add("String_Node_Str");
  command.add(tool);
  command.add("String_Node_Str" + input);
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  command=CommandGenerator.addToCommand(command,customArgs);
  long estimatedTime=runProcessAndWait("String_Node_Str",GetStringVector(command));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_PICARD_BAI).increment(estimatedTime);
  return 0;
}
Program: 13732
Project: 13732
Buggy source:
public int runSortVcf(String input,String output) throws InterruptedException {
  String tool;
  if (bin.endsWith("String_Node_Str"))   tool=bin + PicardTools[4];
 else   tool=bin + "String_Node_Str" + PicardTools[4];
  ArrayList<String> command=new ArrayList<>();
  command.add(java);
  command.add(mem);
  command.add("String_Node_Str");
  command.add(tool);
  command.add("String_Node_Str");
  command.add("String_Node_Str" + input);
  command.add("String_Node_Str" + output);
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  command=CommandGenerator.addToCommand(command,customArgs);
  runProcessAndWait("String_Node_Str",GetStringVector(command));
  HalvadeFileUtils.removeLocalFile(output + "String_Node_Str");
  return 0;
}

Fixed version (ground truth):
public int runSortVcf(String input,String output) throws InterruptedException {
  String tool;
  if (bin.endsWith("String_Node_Str"))   tool=bin + PicardTools[4];
 else   tool=bin + "String_Node_Str" + PicardTools[4];
  ArrayList<String> command=new ArrayList<>();
  command.addAll(java);
  command.add(mem);
  command.add("String_Node_Str");
  command.add(tool);
  command.add("String_Node_Str");
  command.add("String_Node_Str" + input);
  command.add("String_Node_Str" + output);
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  command=CommandGenerator.addToCommand(command,customArgs);
  runProcessAndWait("String_Node_Str",GetStringVector(command));
  HalvadeFileUtils.removeLocalFile(output + "String_Node_Str");
  return 0;
}
Program: 13733
Project: 13733
Buggy source:
public String getJava(){
  return java;
}

Fixed version (ground truth):
public String getJava(){
  return java.get(0);
}
Program: 13734
Project: 13734
Buggy source:
public int runMarkDuplicates(String input,String output,String metrics) throws InterruptedException {
  String tool;
  if (bin.endsWith("String_Node_Str"))   tool=bin + PicardTools[2];
 else   tool=bin + "String_Node_Str" + PicardTools[2];
  ArrayList<String> command=new ArrayList<>();
  command.add(java);
  command.add(mem);
  command.add("String_Node_Str");
  command.add(tool);
  command.add("String_Node_Str" + input);
  command.add("String_Node_Str" + output);
  command.add("String_Node_Str" + metrics);
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  command=CommandGenerator.addToCommand(command,customArgs);
  long estimatedTime=runProcessAndWait("String_Node_Str",GetStringVector(command));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_PICARD_MARKDUP).increment(estimatedTime);
  return 0;
}

Fixed version (ground truth):
public int runMarkDuplicates(String input,String output,String metrics) throws InterruptedException {
  String tool;
  if (bin.endsWith("String_Node_Str"))   tool=bin + PicardTools[2];
 else   tool=bin + "String_Node_Str" + PicardTools[2];
  ArrayList<String> command=new ArrayList<>();
  command.addAll(java);
  command.add(mem);
  command.add("String_Node_Str");
  command.add(tool);
  command.add("String_Node_Str" + input);
  command.add("String_Node_Str" + output);
  command.add("String_Node_Str" + metrics);
  String customArgs=HalvadeConf.getCustomArgs(context.getConfiguration(),"String_Node_Str","String_Node_Str");
  command=CommandGenerator.addToCommand(command,customArgs);
  long estimatedTime=runProcessAndWait("String_Node_Str",GetStringVector(command));
  if (context != null)   context.getCounter(HalvadeCounters.TIME_PICARD_MARKDUP).increment(estimatedTime);
  return 0;
}
Program: 13735
Project: 13735
Buggy source:
@Override protected void map(LongWritable key,Text value,Mapper.Context context) throws IOException, InterruptedException {
  String[] split=value.toString().split("String_Node_Str");
  k.set(split[0]);
  v.set(Integer.parseInt(split[1]));
  context.write(k,v);
}

Fixed version (ground truth):
@Override protected void map(LongWritable key,Text value,Mapper.Context context) throws IOException, InterruptedException {
  String[] split=value.toString().split("String_Node_Str");
  k.set(split[0]);
  v.set(Integer.parseInt(split[split.length - 1]));
  context.write(k,v);
}
Program: 13736
Project: 13736
Buggy source:
public static String[] featureCounts(String bin,String gffFile,String bamFile,String outFile,int numberOfThreads,String customArgs){
  ArrayList<String> command=new ArrayList<>();
  if (bin.endsWith("String_Node_Str"))   command.add(bin + featureCountsCommand);
 else   command.add(bin + "String_Node_Str" + featureCountsCommand);
  command=addToCommand(command,customArgs);
  command.add(featureCountsOptions[0]);
  command.add(new Integer(numberOfThreads).toString());
  command.add(featureCountsOptions[3]);
  command.add("String_Node_Str");
  command.add(featureCountsOptions[4]);
  command.add("String_Node_Str");
  command.add(featureCountsOptions[5]);
  command.add(featureCountsOptions[6]);
  command.add(featureCountsOptions[7]);
  command.add(featureCountsOptions[8]);
  command.add(featureCountsOptions[1]);
  command.add(gffFile);
  command.add(featureCountsOptions[2]);
  command.add(outFile);
  command.add(bamFile);
  Object[] ObjectList=command.toArray();
  String[] StringArray=Arrays.copyOf(ObjectList,ObjectList.length,String[].class);
  return StringArray;
}

Fixed version (ground truth):
public static String[] featureCounts(String bin,String gffFile,String bamFile,String outFile,int numberOfThreads,String customArgs){
  ArrayList<String> command=new ArrayList<>();
  if (bin.endsWith("String_Node_Str"))   command.add(bin + featureCountsCommand);
 else   command.add(bin + "String_Node_Str" + featureCountsCommand);
  command=addToCommand(command,customArgs);
  command.add(featureCountsOptions[0]);
  command.add(new Integer(numberOfThreads).toString());
  int strandedness=0;
  command.add(featureCountsOptions[3]);
  command.add(strandedness + "String_Node_Str");
  command.add(featureCountsOptions[4]);
  command.add("String_Node_Str");
  command.add(featureCountsOptions[5]);
  command.add(featureCountsOptions[1]);
  command.add(gffFile);
  command.add(featureCountsOptions[2]);
  command.add(outFile);
  command.add(bamFile);
  Object[] ObjectList=command.toArray();
  String[] StringArray=Arrays.copyOf(ObjectList,ObjectList.length,String[].class);
  return StringArray;
}
Program: 13738
Project: 13738
Buggy source:
protected static int attemptDownloadFileFromHDFS(TaskInputOutputContext context,FileSystem fs,String from,String to,int tries) throws IOException {
  int val=privateDownloadFileFromHDFS(context,fs,from,to);
  int try_=1;
  while (val != 0 && try_ < tries) {
    val=privateDownloadFileFromHDFS(context,fs,from,to);
    try_++;
  }
  if (val == 0)   Logger.DEBUG(from + "String_Node_Str");
 else {
    Logger.DEBUG(from + "String_Node_Str");
    throw new IOException();
  }
  return val;
}

Fixed version (ground truth):
protected static int attemptDownloadFileFromHDFS(TaskInputOutputContext context,FileSystem fs,String from,String to,int tries) throws IOException {
  if (from.equalsIgnoreCase(to))   return 0;
  int val=privateDownloadFileFromHDFS(context,fs,from,to);
  int try_=1;
  while (val != 0 && try_ < tries) {
    val=privateDownloadFileFromHDFS(context,fs,from,to);
    try_++;
  }
  if (val == 0)   Logger.DEBUG(from + "String_Node_Str");
 else {
    Logger.DEBUG(from + "String_Node_Str");
    throw new IOException();
  }
  return val;
}
Program: 13743
Project: 13743
Buggy source:
@Override public int run(String[] strings) throws Exception {
  int ret=0;
  try {
    Configuration halvadeConf=getConf();
    halvadeOpts=new HalvadeOptions();
    int optReturn=halvadeOpts.GetOptions(strings,halvadeConf);
    if (optReturn != 0)     return optReturn;
    String halvadeDir=halvadeOpts.out + "String_Node_Str";
    if (!halvadeOpts.justCombine) {
      if (halvadeOpts.rnaPipeline) {
        if (halvadeOpts.useSharedMemory) {
          ret=runPass1RNAJob(halvadeConf,halvadeOpts.out + "String_Node_Str");
          if (ret != 0) {
            Logger.DEBUG("String_Node_Str");
            System.exit(-1);
          }
          HalvadeConf.setIsPass2(halvadeConf,true);
          ret=runHalvadeJob(halvadeConf,halvadeDir,HalvadeResourceManager.RNA_SHMEM_PASS2);
        }
 else {
          ret=runHalvadeJob(halvadeConf,halvadeDir,HalvadeResourceManager.RNA);
        }
      }
 else {
        ret=runHalvadeJob(halvadeConf,halvadeDir,HalvadeResourceManager.DNA);
      }
      if (ret != 0) {
        Logger.DEBUG("String_Node_Str");
        System.exit(-2);
      }
    }
    if (halvadeOpts.combineVcf)     runCombineJob(halvadeDir,halvadeOpts.out + "String_Node_Str");
  }
 catch (  IOException|ClassNotFoundException|IllegalArgumentException|IllegalStateException|InterruptedException|URISyntaxException e) {
    Logger.EXCEPTION(e);
  }
  return ret;
}

Fixed version (ground truth):
@Override public int run(String[] strings) throws Exception {
  int ret=0;
  try {
    Configuration halvadeConf=getConf();
    halvadeOpts=new HalvadeOptions();
    int optReturn=halvadeOpts.GetOptions(strings,halvadeConf);
    if (optReturn != 0)     return optReturn;
    String halvadeDir=halvadeOpts.out + "String_Node_Str";
    if (!halvadeOpts.justCombine) {
      if (halvadeOpts.rnaPipeline) {
        if (halvadeOpts.useSharedMemory && !halvadeOpts.useBamInput) {
          ret=runPass1RNAJob(halvadeConf,halvadeOpts.out + "String_Node_Str");
          if (ret != 0) {
            Logger.DEBUG("String_Node_Str");
            System.exit(-1);
          }
          HalvadeConf.setIsPass2(halvadeConf,true);
          ret=runHalvadeJob(halvadeConf,halvadeDir,HalvadeResourceManager.RNA_SHMEM_PASS2);
        }
 else {
          ret=runHalvadeJob(halvadeConf,halvadeDir,HalvadeResourceManager.RNA);
        }
      }
 else {
        ret=runHalvadeJob(halvadeConf,halvadeDir,HalvadeResourceManager.DNA);
      }
      if (ret != 0) {
        Logger.DEBUG("String_Node_Str");
        System.exit(-2);
      }
    }
    if (halvadeOpts.combineVcf)     runCombineJob(halvadeDir,halvadeOpts.out + "String_Node_Str");
  }
 catch (  IOException|ClassNotFoundException|IllegalArgumentException|IllegalStateException|InterruptedException|URISyntaxException e) {
    Logger.EXCEPTION(e);
  }
  return ret;
}
Program: 13744
Project: 13744
Buggy source:
@Override public void readFields(DataInput di) throws IOException {
  type=di.readInt();
  chromosome=di.readInt();
  firstBaseIntron=di.readInt();
  lastBaseIntron=di.readInt();
  overhang=di.readInt();
}

Fixed version (ground truth):
@Override public void readFields(DataInput di) throws IOException {
  type=di.readInt();
  secondary_key=di.readInt();
}
Program: 13745
Project: 13745
Buggy source:
public GenomeSJ(){
  this.type=0;
  this.chromosome=Integer.MAX_VALUE;
  this.firstBaseIntron=-1;
  this.lastBaseIntron=-1;
  this.overhang=-1;
}

Fixed version (ground truth):
public GenomeSJ(){
  this.type=0;
  this.secondary_key=-1;
}
Program: 13746
Project: 13746
Buggy source:
public void parseSJString(String sjString,SAMSequenceDictionary dict){
  String columns[]=sjString.split("String_Node_Str");
  this.type=0;
  this.chromosome=dict.getSequenceIndex(columns[0]);
  this.firstBaseIntron=Integer.parseInt(columns[1]);
  this.lastBaseIntron=Integer.parseInt(columns[2]);
}

Fixed version (ground truth):
public void parseSJString(String sjString,SAMSequenceDictionary dict){
  String columns[]=sjString.split("String_Node_Str");
  this.type=-1;
  this.secondary_key=dict.getSequenceIndex(columns[0]);
}
Program: 13747
Project: 13747
Buggy source:
@Override public int compareTo(GenomeSJ o){
  if (chromosome == o.chromosome) {
    if (firstBaseIntron == o.firstBaseIntron)     return lastBaseIntron - o.lastBaseIntron;
 else     return firstBaseIntron - o.firstBaseIntron;
  }
 else   return chromosome - o.chromosome;
}

Fixed version (ground truth):
@Override public int compareTo(GenomeSJ o){
  if (type == o.type) {
    return secondary_key - o.secondary_key;
  }
 else   return type - o.type;
}
Program: 13748
Project: 13748
Buggy source:
public void setOverhang(int overhang){
  this.type=1;
  this.overhang=overhang;
}

Fixed version (ground truth):
public void setOverhang(int overhang){
  this.type=-2;
  this.secondary_key=overhang;
}
Program: 13749
Project: 13749
Buggy source:
@Override public void write(DataOutput d) throws IOException {
  d.writeInt(type);
  d.writeInt(chromosome);
  d.writeInt(firstBaseIntron);
  d.writeInt(lastBaseIntron);
  d.writeInt(overhang);
}

Fixed version (ground truth):
@Override public void write(DataOutput d) throws IOException {
  d.writeInt(type);
  d.writeInt(secondary_key);
}
Program: 13750
Project: 13750
Buggy source:
@Override protected void reduce(GenomeSJ key,Iterable<Text> values,Context context) throws IOException, InterruptedException {
  Iterator<Text> it=values.iterator();
  Logger.DEBUG("String_Node_Str" + key);
  if (key.getType() == 0) {
    while (it.hasNext()) {
      bw.write(it.next().toString() + "String_Node_Str");
      count++;
    }
  }
 else   if (key.getType() == 1) {
    overhang=key.getOverhang();
    Logger.DEBUG("String_Node_Str" + overhang);
  }
}

Fixed version (ground truth):
@Override protected void reduce(GenomeSJ key,Iterable<Text> values,Context context) throws IOException, InterruptedException {
  Iterator<Text> it=values.iterator();
  if (key.getType() == -1) {
    while (it.hasNext()) {
      bw.write(it.next().toString() + "String_Node_Str");
      count++;
    }
    Logger.DEBUG("String_Node_Str" + count);
  }
 else   if (key.getType() == -2) {
    overhang=key.getSecKey();
    Logger.DEBUG("String_Node_Str" + overhang);
  }
 else {
    int valCount=0;
    while (it.hasNext()) {
      valCount++;
      it.next();
    }
    keyFactors.add(valCount);
    totalValCount+=valCount;
    totalKeyCount++;
    Logger.DEBUG("String_Node_Str" + key + "String_Node_Str"+ valCount);
  }
}
Program: 13751
Project: 13751
Buggy source:
@Override protected void cleanup(Context context) throws IOException, InterruptedException {
  FileSystem fs=null;
  try {
    fs=FileSystem.get(new URI(out),context.getConfiguration());
  }
 catch (  URISyntaxException ex) {
    Logger.EXCEPTION(ex);
  }
  bw.close();
  File mergeFile=new File(mergeJS);
  Logger.DEBUG("String_Node_Str" + count + "String_Node_Str"+ mergeJS);
  HalvadeFileUtils.uploadFileToHDFS(context,fs,mergeFile.getAbsolutePath(),out + mergeFile.getName());
  HalvadeFileUtils.removeLocalFile(mergeJS);
}

Fixed version (ground truth):
@Override protected void cleanup(Context context) throws IOException, InterruptedException {
  Logger.DEBUG("String_Node_Str" + totalValCount);
  Logger.DEBUG("String_Node_Str" + totalKeyCount);
  FileSystem fs=null;
  try {
    fs=FileSystem.get(new URI(out),context.getConfiguration());
  }
 catch (  URISyntaxException ex) {
    Logger.EXCEPTION(ex);
  }
  bw.close();
  File mergeFile=new File(mergeJS);
  Logger.DEBUG("String_Node_Str" + count + "String_Node_Str"+ mergeJS);
  HalvadeFileUtils.uploadFileToHDFS(context,fs,mergeFile.getAbsolutePath(),out + mergeFile.getName());
  Logger.DEBUG("String_Node_Str" + jobId);
  String newGenomeDir=refDir + taskId + "String_Node_Str";
  File starOut=new File(newGenomeDir);
  starOut.mkdirs();
  long time=STARInstance.rebuildStarGenome(context,bin,newGenomeDir,ref,mergeJS,overhang,threads,mem);
  context.getCounter(HalvadeCounters.TIME_STAR_BUILD).increment(time);
  String pass2GenDir=HalvadeConf.getStarDirPass2HDFS(context.getConfiguration());
  File pass2check=new File(newGenomeDir + HalvadeFileUtils.HALVADE_STAR_SUFFIX_P2);
  pass2check.createNewFile();
  if (requireUploadToHDFS) {
    fs.mkdirs(new Path(pass2GenDir));
    File[] genFiles=starOut.listFiles();
    for (    File gen : genFiles) {
      HalvadeFileUtils.uploadFileToHDFS(context,fs,gen.getAbsolutePath(),pass2GenDir + gen.getName());
    }
    Logger.DEBUG("String_Node_Str" + pass2GenDir);
  }
  HalvadeFileUtils.removeLocalFile(mergeJS);
}
Program: 13752
Project: 13752
Buggy source:
@Override protected void setup(Context context) throws IOException, InterruptedException {
  tmpDir=HalvadeConf.getScratchTempDir(context.getConfiguration());
  refDir=HalvadeConf.getRefDirOnScratch(context.getConfiguration());
  out=HalvadeConf.getOutDir(context.getConfiguration());
  taskId=context.getTaskAttemptID().toString();
  taskId=taskId.substring(taskId.indexOf("String_Node_Str"));
  mergeJS=tmpDir + taskId + "String_Node_Str";
  File file=new File(mergeJS);
  threads=HalvadeConf.getReducerThreads(context.getConfiguration());
  try {
    mem=Long.parseLong(context.getConfiguration().get("String_Node_Str"));
  }
 catch (  NumberFormatException ex) {
    mem=0;
  }
  bin=checkBinaries(context);
  try {
    ref=HalvadeFileUtils.downloadGATKIndex(context,taskId);
  }
 catch (  URISyntaxException ex) {
    Logger.EXCEPTION(ex);
    throw new InterruptedException();
  }
  bw=new BufferedWriter(new FileWriter(file.getAbsoluteFile()));
  Logger.DEBUG("String_Node_Str" + mergeJS);
}

Fixed version (ground truth):
@Override protected void setup(Context context) throws IOException, InterruptedException {
  totalValCount=0;
  totalKeyCount=0;
  keyFactors=new ArrayList<>();
  tmpDir=HalvadeConf.getScratchTempDir(context.getConfiguration());
  refDir=HalvadeConf.getRefDirOnScratch(context.getConfiguration());
  out=HalvadeConf.getOutDir(context.getConfiguration());
  jobId=context.getJobID().toString();
  taskId=context.getTaskAttemptID().toString();
  taskId=taskId.substring(taskId.indexOf("String_Node_Str"));
  mergeJS=tmpDir + taskId + "String_Node_Str";
  File file=new File(mergeJS);
  threads=HalvadeConf.getReducerThreads(context.getConfiguration());
  try {
    mem=Long.parseLong(context.getConfiguration().get("String_Node_Str"));
  }
 catch (  NumberFormatException ex) {
    mem=0;
  }
  bin=checkBinaries(context);
  try {
    ref=HalvadeFileUtils.downloadGATKIndex(context,taskId);
  }
 catch (  URISyntaxException ex) {
    Logger.EXCEPTION(ex);
    throw new InterruptedException();
  }
  bw=new BufferedWriter(new FileWriter(file.getAbsoluteFile()));
  Logger.DEBUG("String_Node_Str" + mergeJS);
}
Program: 13753
Project: 13753
Buggy source:
@Override public int compare(WritableComparable a,WritableComparable b){
  GenomeSJ sj1=(GenomeSJ)a;
  GenomeSJ sj2=(GenomeSJ)b;
  return (-1) * sj1.compareTo(sj2);
}

Fixed version (ground truth):
@Override public int compare(WritableComparable a,WritableComparable b){
  GenomeSJ sj1=(GenomeSJ)a;
  GenomeSJ sj2=(GenomeSJ)b;
  return sj1.compareTo(sj2);
}
Program: 13755
Project: 13755
Buggy source:
@Override protected void map(LongWritable key,SAMRecordWritable value,Context context) throws IOException, InterruptedException {
  SAMRecord sam=value.get();
  try {
    String s=sam.getSAMString();
  }
 catch (  StringIndexOutOfBoundsException e) {
    Logger.DEBUG("String_Node_Str");
    Logger.DEBUG(sam.getReadName() + "String_Node_Str" + sam.getReadString());
    throw e;
  }
  instance.writePairedSAMRecordToContext(value.get(),false);
}

Fixed version (ground truth):
@Override protected void map(LongWritable key,SAMRecordWritable value,Context context) throws IOException, InterruptedException {
  try {
    value.get().getSAMString();
  }
 catch (  StringIndexOutOfBoundsException e) {
    Logger.DEBUG("String_Node_Str");
  }
  instance.writePairedSAMRecordToContext(value.get(),false);
}
Program: 13756
Project: 13756
Buggy source:
@Override protected void processAlignments(Iterable<SAMRecordWritable> values,Context context,PreprocessingTools tools,GATKTools gatk) throws IOException, InterruptedException, URISyntaxException, QualityException {
  long startTime=System.currentTimeMillis();
  String region=tmpFileBase + "String_Node_Str";
  String preprocess=tmpFileBase + "String_Node_Str";
  String tmpFile1=tmpFileBase + "String_Node_Str";
  String tmpFile2=tmpFileBase + "String_Node_Str";
  String snps=tmpFileBase + "String_Node_Str";
  boolean useElPrep=HalvadeConf.getUseElPrep(context.getConfiguration());
  ChromosomeRange r=new ChromosomeRange();
  SAMRecordIterator SAMit=new SAMRecordIterator(values.iterator(),header,r);
  if (useElPrep && isFirstAttempt)   elPrepPreprocess(context,tools,SAMit,preprocess);
 else {
    if (!isFirstAttempt)     Logger.DEBUG("String_Node_Str" + taskId + "String_Node_Str");
    if (redistribute) {
      threads=6;
      gatk.setThreads(threads);
    }
    PicardPreprocess(context,tools,SAMit,preprocess);
  }
  region=makeRegionFile(context,r,tools,region);
  if (region == null)   return;
  indelRealignment(context,region,gatk,preprocess,tmpFile1);
  baseQualityScoreRecalibration(context,region,r,tools,gatk,tmpFile1,tmpFile2);
  DnaVariantCalling(context,region,gatk,tmpFile2,snps);
  variantFiles.add(snps);
  HalvadeFileUtils.removeLocalFile(region);
  long estimatedTime=System.currentTimeMillis() - startTime;
  Logger.DEBUG("String_Node_Str" + estimatedTime / 1000);
}

Fixed version (ground truth):
@Override protected void processAlignments(Iterable<SAMRecordWritable> values,Context context,PreprocessingTools tools,GATKTools gatk) throws IOException, InterruptedException, URISyntaxException, QualityException {
  long startTime=System.currentTimeMillis();
  String region=tmpFileBase + "String_Node_Str";
  String preprocess=tmpFileBase + "String_Node_Str";
  String tmpFile1=tmpFileBase + "String_Node_Str";
  String tmpFile2=tmpFileBase + "String_Node_Str";
  String snps=tmpFileBase + "String_Node_Str";
  boolean useElPrep=HalvadeConf.getUseElPrep(context.getConfiguration());
  ChromosomeRange r=new ChromosomeRange();
  SAMRecordIterator SAMit=new SAMRecordIterator(values.iterator(),header,r);
  if (useElPrep && isFirstAttempt)   elPrepPreprocess(context,tools,SAMit,preprocess);
 else {
    if (!isFirstAttempt)     Logger.DEBUG("String_Node_Str" + taskId + "String_Node_Str");
    if (redistribute) {
      threads=6;
      gatk.setThreads(threads);
      Logger.DEBUG("String_Node_Str");
    }
    PicardPreprocess(context,tools,SAMit,preprocess);
  }
  region=makeRegionFile(context,r,tools,region);
  if (region == null)   return;
  indelRealignment(context,region,gatk,preprocess,tmpFile1);
  baseQualityScoreRecalibration(context,region,r,tools,gatk,tmpFile1,tmpFile2);
  DnaVariantCalling(context,region,gatk,tmpFile2,snps);
  variantFiles.add(snps);
  HalvadeFileUtils.removeLocalFile(region);
  long estimatedTime=System.currentTimeMillis() - startTime;
  Logger.DEBUG("String_Node_Str" + estimatedTime / 1000);
}
Program: 13758
Project: 13758
Buggy source:
@Override protected void setup(Context context) throws IOException, InterruptedException {
  super.setup(context);
  isFirstAttempt=taskId.endsWith("String_Node_Str");
  isRNA=HalvadeConf.getIsRNA(context.getConfiguration());
  scc=HalvadeConf.getSCC(context.getConfiguration(),isRNA);
  sec=HalvadeConf.getSEC(context.getConfiguration(),isRNA);
  exomeBedFile=HalvadeConf.getExomeBed(context.getConfiguration());
  useBedTools=HalvadeConf.getUseBedTools(context.getConfiguration());
  useUnifiedGenotyper=HalvadeConf.getUseUnifiedGenotyper(context.getConfiguration());
  redistribute=HalvadeConf.getRedistribute(context.getConfiguration());
}

Fixed version (ground truth):
@Override protected void setup(Context context) throws IOException, InterruptedException {
  super.setup(context);
  isFirstAttempt=taskId.endsWith("String_Node_Str");
  isRNA=HalvadeConf.getIsRNA(context.getConfiguration());
  scc=HalvadeConf.getSCC(context.getConfiguration(),isRNA);
  sec=HalvadeConf.getSEC(context.getConfiguration(),isRNA);
  exomeBedFile=HalvadeConf.getExomeBed(context.getConfiguration());
  useBedTools=HalvadeConf.getUseBedTools(context.getConfiguration());
  useUnifiedGenotyper=HalvadeConf.getUseUnifiedGenotyper(context.getConfiguration());
  redistribute=HalvadeConf.getRedistribute(context.getConfiguration());
  containers=HalvadeConf.getMapContainerCount(context.getConfiguration());
  tasksLeft=Integer.parseInt(context.getConfiguration().get("String_Node_Str")) - taskNr;
  if (redistribute && tasksLeft < containers) {
    threads=6;
  }
}
Program: 13759
Project: 13759
Buggy source:
@Override protected void setup(Context context) throws IOException, InterruptedException {
  super.setup(context);
  keep=HalvadeConf.getKeepFiles(context.getConfiguration());
  java=HalvadeConf.getJava(context.getConfiguration());
  tmp=HalvadeConf.getScratchTempDir(context.getConfiguration());
  threads=HalvadeConf.getReducerThreads(context.getConfiguration());
  dict=HalvadeConf.getSequenceDictionary(context.getConfiguration());
  getReadGroupData(context.getConfiguration());
  taskId=context.getTaskAttemptID().toString();
  taskId=taskId.substring(taskId.indexOf("String_Node_Str"));
  header=new SAMFileHeader();
  header.setSequenceDictionary(dict);
  count=0;
  variantFiles=new ArrayList<>();
  bin=checkBinaries(context);
  try {
    ref=HalvadeFileUtils.downloadGATKIndex(context,taskId);
  }
 catch (  URISyntaxException ex) {
    Logger.EXCEPTION(ex);
    throw new InterruptedException();
  }
}

Fixed version (ground truth):
@Override protected void setup(Context context) throws IOException, InterruptedException {
  super.setup(context);
  keep=HalvadeConf.getKeepFiles(context.getConfiguration());
  java=HalvadeConf.getJava(context.getConfiguration());
  tmp=HalvadeConf.getScratchTempDir(context.getConfiguration());
  threads=HalvadeConf.getReducerThreads(context.getConfiguration());
  dict=HalvadeConf.getSequenceDictionary(context.getConfiguration());
  getReadGroupData(context.getConfiguration());
  taskId=context.getTaskAttemptID().toString();
  taskId=taskId.substring(taskId.indexOf("String_Node_Str"));
  taskNr=Integer.parseInt(taskId.split("String_Node_Str")[1]);
  header=new SAMFileHeader();
  header.setSequenceDictionary(dict);
  count=0;
  variantFiles=new ArrayList<>();
  bin=checkBinaries(context);
  bamrg=new SAMReadGroupRecord(RGID);
  bamrg.setLibrary(RGLB);
  bamrg.setPlatform(RGPL);
  bamrg.setPlatformUnit(RGPU);
  bamrg.setSample(RGSM);
  try {
    ref=HalvadeFileUtils.downloadGATKIndex(context,taskId);
  }
 catch (  URISyntaxException ex) {
    Logger.EXCEPTION(ex);
    throw new InterruptedException();
  }
}