Program: 50221
Project: 50221
Buggy source:
public void justTreeAnalysis(String[] args){
  if (args.length > 3) {
    System.out.println("String_Node_Str");
    return;
  }
  String filename=args[1];
  String graphname=args[2];
  int treeCounter=0;
  GraphImporter gi=new GraphImporter(graphname);
  String ts="String_Node_Str";
  ArrayList<JadeTree> jt=new ArrayList<JadeTree>();
  TreeReader tr=new TreeReader();
  try {
    BufferedReader br=new BufferedReader(new FileReader(filename));
    if (divineTreeFormat(br).compareTo("String_Node_Str") == 0) {
      System.out.println("String_Node_Str");
      TreeReader tr=new TreeReader();
      while ((ts=br.readLine()) != null) {
        if (ts.length() > 1) {
          jt.add(tr.readTree(ts));
          treeCounter++;
        }
      }
    }
 else {
      System.out.println("String_Node_Str");
      for (      JadeTree tree : NexsonReader.readNexson(filename)) {
        jt.add(tree);
        treeCounter++;
      }
    }
    br.close();
  }
 catch (  IOException ioe) {
  }
  System.out.println(treeCounter + "String_Node_Str");
  HashSet<String> names=new HashSet<String>();
  for (int i=0; i < jt.size(); i++) {
    for (int j=0; j < jt.get(i).getExternalNodeCount(); j++) {
      names.add(jt.get(i).getExternalNode(j).getName());
    }
  }
  PrintWriter outFile;
  try {
    outFile=new PrintWriter(new FileWriter("String_Node_Str"));
    ArrayList<String> namesal=new ArrayList<String>();
    namesal.addAll(names);
    for (int i=0; i < namesal.size(); i++) {
      outFile.write((i + 2) + "String_Node_Str" + namesal.get(i)+ "String_Node_Str");
    }
    outFile.write("String_Node_Str");
    outFile.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  gi.addInitialTaxonomyTableIntoGraph("String_Node_Str","String_Node_Str");
  System.out.println("String_Node_Str");
  for (int i=0; i < jt.size(); i++) {
    System.out.println("String_Node_Str" + i);
    gi.setTree(jt.get(i));
    try {
      gi.addProcessedTreeToGraph("String_Node_Str","String_Node_Str" + String.valueOf(i));
      gi.deleteTreeBySource("String_Node_Str" + String.valueOf(i));
    }
 catch (    TaxonNotFoundException tnfx) {
      System.err.println("String_Node_Str" + tnfx.getQuotedName() + "String_Node_Str");
      System.exit(1);
    }
catch (    TreeIngestException tix) {
      System.err.println("String_Node_Str" + tix.toString());
      System.exit(1);
    }
  }
  for (int i=0; i < jt.size(); i++) {
    System.out.println("String_Node_Str" + i);
    gi.setTree(jt.get(i));
    try {
      gi.addProcessedTreeToGraph("String_Node_Str","String_Node_Str" + String.valueOf(i));
    }
 catch (    TaxonNotFoundException tnfx) {
      System.err.println("String_Node_Str" + tnfx.getQuotedName() + "String_Node_Str");
      System.exit(1);
    }
catch (    TreeIngestException tix) {
      System.err.println("String_Node_Str" + tix.toString());
      System.exit(1);
    }
  }
  gi.shutdownDB();
}

Fixed version (ground truth):
public void justTreeAnalysis(String[] args){
  if (args.length > 3) {
    System.out.println("String_Node_Str");
    return;
  }
  String filename=args[1];
  String graphname=args[2];
  int treeCounter=0;
  GraphImporter gi=new GraphImporter(graphname);
  String ts="String_Node_Str";
  ArrayList<JadeTree> jt=new ArrayList<JadeTree>();
  try {
    BufferedReader br=new BufferedReader(new FileReader(filename));
    if (divineTreeFormat(br).compareTo("String_Node_Str") == 0) {
      System.out.println("String_Node_Str");
      TreeReader tr=new TreeReader();
      while ((ts=br.readLine()) != null) {
        if (ts.length() > 1) {
          jt.add(tr.readTree(ts));
          treeCounter++;
        }
      }
    }
 else {
      System.out.println("String_Node_Str");
      for (      JadeTree tree : NexsonReader.readNexson(filename)) {
        jt.add(tree);
        treeCounter++;
      }
    }
    br.close();
  }
 catch (  IOException ioe) {
  }
  System.out.println(treeCounter + "String_Node_Str");
  HashSet<String> names=new HashSet<String>();
  for (int i=0; i < jt.size(); i++) {
    for (int j=0; j < jt.get(i).getExternalNodeCount(); j++) {
      names.add(jt.get(i).getExternalNode(j).getName());
    }
  }
  PrintWriter outFile;
  try {
    outFile=new PrintWriter(new FileWriter("String_Node_Str"));
    ArrayList<String> namesal=new ArrayList<String>();
    namesal.addAll(names);
    for (int i=0; i < namesal.size(); i++) {
      outFile.write((i + 2) + "String_Node_Str" + namesal.get(i)+ "String_Node_Str");
    }
    outFile.write("String_Node_Str");
    outFile.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  gi.addInitialTaxonomyTableIntoGraph("String_Node_Str","String_Node_Str");
  System.out.println("String_Node_Str");
  for (int i=0; i < jt.size(); i++) {
    System.out.println("String_Node_Str" + i);
    gi.setTree(jt.get(i));
    try {
      gi.addProcessedTreeToGraph("String_Node_Str","String_Node_Str" + String.valueOf(i));
      gi.deleteTreeBySource("String_Node_Str" + String.valueOf(i));
    }
 catch (    TaxonNotFoundException tnfx) {
      System.err.println("String_Node_Str" + tnfx.getQuotedName() + "String_Node_Str");
      System.exit(1);
    }
catch (    TreeIngestException tix) {
      System.err.println("String_Node_Str" + tix.toString());
      System.exit(1);
    }
  }
  for (int i=0; i < jt.size(); i++) {
    System.out.println("String_Node_Str" + i);
    gi.setTree(jt.get(i));
    try {
      gi.addProcessedTreeToGraph("String_Node_Str","String_Node_Str" + String.valueOf(i));
    }
 catch (    TaxonNotFoundException tnfx) {
      System.err.println("String_Node_Str" + tnfx.getQuotedName() + "String_Node_Str");
      System.exit(1);
    }
catch (    TreeIngestException tix) {
      System.err.println("String_Node_Str" + tix.toString());
      System.exit(1);
    }
  }
  gi.shutdownDB();
}