Program: 125208
Project: 125208
Buggy source:
public static void main(String[] args){
  if ((args == null) || args.length == 0 || (args[0].equals("String_Node_Str")) || (args.length < 1)) {
    printUsage();
    return;
  }
  Map<String,String> taxonMap=null;
  String rep=null;
  String pattern=null;
  List<Tree> trees=null;
  List<Tree> extraTrees=null;
  String output=null;
  double bootstrap=1.0D;
  double time=-1.0D;
  boolean unresolved=false;
  long startTime=System.currentTimeMillis();
  String line;
  BufferedReader treeBufferReader=null;
  BufferedReader extraTreebuffer=null;
  try {
    List<String[]> options=getOptions(args);
    for (    String[] option : options) {
      if (option[0].equals("String_Node_Str")) {
        if (option.length != 2) {
          printUsage();
          return;
        }
        treeBufferReader=new BufferedReader(new FileReader(option[1]));
        trees=new ArrayList();
      }
 else       if (option[0].equals("String_Node_Str")) {
        if (option.length != 2) {
          printUsage();
          return;
        }
        extraTreebuffer=new BufferedReader(new FileReader(option[1]));
        extraTrees=new ArrayList();
      }
 else       if (option[0].equals("String_Node_Str")) {
        if ((option.length != 2) && (option.length != 3)) {
          printUsage();
          return;
        }
        if (option.length == 2) {
          BufferedReader br=new BufferedReader(new FileReader(option[1]));
          taxonMap=new HashMap<String,String>();
          while ((line=br.readLine()) != null) {
            String[] mapString=line.trim().split("String_Node_Str");
            for (            String s : mapString) {
              String species=s.substring(0,s.indexOf("String_Node_Str")).trim();
              s=s.substring(s.indexOf("String_Node_Str") + 1);
              String[] alleles=s.split("String_Node_Str");
              for (              String allele : alleles) {
                allele=allele.trim();
                if (taxonMap.containsKey(allele)) {
                  System.err.println("String_Node_Str");
                  System.err.println("String_Node_Str");
                  System.exit(-1);
                }
 else {
                  taxonMap.put(allele,species);
                }
              }
            }
          }
          br.close();
        }
 else {
          pattern=option[1];
          rep=option[2];
        }
      }
 else       if (option[0].equals("String_Node_Str")) {
        if (option.length != 2) {
          printUsage();
          return;
        }
        output=option[1];
      }
 else       if (option[0].equals("String_Node_Str")) {
        if (option.length != 1) {
          printUsage();
          return;
        }
      }
 else       if (option[0].equals("String_Node_Str")) {
        if (option.length > 2) {
          printUsage();
          return;
        }
        if (option.length != 2)         continue;
        try {
        }
 catch (        NumberFormatException e) {
          System.err.println("String_Node_Str");
          printUsage();
          return;
        }
      }
 else       if (option[0].equals("String_Node_Str")) {
        if (option.length > 2) {
          printUsage();
          return;
        }
        if (option.length != 2)         continue;
        try {
          bootstrap=Double.parseDouble(option[1]);
          if ((bootstrap <= 1.0D) && (bootstrap > 0.0D))           continue;
          printUsage();
        }
 catch (        NumberFormatException e) {
          System.err.println("String_Node_Str");
          printUsage();
          return;
        }
      }
 else       if (option[0].equals("String_Node_Str")) {
        if ((option.length != 1) || (time != -1.0D)) {
          printUsage();
          return;
        }
        unresolved=true;
      }
 else       if (option[0].equals("String_Node_Str")) {
        if ((option.length != 1)) {
          printUsage();
          return;
        }
        fast=true;
      }
 else       if (option[0].equals("String_Node_Str")) {
        if ((option.length != 1) || (time != -1.0D)) {
          printUsage();
          return;
        }
        rooted=false;
      }
 else       if (option[0].equals("String_Node_Str")) {
        if ((option.length != 1) || (time != -1.0D)) {
          printUsage();
          return;
        }
        extrarooted=false;
      }
 else       if (option[0].equals("String_Node_Str")) {
        if ((option.length != 2) || (unresolved)) {
          printUsage();
          return;
        }
        if (option.length != 2)         continue;
        try {
          time=Double.parseDouble(option[1]);
          if (time > 0.0D)           continue;
          printUsage();
        }
 catch (        NumberFormatException e) {
          System.err.println("String_Node_Str");
          printUsage();
          return;
        }
      }
 else       if (option[0].equals("String_Node_Str")) {
        if (option.length != 1) {
          printUsage();
          return;
        }
        optimizeDuploss=true;
      }
 else {
        printUsage();
        return;
      }
    }
    if (treeBufferReader == null) {
      System.err.println("String_Node_Str");
      printUsage();
      return;
    }
    System.out.println("String_Node_Str" + (rooted ? "String_Node_Str" : "String_Node_Str"));
    while ((line=treeBufferReader.readLine()) != null) {
      Set<String> previousTreeTaxa=new HashSet<String>();
      if (line.length() > 0) {
        NewickReader nr=new NewickReader(new StringReader(line));
        if (rooted) {
          STITree gt=new STITree(true);
          nr.readTree(gt);
          if (previousTreeTaxa.isEmpty()) {
            previousTreeTaxa.addAll(Arrays.asList(gt.getLeaves()));
          }
 else {
            if (!previousTreeTaxa.containsAll(Arrays.asList(gt.getLeaves()))) {
              throw new RuntimeException("String_Node_Str" + gt.getLeaves() + "String_Node_Str"+ previousTreeTaxa);
            }
          }
          trees.add(gt);
        }
 else {
          Tree tr=nr.readTree();
          trees.add(tr);
        }
      }
    }
    treeBufferReader.close();
    if (extraTreebuffer != null) {
      while ((line=extraTreebuffer.readLine()) != null) {
        if (line.length() > 0) {
          NewickReader nr=new NewickReader(new StringReader(line));
          if (extrarooted) {
            STITree gt=new STITree(true);
            nr.readTree(gt);
            extraTrees.add(gt);
          }
 else {
            Tree tr=nr.readTree();
            extraTrees.add(tr);
          }
        }
      }
      extraTreebuffer.close();
    }
  }
 catch (  IOException e) {
    System.err.println("String_Node_Str");
    System.err.println(e.getMessage());
    e.printStackTrace();
    return;
  }
catch (  ParseException e) {
    System.err.println("String_Node_Str");
    System.err.println(e.getMessage());
    e.printStackTrace();
    return;
  }
  if (trees.size() == 0) {
    System.err.println("String_Node_Str");
    return;
  }
  if (_print) {
    System.out.println("String_Node_Str" + (System.currentTimeMillis() - startTime) / 1000.0D + "String_Node_Str");
  }
  startTime=System.currentTimeMillis();
  MGDInference_DP inference;
  if (rep != null) {
    inference=new MGDInference_DP(trees,extraTrees,pattern,rep);
  }
 else   if (taxonMap != null) {
    inference=new MGDInference_DP(trees,extraTrees,taxonMap);
  }
 else {
    inference=new MGDInference_DP(trees,extraTrees);
  }
  List<Solution> solutions=inference.inferSpeciesTree();
  if (_print) {
    System.out.println("String_Node_Str" + (System.currentTimeMillis() - startTime) / 1000.0D + "String_Node_Str");
  }
  if ((output == null) && (_print)) {
    for (    Solution s : solutions)     System.out.println(s._st.toStringWD() + "String_Node_Str" + s._totalCoals+ (optimizeDuploss ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str");
  }
 else   try {
    FileWriter fw=new FileWriter(output);
    for (    Solution s : solutions) {
      if (_print) {
        fw.write(s._st.toStringWD() + "String_Node_Str" + s._totalCoals+ "String_Node_Str");
      }
 else {
        fw.write(s._st.toString() + "String_Node_Str" + s._totalCoals+ "String_Node_Str");
      }
    }
    fw.close();
  }
 catch (  IOException e) {
    System.err.println("String_Node_Str");
    System.err.println(e.getMessage());
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  if ((args == null) || args.length == 0 || (args[0].equals("String_Node_Str")) || (args.length < 1)) {
    printUsage();
    return;
  }
  Map<String,String> taxonMap=null;
  String rep=null;
  String pattern=null;
  List<Tree> trees=null;
  List<Tree> extraTrees=null;
  String output=null;
  double bootstrap=1.0D;
  double time=-1.0D;
  boolean unresolved=false;
  long startTime=System.currentTimeMillis();
  String line;
  BufferedReader treeBufferReader=null;
  BufferedReader extraTreebuffer=null;
  try {
    List<String[]> options=getOptions(args);
    for (    String[] option : options) {
      if (option[0].equals("String_Node_Str")) {
        if (option.length != 2) {
          printUsage();
          return;
        }
        treeBufferReader=new BufferedReader(new FileReader(option[1]));
        trees=new ArrayList();
      }
 else       if (option[0].equals("String_Node_Str")) {
        if (option.length != 2) {
          printUsage();
          return;
        }
        extraTreebuffer=new BufferedReader(new FileReader(option[1]));
        extraTrees=new ArrayList();
      }
 else       if (option[0].equals("String_Node_Str")) {
        if ((option.length != 2) && (option.length != 3)) {
          printUsage();
          return;
        }
        if (option.length == 2) {
          BufferedReader br=new BufferedReader(new FileReader(option[1]));
          taxonMap=new HashMap<String,String>();
          while ((line=br.readLine()) != null) {
            String[] mapString=line.trim().split("String_Node_Str");
            for (            String s : mapString) {
              String species=s.substring(0,s.indexOf("String_Node_Str")).trim();
              s=s.substring(s.indexOf("String_Node_Str") + 1);
              String[] alleles=s.split("String_Node_Str");
              for (              String allele : alleles) {
                allele=allele.trim();
                if (taxonMap.containsKey(allele)) {
                  System.err.println("String_Node_Str");
                  System.err.println("String_Node_Str");
                  System.exit(-1);
                }
 else {
                  taxonMap.put(allele,species);
                }
              }
            }
          }
          br.close();
        }
 else {
          pattern=option[1];
          rep=option[2];
        }
      }
 else       if (option[0].equals("String_Node_Str")) {
        if (option.length != 2) {
          printUsage();
          return;
        }
        output=option[1];
      }
 else       if (option[0].equals("String_Node_Str")) {
        if (option.length != 1) {
          printUsage();
          return;
        }
      }
 else       if (option[0].equals("String_Node_Str")) {
        if (option.length > 2) {
          printUsage();
          return;
        }
        if (option.length != 2)         continue;
        try {
        }
 catch (        NumberFormatException e) {
          System.err.println("String_Node_Str");
          printUsage();
          return;
        }
      }
 else       if (option[0].equals("String_Node_Str")) {
        if (option.length > 2) {
          printUsage();
          return;
        }
        if (option.length != 2)         continue;
        try {
          bootstrap=Double.parseDouble(option[1]);
          if ((bootstrap <= 1.0D) && (bootstrap > 0.0D))           continue;
          printUsage();
        }
 catch (        NumberFormatException e) {
          System.err.println("String_Node_Str");
          printUsage();
          return;
        }
      }
 else       if (option[0].equals("String_Node_Str")) {
        if ((option.length != 1) || (time != -1.0D)) {
          printUsage();
          return;
        }
        unresolved=true;
      }
 else       if (option[0].equals("String_Node_Str")) {
        if ((option.length != 1)) {
          printUsage();
          return;
        }
        fast=true;
      }
 else       if (option[0].equals("String_Node_Str")) {
        if ((option.length != 1) || (time != -1.0D)) {
          printUsage();
          return;
        }
        rooted=false;
      }
 else       if (option[0].equals("String_Node_Str")) {
        if ((option.length != 1) || (time != -1.0D)) {
          printUsage();
          return;
        }
        extrarooted=false;
      }
 else       if (option[0].equals("String_Node_Str")) {
        if ((option.length != 2) || (unresolved)) {
          printUsage();
          return;
        }
        if (option.length != 2)         continue;
        try {
          time=Double.parseDouble(option[1]);
          if (time > 0.0D)           continue;
          printUsage();
        }
 catch (        NumberFormatException e) {
          System.err.println("String_Node_Str");
          printUsage();
          return;
        }
      }
 else       if (option[0].equals("String_Node_Str")) {
        if (option.length != 1) {
          printUsage();
          return;
        }
        optimizeDuploss=true;
      }
 else {
        printUsage();
        return;
      }
    }
    if (treeBufferReader == null) {
      System.err.println("String_Node_Str");
      printUsage();
      return;
    }
    System.err.println("String_Node_Str" + (rooted ? "String_Node_Str" : "String_Node_Str"));
    int l=0;
    try {
      while ((line=treeBufferReader.readLine()) != null) {
        l++;
        Set<String> previousTreeTaxa=new HashSet<String>();
        if (line.length() > 0) {
          NewickReader nr=new NewickReader(new StringReader(line));
          if (rooted) {
            STITree gt=new STITree(true);
            nr.readTree(gt);
            if (previousTreeTaxa.isEmpty()) {
              previousTreeTaxa.addAll(Arrays.asList(gt.getLeaves()));
            }
 else {
              if (!previousTreeTaxa.containsAll(Arrays.asList(gt.getLeaves()))) {
                throw new RuntimeException("String_Node_Str" + gt.getLeaves() + "String_Node_Str"+ previousTreeTaxa);
              }
            }
            trees.add(gt);
          }
 else {
            Tree tr=nr.readTree();
            trees.add(tr);
          }
        }
      }
      treeBufferReader.close();
    }
 catch (    ParseException e) {
      treeBufferReader.close();
      throw new RuntimeException("String_Node_Str" + l,e);
    }
    if (extraTreebuffer != null) {
      while ((line=extraTreebuffer.readLine()) != null) {
        if (line.length() > 0) {
          NewickReader nr=new NewickReader(new StringReader(line));
          if (extrarooted) {
            STITree gt=new STITree(true);
            nr.readTree(gt);
            extraTrees.add(gt);
          }
 else {
            Tree tr=nr.readTree();
            extraTrees.add(tr);
          }
        }
      }
      extraTreebuffer.close();
    }
  }
 catch (  IOException e) {
    System.err.println("String_Node_Str");
    System.err.println(e.getMessage());
    e.printStackTrace();
    return;
  }
catch (  ParseException e) {
    System.err.println("String_Node_Str");
    System.err.println(e.getMessage());
    e.printStackTrace();
    return;
  }
  if (trees.size() == 0) {
    System.err.println("String_Node_Str");
    return;
  }
  if (_print) {
    System.err.println("String_Node_Str" + (System.currentTimeMillis() - startTime) / 1000.0D + "String_Node_Str");
  }
  startTime=System.currentTimeMillis();
  MGDInference_DP inference;
  if (rep != null) {
    inference=new MGDInference_DP(trees,extraTrees,pattern,rep);
  }
 else   if (taxonMap != null) {
    inference=new MGDInference_DP(trees,extraTrees,taxonMap);
  }
 else {
    inference=new MGDInference_DP(trees,extraTrees);
  }
  List<Solution> solutions=inference.inferSpeciesTree();
  if (_print) {
    System.err.println("String_Node_Str" + (System.currentTimeMillis() - startTime) / 1000.0D + "String_Node_Str");
  }
  if ((output == null) && (_print)) {
    for (    Solution s : solutions)     System.out.println(s._st.toStringWD() + "String_Node_Str" + s._totalCoals+ (optimizeDuploss ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str");
  }
 else   try {
    FileWriter fw=new FileWriter(output);
    for (    Solution s : solutions) {
      if (_print) {
        fw.write(s._st.toStringWD() + "String_Node_Str" + s._totalCoals+ "String_Node_Str");
      }
 else {
        fw.write(s._st.toString() + "String_Node_Str" + s._totalCoals+ "String_Node_Str");
      }
    }
    fw.close();
  }
 catch (  IOException e) {
    System.err.println("String_Node_Str");
    System.err.println(e.getMessage());
    e.printStackTrace();
  }
}