Buggy code:
case XPath . Scanner . CHARTYPE_GREATER : if ( ( ++ currentOffset ) == endOffset ) { addToken ( tokens , XPath . Tokens . EXPRTOKEN_OPERATOR_GREATER ) ; starIsMultiplyOperator = false ; break ; } ch = data . charAt ( currentOffset ) ; if ( ch == '=' ) { addToken ( tokens , XPath . Tokens . EXPRTOKEN_OPERATOR_GREATER_EQUAL ) ; starIsMultiplyOperator = false ; if ( ( ++ currentOffset ) == endOffset ) { break ; } } else { addToken ( tokens , XPath . Tokens . EXPRTOKEN_OPERATOR_GREATER ) ; starIsMultiplyOperator = false ; } break ; case XPath . Scanner . CHARTYPE_QUOTE : int qchar = ch ; if ( ( ++ currentOffset ) == endOffset ) { return false ; } ch = data . charAt ( currentOffset ) ; int litOffset = currentOffset ; while ( ch != qchar ) { if ( ( ++ currentOffset ) == endOffset ) { return false ; } ch = data . charAt ( currentOffset ) ; } int litLength = currentOffset - litOffset ; addToken ( tokens , XPath . Tokens . EXPRTOKEN_LITERAL ) ; starIsMultiplyOperator = true ; tokens . addToken ( symbolTable . addSymbol ( data . substring ( litOffset , ( litOffset + litLength ) ) ) ) ; if ( ( ++ currentOffset ) == endOffset ) { break ; } break ; case XPath . Scanner . CHARTYPE_DIGIT : addToken ( tokens , XPath . Tokens . EXPRTOKEN_NUMBER ) ; starIsMultiplyOperator = true ; currentOffset = scanNumber ( tokens , data , endOffset , currentOffset ) ; break ; case XPath . Scanner . CHARTYPE_DOLLAR : if ( ( ++ currentOffset ) == endOffset ) { return false ; } nameOffset = currentOffset ; currentOffset = scanNCName ( data , endOffset , currentOffset ) ; if ( currentOffset == nameOffset ) { return false ; } if ( currentOffset < endOffset ) { ch = data . charAt ( currentOffset ) ; } else { ch = - 1 ; } nameHandle = symbolTable . addSymbol ( data . substring ( nameOffset , currentOffset ) ) ; if ( ch != ':' ) { prefixHandle = null ; } else { prefixHandle = nameHandle ; if ( ( ++ currentOffset ) == endOffset ) { return false ; } nameOffset = currentOffset ; currentOffset = scanNCName ( data , endOffset , currentOffset ) ; if ( currentOffset == nameOffset ) { return false ; } if ( currentOffset < endOffset ) { ch = data . charAt ( currentOffset ) ; } else { ch = - 1 ; } nameHandle = symbolTable . addSymbol ( data . substring ( nameOffset , currentOffset ) ) ; } addToken ( tokens , XPath . Tokens . EXPRTOKEN_VARIABLE_REFERENCE ) ; starIsMultiplyOperator = true ; tokens . addToken ( prefixHandle ) ; tokens . addToken ( nameHandle ) ; break ; case XPath . Scanner . CHARTYPE_STAR : if ( starIsMultiplyOperator ) { addToken ( tokens , XPath . Tokens . EXPRTOKEN_OPERATOR_MULT ) ; starIsMultiplyOperator = false ; } else { addToken ( tokens , XPath . Tokens . EXPRTOKEN_NAMETEST_ANY ) ; starIsMultiplyOperator = true ; } if ( ( ++ currentOffset ) == endOffset ) { break ; } break ; case XPath . Scanner . CHARTYPE_NONASCII : case XPath . Scanner . CHARTYPE_LETTER : case XPath . Scanner . CHARTYPE_UNDERSCORE : nameOffset = currentOffset ; currentOffset = scanNCName ( data , endOffset , currentOffset ) ; if ( currentOffset == nameOffset ) { return false ; } if ( currentOffset < endOffset ) { ch = data . charAt ( currentOffset ) ; } else { ch = - 1 ; } nameHandle = symbolTable . addSymbol ( data . substring ( nameOffset , currentOffset ) ) ; boolean isNameTestNCName = false ; boolean isAxisName = false ; <START_BUG> prefixHandle = null ; <END_BUG> if ( ch == ':' ) { if ( ( ++ currentOffset ) == endOffset ) { return false ; } ch = data . charAt ( currentOffset ) ; if ( ch == '*' ) { if ( ( ++ currentOffset ) < endOffset ) { ch = data . charAt ( currentOffset ) ; } isNameTestNCName = true ; } else if ( ch == ':' ) { if ( ( ++ currentOffset ) < endOffset ) { ch = data . charAt ( currentOffset ) ; } isAxisName = true ; } else { prefixHandle = nameHandle ; nameOffset = currentOffset ; currentOffset = scanNCName ( data , endOffset , currentOffset ) ; if ( currentOffset == nameOffset ) { return false ; } if ( currentOffset < endOffset ) { ch = data . charAt ( currentOffset ) ; } else { ch = - 1 ; } nameHandle = symbolTable . addSymbol ( data . substring ( nameOffset , currentOffset ) ) ; } } while ( ( ( ( ch == '<seq2seq4repair_space>' ) || ( ch == 10 ) ) || ( ch == 9 ) ) || ( ch == 13 ) ) { if ( ( ++ currentOffset ) == endOffset ) { break ; } ch = data . charAt ( currentOffset ) ; } if ( starIsMultiplyOperator ) { if ( nameHandle == ( fAndSymbol ) ) { addToken ( tokens , XPath . Tokens . EXPRTOKEN_OPERATOR_AND ) ; starIsMultiplyOperator = false ; } else if ( nameHandle == ( fOrSymbol ) ) { addToken ( tokens , XPath . Tokens . EXPRTOKEN_OPERATOR_OR ) ; starIsMultiplyOperator = false ; } else if ( nameHandle == ( fModSymbol ) ) { addToken ( tokens , XPath . Tokens . EXPRTOKEN_OPERATOR_MOD ) ; starIsMultiplyOperator = false ; } else if ( nameHandle == ( fDivSymbol ) ) { addToken ( tokens , XPath . Tokens . EXPRTOKEN_OPERATOR_DIV ) ; starIsMultiplyOperator = false ; } else { return false ; } if ( isNameTestNCName ) { return false ; }

Fix:
prefixHandle = "" ;