Program: 125198
Project: 125198
Buggy source:
public List<Solution> inferSpeciesTree(){
  long startTime=System.currentTimeMillis();
  String[] gtTaxa;
  String[] stTaxa;
  Collapse.CollapseDescriptor cd=null;
  if ((trees == null) || (trees.size() == 0)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (taxonMap != null) {
    String error=Trees.checkMapping(trees,taxonMap);
    if (error != null) {
      throw new RuntimeException("String_Node_Str" + error + "String_Node_Str");
    }
    List temp1=new LinkedList();
    List temp2=new LinkedList();
    for (    String s : taxonMap.keySet()) {
      temp1.add(s);
      if (!((List)temp2).contains(taxonMap.get(s))) {
        ((List)temp2).add((String)taxonMap.get(s));
      }
    }
    gtTaxa=new String[temp1.size()];
    stTaxa=new String[temp2.size()];
    for (int i=0; i < gtTaxa.length; i++) {
      gtTaxa[i]=((String)temp1.get(i));
    }
    for (int i=0; i < stTaxa.length; i++) {
      stTaxa[i]=((String)((List)temp2).get(i));
    }
  }
 else {
    cd=null;
    if (rooted & extraTrees == null & taxonMap == null) {
      cd=doCollapse(trees);
    }
    List<String> taxalist=new ArrayList<String>();
    for (    Tree tr : trees) {
      for (      TNode node : tr.postTraverse()) {
        if ((node.isLeaf()) && (!taxalist.contains(node.getName()))) {
          taxalist.add(node.getName());
        }
      }
    }
    stTaxa=new String[taxalist.size()];
    int index=0;
    for (    String taxon : taxalist) {
      stTaxa[(index++)]=taxon;
    }
    gtTaxa=stTaxa;
  }
  System.out.println("String_Node_Str" + stTaxa.length);
  clusters=new HashMap<Integer,Set<Vertex>>(stTaxa.length);
  List<Solution> solutions;
  counter=new DuplicationWeightCounter(gtTaxa,stTaxa,rooted);
  int sigmaN=counter.computeTreeSTBipartitions(trees,taxonMap,clusters);
  counter.addExtraBipartitionsByInput(clusters,extraTrees);
  counter.calculateWeightsByLCA(extraTrees,trees);
  counter.addExtraBipartitionsByHeuristics(clusters);
  if (_print) {
    System.out.println("String_Node_Str" + (System.currentTimeMillis() - startTime) / 1000.0D + "String_Node_Str");
  }
  counter.preCalculateWeights(trees,taxonMap);
  if (_print) {
    System.out.println("String_Node_Str" + (System.currentTimeMillis() - startTime) / 1000.0D + "String_Node_Str");
  }
  sigmaNs=optimizeDuploss ? sigmaN + 2 * (stTaxa.length - 1) * trees.size() : sigmaN;
  solutions=findTreesByDP(stTaxa,counter,trees,taxonMap);
  if (taxonMap == null && rooted && extraTrees == null) {
    restoreCollapse(solutions,cd);
  }
  return (List<Solution>)solutions;
}

Fixed version (ground truth):
public List<Solution> inferSpeciesTree(){
  long startTime=System.currentTimeMillis();
  String[] gtTaxa;
  String[] stTaxa;
  Collapse.CollapseDescriptor cd=null;
  if ((trees == null) || (trees.size() == 0)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (taxonMap != null) {
    String error=Trees.checkMapping(trees,taxonMap);
    if (error != null) {
      throw new RuntimeException("String_Node_Str" + error + "String_Node_Str");
    }
    List temp1=new LinkedList();
    List temp2=new LinkedList();
    for (    String s : taxonMap.keySet()) {
      temp1.add(s);
      if (!((List)temp2).contains(taxonMap.get(s))) {
        ((List)temp2).add((String)taxonMap.get(s));
      }
    }
    gtTaxa=new String[temp1.size()];
    stTaxa=new String[temp2.size()];
    for (int i=0; i < gtTaxa.length; i++) {
      gtTaxa[i]=((String)temp1.get(i));
    }
    for (int i=0; i < stTaxa.length; i++) {
      stTaxa[i]=((String)((List)temp2).get(i));
    }
  }
 else {
    cd=null;
    if (rooted & extraTrees == null & taxonMap == null) {
      cd=doCollapse(trees);
    }
    List<String> taxalist=new ArrayList<String>();
    for (    Tree tr : trees) {
      for (      TNode node : tr.postTraverse()) {
        if ((node.isLeaf()) && (!taxalist.contains(node.getName()))) {
          taxalist.add(node.getName());
        }
      }
    }
    stTaxa=new String[taxalist.size()];
    int index=0;
    for (    String taxon : taxalist) {
      stTaxa[(index++)]=taxon;
    }
    gtTaxa=stTaxa;
  }
  System.out.println("String_Node_Str" + stTaxa.length);
  clusters=new HashMap<Integer,Set<Vertex>>(stTaxa.length);
  List<Solution> solutions;
  counter=new DuplicationWeightCounter(gtTaxa,stTaxa,rooted);
  int sigmaN=counter.computeTreeSTBipartitions(trees,taxonMap,clusters);
  if (extraTrees != null) {
    counter.addExtraBipartitionsByInput(clusters,extraTrees);
    counter.calculateWeightsByLCA(extraTrees,trees);
  }
  counter.addExtraBipartitionsByHeuristics(clusters);
  if (_print) {
    System.out.println("String_Node_Str" + (System.currentTimeMillis() - startTime) / 1000.0D + "String_Node_Str");
  }
  counter.preCalculateWeights(trees,taxonMap);
  if (_print) {
    System.out.println("String_Node_Str" + (System.currentTimeMillis() - startTime) / 1000.0D + "String_Node_Str");
  }
  sigmaNs=optimizeDuploss ? sigmaN + 2 * (stTaxa.length - 1) * trees.size() : sigmaN;
  solutions=findTreesByDP(stTaxa,counter,trees,taxonMap);
  if (taxonMap == null && rooted && extraTrees == null) {
    restoreCollapse(solutions,cd);
  }
  return (List<Solution>)solutions;
}