code: private void activateDefaultPatternRules() throws IOException {
      List<AbstractPatternRule> patternRules = language.getPatternRules();
      List<String> enabledRules = language.getDefaultEnabledRulesForVariant();
      List<String> disabledRules = language.getDefaultDisabledRulesForVariant();
      if (!enabledRules.isEmpty() || !disabledRules.isEmpty()) {
        for (AbstractPatternRule patternRule : patternRules) {
          if (enabledRules.contains(patternRule.getId())) {
            patternRule.setDefaultOn();
          }
          if (disabledRules.contains(patternRule.getId())) {
            patternRule.setDefaultOff();
          }
        }
      }
      userRules.addAll(patternRules);
    }
docs: Loads and activates the pattern rules from
  {@code org/languagetool/rules/<languageCode>/grammar.xml}.