Buggy code:
public class CompletionParser extends AssistParser { public int cursorLocation ; public char [ ] [ ] labels ; boolean betweenNewAndLeftBraket ; boolean betweenCatchAndRightParen ; boolean completionBehindDot ; int [ ] invocationTypeStack = new int [ Parser . StackIncrement ] ; int [ ] qualifierStack = new int [ Parser . StackIncrement ] ; static final int EXPLICIT_RECEIVER = 0 ; static final int NO_RECEIVER = - 1 ; static final int SUPER_RECEIVER = - 2 ; static final int NAME_RECEIVER = - 3 ; static final int ALLOCATION = - 4 ; static final int QUALIFIED_ALLOCATION = - 5 ; int invocationType ; int qualifier ; int labelCounterPtr ; int [ ] labelCounterStack = new int [ Parser . StackIncrement ] ; int blockInvocationPtr ; int [ ] blockInvocationStack = new int [ Parser . StackIncrement ] ; int lastModifiers = AccDefault ; int lastModifiersStart = - 1 ; public CompletionParser ( ProblemReporter problemReporter , boolean assertMode ) { } public char [ ] assistIdentifier ( ) { } protected void attachOrphanCompletionNode ( ) { } public int bodyEnd ( AbstractMethodDeclaration method ) { } public int bodyEnd ( Initializer initializer ) { } private boolean checkCatchClause ( ) { } private boolean checkClassInstanceCreation ( ) { } private boolean checkClassLiteralAccess ( ) { } private boolean checkInvocation ( ) { } private boolean checkMemberAccess ( ) { } private boolean checkNameCompletion ( ) { } private boolean checkRecoveredMethod ( ) { } private boolean checkRecoveredType ( ) { } public void completionIdentifierCheck ( ) { } protected void consumeCaseLabel ( ) { } protected void consumeConditionalExpression ( int op ) { } protected void consumeConstructorBody ( ) { } protected void consumeConstructorHeader ( ) { } protected void consumeConstructorHeaderName ( ) { } protected void consumeFieldAccess ( boolean isSuperAccess ) { } protected void consumeFormalParameter ( ) { } protected void consumeMethodHeaderName ( ) { } protected void consumeMethodBody ( ) { } protected void consumeMethodHeader ( ) { } protected void consumeModifiers ( ) { } protected void consumeNestedMethod ( ) { } protected void consumeStatementLabel ( ) { } protected void consumeToken ( int token ) { } private boolean containsCompletionNode ( AstNode ast ) { } public ImportReference createAssistImportReference ( char [ ] [ ] tokens , long [ ] positions ) { } public ImportReference createAssistPackageReference ( char [ ] [ ] tokens , long [ ] positions ) { } public NameReference createQualifiedAssistNameReference ( char [ ] [ ] previousIdentifiers , char [ ] name , long [ ] positions ) { } public TypeReference createQualifiedAssistTypeReference ( char [ ] [ ] previousIdentifiers , char [ ] name , long [ ] positions ) { } public NameReference createSingleAssistNameReference ( char [ ] name , long position ) { } public TypeReference createSingleAssistTypeReference ( char [ ] name , long position ) { } public CompilationUnitDeclaration dietParse ( ICompilationUnit sourceUnit , CompilationResult compilationResult , int cursorLocation ) { } public void flushAssistState ( ) { } protected NameReference getUnspecifiedReferenceOptimized ( ) { } private boolean hasCompletionInformation ( AstNode ast ) { } public void initialize ( ) { } private void initializeForBlockStatements ( ) { } public void initializeScanner ( ) { } private boolean isAfterArrayType ( ) { } private boolean isEmptyNameCompletion ( ) { } public CompilationUnitDeclaration parse ( ICompilationUnit sourceUnit , CompilationResult compilationResult , int cursorLocation ) { } protected void prepareForBlockStatements ( ) { } protected void pushBlockInvocationPtr ( ) { try { this . blockInvocationStack [ ( ++ ( this . blockInvocationPtr ) ) ] = ( this . invocationPtr ) + 1 ; } catch ( IndexOutOfBoundsException e ) { int oldStackLength = this . blockInvocationStack . length ; <START_BUG> int [ ] oldStack = this . labelCounterStack ; <END_BUG> this . blockInvocationStack = new int [ oldStackLength + ( Parser . StackIncrement ) ] ; System . arraycopy ( oldStack , 0 , this . blockInvocationStack , 0 , oldStackLength ) ; this . blockInvocationStack [ this . blockInvocationPtr ] = ( this . invocationPtr ) + 1 ; } } private void pushCompletionOnMemberAccessOnExpressionStack ( boolean isSuperAccess ) { } protected void pushNewLabelCounter ( ) { } protected void pushOnInvocationStacks ( int invocationType , int qualifierExprPtr ) { } public void recordCompletionOnReference ( ) { } protected void reportSyntaxError ( int act , int currentKind , int stateStackTop ) { } public void reset ( ) { } public void resetAfterCompletion ( ) { } protected boolean resumeAfterRecovery ( ) { } public void setAssistIdentifier ( char [ ] assistIdent ) { } private void storeLabelsIfNeeded ( ) { } protected void updateRecoveryState ( ) { } protected LocalDeclaration createLocalDeclaration ( Expression initialization , char [ ] name , int sourceStart , int sourceEnd ) { } protected FieldDeclaration createFieldDeclaration ( Expression initialization , char [ ] name , int sourceStart , int sourceEnd ) { } }

Fix:
int [ ] oldStack = this . blockInvocationStack ;