PsiMethod (@NotNull PsiClass inheritor, @NotNull PsiMethod method, @NotNull PsiClass methodContainingClass) { String name = method.getName(); if (inheritor.findMethodsByName(name, false).length > 0) { PsiMethod found = MethodSignatureUtil.findMethodBySuperSignature(inheritor, getSuperSignature(inheritor, methodContainingClass, method), false); if (found != null && isAcceptable(found, inheritor, method, methodContainingClass)) { return found; } } if (methodContainingClass.isInterface() && !inheritor.isInterface()) { //check for sibling implementation final PsiClass superClass = inheritor.getSuperClass(); if (superClass != null && !superClass.isInheritor(methodContainingClass, true) && superClass.findMethodsByName(name, true).length > 0) { MethodSignature signature = getSuperSignature(inheritor, methodContainingClass, method); PsiMethod derived = MethodSignatureUtil.findMethodInSuperClassBySignatureInDerived(inheritor, superClass, signature, true); if (derived != null && isAcceptable(derived, inheritor, method, methodContainingClass)) { return derived; } } } return null; }