if (parent instanceof PsiBinaryExpression) {
<BUG>final PsiBinaryExpression binaryExpression = (PsiBinaryExpression)parent;
if (PsiTreeUtil.isAncestor(binaryExpression.getROperand(), expression, false)) {</BUG>
final PsiExpression lhs = binaryExpression.getLOperand();
<BUG>if (isEquality(lhs, equals, variable1, variable2)) {

registerError(binaryExpression, variable1.getName(), variable2.getName(), Boolean.valueOf(equals));
return;</BUG>
}
}

if (parent instanceof PsiBinaryExpression) {
final PsiBinaryExpression binaryExpression = (PsiBinaryExpression)parent;
final IElementType tokenType = binaryExpression.getOperationTokenType();
if (equal && JavaTokenType.OROR.equals(tokenType) || !equal && JavaTokenType.ANDAND.equals(tokenType)) {
if (PsiTreeUtil.isAncestor(binaryExpression.getROperand(), expression, false)) {
final PsiExpression lhs = binaryExpression.getLOperand();
if (isEquality(lhs, equal, qualifiedName1, qualifiedName2)) {
return binaryExpression;
