boolean (@NotNull PsiMethod method) { if (!PsiUtil.canBeOverridden(method)) return false; Project project = method.getProject(); final boolean isInterface = Objects.requireNonNull(method.getContainingClass()).isInterface(); LanguageLevel minimal = isInterface ? LanguageLevel.JDK_1_6 : LanguageLevel.JDK_1_5; GlobalSearchScope scope = getLanguageLevelScope(minimal, project); if (scope == null) return false; int paramCount = method.getParameterList().getParametersCount(); Predicate<PsiMethod> preFilter = m -> m.getParameterList().getParametersCount() == paramCount && !JavaOverridingMethodUtil.containsAnnotationWithName(m, "Override"); Stream<PsiMethod> overridingMethods = JavaOverridingMethodUtil.getOverridingMethodsIfCheapEnough(method, scope, preFilter); return overridingMethods != null && overridingMethods.findAny().isPresent(); }