class SimpleReplaceSpelling1992Rule extends AbstractSimpleReplaceRule {

  private static final Map<String, List<String>> WRONG_WORDS = loadFromPath("/uk/replace_spelling_2019.txt");
  private static final Map<String, String> dashPrefixes1992;

  static {
    dashPrefixes1992 = ExtraDictionaryLoader.loadMap("/uk/dash_prefixes.txt");
    dashPrefixes1992.entrySet().removeIf(entry -> ! entry.getValue().equals(":ua_1992") );
  }
  
  @Override
  public Map<String, List<String>> getWrongWords() {
    return WRONG_WORDS;
  }

  public SimpleReplaceSpelling1992Rule(ResourceBundle messages, Language language) throws IOException {
    super(messages, language);
    setLocQualityIssueType(ITSIssueType.Misspelling);
  }

  @Override
  public final String getId() {
    return "UK_SIMPLE_REPLACE_SPELLING_1992";
  }

  @Override
  public String getDescription() {
    return "Пошук слів, написаних за правописом 1992";
  }

  @Override
  public String getShort() {
    return "Слово, написане за правописом 1992";
  }

  @Override
  public RuleMatch[] match(AnalyzedSentence sentence) throws IOException {
    RuleMatch[] match = super.match(sentence);
    if( match.length == 0 ) {
      match = findTagged1922(sentence);
    }
    return match;
  }
  
  private RuleMatch[] findTagged1922(AnalyzedSentence sentence) {<FILL_FUNCTION_BODY>}

  @Override
  public String getMessage(String tokenStr, List<String> replacements) {
    return "«" + tokenStr + "» — написання не відповідає чинній версії правопису, виправлення: "
        + StringUtils.join(replacements, ",") + ".";
  }

  @Override
  public boolean isCaseSensitive() {
    return false;
  }


}

    List<RuleMatch> ruleMatches = new ArrayList<>();
    AnalyzedTokenReadings[] tokens = sentence.getTokensWithoutWhitespace();

    for (int i = 1; i < tokens.length; i++) {
      AnalyzedTokenReadings tokenReadings = tokens[i];

      if( PosTagHelper.hasPosTagPartAll(tokenReadings, "ua_1992") ) {
        RuleMatch potentialRuleMatch = new RuleMatch(this, sentence, tokenReadings.getStartPos(), tokenReadings.getEndPos(), 
            getShort(), getShort());
        
        String token = tokenReadings.getToken();
        if( token.contains("-") ) {
          String[] parts = token.split("-", 2);
          if( parts.length > 1 && dashPrefixes1992.containsKey(parts[0]) ) {
            potentialRuleMatch.addSuggestedReplacement(token.substring(0, parts[0].length()) + token.substring(parts[0].length()+1));
          }
        }
        ruleMatches.add(potentialRuleMatch);
      }
    }
    
    return toRuleMatchArray(ruleMatches);
  
<methods>public void <init>(java.util.ResourceBundle, org.languagetool.Language) ,public java.lang.String getDescription() ,public java.lang.String getId() ,public java.util.Locale getLocale() ,public java.lang.String getMessage(java.lang.String, List<java.lang.String>) ,public java.lang.String getShort() ,public org.languagetool.synthesis.Synthesizer getSynthesizer() ,public abstract Map<java.lang.String,List<java.lang.String>> getWrongWords() ,public boolean isCaseSensitive() ,public boolean isCheckLemmas() ,public org.languagetool.rules.RuleMatch[] match(org.languagetool.AnalyzedSentence) throws java.io.IOException,public void setCheckLemmas(boolean) ,public void setIgnoreTaggedWords() ,public void useSubRuleSpecificIds() <variables>private boolean checkLemmas,protected boolean ignoreTaggedWords,private final non-sealed org.languagetool.Language language,private static final Logger logger,protected boolean subRuleSpecificIds