Buggy code:
protected boolean optimizeStringLiterals = true ; protected CompilerOptions options ; protected ProblemReporter problemReporter ; protected int rBraceStart ; protected int rBraceEnd ; protected int rBraceSuccessorStart ; protected int realBlockPtr ; protected int [ ] realBlockStack ; protected int recoveredStaticInitializerStart ; public ReferenceContext referenceContext ; public boolean reportOnlyOneSyntaxError = false ; public boolean reportSyntaxErrorIsRequired = true ; protected boolean restartRecovery ; protected boolean methodRecoveryActivated = false ; protected boolean statementRecoveryActivated = false ; protected TypeDeclaration [ ] recoveredTypes ; protected int recoveredTypePtr ; protected int nextTypeStart ; public RecoveryScanner recoveryScanner ; public Scanner scanner ; protected int [ ] stack = new int [ Parser . StackIncrement ] ; protected int stateStackTop ; protected int synchronizedBlockSourceStart ; protected int [ ] variablesCounter ; protected boolean checkExternalizeStrings ; protected boolean recordStringLiterals ; public Javadoc javadoc ; public JavadocParser javadocParser ; protected int lastJavadocEnd ; public static int asi ( int state ) { } public static final short base_check ( int i ) { } private static final void buildFile ( String filename , List listToDump ) throws IOException { } private static final String [ ] buildFileForName ( String filename , String contents ) throws IOException { } private static void buildFileForReadableName ( String file , char [ ] newLhs , char [ ] newNonTerminalIndex , String [ ] newName , String [ ] tokens ) throws IOException { } private static void buildFilesForRecoveryTemplates ( String indexFilename , String templatesFilename , char [ ] newTerminalIndex , char [ ] newNonTerminalIndex , String [ ] newName , char [ ] newLhs , String [ ] tokens ) throws IOException { } private static void buildFilesForStatementsRecoveryFilter ( String filename , char [ ] newNonTerminalIndex , char [ ] newLhs , String [ ] tokens ) throws IOException { } private static void buildFileForCompliance ( String file , int length , String [ ] tokens ) throws IOException { } private static final void buildFileForTable ( String filename , byte [ ] bytes ) throws IOException { } private static final void buildFileForTable ( String filename , char [ ] chars ) throws IOException { } private static final byte [ ] buildFileOfByteFor ( String filename , String tag , String [ ] tokens ) throws IOException { } private static final char [ ] buildFileOfIntFor ( String filename , String tag , String [ ] tokens ) throws IOException { } private static final void buildFileOfShortFor ( String filename , String tag , String [ ] tokens ) throws IOException { } public static final void buildFilesFromLPG ( String dataFilename , String dataFilename2 ) throws IOException { } public static int in_symbol ( int state ) { } public static final void initTables ( ) throws IOException { } public static int nasi ( int state ) { } public static int ntAction ( int state , int sym ) { } protected static int original_state ( int state ) { } protected static int [ ] computeReverseTable ( char [ ] newTerminalIndex , char [ ] newNonTerminalIndex , String [ ] newName ) { } private static int getSymbol ( String terminalName , String [ ] newName , int [ ] newReverse ) { } protected static byte [ ] readByteTable ( String filename ) throws IOException { } protected static String [ ] readNameTable ( String filename ) throws IOException { } protected static String [ ] readReadableNameTable ( String filename ) { } protected static char [ ] readTable ( String filename ) throws IOException { InputStream stream = Parser . class . getResourceAsStream ( filename ) ; if ( stream == null ) { throw new IOException ( Messages . bind ( Messages . parser_missingFile , filename ) ) ; } byte [ ] bytes = null ; try { stream = new BufferedInputStream ( stream ) ; bytes = Util . getInputStreamAsByteArray ( stream , ( - 1 ) ) ; } finally { try { stream . close ( ) ; } catch ( IOException e ) { } } int length = bytes . length ; <START_BUG> if ( ( length % 2 ) != 0 ) <END_BUG> throw new IOException ( Messages . bind ( Messages . parser_corruptedFile , filename ) ) ; char [ ] chars = new char [ length // 2 ] ; int i = 0 ; int charIndex = 0 ; while ( true ) { chars [ ( charIndex ++ ) ] = ( ( char ) ( ( ( ( bytes [ ( i ++ ) ] ) & 255 ) << 8 ) + ( ( bytes [ ( i ++ ) ] ) & 255 ) ) ) ; if ( i == length ) break ; } return chars ; } protected static long [ ] readLongTable ( String filename ) throws IOException { } public static int tAction ( int state , int sym ) { } public Parser ( ProblemReporter problemReporter , boolean optimizeStringLiterals ) { } protected void annotationRecoveryCheckPoint ( int start , int end ) { } public void arrayInitializer ( int length ) { } protected void blockReal ( ) { } public RecoveredElement buildInitialRecoveryState ( ) { } protected void checkAndSetModifiers ( int flag ) { } public void checkComment ( ) { } protected void checkNonNLSAfterBodyEnd ( int declarationEnd ) { } protected void classInstanceCreation ( boolean isQualified ) { } protected void concatExpressionLists ( ) { } protected void concatGenericsLists ( ) { } protected void concatNodeLists ( ) { } protected void consumeAdditionalBound ( ) { } protected void consumeAdditionalBound1 ( ) { } protected void consumeAdditionalBoundList ( ) { } protected void consumeAdditionalBoundList1 ( ) { } protected void consumeAllocationHeader ( ) { } protected void consumeAnnotationAsModifier ( ) { } protected void consumeAnnotationName ( ) { } protected void consumeAnnotationTypeDeclaration ( ) { } protected void consumeAnnotationTypeDeclarationHeader ( ) { } protected void consumeAnnotationTypeDeclarationHeaderName ( ) { }

Fix:
if ( ( length & 1 ) != 0 )