class FalseFriendsAsBitextLoader {

  public List<BitextPatternRule> getFalseFriendsAsBitext(
          String filename, Language motherTongue,
          Language language) throws ParserConfigurationException,
          SAXException, IOException {<FILL_FUNCTION_BODY>}

}

    FalseFriendRuleLoader ruleLoader = new FalseFriendRuleLoader(motherTongue);
    List<BitextPatternRule> bRules = new ArrayList<>();
    List<AbstractPatternRule> rules1 = ruleLoader.getRules(
            JLanguageTool.getDataBroker().getFromRulesDirAsStream(filename),
            motherTongue, language);
    List<AbstractPatternRule> rules2 = ruleLoader.getRules(
            JLanguageTool.getDataBroker().getFromRulesDirAsStream(filename),
            language, motherTongue);
    Map<String, AbstractPatternRule> srcRules = new HashMap<>();
    for (AbstractPatternRule rule : rules1) {
      srcRules.put(rule.getId(), rule);
    }
    for (AbstractPatternRule rule : rules2) {
      if (srcRules.containsKey(rule.getId())) {
        BitextPatternRule bRule = new BitextPatternRule(
                srcRules.get(rule.getId()), rule);
        bRule.setSourceLanguage(motherTongue);
        bRule.setCategory(rule.getCategory());
        bRules.add(bRule);
      }
    }
    return bRules;
  
<no_super_class>