== Compliant Solution [source,text] ---- if (booleanMethod()) { /* ... */ } if (!booleanMethod()) { /* ... */ } if (booleanMethod()) { /* ... */ } doSomething(true); doSomething(booleanMethod()); booleanVariable = booleanMethod(); booleanVariable = booleanMethod() || exp; booleanVariable = !booleanMethod() && exp; booleanVariable = !booleanMethod() || exp; booleanVariable = booleanMethod() && exp; ----