code: public List<AbstractPatternRule> loadFalseFriendRules(String filename)
        throws ParserConfigurationException, SAXException, IOException {
      if (motherTongue == null) {
        return Collections.emptyList();
      }
      FalseFriendRuleLoader ruleLoader = new FalseFriendRuleLoader(motherTongue);
      try (InputStream is = this.getClass().getResourceAsStream(filename)) {
        if (is == null) {
          return ruleLoader.getRules(new File(filename), language, motherTongue);
        } else {
          return ruleLoader.getRules(is, language, motherTongue);
        }
      }
    }
docs: Load false friend rules from an XML file. Only those pairs will be loaded
  that match the current text language and the mother tongue specified in the
  JLanguageTool constructor. Use {@link #addRule(Rule)} to add these rules to the
  checking process.
  @param filename path to an XML file in the classpath or in the filesystem - the classpath is checked first
  @return a List of {@link PatternRule} objects, or an empty list if mother tongue is not set