private static void putInMap(@NotNull PsiClass aClass,
                               @NotNull Map<MethodSignature, HierarchicalMethodSignature> result,
                               @NotNull Map<MethodSignature, HierarchicalMethodSignatureImpl> map,
                               @NotNull HierarchicalMethodSignature hierarchicalMethodSignature,
                               @NotNull MethodSignature signature) {
    if (isInheritedInterfaceStaticMethod(hierarchicalMethodSignature, aClass)) {
      return;
    }
    HierarchicalMethodSignatureImpl existing = map.get(signature);
    if (existing == null) {
      HierarchicalMethodSignatureImpl copy = copy(hierarchicalMethodSignature);
      LOG.assertTrue(copy.getMethod().isValid());
      map.put(signature, copy);
      return;
    }

    MergeSuperType mergeSuperType = solveMergeSuperType(aClass, hierarchicalMethodSignature, existing);
    if ((isReturnTypeIsMoreSpecificThan(hierarchicalMethodSignature, existing) &&
         mergeSuperType == MergeSuperType.MERGE_SUPER) || mergeSuperType == MergeSuperType.FORCE_MERGE) {
      HierarchicalMethodSignatureImpl newCurrent = copy(hierarchicalMethodSignature);
      mergeSupers(newCurrent, existing);
      LOG.assertTrue(newCurrent.getMethod().isValid());
      map.put(signature, newCurrent);
      return;
    }

    mergeSuperType = solveMergeSuperType(aClass, existing, hierarchicalMethodSignature);
    if (mergeSuperType == MergeSuperType.MERGE_SUPER || mergeSuperType == MergeSuperType.FORCE_MERGE) {
      mergeSupers(existing, hierarchicalMethodSignature);
      return;
    }
    // just drop an invalid method declaration there - to highlight accordingly
    if (!result.containsKey(signature)) {
      LOG.assertTrue(hierarchicalMethodSignature.getMethod().isValid());
      result.put(signature, hierarchicalMethodSignature);
    }
  }
private static void putInMap(@NotNull PsiClass aClass,
                               @NotNull Map<MethodSignature, HierarchicalMethodSignature> result,
                               @NotNull Map<MethodSignature, HierarchicalMethodSignatureImpl> map,
                               @NotNull HierarchicalMethodSignature hierarchicalMethodSignature,
                               @NotNull MethodSignature signature)