class AnarASuggestionsFilter extends RuleFilter {

  static private CatalanSynthesizer synth = CatalanSynthesizer.INSTANCE;

  @Override
  public RuleMatch acceptRuleMatch(RuleMatch match, Map<String, String> arguments, int patternTokenPos,
                                   AnalyzedTokenReadings[] patternTokens, List<Integer> tokenPositions) throws IOException {<FILL_FUNCTION_BODY>}

  private String getLanguageVariantCode(RuleMatch match) {
    PatternRule pr = (PatternRule) match.getRule();
    return pr.getLanguage().getShortCodeWithCountryAndVariant();
  }
}

    int initPos = 0;
    AnalyzedTokenReadings[] tokens = match.getSentence().getTokensWithoutWhitespace();
    while (initPos < tokens.length
      && (tokens[initPos].getStartPos() < match.getFromPos() || tokens[initPos].isSentenceStart())) {
      initPos++;
    }
    String verbPostag = tokens[initPos].readingWithTagRegex("V.IP.*").getPOSTag();
    String lemma = tokens[initPos + 2].readingWithTagRegex("V.N.*").getLemma();
    AnalyzedToken at = new AnalyzedToken("", "", lemma);
    String newPostag =  "V[MS]I[PF]" + verbPostag.substring(4, 8);
    String[] synthForms = synth.synthesize(at, newPostag, true,
      getLanguageVariantCode(match));
    if (synthForms.length == 0) {
      return null;
    }
    int adjustEndPos = 0;
    String[] result = PronomsFeblesHelper.getTwoNextPronouns(tokens,initPos + 3);
    String pronomsDarrere = result[0];
    adjustEndPos += Integer.valueOf(result[1]);
    List<String> replacements = new ArrayList<>();
    for (String verb : synthForms) {
      String suggestion = "";
      if (!pronomsDarrere.isEmpty()) {
        suggestion = PronomsFeblesHelper.transformDavant(pronomsDarrere, verb);
      }
      suggestion += verb;
      suggestion = StringTools.preserveCase(suggestion, tokens[initPos].getToken());
      replacements.add(suggestion);
    }
    if (replacements.isEmpty()) {
      return null;
    }
    RuleMatch ruleMatch = new RuleMatch(match.getRule(), match.getSentence(), tokens[initPos].getStartPos(),
      tokens[initPos + 2 + adjustEndPos].getEndPos(), match.getMessage(), match.getShortMessage());
    ruleMatch.setType(match.getType());
    ruleMatch.setSuggestedReplacements(replacements);
    return ruleMatch;
  
<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>