<div dir="ltr">Hi all,<div><br></div><div>I have previously tried examples where one Java line is split into multiple Jimple lines. However, this is the first time I have seen this error.</div><div><br></div><div>I have sent Steven a working example to replicate the error.</div><div><br></div><div>Thank you all for your help.</div><div>Nishant</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 10, 2015 at 3:55 PM, Bodden, Eric <span dir="ltr"><<a href="mailto:eric.bodden@sit.fraunhofer.de" target="_blank">eric.bodden@sit.fraunhofer.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all.<br>
<span class=""><br>
> These lines are occasions on which a single Java line was split into multiple Jimple lines. If condition in your Java code accesses a field which is not directly possible in Jimple. Therefore, Soot creates two lines from it: We first read the field value and then compare it. Apparently, only the first line gets the corresponding line number tag, whereas the second one does not. This in turn is quite strange as we have code that propagates on line numbers (see lines 425ff in class soot.dexpler.DexBody. My guess therefore is that some transformer kills the line number tag for some reason.<br>
<br>
</span>This is generally a known problem in Soot. There are many transformers that might optimize and clean up the Jimple before it gets exposed to the client. Not all of them preserve line numbers faithfully. Usually, the best thing to do is to traverse Stmts backwards, searching for appropriate line numbers there. We could update getJavaSourceStartLineNumber() to do that automatically but that would cause it to have unpredictable runtimes, which I kind of dislike.<br>
<br>
The best way to deal with this, of course, would be to fix the built-in transformers. If you can help us in figuring out which ones are the culprits then we can probably look into this. The -dump-body option should help with this if -print-tags is enabled as well.<br>
<br>
Cheers,<br>
Eric<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><font style="background-color:rgb(255,255,255)" face="verdana, sans-serif" size="4">Nishant Shyamal Budhdev</font><div><span style="color:rgb(153,153,153)"><br></span></div><div><font color="#999999" face="trebuchet ms, sans-serif">Research Assistant</font></div><div><font color="#999999" face="trebuchet ms, sans-serif">Embedded Systems and Networking Lab</font></div><div><font color="#999999" face="trebuchet ms, sans-serif">School Of Computing</font></div><div><font color="#999999" face="trebuchet ms, sans-serif">National University of Singapore</font></div><div><font color="#999999" face="trebuchet ms, sans-serif"><br></font></div><div><font color="#999999" face="'trebuchet ms', sans-serif">Contact : +65 9050 6084<br></font><font color="#999999"><span></span></font></div></div></div>
</div>