<div dir="ltr">Hi,<div><br></div><div>I&#39;m implementing the TaintPropagationHandler interface in order to capture data about the Abstraction objects propagated during FlowDroid&#39;s analysis.</div><div><br></div><div>I am confused about the difference between the notifyFlowIn method and the notifyFlowOut method. In the documentation, it states that notifyFlowIn is invoked when a taint is propagated in the data flow engine, and that notifyFlowOut is invoked when a new taint is generated in the data flow engine. From this, I assume that if an existing taint is being propagated, but no new taint is being generated, only notifyFlowOut would be invoked. </div><div><br></div><div>In my handler, I override notifyFlowIn and notifyFlowOut to dump some information about the current abstraction to a file when they are invoked. When I examine this output, it looks like notifyFlowOut is sometimes invoked even though no new taint is generated. For example:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">&lt;Excerpt from my output file&gt;<br>Generated by Handler: notifyFlowOut<br>Flow function type: NormalFlowFunction<br>***Incoming Abstraction Data***<br>Incoming AccessPath value: $i0<br>Incoming Source Context: $i0(int) * &lt;+length&gt; in $i0 := @parameter0: int<br>Incoming Abstraction hash: -210156627<br>Incoming AccessPath Hash: 1889033344<br>***Outgoing Abstraction Set Data - iterate over all elements of the set***<br>Outgoing set 0:<br>Outgoing Abstraction Access Path: $i0<br>Outgoing Abstraction Source Context: $i0(int) * &lt;+length&gt; in $i0 := @parameter0: int<br>Outgoing Abstraction Hash:-210156627<br>Outgoing AccessPath Hash:1889033344</blockquote><div><br></div><div>In this example, it looks like the incoming and outgoing Abstractions are one and the same. I&#39;m confused about this, because my understanding was that notifyFlowOut only gets invoked when a NEW taint is generated, and here it looks like an existing taint is being propagated. Am I confused about the nature of notifyFlowOut, or what the hash code of the Abstraction represents, or both?</div><div><br></div><div>I am extracting the Abstraction hash in the following way:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">int myHash = incoming.hashCode();</blockquote><div>where incoming is the Abstraction object passed into notifyFlowOut.</div><div><br></div><div>Thanks for any clarification you can provide,</div><div><br></div><div>Katie</div></div>