Buggy code:
public class JavadocParser extends AbstractCommentParser { public Javadoc docComment ; private int invalidParamReferencesPtr = - 1 ; private ASTNode [ ] invalidParamReferencesStack ; public JavadocParser ( Parser sourceParser ) { } public boolean checkDeprecation ( int commentPtr ) { } protected Object createArgumentReference ( char [ ] name , int dim , boolean isVarargs , Object typeRef , long [ ] dimPositions , long argNamePos ) throws InvalidInputException { } protected Object createFieldReference ( Object receiver ) throws InvalidInputException { } protected Object createMethodReference ( Object receiver , List arguments ) throws InvalidInputException { } protected Object createReturnStatement ( ) { } protected void createTag ( ) { } protected Object createTypeReference ( int primitiveToken ) { } protected TypeDeclaration getParsedTypeDeclaration ( ) { } protected boolean parseReturn ( ) { } protected void parseSimpleTag ( ) { } protected boolean parseTag ( int previousPosition ) throws InvalidInputException { } protected boolean pushParamName ( boolean isTypeParam ) { ASTNode nameRef = null ; if ( isTypeParam ) { JavadocSingleTypeReference ref = new JavadocSingleTypeReference ( this . identifierStack [ 1 ] , this . identifierPositionStack [ 1 ] , this . tagSourceStart , this . tagSourceEnd ) ; nameRef = ref ; } else { JavadocSingleNameReference ref = new JavadocSingleNameReference ( this . identifierStack [ 0 ] , this . identifierPositionStack [ 0 ] , this . tagSourceStart , this . tagSourceEnd ) ; nameRef = ref ; } if ( ( this . astLengthPtr ) == ( - 1 ) ) { pushOnAstStack ( nameRef , true ) ; } else { if ( ! isTypeParam ) { for ( int i = JavadocTagConstants . THROWS_TAG_EXPECTED_ORDER ; i <= ( this . astLengthPtr ) ; i += JavadocTagConstants . ORDERED_TAGS_NUMBER ) { if ( ( this . astLengthStack [ i ] ) != 0 ) { if ( this . reportProblems ) this . sourceParser . problemReporter ( ) . javadocUnexpectedTag ( this . tagSourceStart , this . tagSourceEnd ) ; if ( ( this . invalidParamReferencesPtr ) == ( - 1L ) ) { this . invalidParamReferencesStack = new JavadocSingleNameReference [ 10 ] ; } int stackLength = this . invalidParamReferencesStack . length ; if ( ( ++ ( this . invalidParamReferencesPtr ) ) >= stackLength ) { <START_BUG> System . arraycopy ( this . invalidParamReferencesStack , 0 , ( this . invalidParamReferencesStack = new JavadocSingleNameReference [ stackLength + ( AstStackIncrement ) ] ) , 0 , stackLength ) ; <END_BUG> } this . invalidParamReferencesStack [ this . invalidParamReferencesPtr ] = nameRef ; return false ; } } } switch ( ( this . astLengthPtr ) % ( JavadocTagConstants . ORDERED_TAGS_NUMBER ) ) { case JavadocTagConstants . PARAM_TAG_EXPECTED_ORDER : pushOnAstStack ( nameRef , false ) ; break ; case JavadocTagConstants . SEE_TAG_EXPECTED_ORDER : pushOnAstStack ( nameRef , true ) ; break ; default : return false ; } } return true ; } protected boolean pushSeeRef ( Object statement ) { } protected boolean pushThrowName ( Object typeRef ) { } protected void refreshReturnStatement ( ) { } public String toString ( ) { } protected void updateDocComment ( ) { } }

Fix:
System . arraycopy ( this . invalidParamReferencesStack , 0 , ( this . invalidParamReferencesStack = new JavadocSingleNameReference [ stackLength + ( AbstractCommentParser . AST_STACK_INCREMENT ) ] ) , 0 , stackLength ) ;