Program: 125211
Project: 125211
Buggy source:
private List<Solution> findTreesByDP(String[] stTaxa,DuplicationWeightCounter counter,List<Tree> trees,TaxonNameMap taxonNameMap){
  List<Solution> solutions=new ArrayList<Solution>();
  clusterToVertex=new HashMap<STITreeCluster,Vertex>(sigmaNs);
  for (  Set<Vertex> vs : clusters.values()) {
    for (    Vertex vertex : vs) {
      vertex._max_score=-1;
      clusterToVertex.put(vertex._cluster,vertex);
    }
  }
  Vertex all=(Vertex)clusters.get(Integer.valueOf(stTaxa.length)).toArray()[0];
  System.out.println("String_Node_Str" + sigmaNs);
  System.out.println("String_Node_Str" + all._cluster.getClusterSize());
  try {
    computeMinCost(all);
  }
 catch (  CannotResolveException e) {
    e.printStackTrace();
  }
  List minClusters=new LinkedList();
  List coals=new LinkedList();
  Stack minVertices=new Stack();
  if (all._min_rc != null) {
    minVertices.push(all._min_rc);
  }
  if (all._min_lc != null) {
    minVertices.push(all._min_lc);
  }
  if (all._subcl != null) {
    for (    Vertex v : all._subcl) {
      minVertices.push(v);
    }
  }
  while (!minVertices.isEmpty()) {
    Vertex pe=(Vertex)minVertices.pop();
    minClusters.add(pe._cluster);
    if (pe._min_rc != null) {
      minVertices.push(pe._min_rc);
    }
    if (pe._min_lc != null) {
      minVertices.push(pe._min_lc);
    }
    if (pe._min_lc != null && pe._min_rc != null) {
      coals.add(pe._c);
    }
 else {
      coals.add(0);
    }
    if (pe._subcl != null) {
      for (      Vertex v : pe._subcl) {
        minVertices.push(v);
      }
    }
  }
  Solution sol=new Solution();
  if ((minClusters == null) || (minClusters.isEmpty())) {
    Object tr=new STITree();
    for (    String s : stTaxa) {
      ((MutableTree)tr).getRoot().createChild(s);
    }
    sol._st=((Tree)tr);
  }
 else {
    sol._st=buildTreeFromClusters(minClusters);
  }
  Object map=new HashMap();
  for (  TNode node : sol._st.postTraverse()) {
    BitSet bs=new BitSet();
    if (node.isLeaf()) {
      for (int i=0; i < stTaxa.length; i++) {
        if (node.getName().equals(stTaxa[i])) {
          bs.set(i);
          break;
        }
      }
      ((Map)map).put(node,bs);
    }
 else {
      for (      TNode child : node.getChildren()) {
        BitSet childCluster=(BitSet)((Map)map).get(child);
        bs.or(childCluster);
      }
      ((Map)map).put(node,bs);
    }
    STITreeCluster c=new STITreeCluster(stTaxa);
    c.setCluster(bs);
    if (c.getClusterSize() == stTaxa.length) {
      ((STINode)node).setData(Integer.valueOf(0));
    }
 else {
      int pos=minClusters.indexOf(c);
      ((STINode)node).setData((Integer)coals.get(pos));
    }
  }
  sol._totalCoals=all._min_cost;
  System.out.println("String_Node_Str" + all._min_cost);
  solutions.add(sol);
  return (List<Solution>)(List<Solution>)solutions;
}

Fixed version (ground truth):
private List<Solution> findTreesByDP(String[] stTaxa,DuplicationWeightCounter counter,List<Tree> trees,TaxonNameMap taxonNameMap){
  List<Solution> solutions=new ArrayList<Solution>();
  clusterToVertex=new HashMap<STITreeCluster,Vertex>(sigmaNs);
  for (  Set<Vertex> vs : clusters.values()) {
    for (    Vertex vertex : vs) {
      vertex._max_score=-1;
      clusterToVertex.put(vertex._cluster,vertex);
    }
  }
  Vertex all=(Vertex)clusters.get(Integer.valueOf(stTaxa.length)).toArray()[0];
  System.err.println("String_Node_Str" + sigmaNs);
  System.err.println("String_Node_Str" + all._cluster.getClusterSize());
  try {
    computeMinCost(all);
  }
 catch (  CannotResolveException e) {
    e.printStackTrace();
  }
  List minClusters=new LinkedList();
  List coals=new LinkedList();
  Stack minVertices=new Stack();
  if (all._min_rc != null) {
    minVertices.push(all._min_rc);
  }
  if (all._min_lc != null) {
    minVertices.push(all._min_lc);
  }
  if (all._subcl != null) {
    for (    Vertex v : all._subcl) {
      minVertices.push(v);
    }
  }
  while (!minVertices.isEmpty()) {
    Vertex pe=(Vertex)minVertices.pop();
    minClusters.add(pe._cluster);
    if (pe._min_rc != null) {
      minVertices.push(pe._min_rc);
    }
    if (pe._min_lc != null) {
      minVertices.push(pe._min_lc);
    }
    if (pe._min_lc != null && pe._min_rc != null) {
      coals.add(pe._c);
    }
 else {
      coals.add(0);
    }
    if (pe._subcl != null) {
      for (      Vertex v : pe._subcl) {
        minVertices.push(v);
      }
    }
  }
  Solution sol=new Solution();
  if ((minClusters == null) || (minClusters.isEmpty())) {
    Object tr=new STITree();
    for (    String s : stTaxa) {
      ((MutableTree)tr).getRoot().createChild(s);
    }
    sol._st=((Tree)tr);
  }
 else {
    sol._st=buildTreeFromClusters(minClusters);
  }
  Object map=new HashMap();
  for (  TNode node : sol._st.postTraverse()) {
    BitSet bs=new BitSet();
    if (node.isLeaf()) {
      for (int i=0; i < stTaxa.length; i++) {
        if (node.getName().equals(stTaxa[i])) {
          bs.set(i);
          break;
        }
      }
      ((Map)map).put(node,bs);
    }
 else {
      for (      TNode child : node.getChildren()) {
        BitSet childCluster=(BitSet)((Map)map).get(child);
        bs.or(childCluster);
      }
      ((Map)map).put(node,bs);
    }
    STITreeCluster c=new STITreeCluster(stTaxa);
    c.setCluster(bs);
    if (c.getClusterSize() == stTaxa.length) {
      ((STINode)node).setData(Integer.valueOf(0));
    }
 else {
      int pos=minClusters.indexOf(c);
      ((STINode)node).setData((Integer)coals.get(pos));
    }
  }
  sol._totalCoals=all._min_cost;
  System.out.println("String_Node_Str" + all._min_cost);
  solutions.add(sol);
  return (List<Solution>)(List<Solution>)solutions;
}