<commit_before>package eg.syntax;

/**
 * Syntax highlighting for Java
 */
public class JavaHighlighter implements Highlighter {

   private final static String[] JAVA_KEYWORDS = {
     "abstract", "assert",
     "break", "boolean", "Boolean", "byte",
     "catch", "case","const","continue", "class", "char",
     "default", "do", "double",
     "else", "enum", "extends",
     "false", "finally", "final", "float", "for",
     "if", "implements", "import", "instanceof", "int", "interface",
     "long",
     "native", "new", "null",
     "package", "private", "protected", "public",
     "return",
     "strictfp", "switch", "synchronized", "short", "static", "super",
     "String",
     "this", "throw", "throws", "transient", "true", "try",
     "void", "volatile",
     "while"
   };

   private final static String[] JAVA_ANNOTATIONS = {
      "@Override", "@Deprecated", "@SuppressWarnings", "@SafeVarargs",
      "@FunctionalInterface"
   };
   
   private SyntaxHighlighter.SyntaxSearcher s;
   
   @Override
   public void setSyntaxSearcher(SyntaxHighlighter.SyntaxSearcher searcher) {
      s = searcher;
      s.setSkipQuotedBlkCmntMarks();
   }

   @Override
   public void highlight() {
      if (!s.isInBlock(SyntaxConstants.SLASH_STAR, SyntaxConstants.STAR_SLASH)) {
         s.resetAttributes();
         s.keywords(JAVA_ANNOTATIONS, true, null, Attributes.BLUE_PLAIN);
         s.keywords(JAVA_KEYWORDS, true, null, Attributes.RED_PLAIN);
         s.brackets();
         s.braces();
         s.quoteInLine();
         s.lineComments(SyntaxConstants.DOUBLE_SLASH);
     }
     else {
        System.out.println("hallo");
     }
     s.block(SyntaxConstants.SLASH_STAR, SyntaxConstants.STAR_SLASH);
   }
   
   @Override
   public boolean isValid(String text, int pos, int length, int condition) {
      return true;
   }
}<commit_msg>remove a forgotten test printing to the console<commit_after>package eg.syntax;

/**
 * Syntax highlighting for Java
 */
public class JavaHighlighter implements Highlighter {

   private final static String[] JAVA_KEYWORDS = {
     "abstract", "assert",
     "break", "boolean", "Boolean", "byte",
     "catch", "case","const","continue", "class", "char",
     "default", "do", "double",
     "else", "enum", "extends",
     "false", "finally", "final", "float", "for",
     "if", "implements", "import", "instanceof", "int", "interface",
     "long",
     "native", "new", "null",
     "package", "private", "protected", "public",
     "return",
     "strictfp", "switch", "synchronized", "short", "static", "super",
     "String",
     "this", "throw", "throws", "transient", "true", "try",
     "void", "volatile",
     "while"
   };

   private final static String[] JAVA_ANNOTATIONS = {
      "@Override", "@Deprecated", "@SuppressWarnings", "@SafeVarargs",
      "@FunctionalInterface"
   };
   
   private SyntaxHighlighter.SyntaxSearcher s;
   
   @Override
   public void setSyntaxSearcher(SyntaxHighlighter.SyntaxSearcher searcher) {
      s = searcher;
      s.setSkipQuotedBlockMarks();
   }

   @Override
   public void highlight() {
      if (!s.isInBlock(SyntaxConstants.SLASH_STAR, SyntaxConstants.STAR_SLASH)) {
         s.resetAttributes();
         s.keywords(JAVA_ANNOTATIONS, true, null, Attributes.BLUE_PLAIN);
         s.keywords(JAVA_KEYWORDS, true, null, Attributes.RED_PLAIN);
         s.brackets();
         s.braces();
         s.quoteInLine();
         s.lineComments(SyntaxConstants.DOUBLE_SLASH);
     }
     s.block(SyntaxConstants.SLASH_STAR, SyntaxConstants.STAR_SLASH);
   }
   
   @Override
   public boolean isValid(String text, int pos, int length, int condition) {
      return true;
   }
}
{'fraction_non_alphanumeric': 0.15888104291146116, 'fraction_numerical': 0.0, 'mean_word_length': 3.2825581395348835, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5404623', 'n_tokens_mistral': 1194, 'n_tokens_neox': 1170, 'n_words': 257}