There are valid cases for passing a variable multiple times into the same method call, but usually doing so is a mistake, and something else was intended for one of the arguments.

Noncompliant Code Example

if (compare(myPoint.x, myPoint.x) != 0) { // Noncompliant
  //...
}

if (compare(getNextValue(), getNextValue()) != 0) { // Noncompliant
  // ...
}

Compliant Solution

if (compare(myPoint.x, myPoint.y) != 0) {
  //...
}

Object v1 = getNextValue();
Object v2 = getNextValue();
if (compare(v1, v2) != 0) {
  // ...
}

Deprecated

This rule is deprecated, and will eventually be removed.