@Nullable
    private static PsiMethod findOverridingMethod(PsiClass aClass, @NotNull PsiMethod method, @NotNull PsiClass superClass) {
      final PsiSubstitutor substitutor =
        TypeConversionUtil.getSuperClassSubstitutor(superClass, aClass, PsiSubstitutor.EMPTY);
      final MethodSignature signature = method.getSignature(substitutor);
      final List<Pair<PsiMethod, PsiSubstitutor>> pairs =
        aClass.findMethodsAndTheirSubstitutorsByName(signature.getName(), true);
      for (Pair<PsiMethod, PsiSubstitutor> pair : pairs) {
        final PsiMethod overridingMethod = pair.first;
        if (overridingMethod.hasModifierProperty(PsiModifier.ABSTRACT)) {
          continue;
        }
        final PsiClass containingClass = overridingMethod.getContainingClass();
        if (containingClass != null && containingClass.isInterface() && !overridingMethod.hasModifierProperty(PsiModifier.DEFAULT)) {
          continue;
        }
        final PsiSubstitutor overridingSubstitutor = pair.second;
        final MethodSignature foundMethodSignature =
          overridingMethod.getSignature(overridingSubstitutor);
        if (MethodSignatureUtil.isSubsignature(signature,
                                               foundMethodSignature) && overridingMethod != method) {
          return overridingMethod;
        }
      }
      return null;
    }
@Nullable
    private static PsiMethod findOverridingMethod(PsiClass aClass, @NotNull PsiMethod method, @NotNull PsiClass superClass)