private static PsiMethod @NotNull [] getOverloads(@NotNull PsiMethod method) {
    PsiClass aClass = method.getContainingClass();
    if (aClass == null) return new PsiMethod[]{method};
    return aClass.findMethodsByName(method.getName(), false);
  }
private static PsiMethod @NotNull [] getOverloads(@NotNull PsiMethod method)