PsiExpression (@Nullable PsiBinaryExpression condition) { if (condition == null) return null; IElementType tokenType = condition.getOperationTokenType(); PsiExpression left = condition.getLOperand(); PsiExpression right = condition.getROperand(); if (ExpressionUtils.isZero(right)) { if (tokenType.equals(JavaTokenType.NE) || tokenType.equals(JavaTokenType.GT)) return left; } else if (ExpressionUtils.isZero(left)) { if (tokenType.equals(JavaTokenType.NE) || tokenType.equals(JavaTokenType.LT)) return right; } return null; }