Program: 125199
Project: 125199
Buggy source:
void addExtraBipartitionsByInput(Map<Integer,Set<Vertex>> clusters,List<Tree> trees,Map<String,String> taxonMap,boolean extraTreeRooted){
  int sigmaN=0;
  int k=trees.size();
  String[] leaves=stTaxa;
  int n=leaves.length;
  STITreeCluster all=clusters.get(n).iterator().next()._cluster;
  for (  Tree tr : trees) {
    sigmaN+=tr.getLeafCount() - 1;
    Map<TNode,STITreeCluster> map=new HashMap<TNode,STITreeCluster>(n);
    for (Iterator<TNode> nodeIt=tr.postTraverse().iterator(); nodeIt.hasNext(); ) {
      TNode node=nodeIt.next();
      if (node.isLeaf()) {
        String nodeName=node.getName();
        if (taxonMap != null) {
          nodeName=taxonMap.get(nodeName);
        }
        STITreeCluster tb=new STITreeCluster(leaves);
        tb.addLeaf(nodeName);
        map.put(node,tb);
        if (!extraTreeRooted) {
          addSTBToX(clusters,tb,tb.complementaryCluster(),all);
        }
      }
 else {
        int childCount=node.getChildCount();
        STITreeCluster childbslist[]=new STITreeCluster[childCount];
        BitSet bs=new BitSet(leaves.length);
        int index=0;
        for (Iterator iterator3=node.getChildren().iterator(); iterator3.hasNext(); ) {
          TNode child=(TNode)iterator3.next();
          childbslist[index++]=map.get(child);
          bs.or(map.get(child).getCluster());
        }
        STITreeCluster cluster=new STITreeCluster(leaves);
        cluster.setCluster((BitSet)bs.clone());
        int size=cluster.getClusterSize();
        map.put(node,cluster);
        if (extraTreeRooted) {
          if (index > 2) {
            throw new RuntimeException("String_Node_Str" + tr + "String_Node_Str"+ node);
          }
          STITreeCluster l_cluster=childbslist[0];
          STITreeCluster r_cluster=childbslist[1];
          addSTBToX(clusters,l_cluster,r_cluster,cluster);
        }
 else {
          if (childCount == 2) {
            STITreeCluster l_cluster=childbslist[0];
            STITreeCluster r_cluster=childbslist[1];
            STITreeCluster allMinuslAndr_cluster=cluster.complementaryCluster();
            STITreeCluster lAndr_cluster=cluster;
            addSTBToX(clusters,l_cluster,r_cluster,cluster);
            addSTBToX(clusters,r_cluster,allMinuslAndr_cluster,l_cluster.complementaryCluster());
            addSTBToX(clusters,l_cluster,allMinuslAndr_cluster,r_cluster.complementaryCluster());
            addSTBToX(clusters,lAndr_cluster,allMinuslAndr_cluster,all);
          }
 else           if (childCount == 3 && node.isRoot()) {
            STITreeCluster l_cluster=childbslist[0];
            STITreeCluster m_cluster=childbslist[1];
            STITreeCluster r_cluster=childbslist[2];
            addSTBToX(clusters,l_cluster,r_cluster,m_cluster.complementaryCluster());
            addSTBToX(clusters,r_cluster,m_cluster,l_cluster.complementaryCluster());
            addSTBToX(clusters,l_cluster,m_cluster,r_cluster.complementaryCluster());
          }
 else {
            throw new RuntimeException("String_Node_Str" + tr + "String_Node_Str"+ node);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
void addExtraBipartitionsByInput(Map<Integer,Set<Vertex>> clusters,List<Tree> trees,Map<String,String> taxonMap,boolean extraTreeRooted){
  int sigmaN=0;
  int k=trees.size();
  String[] leaves=stTaxa;
  int n=leaves.length;
  STITreeCluster all=clusters.get(n).iterator().next()._cluster;
  for (  Tree tr : trees) {
    sigmaN+=tr.getLeafCount() - 1;
    Map<TNode,STITreeCluster> map=new HashMap<TNode,STITreeCluster>(n);
    for (Iterator<TNode> nodeIt=tr.postTraverse().iterator(); nodeIt.hasNext(); ) {
      TNode node=nodeIt.next();
      if (node.isLeaf()) {
        String nodeName=node.getName();
        if (taxonMap != null) {
          nodeName=taxonMap.get(nodeName);
        }
        STITreeCluster tb=new STITreeCluster(leaves);
        tb.addLeaf(nodeName);
        map.put(node,tb);
        if (!extraTreeRooted) {
          addSTBToX(clusters,tb,tb.complementaryCluster(),all);
        }
      }
 else {
        int childCount=node.getChildCount();
        STITreeCluster childbslist[]=new STITreeCluster[childCount];
        BitSet bs=new BitSet(leaves.length);
        int index=0;
        for (Iterator iterator3=node.getChildren().iterator(); iterator3.hasNext(); ) {
          TNode child=(TNode)iterator3.next();
          childbslist[index++]=map.get(child);
          bs.or(map.get(child).getCluster());
        }
        STITreeCluster cluster=new STITreeCluster(leaves);
        cluster.setCluster((BitSet)bs.clone());
        int size=cluster.getClusterSize();
        map.put(node,cluster);
        if (extraTreeRooted) {
          if (index > 2) {
            throw new RuntimeException("String_Node_Str" + tr + "String_Node_Str"+ node);
          }
          STITreeCluster l_cluster=childbslist[0];
          STITreeCluster r_cluster=childbslist[1];
          addSTBToX(clusters,l_cluster,r_cluster,cluster);
        }
 else {
          if (childCount == 2) {
            STITreeCluster l_cluster=childbslist[0];
            STITreeCluster r_cluster=childbslist[1];
            STITreeCluster allMinuslAndr_cluster=cluster.complementaryCluster();
            STITreeCluster lAndr_cluster=cluster;
            addSTBToX(clusters,l_cluster,r_cluster,cluster);
            if (allMinuslAndr_cluster.getClusterSize() != 0) {
              addSTBToX(clusters,r_cluster,allMinuslAndr_cluster,null);
              addSTBToX(clusters,l_cluster,allMinuslAndr_cluster,null);
              addSTBToX(clusters,lAndr_cluster,allMinuslAndr_cluster,all);
            }
          }
 else           if (childCount == 3 && node.isRoot()) {
            STITreeCluster l_cluster=childbslist[0];
            STITreeCluster m_cluster=childbslist[1];
            STITreeCluster r_cluster=childbslist[2];
            addSTBToX(clusters,l_cluster,r_cluster,null);
            addSTBToX(clusters,r_cluster,m_cluster,null);
            addSTBToX(clusters,l_cluster,m_cluster,null);
          }
 else {
            throw new RuntimeException("String_Node_Str" + tr + "String_Node_Str"+ node);
          }
        }
      }
    }
  }
}