Identical expressions used with logical operators should be simplified

MSAL

When the same expression appears on both sides of &&, ||, &, or |, the result is always equal to that expression. For example, x && x is always just x. This is typically a copy-paste error where one side should have been different.

org.openrewrite.staticanalysis.SimplifyRedundantLogicalExpression
mod run . --recipe=org.openrewrite.staticanalysis.SimplifyRedundantLogicalExpression

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.