Program: 50111
Project: 50111
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"));
  while (taxaleft.removeAll(knownIdsInTree) == true) {
    continue;
  }
  System.out.println("String_Node_Str" + taxaleft.size());
  while (taxaleft.size() > 0) {
    System.out.print("String_Node_Str" + taxaleft.size());
    long tid=taxaleft.removeAt(0);
    Node taxNode=graphDb.getNodeById(tid);
    System.out.println("String_Node_Str" + ((String)taxNode.getProperty("String_Node_Str")));
    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);
      Node taxmrca=null;
      taxmrca=getTaxonomyMRCA(nodesInTree);
      boolean going=true;
      ImmutableCompactLongSet ints=new ImmutableCompactLongSet((long[])taxmrca.getProperty("String_Node_Str"));
      while (going == true) {
        if (mrca.hasProperty("String_Node_Str")) {
          ImmutableCompactLongSet outs=new ImmutableCompactLongSet((long[])mrca.getProperty("String_Node_Str"));
          if (outs.containsAny(ints)) {
            mrca=mrca.getSingleRelationship(RelType.SYNTHCHILDOF,Direction.OUTGOING).getEndNode();
          }
 else {
            break;
          }
        }
 else {
          ImmutableCompactLongSet ins=new ImmutableCompactLongSet((long[])mrca.getProperty("String_Node_Str"));
          if (ins.containsAll(ints) == true)           break;
 else           mrca=mrca.getSingleRelationship(RelType.SYNTHCHILDOF,Direction.OUTGOING).getEndNode();
        }
      }
      Relationship newRel=taxNode.createRelationshipTo(mrca,RelType.SYNTHCHILDOF);
      synthRelIndex.add(newRel,"String_Node_Str",DRAFTTREENAME);
      newRel.setProperty("String_Node_Str",DRAFTTREENAME);
      newRel.setProperty("String_Node_Str",supportingSources);
      knownIdsInTree.add(taxNode.getId());
    }
 else {
      Relationship newRel=taxNode.createRelationshipTo(ptaxNode,RelType.SYNTHCHILDOF);
      synthRelIndex.add(newRel,"String_Node_Str",DRAFTTREENAME);
      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"));
  while (taxaleft.removeAll(knownIdsInTree) == true) {
    continue;
  }
  System.out.println("String_Node_Str" + taxaleft.size());
  while (taxaleft.size() > 0) {
    System.out.print("String_Node_Str" + taxaleft.size());
    long tid=taxaleft.removeAt(0);
    Node taxNode=graphDb.getNodeById(tid);
    System.out.println("String_Node_Str" + ((String)taxNode.getProperty("String_Node_Str")));
    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() > 0) {
      Node mrca=null;
      mrca=getLICAForDraftTreeNodes(nodesInTree);
      Node taxmrca=null;
      taxmrca=getTaxonomyMRCA(nodesInTree);
      boolean going=true;
      ImmutableCompactLongSet ints=new ImmutableCompactLongSet((long[])taxmrca.getProperty("String_Node_Str"));
      while (going == true) {
        if (mrca.hasProperty("String_Node_Str")) {
          ImmutableCompactLongSet outs=new ImmutableCompactLongSet((long[])mrca.getProperty("String_Node_Str"));
          if (outs.containsAny(ints)) {
            mrca=mrca.getSingleRelationship(RelType.SYNTHCHILDOF,Direction.OUTGOING).getEndNode();
          }
 else {
            break;
          }
        }
 else {
          ImmutableCompactLongSet ins=new ImmutableCompactLongSet((long[])mrca.getProperty("String_Node_Str"));
          if (ins.containsAll(ints) == true)           break;
 else           mrca=mrca.getSingleRelationship(RelType.SYNTHCHILDOF,Direction.OUTGOING).getEndNode();
        }
      }
      Relationship newRel=taxNode.createRelationshipTo(mrca,RelType.SYNTHCHILDOF);
      synthRelIndex.add(newRel,"String_Node_Str",DRAFTTREENAME);
      newRel.setProperty("String_Node_Str",DRAFTTREENAME);
      newRel.setProperty("String_Node_Str",supportingSources);
      knownIdsInTree.add(taxNode.getId());
    }
 else {
      Relationship newRel=taxNode.createRelationshipTo(ptaxNode,RelType.SYNTHCHILDOF);
      synthRelIndex.add(newRel,"String_Node_Str",DRAFTTREENAME);
      newRel.setProperty("String_Node_Str",DRAFTTREENAME);
      newRel.setProperty("String_Node_Str",supportingSources);
      taxaleft.add(ptaxNode.getId());
    }
  }
}