public static @NotNull List<Pair<PsiMethod, PsiSubstitutor>> findMethodsAndTheirSubstitutorsByName(@NotNull PsiClass psiClass,
                                                                                                     @NotNull String name,
                                                                                                     boolean checkBases) {
    if (!checkBases) {
      PsiMethod[] methodsByName = psiClass.findMethodsByName(name, false);
      List<Pair<PsiMethod, PsiSubstitutor>> ret = new ArrayList<>(methodsByName.length);
      for (PsiMethod method : methodsByName) {
        ret.add(Pair.create(method, PsiSubstitutor.EMPTY));
      }
      return ret;
    }
    List<PsiMember> list = getMap(psiClass).calcMembersByName(MemberType.METHOD, name, null, null);
    if (list.isEmpty()) return Collections.emptyList();
    return withSubstitutors(psiClass, list.toArray(PsiMember.EMPTY_ARRAY));
  }
public static @NotNull List<Pair<PsiMethod, PsiSubstitutor>> findMethodsAndTheirSubstitutorsByName(@NotNull PsiClass psiClass,
                                                                                                     @NotNull String name,
                                                                                                     boolean checkBases)