<div dir="ltr">Hello everyone<div><br></div><div>I&#39;ve been using soot eclipse plugin for running a simple method. And now I&#39;m trying to run the method without plugin but the result of method is different for the same class:</div><div><br></div><div>the method is:</div><div><br></div><div><div>public static void Analysis(CompleteUnitGraph graph) {</div></div><div><div>     Iterator unitIt = graph.iterator();</div><div><span style="white-space:pre">     </span>for (Unit unit : graph) {</div><div><span style="white-space:pre">      </span>G.v().out.println(unit.toString());</div><div>      if (unit.t.getTag(&quot;SourceLnPosTag&quot;) != null)</div><div>           G.v().out.println( ((SourceLnPosTag) unit.getTag(&quot;SourceLnPosTag&quot;)).startLn();</div><div>      }</div></div><div>}</div><div><br></div><div>and the simple class which I want to show the units is:</div><div><br></div><div>public class foo{</div><div>     public static void main(String[] args){</div><div>          int a = 1;</div><div>          System.out.println(a); <br></div><div>     }</div><div>}</div><div><br></div><div>and  main method which invokes Analysis on foo is :</div><div><br></div><div><div>String sep = File.separator;</div><div>String pathSep = File.pathSeparator;<span style="white-space:pre">        </span></div><div>String path =System.getProperty(&quot;java.home&quot;) + sep + &quot;lib&quot; + sep+ &quot;rt.jar&quot; + pathSep +  System.getProperty(&quot;java.home&quot;) + sep+&quot;lib&quot; + sep + &quot;jce.jar&quot; + path + fooPath;</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().loadClassAndSupport(&quot;foo&quot;);</div><div>sClass.setApplicationClass();</div><div>Scene.v().loadNecessaryClasses();<span class="" style="white-space:pre">        </span></div><div>Body body = sClass.getMethodByName(&quot;main&quot;).retrieveActiveBody();</div><div><span style="white-space:pre">Analysis(</span>new CompleteUnitGraph(body));</div><div><span class="" style="white-space:pre">                </span></div></div><div><span class="" style="white-space:pre"><br></span></div><div><span style="white-space:pre">The first problem is that for all of the units &quot;SourceLnPosTag&quot; is null.</span></div><div><span style="white-space:pre">and the second problem is that the units have different variable names.</span></div><div><span style="white-space:pre">Is there any way to get the same units without using plugin?</span></div><div><span style="white-space:pre"><br></span></div><div><span style="white-space:pre">Thanks </span></div></div>