<div dir="ltr">I don&#39;t know how to solve this issue.But I advise you to use soot nightly build edition.Soot-2.5.0 is too old.<div><a href="https://ssebuild.cased.de/nightly/soot/lib/">https://ssebuild.cased.de/nightly/soot/lib/</a><br><br>在 2016年8月13日星期六 UTC+8上午3:46:13,Yue Duan写道:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:24px"><div dir="ltr"><font size="3">Hi there,</font></div><div dir="ltr"><font size="3"><br></font></div><div dir="ltr"><font size="3">Sorry to bother. I encountered an exception during analysis using soot-2.5.0. I was trying to generate control-flow graph and had this exception.</font></div><div dir="ltr"><font size="3"><br></font></div><div dir="ltr"><font size="3">Exception in thread &quot;main&quot; java.lang.<wbr>StringIndexOutOfBoundsExceptio<wbr>n: String index out of range: -1</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at java.lang.String.substring(<wbr>String.java:1967)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.coffi.CONSTANT_Methodref_<wbr>info.<wbr>createJimpleConstantValue(<wbr>CONSTANT_Methodref_info.java:<wbr>102)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.coffi.CONSTANT_<wbr>MethodHandle_info.<wbr>createJimpleConstantValue(<wbr>CONSTANT_MethodHandle_info.<wbr>java:72)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.coffi.CFG.generateJimple(<wbr>CFG.java:4342)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.coffi.CFG.jimplify(CFG.<wbr>java:1267)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.coffi.CFG.jimplify(CFG.<wbr>java:955)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.coffi.CoffiMethodSource.<wbr>getBody(CoffiMethodSource.<wbr>java:100)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.SootMethod.<wbr>getBodyFromMethodSource(<wbr>SootMethod.java:89)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.SootMethod.<wbr>retrieveActiveBody(SootMethod.<wbr>java:322)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.jimple.toolkits.<wbr>callgraph.<wbr>OnFlyCallGraphBuilder.<wbr>processNewMethod(<wbr>OnFlyCallGraphBuilder.java:<wbr>531)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.jimple.toolkits.<wbr>callgraph.<wbr>OnFlyCallGraphBuilder.<wbr>processReachables(<wbr>OnFlyCallGraphBuilder.java:<wbr>426)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.jimple.toolkits.<wbr>callgraph.CallGraphBuilder.<wbr>build(CallGraphBuilder.java:<wbr>84)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.jimple.toolkits.<wbr>callgraph.CHATransformer.<wbr>internalTransform(<wbr>CHATransformer.java:43)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.SceneTransformer.<wbr>transform(SceneTransformer.<wbr>java:39)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.Transform.apply(<wbr>Transform.java:89)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.RadioScenePack.<wbr>internalApply(RadioScenePack.<wbr>java:57)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.jimple.toolkits.<wbr>callgraph.CallGraphPack.<wbr>internalApply(CallGraphPack.<wbr>java:49)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.Pack.apply(Pack.java:114)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.PackManager.<wbr>runWholeProgramPacks(<wbr>PackManager.java:417)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.PackManager.runPacks(<wbr>PackManager.java:336)</font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.Main.run(Main.java:198)</font></div><div dir="ltr"><font size="3"></font></div><div dir="ltr"><font size="3"><span style="white-space:pre-wrap">        </span>at soot.Main.main(Main.java:141)</font></div><div dir="ltr"><font size="3"><br></font></div><div dir="ltr"><font size="3">Seems like the nameAndType string doesn&#39;t contain &quot;:&quot; when executing </font></div><div dir="ltr"><font size="3"><br></font></div><div dir="ltr"><font size="3"><b>String name = nameAndType.substring(0, nameAndType.indexOf(&quot;:&quot;));</b><br></font></div><div dir="ltr"><font size="3"><br></font></div><div dir="ltr"><font size="3"><br></font></div><div dir="ltr"><font size="3">So I printed the string out as follows:</font></div><div dir="ltr"><font size="3"><b>nameAndType: lambda$getHeadlessProperty$0</b></font><br></div><div dir="ltr"><font size="3"><br></font></div><div dir="ltr"><font size="3"><br></font></div><div dir="ltr"><font size="3">Could you please help me fix this issue?</font></div><div dir="ltr"><font size="3"><br></font></div><div dir="ltr"><font size="3">Thanks,</font></div><div dir="ltr"><font size="3">Yue</font></div></div></div></blockquote></div></div>