void (@NotNull PsiIfStatement ifStatement) { PsiExpression condition = ifStatement.getCondition(); Set<IElementType> tokens = new HashSet<>(); while (condition instanceof PsiPolyadicExpression poly && (poly.getOperationTokenType() == JavaTokenType.ANDAND || poly.getOperationTokenType() == JavaTokenType.OROR)) { tokens.add(poly.getOperationTokenType()); condition = ArrayUtil.getLastElement(poly.getOperands()); } if (tokens.size() > 1) return; if (!(PsiUtil.skipParenthesizedExprDown(condition) instanceof PsiBinaryExpression binOp)) return; PsiExpression lengthExpression = getValueComparedWithZero(binOp); PsiExpression arrayExpression = ExpressionUtils.getArrayFromLengthExpression(lengthExpression); if (arrayExpression == null) return; IElementType tokenType = binOp.getOperationTokenType(); if ((tokenType == JavaTokenType.NE || tokenType == JavaTokenType.GT) && !tokens.contains(JavaTokenType.OROR)) { processIsNotNull(ifStatement, condition, arrayExpression); } else if ((tokenType == JavaTokenType.EQEQ || tokenType == JavaTokenType.LE) && !tokens.contains(JavaTokenType.ANDAND)) { processIsNull(ifStatement, condition, arrayExpression); } }