void (@NotNull PsiMethod method) { // no call to super, so it doesn't drill down into inner classes if (method.isConstructor()) { return; } if (method.getNameIdentifier() == null) { return; } final PsiClass containingClass = method.getContainingClass(); if (containingClass == null) { return; } final PsiClass parent = containingClass.getSuperClass(); if (parent == null) { return; } final String parentName = parent.getName(); if (parentName == null) { return; } final String methodName = method.getName(); if (!methodName.equals(parentName)) { return; } registerMethodError(method); }