boolean (PsiExpression expression) { if (!(expression instanceof PsiMethodCallExpression call)) { return false; } final PsiReferenceExpression methodExpression = call.getMethodExpression(); @NonNls final String methodName = methodExpression.getReferenceName(); if (!"equals".equals(methodName)) { return false; } final PsiExpression qualifier = methodExpression.getQualifierExpression(); if (qualifier == null) { return false; } final PsiExpressionList argList = call.getArgumentList(); final PsiExpression[] expressions = argList.getExpressions(); return expressions.length == 1 && expressions[0] != null; }