@Nullable
  private static CommonCodeStyleSettings safelyGetDefaults(LanguageCodeStyleProvider provider) {
    Ref<CommonCodeStyleSettings> defaultSettingsRef =
      RecursionManager.doPreventingRecursion(provider, true, () -> new Ref<>(provider.getDefaultCommonSettings()));
    if (defaultSettingsRef == null) {
      LOG.error(PluginException.createByClass(provider.getClass().getCanonicalName() + ".getDefaultCommonSettings() recursively creates root settings.", null, provider.getClass()));
      return null;
    }
    else {
      CommonCodeStyleSettings defaultSettings = defaultSettingsRef.get();
      if (defaultSettings instanceof CodeStyleSettings) {
        LOG.error(PluginException.createByClass(provider.getClass().getName() + ".getDefaultCommonSettings() creates root CodeStyleSettings instead of CommonCodeStyleSettings", null, provider.getClass()));
      }
      return defaultSettings;
    }
  }
@Nullable
  private static CommonCodeStyleSettings safelyGetDefaults(LanguageCodeStyleProvider provider)