Program: 109887
Project: 109887
Buggy source:
/** 
 * {@inheritDoc}
 */
@SuppressWarnings("String_Node_Str") @Override protected void internalTransform(String arg0,@SuppressWarnings("String_Node_Str") Map arg1){
  pointsToAnalysis=new PointsToAnalysis();
  pointsToAnalysis.doAnalysis();
  final ContextTransitionTable<SootMethod,Unit,PointsToGraph> ctt=pointsToAnalysis.getContextTransitionTable();
  final Set<SootMethod> allMethods=pointsToAnalysis.getMethods();
  final Map<Context<SootMethod,Unit,PointsToGraph>,Collection<ContextSensitiveEdge>> csEdgesIntoContext=new HashMap<Context<SootMethod,Unit,PointsToGraph>,Collection<ContextSensitiveEdge>>();
  final Map<Context<SootMethod,Unit,PointsToGraph>,Collection<ContextSensitiveEdge>> csEdgesOutOfContext=new HashMap<Context<SootMethod,Unit,PointsToGraph>,Collection<ContextSensitiveEdge>>();
  final Map<CallSite<SootMethod,Unit,PointsToGraph>,Collection<ContextSensitiveEdge>> csEdgesOutOfCallSite=new HashMap<CallSite<SootMethod,Unit,PointsToGraph>,Collection<ContextSensitiveEdge>>();
  final Collection<ContextSensitiveEdge> csEdges=new ArrayList<ContextSensitiveEdge>();
  CallGraph callGraph=new CallGraph();
  for (  Map.Entry<CallSite<SootMethod,Unit,PointsToGraph>,Map<SootMethod,Context<SootMethod,Unit,PointsToGraph>>> e : ctt.getTransitions().entrySet()) {
    CallSite<SootMethod,Unit,PointsToGraph> cs=e.getKey();
    final Context<SootMethod,Unit,PointsToGraph> sourceContext=cs.getCallingContext();
    final SootMethod sourceMethod=sourceContext.getMethod();
    final Unit stmt=cs.getCallNode();
    final Map<SootMethod,Context<SootMethod,Unit,PointsToGraph>> targets=e.getValue();
    for (    final SootMethod targetMethod : targets.keySet()) {
      final Context<SootMethod,Unit,PointsToGraph> targetContext=targets.get(targetMethod);
      Edge cgEdge=new Edge(sourceMethod,(Stmt)stmt,targetMethod);
      callGraph.addEdge(cgEdge);
      ContextSensitiveEdge csEdge=new ContextSensitiveEdge(){
        @Override public Kind kind(){
          if (stmt instanceof InvokeExpr) {
            return Edge.ieToKind((InvokeExpr)stmt);
          }
 else {
            return Kind.INVALID;
          }
        }
        @Override public SootMethod src(){
          return sourceMethod;
        }
        @Override public soot.Context srcCtxt(){
          return sourceContext;
        }
        @Override public Stmt srcStmt(){
          return (Stmt)stmt;
        }
        @Override public Unit srcUnit(){
          return stmt;
        }
        @Override public SootMethod tgt(){
          return targetMethod;
        }
        @Override public soot.Context tgtCtxt(){
          return targetContext;
        }
      }
;
      csEdges.add(csEdge);
      if (!csEdgesOutOfContext.containsKey(sourceContext))       csEdgesOutOfContext.put(sourceContext,new ArrayList<ContextSensitiveEdge>());
      csEdgesOutOfContext.get(sourceContext).add(csEdge);
      if (!csEdgesOutOfCallSite.containsKey(cs))       csEdgesOutOfCallSite.put(cs,new ArrayList<ContextSensitiveEdge>());
      csEdgesOutOfCallSite.get(cs).add(csEdge);
      if (!csEdgesIntoContext.containsKey(targetContext))       csEdgesIntoContext.put(targetContext,new ArrayList<ContextSensitiveEdge>());
      csEdgesIntoContext.get(targetContext).add(csEdge);
    }
  }
  Scene.v().setCallGraph(callGraph);
  Scene.v().setContextSensitiveCallGraph(new ContextSensitiveCallGraph(){
    @SuppressWarnings("String_Node_Str") private Context<SootMethod,Unit,PointsToGraph> vContext(    soot.Context sContext){
      return (Context<SootMethod,Unit,PointsToGraph>)sContext;
    }
    private CallSite<SootMethod,Unit,PointsToGraph> vCallSite(    soot.Context sContext,    Unit unit){
      return new CallSite<SootMethod,Unit,PointsToGraph>(vContext(sContext),unit);
    }
    @Override public Iterator<?> edgesOutOf(    soot.Context sContext,    SootMethod m,    Unit stmt){
      return csEdgesOutOfCallSite.get((vCallSite(sContext,stmt))).iterator();
    }
    @Override public Iterator<?> edgesOutOf(    soot.Context sContext,    SootMethod m){
      return csEdgesOutOfContext.get(vContext(sContext)).iterator();
    }
    @Override public Iterator<?> edgesInto(    soot.Context sContext,    SootMethod m){
      return csEdgesIntoContext.get(vContext(sContext)).iterator();
    }
    @Override public Iterator<?> edgeSources(){
      return allMethods.iterator();
    }
    @Override public Iterator<?> allEdges(){
      return csEdges.iterator();
    }
  }
);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@SuppressWarnings("String_Node_Str") @Override protected void internalTransform(String arg0,@SuppressWarnings("String_Node_Str") Map arg1){
  pointsToAnalysis=new PointsToAnalysis();
  pointsToAnalysis.doAnalysis();
  final ContextTransitionTable<SootMethod,Unit,PointsToGraph> ctt=pointsToAnalysis.getContextTransitionTable();
  final Set<SootMethod> allMethods=pointsToAnalysis.getMethods();
  final Map<Context<SootMethod,Unit,PointsToGraph>,Collection<ContextSensitiveEdge>> csEdgesIntoContext=new HashMap<Context<SootMethod,Unit,PointsToGraph>,Collection<ContextSensitiveEdge>>();
  final Map<Context<SootMethod,Unit,PointsToGraph>,Collection<ContextSensitiveEdge>> csEdgesOutOfContext=new HashMap<Context<SootMethod,Unit,PointsToGraph>,Collection<ContextSensitiveEdge>>();
  final Map<CallSite<SootMethod,Unit,PointsToGraph>,Collection<ContextSensitiveEdge>> csEdgesOutOfCallSite=new HashMap<CallSite<SootMethod,Unit,PointsToGraph>,Collection<ContextSensitiveEdge>>();
  final Collection<ContextSensitiveEdge> csEdges=new ArrayList<ContextSensitiveEdge>();
  CallGraph callGraph=new CallGraph();
  for (  Map.Entry<CallSite<SootMethod,Unit,PointsToGraph>,Map<SootMethod,Context<SootMethod,Unit,PointsToGraph>>> e : ctt.getTransitions().entrySet()) {
    CallSite<SootMethod,Unit,PointsToGraph> cs=e.getKey();
    final Context<SootMethod,Unit,PointsToGraph> sourceContext=cs.getCallingContext();
    final SootMethod sourceMethod=sourceContext.getMethod();
    final Unit stmt=cs.getCallNode();
    final Map<SootMethod,Context<SootMethod,Unit,PointsToGraph>> targets=e.getValue();
    for (    final SootMethod targetMethod : targets.keySet()) {
      final Context<SootMethod,Unit,PointsToGraph> targetContext=targets.get(targetMethod);
      Kind K;
      if (stmt instanceof InvokeExpr) {
        K=Edge.ieToKind((InvokeExpr)stmt);
      }
 else {
        K=Kind.INVALID;
      }
      Edge cgEdge=new Edge(sourceMethod,(Stmt)stmt,targetMethod,K);
      callGraph.addEdge(cgEdge);
      ContextSensitiveEdge csEdge=new ContextSensitiveEdge(){
        @Override public Kind kind(){
          if (stmt instanceof InvokeExpr) {
            return Edge.ieToKind((InvokeExpr)stmt);
          }
 else {
            return Kind.INVALID;
          }
        }
        @Override public SootMethod src(){
          return sourceMethod;
        }
        @Override public soot.Context srcCtxt(){
          return sourceContext;
        }
        @Override public Stmt srcStmt(){
          return (Stmt)stmt;
        }
        @Override public Unit srcUnit(){
          return stmt;
        }
        @Override public SootMethod tgt(){
          return targetMethod;
        }
        @Override public soot.Context tgtCtxt(){
          return targetContext;
        }
      }
;
      csEdges.add(csEdge);
      if (!csEdgesOutOfContext.containsKey(sourceContext))       csEdgesOutOfContext.put(sourceContext,new ArrayList<ContextSensitiveEdge>());
      csEdgesOutOfContext.get(sourceContext).add(csEdge);
      if (!csEdgesOutOfCallSite.containsKey(cs))       csEdgesOutOfCallSite.put(cs,new ArrayList<ContextSensitiveEdge>());
      csEdgesOutOfCallSite.get(cs).add(csEdge);
      if (!csEdgesIntoContext.containsKey(targetContext))       csEdgesIntoContext.put(targetContext,new ArrayList<ContextSensitiveEdge>());
      csEdgesIntoContext.get(targetContext).add(csEdge);
    }
  }
  Scene.v().setCallGraph(callGraph);
  Scene.v().setContextSensitiveCallGraph(new ContextSensitiveCallGraph(){
    @SuppressWarnings("String_Node_Str") private Context<SootMethod,Unit,PointsToGraph> vContext(    soot.Context sContext){
      return (Context<SootMethod,Unit,PointsToGraph>)sContext;
    }
    private CallSite<SootMethod,Unit,PointsToGraph> vCallSite(    soot.Context sContext,    Unit unit){
      return new CallSite<SootMethod,Unit,PointsToGraph>(vContext(sContext),unit);
    }
    @Override public Iterator<?> edgesOutOf(    soot.Context sContext,    SootMethod m,    Unit stmt){
      return csEdgesOutOfCallSite.get((vCallSite(sContext,stmt))).iterator();
    }
    @Override public Iterator<?> edgesOutOf(    soot.Context sContext,    SootMethod m){
      return csEdgesOutOfContext.get(vContext(sContext)).iterator();
    }
    @Override public Iterator<?> edgesInto(    soot.Context sContext,    SootMethod m){
      return csEdgesIntoContext.get(vContext(sContext)).iterator();
    }
    @Override public Iterator<?> edgeSources(){
      return allMethods.iterator();
    }
    @Override public Iterator<?> allEdges(){
      return csEdges.iterator();
    }
  }
);
}