Program: 133105
Project: 133105
Buggy source:
private static boolean eliminateIter(Logger logger,Block block){
  boolean converged=true;
  ListIterator<Continuation> it=block.continuationIterator();
  while (it.hasNext()) {
    Continuation c=it.next();
    if (c.isNoop()) {
      it.remove();
      converged=false;
    }
  }
  List<List<Var>> dependentSets=new ArrayList<List<Var>>();
  Set<String> thisBlockNeeded=new HashSet<String>();
  Set<String> thisBlockWritten=new HashSet<String>();
  block.findThisBlockNeededVars(thisBlockNeeded,thisBlockWritten,dependentSets);
  if (logger.isTraceEnabled()) {
    logger.trace("String_Node_Str" + thisBlockNeeded + "String_Node_Str"+ thisBlockWritten);
  }
  Map<String,Block> candidates=new HashMap<String,Block>();
  for (  Var v : block.getVariables()) {
    if (!thisBlockNeeded.contains(v.name()) && !thisBlockWritten.contains(v.name()))     candidates.put(v.name(),null);
  }
  List<Set<String>> subblockNeededVars=new ArrayList<Set<String>>();
  for (  Continuation cont : block.getContinuations()) {
    Set<String> contAllUsed=new HashSet<String>();
    for (    Block subBlock : cont.getBlocks()) {
      Set<String> subblockNeeded=new HashSet<String>();
      Set<String> subblockWritten=new HashSet<String>();
      subBlock.findNeededVars(subblockNeeded,subblockWritten,dependentSets);
      subblockNeededVars.add(subblockNeeded);
      if (logger.isTraceEnabled()) {
        logger.trace("String_Node_Str" + subBlock.getType() + "String_Node_Str"+ subblockNeeded+ "String_Node_Str"+ subblockWritten);
      }
      Set<String> subblockAll=new HashSet<String>();
      subblockAll.addAll(subblockNeeded);
      subblockAll.addAll(subblockWritten);
      for (      String var : subblockAll) {
        if (candidates.containsKey(var)) {
          if (candidates.get(var) == null) {
            candidates.put(var,subBlock);
          }
 else {
            candidates.remove(var);
          }
        }
      }
      contAllUsed.addAll(subblockAll);
    }
    cont.removeUnused(contAllUsed);
  }
  pushdownDeclarations(block,candidates);
  Set<String> allNeeded=new HashSet<String>();
  allNeeded.addAll(thisBlockNeeded);
  for (  Set<String> needed : subblockNeededVars) {
    allNeeded.addAll(needed);
  }
  Set<String> unneeded=unneededVars(block,allNeeded,dependentSets);
  for (  String v : unneeded) {
    logger.debug("String_Node_Str" + v + "String_Node_Str");
    converged=false;
  }
  block.removeVars(unneeded);
  return converged;
}

Fixed version (ground truth):
private static boolean eliminateIter(Logger logger,Block block){
  boolean converged=true;
  ListIterator<Continuation> it=block.continuationIterator();
  while (it.hasNext()) {
    Continuation c=it.next();
    if (c.isNoop()) {
      it.remove();
      converged=false;
    }
  }
  List<List<Var>> dependentSets=new ArrayList<List<Var>>();
  Set<String> thisBlockNeeded=new HashSet<String>();
  Set<String> thisBlockWritten=new HashSet<String>();
  block.findThisBlockNeededVars(thisBlockNeeded,thisBlockWritten,dependentSets);
  if (logger.isTraceEnabled()) {
    logger.trace("String_Node_Str" + thisBlockNeeded + "String_Node_Str"+ thisBlockWritten);
  }
  Map<String,Pair<Continuation,Block>> candidates=new HashMap<String,Pair<Continuation,Block>>();
  for (  Var v : block.getVariables()) {
    if (!thisBlockNeeded.contains(v.name()) && !thisBlockWritten.contains(v.name()))     candidates.put(v.name(),null);
  }
  List<Set<String>> subblockNeededVars=new ArrayList<Set<String>>();
  for (  Continuation cont : block.getContinuations()) {
    Set<String> contAllUsed=new HashSet<String>();
    for (    Block subBlock : cont.getBlocks()) {
      Set<String> subblockNeeded=new HashSet<String>();
      Set<String> subblockWritten=new HashSet<String>();
      subBlock.findNeededVars(subblockNeeded,subblockWritten,dependentSets);
      subblockNeededVars.add(subblockNeeded);
      if (logger.isTraceEnabled()) {
        logger.trace("String_Node_Str" + subBlock.getType() + "String_Node_Str"+ subblockNeeded+ "String_Node_Str"+ subblockWritten);
      }
      Set<String> subblockAll=new HashSet<String>();
      subblockAll.addAll(subblockNeeded);
      subblockAll.addAll(subblockWritten);
      for (      String var : subblockAll) {
        if (candidates.containsKey(var)) {
          if (candidates.get(var) == null) {
            candidates.put(var,Pair.create(cont,subBlock));
          }
 else {
            candidates.remove(var);
          }
        }
      }
      contAllUsed.addAll(subblockAll);
    }
    cont.removeUnused(contAllUsed);
  }
  pushdownDeclarations(block,candidates);
  Set<String> allNeeded=new HashSet<String>();
  allNeeded.addAll(thisBlockNeeded);
  for (  Set<String> needed : subblockNeededVars) {
    allNeeded.addAll(needed);
  }
  Set<String> unneeded=unneededVars(block,allNeeded,dependentSets);
  for (  String v : unneeded) {
    logger.debug("String_Node_Str" + v + "String_Node_Str");
    converged=false;
  }
  block.removeVars(unneeded);
  return converged;
}