private static @NotNull List<PsiReference> doGetReferences(@NotNull PsiElement element, @NotNull Hints hints) {
    if (element instanceof ContributedReferenceHost) {
      return Arrays.asList(ReferenceProvidersRegistry.getReferencesFromProviders(element, hints));
    }
    if (element instanceof HintedReferenceHost) {
      return Arrays.asList(((HintedReferenceHost)element).getReferences(hints));
    }
    return Arrays.asList(element.getReferences());
  }
private static @NotNull List<PsiReference> doGetReferences(@NotNull PsiElement element, @NotNull Hints hints)