synchronized
  public void registerProvider(@NonNls String @NotNull [] names,
                               @NotNull ElementPattern<?> filter,
                               boolean caseSensitive,
                               @NotNull PsiReferenceProvider provider,
                               double priority) {
    Map<String, @NotNull ProviderInfo<ElementPattern<?>>[]> map = caseSensitive ? myNamesToProvidersMap : myNamesToProvidersMapInsensitive;

    for (String attributeName : names) {
      String key = caseSensitive ? attributeName : StringUtil.toLowerCase(attributeName);
      ProviderInfo<ElementPattern<?>>[] psiReferenceProviders = map.get(key);

      ProviderInfo<ElementPattern<?>> newInfo = new ProviderInfo<>(provider, filter, priority);
      ProviderInfo<ElementPattern<?>>[] newProviders = psiReferenceProviders == null ? new ProviderInfo[]{newInfo} : ArrayUtil.append(psiReferenceProviders, newInfo);

      map.put(key, newProviders);
    }
  }
synchronized
  public void registerProvider(@NonNls String @NotNull [] names,
                               @NotNull ElementPattern<?> filter,
                               boolean caseSensitive,
                               @NotNull PsiReferenceProvider provider,
                               double priority)