<div dir="ltr"><div><div><div><div>HI Steven,<br></div>    Two different propagation paths are what I want. But the result only have 1 path;<br></div>    Can you tell me how to get it?<br><br></div>Thanks,<br></div>Rainkin<br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-22 17:00 GMT+08:00 Steven Arzt <span dir="ltr">&lt;<a href="mailto:Steven.Arzt@cased.de" target="_blank">Steven.Arzt@cased.de</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="DE"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">Hi Rainkin,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">I do not understand your question. In this code example, there is only a single context. The method “foo” is always called with a tainted element which originated from sourceOne(10). In terms of contexts, the two source-to-sink connections are equal. Moreover, there is only one call to “System.out.println()” in the code, so I’m not sure how you want to get two different statements out of that.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">The only thing you could do is to obtain two different propagation paths to record that one flow was propagated over the first call to “foo” and the other one over the second call. I’m not sure what the use case for that should be, though.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">Best regards,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">  Steven<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">Von:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:soot-list-bounces@CS.McGill.CA" target="_blank">soot-list-bounces@CS.McGill.CA</a> [mailto:<a href="mailto:soot-list-bounces@CS.McGill.CA" target="_blank">soot-list-bounces@CS.McGill.CA</a>] <b>Im Auftrag von </b>???<br><b>Gesendet:</b> Mittwoch, 22. April 2015 10:50<br><b>An:</b> <a href="mailto:soot-list@CS.McGill.CA" target="_blank">soot-list@CS.McGill.CA</a><br><b>Betreff:</b> [Soot-list] How to get context-sensitive result of flowdroid<u></u><u></u></span></p><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><div><div><div><p class="MsoNormal">Hi guys,<u></u><u></u></p></div><p class="MsoNormal">    this is a example:<u></u><u></u></p><p class="MsoNormal">    public void test(){<br>        String sourceOne = sourceOne(10); // source<br>        foo(sourceOne);<br>        foo(sourceOne);<br>    }<br><br>    public String sourceOne(int number){<br>        return number&gt;0 ? &quot;positive&quot; : &quot;negative&quot;;<br>    }<br>    <br>    public void foo(String s){<br>        System.out.println(s); // sink<br>    }<u></u><u></u></p><p class="MsoNormal">  <u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">  the method sourceOne is a source and System.out.println() is a sink.<u></u><u></u></p></div><p class="MsoNormal">  After analysis, I get the following result:<u></u><u></u></p><p class="MsoNormal">[main] INFO soot.jimple.infoflow.Infoflow - Source lookup done, found 1 sources and 1 sinks.<br>[main] INFO soot.jimple.infoflow.Infoflow - IFDS problem with 14 forward and 0 backward edges solved, processing 1 results...<br>[main] INFO soot.jimple.infoflow.data.pathBuilders.ContextSensitivePathBuilder - Context-sensitive path reconstructor started<br>[main] INFO soot.jimple.infoflow.data.pathBuilders.ContextSensitivePathBuilder - Obtainted 1 connections between sources and sinks<br>[main] INFO soot.jimple.infoflow.data.pathBuilders.ContextSensitivePathBuilder - Building path 1<br>[main] INFO soot.jimple.infoflow.data.pathBuilders.ContextSensitivePathBuilder - Path processing took 0.008987293 seconds in total<br>[main] INFO soot.jimple.infoflow.Infoflow - The sink virtualinvoke $r2.&lt;java.io.PrintStream: void println(java.lang.String)&gt;(r1) in method &lt;TestCode: void foo(java.lang.String)&gt; was called with values from the following sources:<br>[main] INFO soot.jimple.infoflow.Infoflow - - r1 = virtualinvoke r0.&lt;TestCode: java.lang.String sourceOne(int)&gt;(10) in method &lt;TestCode: void test()&gt;<br>[main] INFO soot.jimple.infoflow.Infoflow -     on Path: <br>[main] INFO soot.jimple.infoflow.Infoflow -      -&gt; &lt;TestCode: void foo(java.lang.String)&gt;<br>[main] INFO soot.jimple.infoflow.Infoflow -          -&gt; virtualinvoke $r2.&lt;java.io.PrintStream: void println(java.lang.String)&gt;(r1)<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt"> I want to know how to get a context-sensitive result, in which  sourceOne() will point to 2 different system.out.println()<u></u><u></u></p></div><div><p class="MsoNormal">Thx,<u></u><u></u></p></div><div><p class="MsoNormal">Rainkin<u></u><u></u></p></div></div></div></div></div></div></blockquote></div><br></div>