Program: 100096
Project: 100096
Buggy source:
/** 
 * Compute a set of <n, d1> pairs that represent return statement factoids that should be considered reached in a partially balanced parentheses tabulation. We assume that the given   {@link TabulationResult} represents a solution to a fully balanced tabulation. We look atany exit statements that were reached, and compute the corresponding return factoids that could be reached, if we ignored parentheses. We return the set of such factoids, which represent roots to restart tabulation with.
 */
public static <T,P>Collection<Pair<T,Integer>> computeNewSeeds(TabulationResult<T,P> tabulation,PartiallyBalancedTabulationProblem<T,P> problem){
  Collection<Pair<T,Integer>> result=HashSetFactory.make();
  ISupergraph<T,P> supergraph=tabulation.getProblem().getSupergraph();
  for (  PathEdge<T> entry : tabulation.getSeeds()) {
    for (    T exit : supergraph.getExitsForProcedure(supergraph.getProcOf(entry.getEntry()))) {
      IntSet reached=tabulation.getSummaryTargets(entry.getEntry(),entry.getD1(),exit);
      if (reached != null) {
        for (IntIterator it=reached.intIterator(); it.hasNext(); ) {
          int d2=it.next();
          for (Iterator<? extends T> it2=supergraph.getSuccNodes(exit); it2.hasNext(); ) {
            T retSite=it2.next();
            IFlowFunction f=problem.getFunctionMap().getUnbalancedReturnFlowFunction(exit,retSite);
            if (f instanceof IUnaryFlowFunction) {
              IUnaryFlowFunction uf=(IUnaryFlowFunction)f;
              IntSet facts=uf.getTargets(d2);
              for (IntIterator it4=facts.intIterator(); it4.hasNext(); ) {
                int d3=it4.next();
                result.add(Pair.make(retSite,d3));
              }
            }
 else {
              Assertions.UNREACHABLE("String_Node_Str");
            }
          }
        }
      }
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Compute a set of <n, d1> pairs that represent return statement factoids that should be considered reached in a partially balanced parentheses tabulation. We assume that the given   {@link TabulationResult} represents a solution to a fully balanced tabulation. We look atany exit statements that were reached, and compute the corresponding return factoids that could be reached, if we ignored parentheses. We return the set of such factoids, which represent roots to restart tabulation with.
 */
public static <T,P>Collection<Pair<T,Integer>> computeNewSeeds(TabulationResult<T,P> tabulation,PartiallyBalancedTabulationProblem<T,P> problem){
  Collection<Pair<T,Integer>> result=HashSetFactory.make();
  ISupergraph<T,P> supergraph=tabulation.getProblem().getSupergraph();
  for (  PathEdge<T> entry : tabulation.getSeeds()) {
    for (    T exit : supergraph.getExitsForProcedure(supergraph.getProcOf(entry.getEntry()))) {
      IntSet reached=tabulation.getSummaryTargets(entry.getEntry(),entry.getD1(),exit);
      if (reached != null) {
        for (IntIterator it=reached.intIterator(); it.hasNext(); ) {
          int d2=it.next();
          for (Iterator<? extends T> it2=supergraph.getSuccNodes(exit); it2.hasNext(); ) {
            T retSite=it2.next();
            IFlowFunction f=problem.getFunctionMap().getUnbalancedReturnFlowFunction(exit,retSite);
            if (f instanceof IUnaryFlowFunction) {
              IUnaryFlowFunction uf=(IUnaryFlowFunction)f;
              IntSet facts=uf.getTargets(d2);
              if (facts != null) {
                for (IntIterator it4=facts.intIterator(); it4.hasNext(); ) {
                  int d3=it4.next();
                  result.add(Pair.make(retSite,d3));
                }
              }
            }
 else {
              Assertions.UNREACHABLE("String_Node_Str");
            }
          }
        }
      }
    }
  }
  return result;
}