class ConjunctionAtBeginOfSentenceRule extends AbstractStatisticSentenceStyleRule {
  
  private static final int DEFAULT_MIN_PERCENT = 10;
/*
  private static final Set<String> fillerWords = new HashSet<>(Arrays.asList("aber", "als", "also", "andererseits", "anschließend", "anschliessend", "anstatt", 
      "außer", "ausserdem", "bevor", "beziehungsweise", "bis", "da", "dadurch", "dafür", "dagegen", "damit", "danach", "dann", "darauf", "darum", "dass", 
      "davor", "dazu", "denn", "deshalb", "dessen", "desto", "desungeachtet", "deswegen", "doch", "ehe", "eh", "entweder", "falls", "ferner", "folglich", 
      "genauso", "geschweige", "immerhin", "indem", "indes", "indessen", "insofern", "insoweit", "inzwischen", "je", "jedoch", "nachdem", "ob", 
      "obgleich", "obschon", "obwohl", "obzwar", "oder", "respektive", "seit", "seitdem", "so", "sodass", "sofern", "solang", "solange", "sondern", "sooft", 
      "soviel", "soweit", "sowie", "sowohl", "später", "statt", "trotzdem", "um", "umso", "und", "ungeachtet", "vorher", "während", "währenddem", 
      "währenddessen", "weder", "weil", "wenn", "wenngleich", "wennschon", "wie", "wiewohl", "wobei", "wohingegen", "zumal", "zuvor", "zwar")); 
*/      
  String sentenceMessage = null;
  
  public ConjunctionAtBeginOfSentenceRule(ResourceBundle messages, Language lang, UserConfig userConfig) {
    super(messages, lang, userConfig, DEFAULT_MIN_PERCENT);
  }

  /**
   * Word is a Conjunction
   */
  private static boolean isConjunction(AnalyzedTokenReadings token) {
    return (token.hasPosTagStartingWith("KON"));  
  }
  
  /**
   * Token is comma
   */
  private static boolean isComma(AnalyzedTokenReadings token) {
    return (",".equals(token.getToken()));  
  }
  
  /**
   * Is sentence with modal verb
   */
  @Override
  protected AnalyzedTokenReadings conditionFulfilled(List<AnalyzedTokenReadings> sentence) {<FILL_FUNCTION_BODY>}
  
  @Override
  protected boolean excludeDirectSpeech() {
    return true;
  }

  @Override
  protected String getLimitMessage(int limit, double percent) {
    if (limit == 0) {
      return "Eine Konjunktion sollte nur in Ausnahmefällen am Satzanfang verwendet werden. Formulieren Sie den Satz um, falls möglich.";
    }
    return "Mehr als " + limit + "% Sätze beginnen mit einer Konjunktion {" + ((int) (percent +0.5d)) + "%} gefunden. Formulieren Sie den Satz um, falls möglich.";
  }

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

  @Override
  public String getDescription() {
    return "Statistische Stilanalyse: Sätze beginnend mit Konjunktion";
  }

  @Override
  public String getConfigureText() {
    return "Anzeigen wenn mehr als ...% Sätze eines Kapitels mit einer Konjunktion beginnen:";
  }

}

    if (sentence.size() < 3) {
      return null;
    }
    AnalyzedTokenReadings token = null;
    int num = 0;
    if (isOpeningQuote(sentence.get(0))) {
      num++;
    }
    if (isConjunction(sentence.get(num))) {
      token = sentence.get(num);
    }
    if (token == null || token.getToken().equals("Wie") || token.getToken().equals("Seit") || token.getToken().equals("Allerdings")
        || (token.getToken().equals("Aber") && sentence.get(num + 1).getToken().equals("auch"))) {
      return null;
    }
    if (token.getToken().equals("Um")) {
      for (int i = 1; i < sentence.size(); i++) {
        if(isComma(sentence.get(i)) || sentence.get(i).getToken().equals("herum")) {
          return null;
        }
      }
      return token;
    }
    if (!token.hasPosTagStartingWith("KON:UNT") || token.getToken().equals("Sondern")
        || (token.getToken().equals("Auch") && sentence.get(num + 1).getToken().equals("wenn"))) {
      if (token.getToken().equals("Entweder")) {
        for (int i = 1; i < sentence.size(); i++) {
          if(sentence.get(i).getToken().equals("oder")) {
            return null;
          }
        }
      } else if (token.getToken().equals("Sowohl")) {
        for (int i = 1; i < sentence.size() - 1; i++) {
          if(sentence.get(i).getToken().equals("als") && sentence.get(i + 1).getToken().equals("auch")) {
            return null;
          }
        }
      } else if (token.getToken().equals("Weder")) {
        for (int i = 1; i < sentence.size(); i++) {
          if(sentence.get(i).getToken().equals("noch")) {
            return null;
          }
        }
      } else {
        if(sentence.get(sentence.size() - 1).getToken().equals("?")) {
          return null;
        }
        return token;
      }
    }
    for (int i = 2; i < sentence.size(); i++) {
      if(isComma(sentence.get(i))) {
        return null;
      }
    }
    return token;
  
<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 getSentenceCount() ,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 MARKS_REGEX,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 int sentenceCount,private boolean withoutDirectSpeech