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

Predicate useUsePairSameVar

Holds if use1 and use2 form a use-use-pair of the same SSA variable, that is, the value read in use1 can reach use2 without passing through any SSA definition of the variable.

This is the transitive closure of adjacentUseUseSameVar.

Import path

predicate useUsePairSameVar(VarRead use1, VarRead use2)