Buggy code:
public class SelectionParser extends AssistParser { public int selectionStart ; public int selectionEnd ; public static final char [ ] SUPER = "super" . toCharArray ( ) ; public static final char [ ] THIS = "this" . toCharArray ( ) ; public SelectionParser ( ProblemReporter problemReporter ) { } public char [ ] assistIdentifier ( ) { } protected void attachOrphanCompletionNode ( ) { } private boolean checkRecoveredType ( ) { } protected void classInstanceCreation ( boolean hasClassBody ) { } protected void consumeArrayCreationExpressionWithoutInitializer ( ) { } protected void consumeArrayCreationExpressionWithInitializer ( ) { } protected void consumeClassInstanceCreationExpressionQualifiedWithTypeArguments ( ) { } protected void consumeClassInstanceCreationExpressionWithTypeArguments ( ) { } protected void consumeEnterAnonymousClassBody ( ) { } protected void consumeEnterVariable ( ) { } protected void consumeExitVariableWithInitialization ( ) { } protected void consumeFieldAccess ( boolean isSuperAccess ) { } protected void consumeFormalParameter ( boolean isVarArgs ) { if ( ( this . indexOfAssistIdentifier ( ) ) < 0 ) { super . consumeFormalParameter ( isVarArgs ) ; if ( ( ( ! ( diet ) ) || ( ( dietInt ) != 0 ) ) && ( ( astPtr ) > ( - 1 ) ) ) { Argument argument = ( ( Argument ) ( astStack [ astPtr ] ) ) ; if ( ( argument . type ) == ( assistNode ) ) { isOrphanCompletionNode = true ; this . restartRecovery = true ; this . lastIgnoredToken = - 1 ; } } } else { ( identifierLengthPtr ) -- ; char [ ] identifierName = identifierStack [ identifierPtr ] ; long namePositions = identifierPositionStack [ ( ( identifierPtr ) -- ) ] ; int extendedDimensions = this . intStack [ ( ( this . intPtr ) -- ) ] ; int endOfEllipsis = 0 ; if ( isVarArgs ) { endOfEllipsis = this . intStack [ ( ( this . intPtr ) -- ) ] ; } int firstDimensions = this . intStack [ ( ( this . intPtr ) -- ) ] ; final int typeDimensions = firstDimensions + extendedDimensions ; TypeReference type = getTypeReference ( typeDimensions ) ; if ( isVarArgs ) { <START_BUG> type = type . copyDims ( ( typeDimensions + 1 ) ) ; <END_BUG> if ( extendedDimensions == 0 ) { type . sourceEnd = endOfEllipsis ; } type . bits |= ASTNode . IsVarArgs ; } int modifierPositions = intStack [ ( ( intPtr ) -- ) ] ; ( intPtr ) -- ; Argument arg = new SelectionOnArgumentName ( identifierName , namePositions , type , ( ( intStack [ ( ( intPtr ) + 1 ) ] ) & ( ~ ( AccDeprecated ) ) ) ) ; arg . declarationSourceStart = modifierPositions ; pushOnAstStack ( arg ) ; assistNode = arg ; this . lastCheckPoint = ( ( int ) ( namePositions ) ) ; isOrphanCompletionNode = true ; if ( ! ( diet ) ) { this . restartRecovery = true ; this . lastIgnoredToken = - 1 ; } ( listLength ) ++ ; } } protected void consumeInstanceOfExpression ( int op ) { } protected void consumeInstanceOfExpressionWithName ( int op ) { } protected void consumeLocalVariableDeclarationStatement ( ) { } protected void consumeMarkerAnnotation ( ) { } protected void consumeMemberValuePair ( ) { } protected void consumeMethodInvocationName ( ) { } protected void consumeMethodInvocationPrimary ( ) { } protected void consumeNormalAnnotation ( ) { } protected void consumeSingleMemberAnnotation ( ) { } protected void consumeStaticImportOnDemandDeclarationName ( ) { } protected void consumeTypeImportOnDemandDeclarationName ( ) { } public ImportReference createAssistImportReference ( char [ ] [ ] tokens , long [ ] positions , int mod ) { } public ImportReference createAssistPackageReference ( char [ ] [ ] tokens , long [ ] positions ) { } protected LocalDeclaration createLocalDeclaration ( char [ ] assistName , int sourceStart , int sourceEnd ) { } public NameReference createQualifiedAssistNameReference ( char [ ] [ ] previousIdentifiers , char [ ] assistName , long [ ] positions ) { } public TypeReference createQualifiedAssistTypeReference ( char [ ] [ ] previousIdentifiers , char [ ] assistName , long [ ] positions ) { } public TypeReference createParameterizedQualifiedAssistTypeReference ( char [ ] [ ] tokens , TypeReference [ ] [ ] typeArguments , char [ ] assistname , TypeReference [ ] assistTypeArguments , long [ ] positions ) { } public NameReference createSingleAssistNameReference ( char [ ] assistName , long position ) { } public TypeReference createSingleAssistTypeReference ( char [ ] assistName , long position ) { } public TypeReference createParameterizedSingleAssistTypeReference ( TypeReference [ ] typeArguments , char [ ] assistName , long position ) { } public CompilationUnitDeclaration dietParse ( ICompilationUnit sourceUnit , CompilationResult compilationResult , int start , int end ) { } protected NameReference getUnspecifiedReference ( ) { } protected NameReference getUnspecifiedReferenceOptimized ( ) { } public void initializeScanner ( ) { } protected MessageSend newMessageSend ( ) { } protected MessageSend newMessageSendWithTypeArguments ( ) { } public CompilationUnitDeclaration parse ( ICompilationUnit sourceUnit , CompilationResult compilationResult , int start , int end ) { } protected boolean resumeAfterRecovery ( ) { } public void selectionIdentifierCheck ( ) { } public void setAssistIdentifier ( char [ ] assistIdent ) { } protected void updateRecoveryState ( ) { } public String toString ( ) { } }

Fix:
type = copyDims ( type , ( typeDimensions + 1 ) ) ;