Patent ID: 8327339

Claim:
A method for detecting user input dependence in software code, comprising: generating, by a static analysis engine executing on a processor, an Augmented Static Single Assignment (aSSA) form of the software code comprising: an augmented phi-node comprising: a control dependency to a predicate; a first data dependency to a first variable assignment, and a second data dependency to a second variable assignment, wherein the first variable assignment and second variable assignment are dependent on the predicate; generating, by the static analysis engine, a reachability data structure using the aSSA form of the software code, wherein the reachability data structure comprises: a root node representing an input controlled by a user; a first node representing the augmented phi-node; a second node representing the variable assignment; a third node representing the predicate; a first directed edge connecting the first node and the second node, wherein the first directed edge represents the data dependency; and a second directed edge connecting the first node and the third node, wherein the second directed edge represents the control dependency; determining that the first node is reachable by a path from the root node, wherein the path represents a portion of the software code; and marking, by a source code modifier executing on the processor, the portion of the software code corresponding to the path as code to modify.