void (@NotNull PsiThisExpression thisExpression) { super.visitThisExpression(thisExpression); final PsiJavaCodeReferenceElement qualifier = thisExpression.getQualifier(); if (qualifier == null) { return; } final PsiElement referent = qualifier.resolve(); if (!(referent instanceof PsiClass)) { return; } final PsiClass containingClass = ClassUtils.getContainingClass(thisExpression); if (containingClass == null || !containingClass.equals(referent)) { return; } registerError(qualifier, thisExpression); }