Buggy code:
i ++ ) tempStack [ i ] = stack [ i ] ; act = Parser . tAction ( act , tok ) ; while ( act <= ( ParserBasicInformation . NUM_RULES ) ) { do { tempStackTop -= ( Parser . rhs [ act ] ) - 1 ; act = Parser . ntAction ( tempStack [ tempStackTop ] , Parser . lhs [ act ] ) ; } while ( act <= ( ParserBasicInformation . NUM_RULES ) ) ; if ( ( ( tempStackTop ) + 1 ) >= ( stackLength ) ) reallocateStacks ( ) ; pos = ( pos < ( tempStackTop ) ) ? pos : tempStackTop ; tempStack [ ( ( tempStackTop ) + 1 ) ] = act ; act = Parser . tAction ( act , tok ) ; } while ( ( act > ( ParserBasicInformation . ERROR_ACTION ) ) || ( act < ( ParserBasicInformation . ACCEPT_ACTION ) ) ) { nextStackTop = ( tempStackTop ) + 1 ; for ( int i = next_pos + 1 ; i <= ( nextStackTop ) ; i ++ ) nextStack [ i ] = tempStack [ i ] ; for ( int i = pos + 1 ; i <= ( nextStackTop ) ; i ++ ) { locationStack [ i ] = locationStack [ stateStackTop ] ; locationStartStack [ i ] = locationStartStack [ stateStackTop ] ; } if ( act > ( ParserBasicInformation . ERROR_ACTION ) ) { act -= ParserBasicInformation . ERROR_ACTION ; do { nextStackTop -= ( Parser . rhs [ act ] ) - 1 ; act = Parser . ntAction ( nextStack [ nextStackTop ] , Parser . lhs [ act ] ) ; } while ( act <= ( ParserBasicInformation . NUM_RULES ) ) ; pos = ( pos < ( nextStackTop ) ) ? pos : nextStackTop ; } if ( ( ( nextStackTop ) + 1 ) >= ( stackLength ) ) reallocateStacks ( ) ; tempStackTop = nextStackTop ; nextStack [ ( ++ ( nextStackTop ) ) ] = act ; next_pos = nextStackTop ; currentToken = lexStream . getToken ( ) ; tok = lexStream . kind ( currentToken ) ; act = Parser . tAction ( act , tok ) ; while ( act <= ( ParserBasicInformation . NUM_RULES ) ) { do { int lhs_symbol = Parser . lhs [ act ] ; if ( DiagnoseParser . DEBUG ) { System . out . println ( Parser . name [ Parser . non_terminal_index [ lhs_symbol ] ] ) ; } tempStackTop -= ( Parser . rhs [ act ] ) - 1 ; act = ( ( tempStackTop ) > next_pos ) ? tempStack [ tempStackTop ] : nextStack [ tempStackTop ] ; act = Parser . ntAction ( act , lhs_symbol ) ; } while ( act <= ( ParserBasicInformation . NUM_RULES ) ) ; if ( ( ( tempStackTop ) + 1 ) >= ( stackLength ) ) reallocateStacks ( ) ; next_pos = ( next_pos < ( tempStackTop ) ) ? next_pos : tempStackTop ; tempStack [ ( ( tempStackTop ) + 1 ) ] = act ; act = Parser . tAction ( act , tok ) ; } if ( act != ( ParserBasicInformation . ERROR_ACTION ) ) { prevStackTop = stateStackTop ; for ( int i = prev_pos + 1 ; i <= ( prevStackTop ) ; i ++ ) prevStack [ i ] = stack [ i ] ; prev_pos = pos ; stateStackTop = nextStackTop ; for ( int i = pos + 1 ; i <= ( stateStackTop ) ; i ++ ) stack [ i ] = nextStack [ i ] ; locationStack [ stateStackTop ] = currentToken ; locationStartStack [ stateStackTop ] = lexStream . start ( currentToken ) ; pos = next_pos ; } } if ( act == ( ParserBasicInformation . ERROR_ACTION ) ) { DiagnoseParser . RepairCandidate candidate = errorRecovery ( currentToken , forceRecoveryAfterLBracketMissing ) ; forceRecoveryAfterLBracketMissing = false ; if ( parser . reportOnlyOneSyntaxError ) { return ; } if ( ( this . parser . problemReporter ( ) . options . maxProblemsPerUnit ) < ( this . parser . compilationUnit . compilationResult . problemCount ) ) { <START_BUG> if ( ( this . recoveryScanner ) == null ) <END_BUG> return ; this . reportProblem = false ; } act = stack [ stateStackTop ] ; if ( ( candidate . symbol ) == 0 ) { break ; } else if ( ( candidate . symbol ) > ( ParserBasicInformation . NT_OFFSET ) ) { int lhs_symbol = ( candidate . symbol ) - ( ParserBasicInformation . NT_OFFSET ) ; if ( DiagnoseParser . DEBUG ) { System . out . println ( Parser . name [ Parser . non_terminal_index [ lhs_symbol ] ] ) ; } act = Parser . ntAction ( act , lhs_symbol ) ; while ( act <= ( ParserBasicInformation . NUM_RULES ) ) { stateStackTop -= ( Parser . rhs [ act ] ) - 1 ; act = Parser . ntAction ( stack [ stateStackTop ] , Parser . lhs [ act ] ) ; } stack [ ( ++ ( stateStackTop ) ) ] = act ; currentToken = lexStream . getToken ( ) ; tok = lexStream . kind ( currentToken ) ; locationStack [ stateStackTop ] = currentToken ; locationStartStack [ stateStackTop ] = lexStream . start ( currentToken ) ; } else { tok = candidate . symbol ; locationStack [ stateStackTop ] = candidate . location ; locationStartStack [ stateStackTop ] = lexStream . start ( candidate . location ) ; } } } while ( act != ( ParserBasicInformation . ACCEPT_ACTION ) ) ; } finally { if ( ( this . recoveryScanner ) != null ) { this . recoveryScanner . record = oldRecord ; } } return ; }

Fix:
if ( ( ( this . recoveryScanner ) == null ) || ( ! ( this . recoveryScanner . record ) ) )