class SuppressIfAnyRuleMatchesFilter extends RuleFilter {

  /*
   * Suppress the match if the new suggestion creates any new match with the rule IDs provided
   */
  @Override
  public RuleMatch acceptRuleMatch(RuleMatch match, Map<String, String> arguments, int patternTokenPos,
                                   AnalyzedTokenReadings[] patternTokens, List<Integer> tokenPositions) throws IOException {<FILL_FUNCTION_BODY>}

}

    List<String> ruleIDs = Arrays.asList(getRequired("ruleIDs", arguments).split(","));
    JLanguageTool lt = ((PatternRule) match.getRule()).getLanguage().createDefaultJLanguageTool();
    String sentence = match.getSentence().getText();
    for (String replacement : match.getSuggestedReplacements()) {
      String newSentence = sentence.substring(0, match.getFromPos()) + replacement
          + sentence.substring(match.getToPos());
      AnalyzedSentence analyzedSentence = lt.analyzeText(newSentence).get(0);
      for (Rule r: lt.getAllActiveRules()) {
        if (ruleIDs.contains(r.getId())) {
          RuleMatch matches[] = r.match(analyzedSentence);
          for (RuleMatch m : matches) {
            if ((m.getToPos() >= match.getFromPos() && m.getToPos() <= match.getToPos())
              || (match.getToPos() >= m.getFromPos() && match.getToPos() <= m.getToPos())) {
              return null;
            }
          }
        }
      }
    }
    return match;
  
<methods>public non-sealed void <init>() ,public abstract org.languagetool.rules.RuleMatch acceptRuleMatch(org.languagetool.rules.RuleMatch, Map<java.lang.String,java.lang.String>, int, org.languagetool.AnalyzedTokenReadings[], List<java.lang.Integer>) throws java.io.IOException,public boolean matches(Map<java.lang.String,java.lang.String>, org.languagetool.AnalyzedTokenReadings[], int, List<java.lang.Integer>) throws java.io.IOException<variables>