Program: 85321
Project: 85321
Buggy source:
/** 
 * 1. Update the call graph; 2. Eliminate the pointers, objects, and constraints related to the unreachable code.
 */
private void finalizeInternalData(){
  markReachableMethods();
  for (Iterator<IVarAbstraction> it=allocations.iterator(); it.hasNext(); ) {
    IVarAbstraction po=it.next();
    AllocNode obj=(AllocNode)po.getWrappedNode();
    SootMethod sm=obj.getMethod();
    if (sm != null && func2int.containsKey(sm) == false)     it.remove();
  }
  final Vector<AllocNode> removeSet=new Vector<AllocNode>();
  for (Iterator<IVarAbstraction> it=pointers.iterator(); it.hasNext(); ) {
    IVarAbstraction pn=it.next();
    Node vn=pn.getWrappedNode();
    SootMethod sm=null;
    if (vn instanceof LocalVarNode) {
      sm=((LocalVarNode)vn).getMethod();
    }
 else     if (vn instanceof AllocDotField) {
      sm=((AllocDotField)vn).getBase().getMethod();
    }
    if (sm != null) {
      if (func2int.containsKey(sm) == false) {
        pn.deleteAll();
        vn.discardP2Set();
        it.remove();
        continue;
      }
    }
    if (pn.getRepresentative() != pn)     continue;
    removeSet.clear();
    if (pn.hasPTResult()) {
      Set<AllocNode> objSet=pn.get_all_points_to_objects();
      for (Iterator<AllocNode> oit=objSet.iterator(); oit.hasNext(); ) {
        AllocNode obj=oit.next();
        IVarAbstraction po=consG.get(obj);
        if (!po.reachable() || pn.isDeadObject(obj)) {
          removeSet.add(obj);
        }
      }
      for (      AllocNode obj : removeSet)       pn.remove_points_to(obj);
      pn.drop_duplicates();
    }
 else {
      PointsToSetInternal pts=vn.getP2Set();
      pts.forall(new P2SetVisitor(){
        @Override public void visit(        Node n){
          IVarAbstraction pan=findInternalNode(n);
          if (pan.reachable())           removeSet.add((AllocNode)n);
        }
      }
);
      pts=vn.makeP2Set();
      for (      AllocNode an : removeSet)       pts.add(an);
    }
  }
  for (Iterator<PlainConstraint> cIt=constraints.iterator(); cIt.hasNext(); ) {
    PlainConstraint cons=cIt.next();
    IVarAbstraction lhs=cons.getLHS();
    IVarAbstraction rhs=cons.getRHS();
    if (!lhs.reachable() || !rhs.reachable() || getMappedMethodID(lhs) == Constants.UNKNOWN_FUNCTION || getMappedMethodID(rhs) == Constants.UNKNOWN_FUNCTION) {
      cIt.remove();
    }
  }
  pointers.reassign();
  allocations.reassign();
  constraints.reassign();
}

Fixed version (ground truth):
/** 
 * 1. Update the call graph; 2. Eliminate the pointers, objects, and constraints related to the unreachable code.
 */
private void finalizeInternalData(){
  markReachableMethods();
  for (Iterator<IVarAbstraction> it=allocations.iterator(); it.hasNext(); ) {
    IVarAbstraction po=it.next();
    AllocNode obj=(AllocNode)po.getWrappedNode();
    SootMethod sm=obj.getMethod();
    if (sm != null && func2int.containsKey(sm) == false)     it.remove();
  }
  final Vector<AllocNode> removeSet=new Vector<AllocNode>();
  for (Iterator<IVarAbstraction> it=pointers.iterator(); it.hasNext(); ) {
    IVarAbstraction pn=it.next();
    Node vn=pn.getWrappedNode();
    SootMethod sm=null;
    if (vn instanceof LocalVarNode) {
      sm=((LocalVarNode)vn).getMethod();
    }
 else     if (vn instanceof AllocDotField) {
      sm=((AllocDotField)vn).getBase().getMethod();
    }
    if (sm != null) {
      if (func2int.containsKey(sm) == false) {
        pn.deleteAll();
        vn.discardP2Set();
        it.remove();
        continue;
      }
    }
    if (pn.getRepresentative() != pn)     continue;
    removeSet.clear();
    if (pn.hasPTResult()) {
      Set<AllocNode> objSet=pn.get_all_points_to_objects();
      for (Iterator<AllocNode> oit=objSet.iterator(); oit.hasNext(); ) {
        AllocNode obj=oit.next();
        IVarAbstraction po=consG.get(obj);
        if (!po.reachable() || pn.isDeadObject(obj)) {
          removeSet.add(obj);
        }
      }
      for (      AllocNode obj : removeSet)       pn.remove_points_to(obj);
      pn.drop_duplicates();
    }
 else {
      PointsToSetInternal pts=vn.getP2Set();
      pts.forall(new P2SetVisitor(){
        @Override public void visit(        Node n){
          IVarAbstraction pan=findInternalNode(n);
          if (pan.reachable())           removeSet.add((AllocNode)n);
        }
      }
);
      pts=vn.makeP2Set();
      for (      AllocNode an : removeSet)       pts.add(an);
    }
  }
  for (Iterator<PlainConstraint> cIt=constraints.iterator(); cIt.hasNext(); ) {
    PlainConstraint cons=cIt.next();
    IVarAbstraction lhs=cons.getLHS();
    IVarAbstraction rhs=cons.getRHS();
    if (!lhs.reachable() || !rhs.reachable() || getMethodIDFromPtr(lhs) == Constants.UNKNOWN_FUNCTION || getMethodIDFromPtr(rhs) == Constants.UNKNOWN_FUNCTION) {
      cIt.remove();
    }
  }
  pointers.reassign();
  allocations.reassign();
  constraints.reassign();
}