boolean (PsiExpression expression, PsiElement parent) { if (expression instanceof PsiAssignmentExpression assignmentExpression) { final IElementType tokenType = assignmentExpression.getOperationTokenType(); if (parent instanceof PsiVariable) { if (!tokenType.equals(JavaTokenType.EQ)) { return true; } } else if (parent instanceof PsiAssignmentExpression nestedAssignment) { final IElementType nestedTokenType = nestedAssignment.getOperationTokenType(); if (!tokenType.equals(nestedTokenType)) { return true; } } return isUnclearExpression(assignmentExpression.getRExpression(), assignmentExpression); } else if (expression instanceof PsiConditionalExpression conditionalExpression) { if (PsiUtilCore.hasErrorElementChild(expression)) { return false; } return (parent instanceof PsiConditionalExpression) || isUnclearExpression(conditionalExpression.getCondition(), conditionalExpression) || isUnclearExpression(conditionalExpression.getThenExpression(), conditionalExpression) || isUnclearExpression(conditionalExpression.getElseExpression(), conditionalExpression); } else if (expression instanceof PsiPolyadicExpression polyadicExpression) { if ((parent instanceof PsiConditionalExpression) || (parent instanceof PsiPolyadicExpression) || (parent instanceof PsiInstanceOfExpression)) { return true; } for (PsiExpression operand : polyadicExpression.getOperands()) { final PsiType type = operand.getType(); if ((type == null) || type.equalsToText(CommonClassNames.JAVA_LANG_STRING)) { return false; } if (isUnclearExpression(operand, polyadicExpression)) { return true; } } } else if (expression instanceof PsiInstanceOfExpression instanceOfExpression) { if ((parent instanceof PsiPolyadicExpression) || (parent instanceof PsiConditionalExpression)) { return true; } return isUnclearExpression(instanceOfExpression.getOperand(), instanceOfExpression); } else if (expression instanceof PsiParenthesizedExpression parenthesizedExpression) { final PsiExpression nestedExpression = parenthesizedExpression.getExpression(); return isUnclearExpression(nestedExpression, parenthesizedExpression); } return false; }