CodeQL library for Java/Kotlin
codeql/java-all 0.11.0 (changelog, source)
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, VarRead use)