void (@NotNull PsiSuperExpression expression) { super.visitSuperExpression(expression); final PsiJavaCodeReferenceElement qualifier = expression.getQualifier(); if (qualifier != null) { return; } final PsiElement parent = expression.getParent(); if (!(parent instanceof PsiReferenceExpression referenceExpression)) { return; } final PsiElement grandParent = referenceExpression.getParent(); if (grandParent instanceof PsiMethodCallExpression methodCallExpression) { if (!hasUnnecessarySuperQualifier(methodCallExpression)) { return; } if (myIgnoreClarification) { PsiClass containingClass = ClassUtils.getContainingClass(expression); if (containingClass != null) { final PsiElement classParent = containingClass.getParent(); String referenceName = methodCallExpression.getMethodExpression().getReferenceName(); if (referenceName != null) { PsiExpression copyCall = JavaPsiFacade.getElementFactory(expression.getProject()) .createExpressionFromText(referenceName + methodCallExpression.getArgumentList().getText(), classParent); PsiMethod method = ((PsiMethodCallExpression)copyCall).resolveMethod(); if (method != null && method != referenceExpression.resolve()) { return; } } } } } else { if (!hasUnnecessarySuperQualifier(referenceExpression)) { return; } if (myIgnoreClarification) { PsiClass containingClass = ClassUtils.getContainingClass(expression); if (containingClass != null) { final PsiElement classParent = containingClass.getParent(); final String referenceText = referenceExpression.getReferenceName(); if (referenceText != null) { PsiVariable variable = PsiResolveHelper.getInstance(expression.getProject()) .resolveAccessibleReferencedVariable(referenceText, classParent); if (variable != null && variable != referenceExpression.resolve()) { return; } } } } } registerError(expression); }