private static Set<PsiMethod> calculateOverriddenMethods(
      PsiMethod[] methods) {
      final Set<PsiMethod> overriddenMethods =
        new HashSet<>(methods.length);
      for (final PsiMethod method : methods) {
        calculateOverriddenMethods(method, overriddenMethods);
      }
      return overriddenMethods;
    }
private static Set<PsiMethod> calculateOverriddenMethods(
      PsiMethod[] methods)