Program: 50205
Project: 50205
Buggy source:
/** 
 * Used to add missing external nodes to the draft tree stored in the graph.
 * @param startNode
 * @param taxRootNode
 */
private void addMissingChildrenToDraftTreeWhile(Node startNode,Node taxRootNode){
  String[] supportingSources=new String[1];
  supportingSources[0]="String_Node_Str";
  TLongArrayList taxaleft=new TLongArrayList((long[])startNode.getProperty("String_Node_Str"));
  taxaleft.removeAll(knownIdsInTree);
  System.out.println("String_Node_Str" + taxaleft.size());
  while (taxaleft.size() > 0) {
    long tid=taxaleft.removeAt(0);
    Node taxNode=graphDb.getNodeById(tid);
    TLongArrayList ttmrca=new TLongArrayList((long[])taxNode.getProperty("String_Node_Str"));
    if (taxNode.hasRelationship(Direction.OUTGOING,RelType.SYNTHCHILDOF))     continue;
    Node ptaxNode=taxNode.getSingleRelationship(RelType.TAXCHILDOF,Direction.OUTGOING).getEndNode();
    ArrayList<Node> nodesInTree=new ArrayList<Node>();
    for (    long cid : (long[])ptaxNode.getProperty("String_Node_Str")) {
      Node childNode=graphDb.getNodeById(cid);
      if (knownIdsInTree.contains(cid)) {
        nodesInTree.add(childNode);
      }
    }
    if (nodesInTree.size() > 1) {
      Node mrca=null;
      mrca=getLICAForDraftTreeNodes(nodesInTree);
      Relationship newRel=taxNode.createRelationshipTo(mrca,RelType.SYNTHCHILDOF);
      newRel.setProperty("String_Node_Str",DRAFTTREENAME);
      newRel.setProperty("String_Node_Str",supportingSources);
      knownIdsInTree.add(taxNode.getId());
    }
 else {
      Relationship newRel=taxNode.createRelationshipTo(ptaxNode,RelType.SYNTHCHILDOF);
      newRel.setProperty("String_Node_Str",DRAFTTREENAME);
      newRel.setProperty("String_Node_Str",supportingSources);
      taxaleft.add(ptaxNode.getId());
    }
  }
}

Fixed version (ground truth):
/** 
 * Used to add missing external nodes to the draft tree stored in the graph.
 * @param startNode
 * @param taxRootNode
 */
private void addMissingChildrenToDraftTreeWhile(Node startNode,Node taxRootNode){
  String[] supportingSources=new String[1];
  supportingSources[0]="String_Node_Str";
  TLongArrayList taxaleft=new TLongArrayList((long[])startNode.getProperty("String_Node_Str"));
  taxaleft.removeAll(knownIdsInTree);
  System.out.println("String_Node_Str" + taxaleft.size());
  while (taxaleft.size() > 0) {
    System.out.println("String_Node_Str" + taxaleft.size());
    long tid=taxaleft.removeAt(0);
    Node taxNode=graphDb.getNodeById(tid);
    TLongArrayList ttmrca=new TLongArrayList((long[])taxNode.getProperty("String_Node_Str"));
    if (taxNode.hasRelationship(Direction.OUTGOING,RelType.SYNTHCHILDOF))     continue;
    Node ptaxNode=taxNode.getSingleRelationship(RelType.TAXCHILDOF,Direction.OUTGOING).getEndNode();
    ArrayList<Node> nodesInTree=new ArrayList<Node>();
    for (    long cid : (long[])ptaxNode.getProperty("String_Node_Str")) {
      Node childNode=graphDb.getNodeById(cid);
      if (knownIdsInTree.contains(cid)) {
        nodesInTree.add(childNode);
      }
    }
    if (nodesInTree.size() > 1) {
      Node mrca=null;
      mrca=getLICAForDraftTreeNodes(nodesInTree);
      Relationship newRel=taxNode.createRelationshipTo(mrca,RelType.SYNTHCHILDOF);
      newRel.setProperty("String_Node_Str",DRAFTTREENAME);
      newRel.setProperty("String_Node_Str",supportingSources);
      knownIdsInTree.add(taxNode.getId());
    }
 else {
      Relationship newRel=taxNode.createRelationshipTo(ptaxNode,RelType.SYNTHCHILDOF);
      newRel.setProperty("String_Node_Str",DRAFTTREENAME);
      newRel.setProperty("String_Node_Str",supportingSources);
      taxaleft.add(ptaxNode.getId());
    }
  }
}