版本错误
1.5.4版本的wala在创建调用图时报错
// An highlighted block
CallGraph cg = builder.makeCallGraph(options,null);
替换wala版本到1.5.7 问题解决
构建调用图
// An highlighted block
// build scope
AnalysisScope scope = AnalysisScopeReader.makeJavaBinaryAnalysisScope(jarPath,exclusionsFile);
// Hierarchy
ClassHierarchy cha = ClassHierarchyFactory.makeWithRoot(scope);
// AllApplicationEntrypoints entrypoints = new AllApplicationEntrypoints(scope,cha);
Iterable<Entrypoint> Mainentrypoints = com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope, cha);
// options
AnalysisOptions options =new AnalysisOptions(scope,Mainentrypoints);
AnalysisCache cache = new AnalysisCacheImpl();
CallGraphBuilder builder = Util.makeVanillaZeroOneCFABuilder(Language.JAVA,options,cache,cha,scope);
CallGraph cg = builder.makeCallGraph(options,null);