Program: 50164
Project: 50164
Buggy source:
@Override public Evaluation evaluate(Path inPath){
  Node curNode=inPath.endNode();
  if (visited.contains(curNode.getId())) {
    return Evaluation.EXCLUDE_AND_PRUNE;
  }
  visited.add(curNode.getId());
  TLongBitArray curNodeMRCAIds=new TLongBitArray((long[])curNode.getProperty("String_Node_Str"));
  TLongBitArray curNodeOutMRCAIds=null;
  boolean isTaxNode=false;
  if (curNode.hasProperty("String_Node_Str") == false) {
    isTaxNode=true;
  }
 else {
    curNodeOutMRCAIds=new TLongBitArray((long[])curNode.getProperty("String_Node_Str"));
  }
  if (isTaxNode == false) {
    if (curNodeMRCAIds.containsAny(outgroupNodeIds) == false) {
      if (curNodeOutMRCAIds.containsAny(ingroupNodeIds) == false) {
        if (curNodeMRCAIds.containsAny(ingroupNodeIds) == true) {
          boolean passed=false;
          TLongHashSet visitedrels=new TLongHashSet();
          for (          Relationship rel : curNode.getRelationships(Direction.INCOMING,RelType.STREECHILDOF)) {
            if (visitedrels.contains(rel.getId()) || rel.hasProperty("String_Node_Str")) {
              continue;
            }
            TLongArrayList inids=new TLongArrayList((long[])rel.getProperty("String_Node_Str"));
            visited.addAll(inids);
            TLongHashSet relmatched=new TLongHashSet();
            HashSet<Integer> childmatched=new HashSet<Integer>();
            for (int j=0; j < inids.size(); j++) {
              TLongBitArray trelj=new TLongBitArray((long[])graphdb.getRelationshipById(inids.get(j)).getProperty("String_Node_Str"));
              for (int i=0; i < jadenode.getChildCount(); i++) {
                TLongBitArray chndi=new TLongBitArray((long[])jadenode.getChild(i).getObject("String_Node_Str"));
                if (chndi.containsAny(trelj) == true) {
                  relmatched.add(inids.get(j));
                  childmatched.add(i);
                  break;
                }
              }
            }
            if (relmatched.size() >= 2 && childmatched.size() == jadenode.getChildCount()) {
              passed=true;
              break;
            }
          }
          if (passed == false) {
            return Evaluation.EXCLUDE_AND_CONTINUE;
          }
          TLongBitArray mrcaSearchIdsNotSetForThisNode=ingroupNodeIds.andNot(curNodeMRCAIds);
          if (mrcaSearchIdsNotSetForThisNode.size() > 0) {
            curNodeMRCAIds.addAll(mrcaSearchIdsNotSetForThisNode);
            curNodeMRCAIds.sort();
            if (updateDB) {
              curNode.setProperty("String_Node_Str",curNodeMRCAIds.toArray());
            }
          }
          TLongBitArray outmrcaSearchIdsNotSetForThisNode=outgroupNodeIds.andNot(curNodeOutMRCAIds);
          if (outmrcaSearchIdsNotSetForThisNode.size() > 0) {
            curNodeOutMRCAIds.addAll(outmrcaSearchIdsNotSetForThisNode);
            curNodeOutMRCAIds.sort();
            if (updateDB) {
              curNode.setProperty("String_Node_Str",curNodeOutMRCAIds.toArray());
            }
          }
          if (updateDB) {
            for (            Relationship parentRel : curNode.getRelationships(RelType.STREECHILDOF,Direction.OUTGOING)) {
              for (              Node ancestor : Traversal.description().breadthFirst().evaluator(new LongArrayPropertyContainsAllEvaluator("String_Node_Str",curNodeMRCAIds)).relationships(RelType.STREECHILDOF,Direction.OUTGOING).traverse(parentRel.getEndNode()).nodes()) {
                System.out.println("String_Node_Str" + ancestor + "String_Node_Str");
                TLongBitArray outmrcaAncestor=new TLongBitArray((long[])ancestor.getProperty("String_Node_Str"));
                if (outmrcaAncestor.containsAny(ingroupNodeIds)) {
                  System.out.println("String_Node_Str");
                  LinkedList<String> names=new LinkedList<String>();
                  for (                  Long l : outmrcaAncestor.getIntersection(ingroupNodeIds)) {
                    names.add((String)graphdb.getNodeById(l).getProperty("String_Node_Str"));
                  }
                  System.out.println(curNode + "String_Node_Str" + ancestor+ "String_Node_Str"+ curNode+ "String_Node_Str"+ Arrays.toString(names.toArray())+ "String_Node_Str"+ ancestor);
                  throw new java.lang.IllegalStateException();
                }
                TLongBitArray mrcaNew=new TLongBitArray((long[])ancestor.getProperty("String_Node_Str"));
                mrcaNew.addAll(curNodeMRCAIds);
                if (updateDB) {
                  ancestor.setProperty("String_Node_Str",mrcaNew.toArray());
                }
              }
            }
            for (            Relationship childRel : curNode.getRelationships(RelType.STREECHILDOF,Direction.INCOMING)) {
              for (              Node descendant : Traversal.description().breadthFirst().evaluator(new LongArrayPropertyContainsAllEvaluator("String_Node_Str",curNodeOutMRCAIds)).relationships(RelType.STREECHILDOF,Direction.INCOMING).traverse(childRel.getStartNode()).nodes()) {
                System.out.println("String_Node_Str" + descendant + "String_Node_Str");
                TLongBitArray mrcaDescendant=new TLongBitArray((long[])descendant.getProperty("String_Node_Str"));
                if (mrcaDescendant.containsAny(outgroupNodeIds)) {
                  System.out.println("String_Node_Str");
                  LinkedList<String> names=new LinkedList<String>();
                  for (                  Long l : mrcaDescendant.getIntersection(outgroupNodeIds)) {
                    names.add((String)graphdb.getNodeById(l).getProperty("String_Node_Str"));
                  }
                  System.out.println(curNode + "String_Node_Str" + descendant+ "String_Node_Str"+ curNode+ "String_Node_Str"+ Arrays.toString(names.toArray())+ "String_Node_Str"+ descendant);
                  throw new java.lang.IllegalStateException();
                }
                TLongBitArray outMrcaNew=new TLongBitArray((long[])descendant.getProperty("String_Node_Str"));
                outMrcaNew.addAll(curNodeOutMRCAIds);
                if (updateDB) {
                  descendant.setProperty("String_Node_Str",outMrcaNew.toArray());
                }
              }
            }
          }
          return Evaluation.INCLUDE_AND_PRUNE;
        }
      }
    }
  }
 else {
    if (curNodeMRCAIds.containsAny(outgroupNodeIds) == false) {
      if (curNodeMRCAIds.containsAll(ingroupNodeIds)) {
        return Evaluation.INCLUDE_AND_PRUNE;
      }
    }
  }
  return Evaluation.EXCLUDE_AND_CONTINUE;
}

Fixed version (ground truth):
@Override public Evaluation evaluate(Path inPath){
  Node curNode=inPath.endNode();
  if (visited.contains(curNode.getId())) {
    return Evaluation.EXCLUDE_AND_PRUNE;
  }
  visited.add(curNode.getId());
  TLongBitArray curNodeMRCAIds=new TLongBitArray((long[])curNode.getProperty("String_Node_Str"));
  TLongBitArray curNodeOutMRCAIds=null;
  boolean isTaxNode=false;
  if (curNode.hasProperty("String_Node_Str") == false) {
    isTaxNode=true;
  }
 else {
    curNodeOutMRCAIds=new TLongBitArray((long[])curNode.getProperty("String_Node_Str"));
  }
  if (isTaxNode == false) {
    if (curNodeMRCAIds.containsAny(outgroupNodeIds) == false) {
      if (curNodeOutMRCAIds.containsAny(ingroupNodeIds) == false) {
        if (curNodeMRCAIds.containsAny(ingroupNodeIds) == true) {
          boolean passed=false;
          TLongHashSet visitedrels=new TLongHashSet();
          for (          Relationship rel : curNode.getRelationships(Direction.INCOMING,RelType.STREECHILDOF)) {
            if (visitedrels.contains(rel.getId()) || rel.hasProperty("String_Node_Str")) {
              continue;
            }
            TLongArrayList inids=new TLongArrayList((long[])rel.getProperty("String_Node_Str"));
            visited.addAll(inids);
            TLongHashSet relmatched=new TLongHashSet();
            HashSet<Integer> childmatched=new HashSet<Integer>();
            for (int j=0; j < inids.size(); j++) {
              TLongBitArray trelj=new TLongBitArray((long[])graphdb.getRelationshipById(inids.get(j)).getProperty("String_Node_Str"));
              for (int i=0; i < jadenode.getChildCount(); i++) {
                TLongBitArray chndi=new TLongBitArray((long[])jadenode.getChild(i).getObject("String_Node_Str"));
                if (chndi.containsAny(trelj) == true) {
                  relmatched.add(inids.get(j));
                  childmatched.add(i);
                  break;
                }
              }
            }
            if (relmatched.size() >= 2) {
              passed=true;
              break;
            }
          }
          if (passed == false) {
            return Evaluation.EXCLUDE_AND_CONTINUE;
          }
          TLongBitArray mrcaSearchIdsNotSetForThisNode=ingroupNodeIds.andNot(curNodeMRCAIds);
          if (mrcaSearchIdsNotSetForThisNode.size() > 0) {
            curNodeMRCAIds.addAll(mrcaSearchIdsNotSetForThisNode);
            curNodeMRCAIds.sort();
            if (updateDB) {
              curNode.setProperty("String_Node_Str",curNodeMRCAIds.toArray());
            }
          }
          TLongBitArray outmrcaSearchIdsNotSetForThisNode=outgroupNodeIds.andNot(curNodeOutMRCAIds);
          if (outmrcaSearchIdsNotSetForThisNode.size() > 0) {
            curNodeOutMRCAIds.addAll(outmrcaSearchIdsNotSetForThisNode);
            curNodeOutMRCAIds.sort();
            if (updateDB) {
              curNode.setProperty("String_Node_Str",curNodeOutMRCAIds.toArray());
            }
          }
          if (updateDB) {
            for (            Relationship parentRel : curNode.getRelationships(RelType.STREECHILDOF,Direction.OUTGOING)) {
              for (              Node ancestor : Traversal.description().breadthFirst().evaluator(new LongArrayPropertyContainsAllEvaluator("String_Node_Str",curNodeMRCAIds)).relationships(RelType.STREECHILDOF,Direction.OUTGOING).traverse(parentRel.getEndNode()).nodes()) {
                System.out.println("String_Node_Str" + ancestor + "String_Node_Str");
                TLongBitArray outmrcaAncestor=new TLongBitArray((long[])ancestor.getProperty("String_Node_Str"));
                if (outmrcaAncestor.containsAny(ingroupNodeIds)) {
                  System.out.println("String_Node_Str");
                  LinkedList<String> names=new LinkedList<String>();
                  for (                  Long l : outmrcaAncestor.getIntersection(ingroupNodeIds)) {
                    names.add((String)graphdb.getNodeById(l).getProperty("String_Node_Str"));
                  }
                  System.out.println(curNode + "String_Node_Str" + ancestor+ "String_Node_Str"+ curNode+ "String_Node_Str"+ Arrays.toString(names.toArray())+ "String_Node_Str"+ ancestor);
                  throw new java.lang.IllegalStateException();
                }
                TLongBitArray mrcaNew=new TLongBitArray((long[])ancestor.getProperty("String_Node_Str"));
                mrcaNew.addAll(curNodeMRCAIds);
                if (updateDB) {
                  ancestor.setProperty("String_Node_Str",mrcaNew.toArray());
                }
              }
            }
            for (            Relationship childRel : curNode.getRelationships(RelType.STREECHILDOF,Direction.INCOMING)) {
              for (              Node descendant : Traversal.description().breadthFirst().evaluator(new LongArrayPropertyContainsAllEvaluator("String_Node_Str",curNodeOutMRCAIds)).relationships(RelType.STREECHILDOF,Direction.INCOMING).traverse(childRel.getStartNode()).nodes()) {
                System.out.println("String_Node_Str" + descendant + "String_Node_Str");
                TLongBitArray mrcaDescendant=new TLongBitArray((long[])descendant.getProperty("String_Node_Str"));
                if (mrcaDescendant.containsAny(outgroupNodeIds)) {
                  System.out.println("String_Node_Str");
                  LinkedList<String> names=new LinkedList<String>();
                  for (                  Long l : mrcaDescendant.getIntersection(outgroupNodeIds)) {
                    names.add((String)graphdb.getNodeById(l).getProperty("String_Node_Str"));
                  }
                  System.out.println(curNode + "String_Node_Str" + descendant+ "String_Node_Str"+ curNode+ "String_Node_Str"+ Arrays.toString(names.toArray())+ "String_Node_Str"+ descendant);
                  throw new java.lang.IllegalStateException();
                }
                TLongBitArray outMrcaNew=new TLongBitArray((long[])descendant.getProperty("String_Node_Str"));
                outMrcaNew.addAll(curNodeOutMRCAIds);
                if (updateDB) {
                  descendant.setProperty("String_Node_Str",outMrcaNew.toArray());
                }
              }
            }
          }
          return Evaluation.INCLUDE_AND_PRUNE;
        }
      }
    }
  }
 else {
    if (curNodeMRCAIds.containsAny(outgroupNodeIds) == false) {
      if (curNodeMRCAIds.containsAll(ingroupNodeIds)) {
        return Evaluation.INCLUDE_AND_PRUNE;
      }
    }
  }
  return Evaluation.EXCLUDE_AND_CONTINUE;
}