class NonSignificantVerbsRule extends AbstractStatisticStyleRule {
  
  private static final int DEFAULT_MIN_PER_MILL = 8;

  private static final String[] nonSignificant = {"haben", "sein", "machen", "tun"};
  
  public NonSignificantVerbsRule(ResourceBundle messages, Language lang, UserConfig userConfig) {
    super(messages, lang, userConfig, DEFAULT_MIN_PER_MILL);
    addExamplePair(Example.wrong("Er <marker>machte</marker> einen Kuchen."),
                   Example.fixed("Das macht mir Angst."));
  }

  /*
   * Is a unknown word (has only letters and no PosTag) 
   */
  private static boolean isUnknownWord(AnalyzedTokenReadings token) {
    return token.isPosTagUnknown() && token.getToken().length() > 2 && token.getToken().matches("^[A-Za-zÄÖÜäöüß]+$");
  }
  
  private static boolean isException(AnalyzedTokenReadings[] tokens, int num) {<FILL_FUNCTION_BODY>}

  /**
   * Minimal value is given in per mil
   */
  @Override
  public double denominator() {
    return 1000.0;
  }
  
  @Override
  protected int conditionFulfilled(AnalyzedTokenReadings[] tokens, int nAnalysedToken) {
    if (tokens[nAnalysedToken].hasAnyLemma(nonSignificant) && !isException(tokens, nAnalysedToken)) {
      return nAnalysedToken;
    }
    return -1;
  }
  
  @Override
  protected boolean sentenceConditionFulfilled(AnalyzedTokenReadings[] tokens, int nToken) {
    return false;
  }

  @Override
  protected boolean excludeDirectSpeech() {
    return true;
  }

  @Override
  protected String getLimitMessage(int limit, double percent) {
    if (limit == 0) {
      return "Dieses Verb hat wenig Aussagekraft. Verwenden Sie wenn möglich ein anderes oder formulieren Sie den Satz um.";
    }
    return "Mehr als " + limit + "‰ wenig aussagekräftige Verben {" + ((int) (percent +0.5d)) + 
        "‰} gefunden. Verwenden Sie wenn möglich ein anderes Verb oder formulieren Sie den Satz um.";
  }

  @Override
  protected String getSentenceMessage() {
    return null;
  }

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

  @Override
  public String getDescription() {
    return "Statistische Stilanalyse: Verben mit wenig Aussagekraft";
  }

  @Override
  public String getConfigureText() {
    return "Anzeigen wenn mehr als ...‰ eines Kapitels wenig aussagekräftige Verben sind:";
  }

}

    if (tokens[num].getToken().startsWith("sein") || tokens[num].getToken().startsWith("Sein")) {
      return true;
    } else if (tokens[num].hasLemma("machen")) {
      for (int i = 1; i < tokens.length; i++) {
        if ("Angst".equals(tokens[i].getToken()) || "Weg".equals(tokens[i].getToken()) || 
            "frisch".equals(tokens[i].getToken()) || "bemerkbar".equals(tokens[i].getToken()) ||
            "aufmerksam".equals(tokens[i].getToken())) {
          return true;
        }
      }
    } else {
      boolean isHaben = tokens[num].hasLemma("haben");
      if (isHaben) {
        for (int i = 1; i < tokens.length; i++) {
          String sToken = tokens[i].getToken();
          if (sToken.equals("Glück") || sToken.equals("Angst")  || sToken.equals("Mühe") || 
              sToken.equals("Recht") || sToken.equals("recht")) {
            return true;
          }
        }
      }  
      if (isHaben || tokens[num].hasLemma("sein")) {
        for (int i = 1; i < tokens.length; i++) {
          if (tokens[i].hasPosTagStartingWith("PA2") || tokens[i].hasPosTagStartingWith("VER:PA2") || 
              "Flucht".equals(tokens[i].getToken()) || isUnknownWord(tokens[i])) {
            return true;
          }
        }
      }
    }
    return false;
  
<methods>public void <init>(java.util.ResourceBundle, org.languagetool.Language, org.languagetool.UserConfig, int, boolean) ,public void <init>(java.util.ResourceBundle, org.languagetool.Language, org.languagetool.UserConfig, int) ,public double denominator() ,public abstract java.lang.String getConfigureText() ,public int getDefaultValue() ,public int getMaxConfigurableValue() ,public int getMinConfigurableValue() ,public int getNumberOfMatches() ,public int getWordCount() ,public boolean hasConfigurableValue() ,public org.languagetool.rules.RuleMatch[] match(List<org.languagetool.AnalyzedSentence>) throws java.io.IOException,public int minToCheckParagraph() ,public void setWithoutDirectSpeech(boolean) <variables>private static final boolean DEFAULT_ACTIVATION,private static final java.util.regex.Pattern ENDING_QUOTES,private static final java.util.regex.Pattern OPENING_QUOTES,private final non-sealed int defaultMinPercent,private final non-sealed int minPercent,private int numMatches,private boolean withoutDirectSpeech,private int wordCount