Buggy code:
; static final char [ ] charArray_u = new char [ ] { 'u' } ; static final char [ ] charArray_v = new char [ ] { 'v' } ; static final char [ ] charArray_w = new char [ ] { 'w' } ; static final char [ ] charArray_x = new char [ ] { 'x' } ; static final char [ ] charArray_y = new char [ ] { 'y' } ; static final char [ ] charArray_z = new char [ ] { 'z' } ; static final char [ ] initCharArray = new char [ ] { '' , '' , '' , '' , '' , '' } ; static final int TableSize = 30 ; static final int InternalTableSize = 6 ; public static final int OptimizedLength = 6 ; public final char [ ] [ ] [ ] [ ] charArray_length = new char [ Scanner . OptimizedLength ] [ Scanner . TableSize ] [ Scanner . InternalTableSize ] [ ] ; int currentLineNr = - 1 ; int previousLineNr = - 1 ; NLSLine currentLine = null ; List lines = new ArrayList ( ) ; public static final String TAG_PREFIX = "////$NON-NLS-" ; public static final int TAG_PREFIX_LENGTH = Scanner . TAG_PREFIX . length ( ) ; public static final String TAG_POSTFIX = "$" ; public static final int TAG_POSTFIX_LENGTH = Scanner . TAG_POSTFIX . length ( ) ; public StringLiteral [ ] nonNLSStrings = null ; public boolean checkNonExternalizedStringLiterals = true ; public boolean wasNonExternalizedStringLiteral = false ; static int newEntry2 = 0 ; static int newEntry3 = 0 ; static int newEntry4 = 0 ; static int newEntry5 = 0 ; static int newEntry6 = 0 ; public static final int RoundBracket = 0 ; public static final int SquareBracket = 1 ; public static final int CurlyBracket = 2 ; public static final int BracketKinds = 3 ; public Scanner ( ) { } public Scanner ( boolean tokenizeComments , boolean tokenizeWhiteSpace ) { } public final boolean atEnd ( ) { } public char [ ] getCurrentIdentifierSource ( ) { } public final char [ ] getCurrentTokenSource ( ) { } public final char [ ] getCurrentTokenSourceString ( ) { } public final int getLineEnd ( int lineNumber ) { } public final int getLineStart ( int lineNumber ) { } public final boolean getNextChar ( char testedChar ) { } public final int getNextChar ( char testedChar1 , char testedChar2 ) { } public final boolean getNextCharAsDigit ( ) { } public final boolean getNextCharAsDigit ( int radix ) { } public boolean getNextCharAsJavaIdentifierPart ( ) { } public int getNextToken ( ) throws InvalidInputException { } public final void getNextUnicodeChar ( ) throws IndexOutOfBoundsException , InvalidInputException { } public final void jumpOverMethodBody ( ) { } public final boolean jumpOverUnicodeWhiteSpace ( ) throws InvalidInputException { } public final int [ ] lineEnds ( ) { } final char [ ] optimizedCurrentTokenSource1 ( ) { } final char [ ] optimizedCurrentTokenSource2 ( ) { } final char [ ] optimizedCurrentTokenSource3 ( ) { } final char [ ] optimizedCurrentTokenSource4 ( ) { } final char [ ] optimizedCurrentTokenSource5 ( ) { } final char [ ] optimizedCurrentTokenSource6 ( ) { } public final void pushLineSeparator ( ) throws InvalidInputException { } public final void pushUnicodeLineSeparator ( ) { } public final void recordComment ( boolean isJavadoc ) { } public void resetTo ( int begin , int end ) { } public final void scanEscapeCharacter ( ) throws InvalidInputException { } public int scanIdentifierOrKeyword ( ) throws InvalidInputException { } public int scanNumber ( boolean dotPrefix ) throws InvalidInputException { } public final int searchLineNumber ( int position ) { } public final void setSourceBuffer ( char [ ] sourceString ) { } public String toString ( ) { } public final String toStringAction ( int act ) { } public Scanner ( boolean tokenizeComments , boolean tokenizeWhiteSpace , boolean checkNonExternalizedStringLiterals ) { } public Scanner ( boolean tokenizeComments , boolean tokenizeWhiteSpace , boolean checkNonExternalizedStringLiterals , boolean assertMode ) { } private void checkNonExternalizeString ( ) throws InvalidInputException { } private void parseTags ( NLSLine line ) throws InvalidInputException { String s = new String ( getCurrentTokenSource ( ) ) ; int pos = s . indexOf ( Scanner . TAG_PREFIX ) ; int lineLength = line . size ( ) ; while ( pos != ( - 1 ) ) { int start = pos + ( Scanner . TAG_PREFIX_LENGTH ) ; int end = s . indexOf ( Scanner . TAG_POSTFIX , start ) ; String index = s . substring ( start , end ) ; int i = 0 ; try { i = ( Integer . parseInt ( index ) ) - 1 ; } catch ( NumberFormatException e ) { i = - 1 ; } if ( line . exists ( i ) ) { line . set ( i , null ) ; } pos = s . indexOf ( Scanner . TAG_PREFIX , start ) ; } this . nonNLSStrings = new StringLiteral [ lineLength ] ; int nonNLSCounter = 0 ; for ( Iterator iterator = line . iterator ( ) ; iterator . hasNext ( ) ; ) { StringLiteral literal = ( ( StringLiteral ) ( iterator . next ( ) ) ) ; if ( literal != null ) { this . nonNLSStrings [ ( nonNLSCounter ++ ) ] = literal ; } } if ( nonNLSCounter == 0 ) { this . nonNLSStrings = null ; currentLine = null ; return ; } <START_BUG> wasNonExternalizedStringLiteral = true ; <END_BUG> if ( nonNLSCounter != lineLength ) { System . arraycopy ( this . nonNLSStrings , 0 , ( this . nonNLSStrings = new StringLiteral [ nonNLSCounter ] ) , 0 , nonNLSCounter ) ; } currentLine = null ; } }

Fix:
this . wasNonExternalizedStringLiteral = true ;