Buggy code:
public Scanner ( ) { } public Scanner ( boolean tokenizeComments , boolean tokenizeWhiteSpace , boolean checkNonExternalizedStringLiterals , long sourceLevel , long complianceLevel , char [ ] [ ] taskTags , char [ ] [ ] taskPriorities , boolean isTaskCaseSensitive ) { } public Scanner ( boolean tokenizeComments , boolean tokenizeWhiteSpace , boolean checkNonExternalizedStringLiterals , long sourceLevel , char [ ] [ ] taskTags , char [ ] [ ] taskPriorities , boolean isTaskCaseSensitive ) { } public final boolean atEnd ( ) { } public void checkTaskTag ( int commentStart , int commentEnd ) throws InvalidInputException { } public char [ ] getCurrentIdentifierSource ( ) { } public int getCurrentTokenEndPosition ( ) { } public final char [ ] getCurrentTokenSource ( ) { } public final String getCurrentTokenString ( ) { } public final char [ ] getCurrentTokenSourceString ( ) { } public final String getCurrentStringLiteral ( ) { } public final char [ ] getRawTokenSource ( ) { } public final char [ ] getRawTokenSourceEnd ( ) { } public int getCurrentTokenStartPosition ( ) { } public final int getLineEnd ( int lineNumber ) { } public final int [ ] getLineEnds ( ) { } public final int getLineStart ( int lineNumber ) { } public final int getNextChar ( ) { } public final boolean getNextChar ( char testedChar ) { } public final int getNextChar ( char testedChar1 , char testedChar2 ) { } public final boolean getNextCharAsDigit ( ) throws InvalidInputException { } public final boolean getNextCharAsDigit ( int radix ) { } public boolean getNextCharAsJavaIdentifierPart ( ) { } public int getNextToken ( ) throws InvalidInputException { } public void getNextUnicodeChar ( ) throws InvalidInputException { } public NLSTag [ ] getNLSTags ( ) { } public char [ ] getSource ( ) { } protected boolean isDigit ( char c ) throws InvalidInputException { } public final void jumpOverMethodBody ( ) { } public final boolean jumpOverUnicodeWhiteSpace ( ) throws InvalidInputException { } final char [ ] optimizedCurrentTokenSource1 ( ) { } final char [ ] optimizedCurrentTokenSource2 ( ) { } final char [ ] optimizedCurrentTokenSource3 ( ) { } final char [ ] optimizedCurrentTokenSource4 ( ) { } final char [ ] optimizedCurrentTokenSource5 ( ) { } final char [ ] optimizedCurrentTokenSource6 ( ) { } private void parseTags ( ) { int position = 0 ; final int currentStartPosition = this . startPosition ; final int currentLinePtr = this . linePtr ; if ( currentLinePtr >= 0 ) { position = ( this . lineEnds [ currentLinePtr ] ) + 1 ; } while ( Character . isWhitespace ( this . source [ position ] ) ) { position ++ ; } if ( currentStartPosition == position ) { return ; } char [ ] s = null ; int sourceEnd = this . currentPosition ; int sourceStart = currentStartPosition ; int sourceDelta = 0 ; if ( ( this . withoutUnicodePtr ) != 0 ) { System . arraycopy ( this . withoutUnicodeBuffer , 1 , ( s = new char [ this . withoutUnicodePtr ] ) , 0 , this . withoutUnicodePtr ) ; sourceEnd = this . withoutUnicodePtr ; sourceStart = 1 ; sourceDelta = currentStartPosition ; } else { s = this . source ; } int pos = CharOperation . indexOf ( Scanner . TAG_PREFIX , s , true , sourceStart , sourceEnd ) ; if ( pos != ( - 1 ) ) { if ( ( this . nlsTags ) == null ) { this . nlsTags = new NLSTag [ 10 ] ; this . nlsTagsPtr = 0 ; } while ( pos != ( - 1 ) ) { int start = pos + ( Scanner . TAG_PREFIX_LENGTH ) ; int end = CharOperation . indexOf ( Scanner . TAG_POSTFIX , s , start , sourceEnd ) ; if ( end != ( - 1 ) ) { NLSTag currentTag = null ; final int currentLine = currentLinePtr + 1 ; try { currentTag = new NLSTag ( ( pos + sourceDelta ) , ( end + sourceDelta ) , currentLine , extractInt ( s , start , end ) ) ; } catch ( NumberFormatException e ) { <START_BUG> currentTag = new NLSTag ( ( pos + currentStartPosition ) , ( currentStartPosition + end ) , currentLine , ( - 1 ) ) ; <END_BUG> } if ( ( this . nlsTagsPtr ) == ( this . nlsTags . length ) ) { System . arraycopy ( this . nlsTags , 0 , ( this . nlsTags = new NLSTag [ ( this . nlsTagsPtr ) + 10 ] ) , 0 , this . nlsTagsPtr ) ; } this . nlsTags [ ( ( this . nlsTagsPtr ) ++ ) ] = currentTag ; } else { end = start ; } pos = CharOperation . indexOf ( Scanner . TAG_PREFIX , s , true , end , sourceEnd ) ; } } } private int extractInt ( char [ ] array , int start , int end ) { } public final void pushLineSeparator ( ) { } public final void pushUnicodeLineSeparator ( ) { } public void recordComment ( int token ) { } public void resetTo ( int begin , int end ) { } public final void scanEscapeCharacter ( ) throws InvalidInputException { } public int scanIdentifierOrKeyword ( ) { } public int scanNumber ( boolean dotPrefix ) throws InvalidInputException { } public final int getLineNumber ( int position ) { } public final void setSource ( char [ ] sourceString ) { } public final void setSource ( char [ ] contents , CompilationResult compilationResult ) { } public final void setSource ( CompilationResult compilationResult ) { } public String toString ( ) { } public String toStringAction ( int act ) { } public void unicodeInitializeBuffer ( int length ) { } public void unicodeStore ( ) { } }

Fix:
currentTag = new NLSTag ( ( pos + sourceDelta ) , ( end + sourceDelta ) , currentLine , ( - 1 ) ) ;