Program: 50145
Project: 50145
Buggy source:
private List<Long> findBestNonOverlapping(Collection<Relationship> rels){
  if (rels.size() < 1) {
    if (VERBOSE) {
      System.out.println("String_Node_Str");
    }
    return new ArrayList<Long>();
  }
  TLongBitArraySet[] mrcaSetsForRels=new TLongBitArraySet[rels.size()];
  double[] weights=new double[rels.size()];
  Long[] relIds=new Long[rels.size()];
  int taxSum=0;
  HashSet<Long> uniqueTips=new HashSet<Long>();
  Iterator<Relationship> relsIter=rels.iterator();
  for (int i=0; relsIter.hasNext(); i++) {
    Relationship rel=relsIter.next();
    TLongBitArraySet currDesc=mrcaTipsAndInternal(rel.getId());
    if (currDesc == null) {
      throw new IllegalStateException("String_Node_Str" + rel);
    }
    relIds[i]=rel.getId();
    mrcaSetsForRels[i]=currDesc;
    weights[i]=getScoreNodeCount(rel);
    long[] currTips=mrcaTips(rel);
    taxSum+=currTips.length;
    for (int j=0; j < currTips.length; j++) {
      uniqueTips.add(currTips[j]);
    }
    if (VERBOSE) {
      System.out.println(rel.getId() + "String_Node_Str" + rel.getStartNode().getId()+ "String_Node_Str"+ nodeMrca.get(rel.getStartNode().getId())+ "String_Node_Str"+ weights[i]);
    }
  }
  System.out.println("String_Node_Str" + taxSum + "String_Node_Str"+ uniqueTips.size()+ "String_Node_Str"+ relIds.length);
  if (taxSum == uniqueTips.size()) {
    System.out.println("String_Node_Str");
    return new ArrayList<Long>(Arrays.asList(relIds));
  }
 else   if (relIds.length <= BruteWeightedIS.MAX_TRACTABLE_N) {
    return new BruteWeightedIS(relIds,weights,mrcaSetsForRels).best();
  }
 else {
    return new GreedyApproximateWeightedIS(relIds,weights,mrcaSetsForRels).best();
  }
}

Fixed version (ground truth):
private List<Long> findBestNonOverlapping(Collection<Relationship> rels){
  if (rels.size() < 1) {
    if (VERBOSE) {
      System.out.println("String_Node_Str");
    }
    return new ArrayList<Long>();
  }
  TLongBitArraySet[] mrcaSetsForRels=new TLongBitArraySet[rels.size()];
  double[] weights=new double[rels.size()];
  Long[] relIds=new Long[rels.size()];
  int taxSum=0;
  HashSet<Long> uniqueTips=new HashSet<Long>();
  Iterator<Relationship> relsIter=rels.iterator();
  for (int i=0; relsIter.hasNext(); i++) {
    Relationship rel=relsIter.next();
    TLongBitArraySet currDesc=mrcaTipsAndInternal(rel.getStartNode());
    if (currDesc == null) {
      throw new IllegalStateException("String_Node_Str" + rel);
    }
    relIds[i]=rel.getId();
    mrcaSetsForRels[i]=currDesc;
    weights[i]=getScoreNodeCount(rel);
    TLongBitArraySet currTips=mrcaTips(rel.getStartNode());
    taxSum+=currTips.size();
    for (    long t : currTips) {
      uniqueTips.add(t);
    }
    if (VERBOSE) {
      System.out.println(rel.getId() + "String_Node_Str" + rel.getStartNode().getId()+ "String_Node_Str"+ nodeMrcaTipsAndInternal.get(rel.getStartNode().getId())+ "String_Node_Str"+ weights[i]);
    }
  }
  System.out.println("String_Node_Str" + taxSum + "String_Node_Str"+ uniqueTips.size()+ "String_Node_Str"+ relIds.length);
  if (taxSum == uniqueTips.size()) {
    System.out.println("String_Node_Str");
    return new ArrayList<Long>(Arrays.asList(relIds));
  }
 else   if (relIds.length <= BruteWeightedIS.MAX_TRACTABLE_N) {
    return new BruteWeightedIS(relIds,weights,mrcaSetsForRels).best();
  }
 else {
    return new GreedyApproximateWeightedIS(relIds,weights,mrcaSetsForRels).best();
  }
}