CodeQL library for Java
Search

Predicate parameterDefUsePair

Holds if there exists a path from the entry-point of the callable to use without passing through a VariableUpdate of the parameter p that use refers to.

Other paths may also exist, so the SSA variables can be different.

Import path

import semmle.code.java.dataflow.DefUse
predicate parameterDefUsePair(Parameter p, RValue use)