Buggy code:
public class CodeSnippetParser extends Parser implements EvaluationConstants { int codeSnippetStart ; int codeSnippetEnd ; boolean hasRecoveredOnExpression ; int problemCountBeforeRecovery = 0 ; int lastStatement = - 1 ; EvaluationContext evaluationContext ; public CodeSnippetParser ( ProblemReporter problemReporter , EvaluationContext evaluationContext , boolean optimizeStringLiterals , boolean assertMode , int codeSnippetStart , int codeSnippetEnd ) { } protected void classInstanceCreation ( boolean alwaysQualified ) { } protected void consumeClassDeclaration ( ) { } protected void consumeClassHeaderName ( ) { } protected void consumeEmptyStatement ( ) { } protected void consumeExpressionStatement ( ) { } protected void consumeFieldAccess ( boolean isSuperAccess ) { } protected void consumeInterfaceHeaderName ( ) { } protected void consumeLocalVariableDeclarationStatement ( ) { } protected void consumeMethodDeclaration ( boolean isNotAbstract ) { } protected void consumeMethodInvocationName ( ) { } protected void consumeMethodInvocationSuper ( ) { } protected void consumePrimaryNoNewArrayThis ( ) { } protected void consumeStatementBreak ( ) { } protected void consumeStatementBreakWithLabel ( ) { } protected void consumeStatementCatch ( ) { } protected void consumeStatementContinue ( ) { } protected void consumeStatementContinueWithLabel ( ) { } protected void consumeStatementDo ( ) { } protected void consumeStatementFor ( ) { } protected void consumeStatementIfNoElse ( ) { } protected void consumeStatementIfWithElse ( ) { } protected void consumeStatementLabel ( ) { } protected void consumeStatementReturn ( ) { } protected void consumeStatementSwitch ( ) { } protected void consumeStatementSynchronized ( ) { } protected void consumeStatementThrow ( ) { } protected void consumeStatementTry ( boolean arg_0 ) { } protected void consumeStatementWhile ( ) { } protected CompilationUnitDeclaration endParse ( int act ) { } protected NameReference getUnspecifiedReference ( ) { } protected NameReference getUnspecifiedReferenceOptimized ( ) { } protected void ignoreExpressionAssignment ( ) { } private boolean isTopLevelType ( ) { } protected MessageSend newMessageSend ( ) { } private void recordLastStatementIfNeeded ( ) { } protected void reportSyntaxError ( int act , int currentKind , int stateStackTop ) { } protected boolean resumeOnSyntaxError ( ) { if ( ( this . diet ) || ( this . hasRecoveredOnExpression ) ) { return super . resumeOnSyntaxError ( ) ; } this . problemCountBeforeRecovery = this . compilationUnit . compilationResult . problemCount ; if ( ( this . lastStatement ) < 0 ) { this . lastStatement = this . codeSnippetStart ; } this . scanner . initialPosition = this . lastStatement ; this . scanner . startPosition = this . lastStatement ; this . scanner . currentPosition = this . lastStatement ; <START_BUG> this . scanner . eofPosition = ( this . codeSnippetEnd ) + 1 ; <END_BUG> this . scanner . commentPtr = - 1 ; this . expressionPtr = - 1 ; this . identifierPtr = - 1 ; this . identifierLengthPtr = - 1 ; goForExpression ( ) ; this . hasRecoveredOnExpression = true ; this . hasReportedError = false ; return true ; } }

Fix:
this . scanner . eofPosition = ( ( this . codeSnippetEnd ) < ( Integer . MAX_VALUE ) ) ? ( this . codeSnippetEnd ) + 1 : this . codeSnippetEnd ;