<div dir="ltr">Hi everyone<div><br></div><div>I&#39;m trying to create Unit graph for classes of a java library. I use the following code for building this graph:</div><div><br></div><div><div>String sep = File.separator;</div><div>String pathSep = File.pathSeparator;</div><div>String path =System.getProperty(&quot;java.home&quot;) + sep + &quot;lib&quot; + sep + &quot;rt.jar&quot; pathSep;</div><div>path += System.getProperty(&quot;java.home&quot;) + sep+&quot;lib&quot; + sep + &quot;jce.jar&quot;;</div><div>path  += pathSep + classPath;</div><div><br></div><div>Options.v().set_soot_classpath(path);</div><div>Options.v().set_keep_line_number(true);</div><div>Options.v().setPhaseOption(&quot;jb&quot;, &quot;use-original-names:true&quot;);</div><div>SootClass sClass = Scene.v().forceResolve(className, SootClass.BODIES);</div><div>sClass.setApplicationClass();</div><div>Scene.v().allowsPhantomRefs();<span style="white-space:pre-wrap">        </span></div><div><br></div><div>sClass.getMethodByName(methodName).retrieveActiveBody();</div><div>Body body = sootMethod.retrieveActiveBody();</div><div><span style="white-space:pre-wrap">UnitGraph </span>graph = new EnhancedUnitGraph(body);</div><div><br></div><div><span style="white-space:pre-wrap">                </span></div></div><div><br></div><div>This code works for some classes but gives following exception on on line &quot;SootClass sClass = Scene.v().forceResolve(className, SootClass.BODIES);&quot;</div><div>for some other classes. </div><div><br></div><div><br></div><div><div>Exception in thread &quot;main&quot; soot.CompilationDeathException: there were errors during parsing and/or type checking (JastAdd frontend)</div><div><span style="white-space:pre-wrap">        </span>at soot.JastAddInitialResolver.formAst(JastAddInitialResolver.java:63)</div><div><span style="white-space:pre-wrap">        </span>at soot.JavaClassSource.resolve(JavaClassSource.java:54)</div><div><span style="white-space:pre-wrap">        </span>at soot.SootResolver.bringToHierarchy(SootResolver.java:215)</div><div><span style="white-space:pre-wrap">        </span>at soot.SootResolver.processResolveWorklist(SootResolver.java:155)</div><div><span style="white-space:pre-wrap">        </span>at soot.SootResolver.resolveClass(SootResolver.java:124)</div><div><span style="white-space:pre-wrap">        </span>at soot.Scene.forceResolve(Scene.java:1279)</div><div><span style="white-space:pre-wrap">        </span>at automatic.main(automatic.java:69)</div></div><div><br></div><div><br></div><div>Does anyone knows why this gives exception for some classes?</div><div><br></div><div>Thanks for help</div><div><br></div><div><br></div></div>