Program: 125212
Project: 125212
Buggy source:
private void tryAddingGeneSTBs(Map<Integer,Set<Vertex>> clusters,STITreeCluster l_cluster,STITreeCluster r_cluster,STITreeCluster cluster,TNode node,HashSet<STBipartition> addedSoFar,int allInducedByGTSize){
  if (cluster == null) {
    cluster=new STITreeCluster(l_cluster);
    cluster.getCluster().or(r_cluster.getCluster());
  }
  int size=cluster.getClusterSize();
  if (l_cluster.isDisjoint(r_cluster)) {
    STBipartition stb=new STBipartition(l_cluster,r_cluster,cluster);
    if (addedSoFar.contains(stb)) {
      return;
    }
 else {
      addedSoFar.add(stb);
    }
    geneTreeSTBBySize.get(size).add(stb);
    ((STINode)node).setData(stb);
    addSTBToX(clusters,stb);
    geneTreeSTBCount.put(stb,geneTreeSTBCount.containsKey(stb) ? geneTreeSTBCount.get(stb) + 1 : 1);
    if (size == allInducedByGTSize) {
      if (!geneTreeRootSTBs.containsKey(stb)) {
        geneTreeRootSTBs.put(stb,1);
      }
 else {
        geneTreeRootSTBs.put(stb,geneTreeRootSTBs.get(stb) + 1);
      }
    }
  }
 else {
    BitSet and=(BitSet)l_cluster.getCluster().clone();
    and.and(r_cluster.getCluster());
    BitSet l_Minus_r=(BitSet)and.clone();
    l_Minus_r.xor(l_cluster.getCluster());
    STITreeCluster lmr=new STITreeCluster(stTaxa);
    lmr.setCluster(l_Minus_r);
    BitSet r_Minus_l=(BitSet)and.clone();
    r_Minus_l.xor(r_cluster.getCluster());
    STITreeCluster rml=new STITreeCluster(stTaxa);
    rml.setCluster(r_Minus_l);
    if (!rml.getCluster().isEmpty()) {
      addToClusters(clusters,rml,rml.getClusterSize());
      addSTBToX(clusters,new STBipartition(l_cluster,rml,cluster));
    }
    if (!lmr.getCluster().isEmpty()) {
      addToClusters(clusters,lmr,lmr.getClusterSize());
      addSTBToX(clusters,new STBipartition(lmr,r_cluster,cluster));
    }
  }
}

Fixed version (ground truth):
private void tryAddingGeneSTBs(Map<Integer,Set<Vertex>> clusters,STITreeCluster l_cluster,STITreeCluster r_cluster,STITreeCluster cluster,TNode node,int allInducedByGTSize){
  if (cluster == null) {
    cluster=new STITreeCluster(l_cluster);
    cluster.getCluster().or(r_cluster.getCluster());
  }
  int size=cluster.getClusterSize();
  if (l_cluster.isDisjoint(r_cluster)) {
    STBipartition stb=new STBipartition(l_cluster,r_cluster,cluster);
    geneTreeSTBBySize.get(size).add(stb);
    ((STINode)node).setData(stb);
    addSTBToX(clusters,stb);
    geneTreeSTBCount.put(stb,geneTreeSTBCount.containsKey(stb) ? geneTreeSTBCount.get(stb) + 1 : 1);
    if (size == allInducedByGTSize) {
      if (!geneTreeRootSTBs.containsKey(stb)) {
        geneTreeRootSTBs.put(stb,1);
      }
 else {
        geneTreeRootSTBs.put(stb,geneTreeRootSTBs.get(stb) + 1);
      }
    }
  }
 else {
    BitSet and=(BitSet)l_cluster.getCluster().clone();
    and.and(r_cluster.getCluster());
    BitSet l_Minus_r=(BitSet)and.clone();
    l_Minus_r.xor(l_cluster.getCluster());
    STITreeCluster lmr=new STITreeCluster(stTaxa);
    lmr.setCluster(l_Minus_r);
    BitSet r_Minus_l=(BitSet)and.clone();
    r_Minus_l.xor(r_cluster.getCluster());
    STITreeCluster rml=new STITreeCluster(stTaxa);
    rml.setCluster(r_Minus_l);
    if (!rml.getCluster().isEmpty()) {
      addToClusters(clusters,rml,rml.getClusterSize());
      addSTBToX(clusters,new STBipartition(l_cluster,rml,cluster));
    }
    if (!lmr.getCluster().isEmpty()) {
      addToClusters(clusters,lmr,lmr.getClusterSize());
      addSTBToX(clusters,new STBipartition(lmr,r_cluster,cluster));
    }
  }
}