Program: 75744
Project: 75744
Buggy source:
/** 
 * Construct a new analysis
 */
public CircuitAnalysis(Entity entity,SootClass theClass){
  HashMutableDirectedGraph graph=new HashMutableDirectedGraph(){
    public String toString(){
      String string="String_Node_Str" + getNodes();
      for (Iterator nodes=getNodes().iterator(); nodes.hasNext(); ) {
        Object source=nodes.next();
        string+="String_Node_Str" + source + "String_Node_Str";
        for (Iterator succs=getSuccsOf(source).iterator(); succs.hasNext(); ) {
          string+=succs.next() + "String_Node_Str";
        }
      }
      return string;
    }
  }
;
  _graph=graph;
  System.out.println("String_Node_Str" + entity.getClass().getName());
  if (entity.getClass().getName().equals("String_Node_Str")) {
    Port input=entity.getPort("String_Node_Str");
    Port output=entity.getPort("String_Node_Str");
    String delay="String_Node_Str" + count++;
    graph.addNode(input);
    graph.addNode(output);
    graph.addNode(delay);
    graph.addEdge(input,delay);
    graph.addEdge(delay,output);
    return;
  }
  Set requiredNodeSet=new HashSet();
  if (theClass.declaresMethodByName("String_Node_Str")) {
    _analyze(graph,requiredNodeSet,theClass.getMethodByName("String_Node_Str"));
  }
  if (theClass.declaresMethodByName("String_Node_Str")) {
    _analyze(graph,requiredNodeSet,theClass.getMethodByName("String_Node_Str"));
  }
  if (theClass.declaresMethodByName("String_Node_Str")) {
    _analyze(graph,requiredNodeSet,theClass.getMethodByName("String_Node_Str"));
  }
  boolean changed=true;
  while (changed) {
    changed=false;
    for (Iterator nodes=graph.getNodes().iterator(); nodes.hasNext(); ) {
      Object node=nodes.next();
      if (requiredNodeSet.contains(node)) {
        continue;
      }
      HashSet set=new HashSet(graph.getSuccsOf(node));
      set.retainAll(requiredNodeSet);
      if (set.isEmpty()) {
        continue;
      }
      requiredNodeSet.add(node);
      changed=true;
    }
  }
  System.out.println("String_Node_Str" + graph);
  Set removeSet=new HashSet();
  for (Iterator nodes=graph.getNodes().iterator(); nodes.hasNext(); ) {
    Object node=nodes.next();
    if (node instanceof Local || node instanceof SootField || !requiredNodeSet.contains(node)) {
      for (Iterator preds=graph.getPredsOf(node).iterator(); preds.hasNext(); ) {
        Object pred=preds.next();
        for (Iterator succs=graph.getSuccsOf(node).iterator(); succs.hasNext(); ) {
          Object succ=succs.next();
          graph.addEdge(pred,succ);
        }
      }
      removeSet.add(node);
    }
  }
  for (Iterator nodes=removeSet.iterator(); nodes.hasNext(); ) {
    Object node=nodes.next();
    List predList=new LinkedList(graph.getPredsOf(node));
    for (Iterator preds=predList.iterator(); preds.hasNext(); ) {
      Object pred=preds.next();
      graph.removeEdge(pred,node);
    }
    List succList=new LinkedList(graph.getSuccsOf(node));
    for (Iterator succs=succList.iterator(); succs.hasNext(); ) {
      Object succ=succs.next();
      graph.removeEdge(node,succ);
    }
    graph.removeNode(node);
  }
  System.out.println("String_Node_Str" + graph);
}

Fixed version (ground truth):
/** 
 * Construct a new analysis
 */
public CircuitAnalysis(Entity entity,SootClass theClass){
  HashMutableDirectedGraph graph=new HashMutableDirectedGraph(){
    public String toString(){
      String string="String_Node_Str" + getNodes();
      for (Iterator nodes=getNodes().iterator(); nodes.hasNext(); ) {
        Object source=nodes.next();
        string+="String_Node_Str" + source + "String_Node_Str";
        for (Iterator succs=getSuccsOf(source).iterator(); succs.hasNext(); ) {
          string+=succs.next() + "String_Node_Str";
        }
      }
      return string;
    }
  }
;
  _graph=graph;
  System.out.println("String_Node_Str" + entity.getClass().getName());
  if (entity.getClass().getName().equals("String_Node_Str")) {
    Port input=entity.getPort("String_Node_Str");
    Port output=entity.getPort("String_Node_Str");
    String delay="String_Node_Str" + count++;
    graph.addNode(input);
    graph.addNode(output);
    graph.addNode(delay);
    graph.addEdge(input,delay);
    graph.addEdge(delay,output);
    return;
  }
 else   if (entity.getClass().getName().equals("String_Node_Str")) {
    Port input=entity.getPort("String_Node_Str");
    Port output=entity.getPort("String_Node_Str");
    String delay="String_Node_Str" + count++;
    graph.addNode(input);
    graph.addNode(output);
    graph.addNode(delay);
    graph.addEdge(input,delay);
    graph.addEdge(delay,output);
    return;
  }
  Set requiredNodeSet=new HashSet();
  if (theClass.declaresMethodByName("String_Node_Str")) {
    _analyze(graph,requiredNodeSet,theClass.getMethodByName("String_Node_Str"));
  }
  if (theClass.declaresMethodByName("String_Node_Str")) {
    _analyze(graph,requiredNodeSet,theClass.getMethodByName("String_Node_Str"));
  }
  if (theClass.declaresMethodByName("String_Node_Str")) {
    _analyze(graph,requiredNodeSet,theClass.getMethodByName("String_Node_Str"));
  }
  boolean changed=true;
  while (changed) {
    changed=false;
    for (Iterator nodes=graph.getNodes().iterator(); nodes.hasNext(); ) {
      Object node=nodes.next();
      if (requiredNodeSet.contains(node)) {
        continue;
      }
      HashSet set=new HashSet(graph.getSuccsOf(node));
      set.retainAll(requiredNodeSet);
      if (set.isEmpty()) {
        continue;
      }
      requiredNodeSet.add(node);
      changed=true;
    }
  }
  System.out.println("String_Node_Str" + graph);
  Set removeSet=new HashSet();
  for (Iterator nodes=graph.getNodes().iterator(); nodes.hasNext(); ) {
    Object node=nodes.next();
    if (node instanceof Local || node instanceof SootField || !requiredNodeSet.contains(node)) {
      for (Iterator preds=graph.getPredsOf(node).iterator(); preds.hasNext(); ) {
        Object pred=preds.next();
        for (Iterator succs=graph.getSuccsOf(node).iterator(); succs.hasNext(); ) {
          Object succ=succs.next();
          graph.addEdge(pred,succ);
        }
      }
      removeSet.add(node);
    }
  }
  for (Iterator nodes=removeSet.iterator(); nodes.hasNext(); ) {
    Object node=nodes.next();
    List predList=new LinkedList(graph.getPredsOf(node));
    for (Iterator preds=predList.iterator(); preds.hasNext(); ) {
      Object pred=preds.next();
      graph.removeEdge(pred,node);
    }
    List succList=new LinkedList(graph.getSuccsOf(node));
    for (Iterator succs=succList.iterator(); succs.hasNext(); ) {
      Object succ=succs.next();
      graph.removeEdge(node,succ);
    }
    graph.removeNode(node);
  }
  System.out.println("String_Node_Str" + graph);
}