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

Member predicate Guard::isEquality

Holds if this guard is an equality test between e1 and e2. The test can be either ==, !=, .equals, or a switch case. If the test is negated, that is !=, then polarity is false, otherwise polarity is true.

predicate isEquality(Expr e1, Expr e2, boolean polarity)