CodeQL library for Java/Kotlin
codeql/java-all 0.8.12 (changelog, source)
Search

Predicate defUsePair

Holds if there exists a path from def to use without passing through another VariableUpdate of the LocalScopeVariable that they both refer to.

Other paths may also exist, so the SSA variables in def and use can be different.

Import path

import semmle.code.java.dataflow.DefUse
predicate defUsePair(VariableUpdate def, VarRead use)