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 , boolean assertMode ) { } public char [ ] assistIdentifier ( ) { } protected void attachOrphanCompletionNode ( ) { } private boolean checkRecoveredType ( ) { } protected void classInstanceCreation ( boolean alwaysQualified ) { } protected void consumeArrayCreationExpression ( ) { } protected void consumeEnterAnonymousClassBody ( ) { if ( ( this . indexOfAssistIdentifier ( ) ) < 0 ) { super . consumeEnterAnonymousClassBody ( ) ; return ; } QualifiedAllocationExpression alloc ; <START_BUG> AnonymousLocalTypeDeclaration anonymousType = new AnonymousLocalTypeDeclaration ( ) ; <END_BUG> alloc = anonymousType . allocation = new SelectionOnQualifiedAllocationExpression ( anonymousType ) ; markCurrentMethodWithLocalType ( ) ; pushOnAstStack ( anonymousType ) ; alloc . sourceEnd = rParenPos ; int argumentLength ; if ( ( argumentLength = expressionLengthStack [ ( ( expressionLengthPtr ) -- ) ] ) != 0 ) { expressionPtr -= argumentLength ; System . arraycopy ( expressionStack , ( ( expressionPtr ) + 1 ) , ( alloc . arguments = new Expression [ argumentLength ] ) , 0 , argumentLength ) ; } char [ ] oldIdent = this . assistIdentifier ( ) ; this . setAssistIdentifier ( null ) ; alloc . type = getTypeReference ( 0 ) ; this . setAssistIdentifier ( oldIdent ) ; anonymousType . sourceEnd = alloc . sourceEnd ; anonymousType . sourceStart = anonymousType . declarationSourceStart = alloc . type . sourceStart ; alloc . sourceStart = intStack [ ( ( intPtr ) -- ) ] ; pushOnExpressionStack ( alloc ) ; assistNode = alloc ; this . lastCheckPoint = ( alloc . sourceEnd ) + 1 ; if ( ! ( diet ) ) { this . restartRecovery = true ; this . lastIgnoredToken = - 1 ; } this . isOrphanCompletionNode = true ; anonymousType . bodyStart = scanner . currentPosition ; listLength = 0 ; if ( ( currentElement ) != null ) { lastCheckPoint = anonymousType . bodyStart ; currentElement = currentElement . add ( anonymousType , 0 ) ; lastIgnoredToken = - 1 ; } } protected void consumeEnterVariable ( ) { } protected void consumeExitVariableWithInitialization ( ) { } protected void consumeFieldAccess ( boolean isSuperAccess ) { } protected void consumeMethodInvocationName ( ) { } protected void consumeMethodInvocationPrimary ( ) { } protected void consumeTypeImportOnDemandDeclarationName ( ) { } 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 selectionStart , int selectionEnd ) { } protected NameReference getUnspecifiedReference ( ) { } protected NameReference getUnspecifiedReferenceOptimized ( ) { } public void initializeScanner ( ) { } protected MessageSend newMessageSend ( ) { } public CompilationUnitDeclaration parse ( ICompilationUnit sourceUnit , CompilationResult compilationResult , int selectionStart , int selectionEnd ) { } protected boolean resumeAfterRecovery ( ) { } public void selectionIdentifierCheck ( ) { } public void setAssistIdentifier ( char [ ] assistIdent ) { } protected void updateRecoveryState ( ) { } }

Fix:
AnonymousLocalTypeDeclaration anonymousType = new AnonymousLocalTypeDeclaration ( this . compilationUnit . compilationResult ) ;