class ExampleSentencePrinter {

  private static final int MAX_BLOCK_SIZE = 5000;
  
  private void run(Language lang) {<FILL_FUNCTION_BODY>}

  public static void main(String[] args) {
    ExampleSentencePrinter prg = new ExampleSentencePrinter();
    prg.run(Languages.getLanguageForShortCode("de"));
  }

}

    File basePath = new File("/home/dnaber/lt/git/languagetool/languagetool-language-modules");
    if (!basePath.exists()) {
      throw new RuntimeException("basePath does not exist: " + basePath);
    }
    JLanguageTool tool = new JLanguageTool(lang);
    System.out.println("<html>");
    System.out.println("<head>");
    System.out.println("  <title>LanguageTool examples sentences</title>");
    System.out.println("  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />");
    System.out.println("</head>");
    System.out.println("<body>");
    int i = 1;
    int blockSize = 0;
    for (Rule rule : tool.getAllActiveRules()) {
      List<IncorrectExample> incorrectExamples = rule.getIncorrectExamples();
      if (incorrectExamples.size() > 0) {
        String example = incorrectExamples.get(0).getExample()
                .replace("<marker>", "<b>")
                .replace("</marker>", "</b>");
        int exampleLength = example.replace("<b>", "").replace("</b>", "").length();
        if (blockSize + exampleLength > MAX_BLOCK_SIZE) {
          System.out.println("<br><br>");
          blockSize = 0;
        }
        //System.out.println(i + ". " + example + " [" + rule.getId() + "]<br>");
        System.out.println(example + "<br>");
        blockSize += exampleLength;
        i++;
      }
    }
    System.out.println("</body>");
    System.out.println("</html>");
  
<no_super_class>