PsiMethod (@NotNull final PsiMethod method) { CommonProcessors.FindFirstProcessor<PsiMethod> processor = new CommonProcessors.FindFirstProcessor<>(); MethodDeepestSuperSearcher.processDeepestSuperMethods(method, processor); final PsiMethod first = processor.getFoundValue(); return first == null ? method : first; }