void (@NotNull PsiVariable variable) { super.visitVariable(variable); if (!PsiTypes.booleanType().equals(variable.getType())) { return; } if (variable instanceof PsiParameter && variable.getParent() instanceof PsiForeachStatement) { return; } final String name = variable.getName(); final JavaCodeStyleManager codeStyleManager = JavaCodeStyleManager.getInstance(variable.getProject()); final String prefix = codeStyleManager.getPrefixByVariableKind(codeStyleManager.getVariableKind(variable)); for (final String negativeName : NEGATIVE_NAMES) { assert name != null; if (isNegativelyNamed(name, negativeName) || !prefix.isEmpty() && isNegativelyNamed(name, prefix + negativeName)) { registerVariableError(variable, variable); break; } } }