private static @NotNull List<PsiReference> collectReferences(@Nullable Collection<PsiReference[]> references) {
    if (references == null) return Collections.emptyList();
    List<PsiReference> list = new SmartList<>();
    for (PsiReference[] reference : references) {
      ContainerUtil.addAllNotNull(list, reference);
    }

    return list;
  }
private static @NotNull List<PsiReference> collectReferences(@Nullable Collection<PsiReference[]> references)