@NotNull
  public static Set<MethodSignature> getDuplicatedSignatures(@NotNull PsiClass clazz) {
    return CachedValuesManager.getCachedValue(clazz, () -> {
      PsiElementFactory factory = JavaPsiFacade.getInstance(clazz.getProject()).getElementFactory();
      MostlySingularMultiMap<MethodSignature, PsiMethod> signatures = new MostlySingularMultiMap<>();
      for (PsiMethod method : clazz.getMethods()) {
        MethodSignature signature = method.getSignature(factory.createRawSubstitutor(method));
        signatures.add(signature, method);
      }

      Set<MethodSignature> result = new HashSet<>();
      for (MethodSignature signature : signatures.keySet()) {
        if (signatures.valuesForKey(signature) > 1) {
          result.add(signature);
        }
      }

      return CachedValueProvider.Result.create(result, clazz);
    });
  }
@NotNull
  public static Set<MethodSignature> getDuplicatedSignatures(@NotNull PsiClass clazz)