Buggy code:
protected TSTokenId readRegexp ( ) { } protected String nextWhileWordChar ( char ch ) { } protected String nextWhileMatchesRegExp ( String pattern ) { } protected TSTokenId readNumber ( ) { } protected TSTokenId readHexNumber ( ) { } protected String nextWhileOperatorChar ( ) { } protected String nextWhileDigit ( ) { } protected String nextWhileHexDigit ( ) { } protected String nextWhileWhiteSpace ( ) { } protected String nextUntilUnescaped ( char end ) { } protected TSTokenId readWhileInParanthese ( ) { } protected TSTokenId readMultilineComment ( char start ) { } protected boolean isOperatorChar ( String input ) { } protected boolean isDigit ( String input ) { } protected boolean isHexDigit ( String input ) { } protected boolean isWordChar ( String input , boolean constant ) { if ( constant ) <START_BUG> return Pattern . matches ( "[\\w\\$_{}]" , input ) ; <END_BUG> else return Pattern . matches ( "[\\w\\$_]" , input ) ; } protected boolean isWhiteSpace ( char ch ) { } public int getReadLength ( ) { } public TSLexerState getState ( ) { } public static final class TSScannerKeyWords { public static final Collection < String > keywords3 = new TreeSet < String > ( Arrays . asList ( "ACT" , "ACTIFSUB" , "ACTIFSUBRO" , "ACTRO" , "all" , "arrowACT" , "arrowNO" , "ascii" , "atLeast" , "atMost" , "BE" , "be_groups" , "be_users" , "BOX" , "browse" , "bullets" , "CUR" , "CURIFSUB" , "CURIFSUBRO" , "CURRO" , "default" , "description" , "directory" , "directReturn" , "div" , "else" , "email" , "end" , "equals" , "external" , "false" , "FE" , "fe_groups" , "fe_users" , "feadmin" , "header" , "html" , "id" , "if" , "ifEmpty" , "IFSUB" , "IFSUBRO" , "image" , "inBranch" , "isFalse" , "isGreaterThan" , "isInList" , "isLessThan" , "isPositive" , "isTrue" , "language" , "leveltitle" , "list" , "login" , "mailform" , "media" , "menu" , "mod" , "multimedia" , "negate" , "NEW" , "NO" , "none" , "pages" , "pages_language_overlay" , "parseFunc_RTE" , "pid" , "required" , "RO" , "rootline" , "script" , "search" , "shortcut" , "sitemap" , "SPC" , "splash" , "sys_dmail" , "sys_domain" , "sys_filemounts" , "sys_note" , "sys_template" , "tabel" , "text" , "textpic" , "this" , "top" , "true" , "twice" , "uid" , "uniqueGlobal" , "uniqueLocal" , "unsetEmpty" , "updated" , "uploads" , "us" , "user_task" , "USERDEF1" , "USERDEF1RO" , "USERDEF2" , "USERDEF2RO" , "usergroup" , "USR" , "USRRO" , "web_func" , "web_info" , "web_layout" , "web_list" , "web_ts" , "xhtml_strict" , "xhtml_trans" , "XY" , "ypMenu" ) ) ; public static final Collection < String > keywords2 = new TreeSet < String > ( Arrays . asList ( "admPanel" , "alt_print" , "auth" , "browser" , "cache" , "CHECK" , "cObj" , "cObject" , "COMMENT" , "config" , "content" , "copy" , "cut" , "dataArray" , "dayofmonth" , "dayofweek" , "db_list" , "device" , "dynCSS" , "edit" , "edit_access" , "edit_pageheader" , "folder" , "folderTree" , "foldoutMenu" , "Functions" , "gmenu_foldout" , "gmenu_layers" , "hostname" , "hour" , "imgList" , "imgResource" , "imgText" , "info" , "IP" , "jsmenu" , "JSwindow" , "LABEL" , "layout" , "lib" , "loginUser" , "marks" , "minute" , "mod" , "module" , "month" , "move_wizard" , "new" , "new_wizard" , "noResultObj" , "numRows" , "options" , "page" , "pageTree" , "paste" , "perms" , "PIDinRootline" , "PIDupinRootline" , "plugin" , "postform" , "postform_newThread" , "preview" , "publish" , "RADIO" , "renderObj" , "REQ" , "RTE" , "RTE_compliant" , "select" , "setup" , "split" , "stat" , "stat_apache" , "stat_apache_logfile" , "stat_apache_noHost" , "stat_apache_notExtended" , "stat_apache_pagenames" , "stat_excludeBEuserHits" , "stat_excludeIPList" , "stat_mysql" , "stat_titleLen" , "stat_typeNumList" , "stdWrap" , "subparts" , "system" , "temp" , "template" , "treeLevel" , "tsdebug" , "typolink" , "url" , "useragent" , "userFunc" , "version" , "view" , "workOnSubpart" ) ) ;

Fix:
return Pattern . matches ( "[\\w\\$_{}\\.\\:]" , input ) ;