Buggy code:
; public static char [ ] asb = null ; public static char [ ] asr = null ; public static char [ ] symbol_index = null ; private static final String UNEXPECTED_EOF = "Unexpected<seq2seq4repair_space>End<seq2seq4repair_space>Of<seq2seq4repair_space>File" ; public static final String [ ] name = new String [ ] { null , "++" , "--" , "==" , "<=" , ">=" , "!=" , "<<" , ">>" , ">>>" , "+=" , "-=" , "*=" , "//=" , "&=" , "|=" , "^=" , "%=" , "<<=" , ">>=" , ">>>=" , "||" , "&&" , "+" , "-" , "!" , "%" , "^" , "&" , "*" , "|" , "~" , "//" , ">" , "<" , "(" , ")" , "{" , "}" , "[" , "]" , ";" , "?" , ":" , "," , "." , "=" , "" , "$empty" , "Identifier" , "abstract" , "assert" , "boolean" , "break" , "byte" , "case" , "catch" , "char" , "class" , "continue" , "default" , "do" , "double" , "else" , "extends" , "false" , "final" , "finally" , "float" , "for" , "if" , "implements" , "import" , "instanceof" , "int" , "interface" , "long" , "native" , "new" , "null" , "package" , "private" , "protected" , "public" , "return" , "short" , "static" , "strictfp" , "super" , "switch" , "synchronized" , "this" , "throw" , "throws" , "transient" , "true" , "try" , "void" , "volatile" , "while" , "IntegerLiteral" , "LongLiteral" , "FloatingPointLiteral" , "DoubleLiteral" , "CharacterLiteral" , "StringLiteral" , Parser . UNEXPECTED_EOF , "Invalid<seq2seq4repair_space>Character" , "Goal" , "MethodBody" , "ConstructorBody" , "StaticInitializer" , "Initializer" , "Headers" , "BlockStatements" , "MethodPushModifiersHeader" , "CatchHeader" , "FieldDeclaration" , "ImportDeclaration" , "PackageDeclaration" , "TypeDeclaration" , "GenericMethodDeclaration" , "ClassBodyDeclaration" , "Expression" , "Type" , "PrimitiveType" , "ReferenceType" , "ClassOrInterfaceType" , "ArrayType" , "Name" , "Dims" , "ClassType" , "SimpleName" , "Header" , "ClassHeader" , "InterfaceHeader" , "MethodHeader" , "ConstructorHeader" , "FormalParameter" , "ImportDeclarations" , "TypeDeclarations" , "PackageDeclarationName" , "SingleTypeImportDeclarationName" , "TypeImportOnDemandDeclarationName" , "Modifiers" , "Modifier" , "ClassBody" , "ClassHeaderName" , "InterfaceTypeList" , "InterfaceType" , "ClassBodyDeclarations" , "Block" , "VariableDeclarators" , "VariableDeclarator" , "VariableDeclaratorId" , "VariableInitializer" , "ArrayInitializer" , "MethodHeaderName" , "MethodHeaderParameters" , "MethodPushModifiersHeaderName" , "ClassTypeList" , "ConstructorHeaderName" , "FormalParameterList" , "ClassTypeElt" , "StaticOnly" , "ExplicitConstructorInvocation" , "Primary" , "InterfaceBody" , "InterfaceHeaderName" , "InterfaceMemberDeclarations" , "InterfaceMemberDeclaration" , "VariableInitializers" , "BlockStatement" , "Statement" , "LocalVariableDeclaration" , "StatementWithoutTrailingSubstatement" , "StatementNoShortIf" , "StatementExpression" , "PostIncrementExpression" , "PostDecrementExpression" , "MethodInvocation" , "ClassInstanceCreationExpression" , "SwitchBlock" , "SwitchBlockStatements" , "SwitchLabels" , "SwitchBlockStatement" , "SwitchLabel" , "ConstantExpression" , "StatementExpressionList" , "OnlySynchronized" , "Catches" , "Finally" , "CatchClause" , "PushLPAREN" , "PushRPAREN" , "PrimaryNoNewArray" , "FieldAccess" , "ArrayAccess" , "ClassInstanceCreationExpressionName" , "ArgumentList" , "DimWithOrWithOutExprs" , "DimWithOrWithOutExpr" , "DimsLoop" , "OneDimLoop" , "PostfixExpression" , "UnaryExpression" , "UnaryExpressionNotPlusMinus" , "MultiplicativeExpression" , "AdditiveExpression" , "ShiftExpression" , "RelationalExpression" , "EqualityExpression" , "AndExpression" , "ExclusiveOrExpression" , "InclusiveOrExpression" , "ConditionalAndExpression" , "ConditionalOrExpression" , "ConditionalExpression" , "AssignmentExpression" , "LeftHandSide" , "AssignmentOperator" } ; public static short [ ] check_table = null ; public static char [ ] lhs = null ; public static char [ ] action = Parser . lhs ; private static final String FILEPREFIX = "parser" ; 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 Parser ( ProblemReporter problemReporter , boolean optimizeStringLiterals , boolean assertMode ) { } protected void adjustInterfaceModifiers ( ) { } public final void arrayInitializer ( int length ) { ArrayInitializer ai = new ArrayInitializer ( ) ; if ( length != 0 ) { expressionPtr -= length ; System . arraycopy ( expressionStack , ( ( expressionPtr ) + 1 ) , ( ai . expressions = new Expression [ length ] ) , 0 , length ) ; } pushOnExpressionStack ( ai ) ; ai . sourceEnd = endStatementPosition ; <START_BUG> int searchPosition = ( length == 0 ) ? endPosition : ai . expressions [ 0 ] . sourceStart ; <END_BUG> try { while ( ( scanner . source [ ( -- searchPosition ) ] ) != '{' ) { } } catch ( IndexOutOfBoundsException ex ) { searchPosition = ( length == 0 ? endPosition : ai . expressions [ 0 ] . sourceStart ) - 1 ; } ai . sourceStart = searchPosition ; } protected static int asi ( int state ) { } protected void blockReal ( ) { } private static final void buildFileFor ( String filename , String tag , String [ ] tokens , boolean isShort ) throws IOException { } private static final void buildFileForTable ( String filename , char [ ] chars ) throws IOException { } public static final void buildFilesFromLPG ( String dataFilename ) throws IOException { } public RecoveredElement buildInitialRecoveryState ( ) { }

Fix:
int searchPosition = ( length == 0 ) ? ( endPosition ) + 1 : ai . expressions [ 0 ] . sourceStart ;