Example #1
0
  /** Retrieves the active pointer analysis */
  public PointsToAnalysis getPointsToAnalysis() {
    if (!hasPointsToAnalysis()) {
      return DumbPointerAnalysis.v();
    }

    return activePointsToAnalysis;
  }
Example #2
0
 public CallGraph buildCallGraph(Collection<JavaCriticalSection> validSyncs)
     throws NoMatchingSootMethodException {
   CallGraphBuilder cgb = new CallGraphBuilder(DumbPointerAnalysis.v());
   cgb.build();
   CallGraph cg = Scene.v().getCallGraph();
   for (JavaCriticalSection cs : results) {
     String clsname = cs.getClassName();
     String regex = "\\$\\d";
     Pattern pattern = Pattern.compile(regex);
     Matcher matcher = pattern.matcher(clsname);
     if (matcher.find()) {
       continue;
     }
     validSyncs.add(cs);
     cs.bindToSoot();
     syncsEnclosingMethods.add(cs.getSootMethod());
   }
   Scene.v().setCallGraph(cg);
   return cg;
 }