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 consumeExitVariableWithInitialization ( ) { } protected void consumeFieldAccess ( boolean isSuperAccess ) { } protected void consumeFormalParameter ( ) { } protected void consumeMethodHeaderName ( ) { if ( ( this . indexOfAssistIdentifier ( ) ) < 0 ) { super . consumeMethodHeaderName ( ) ; } else { <START_BUG> CompletionOnMethodName md = new CompletionOnMethodName ( ) ; <END_BUG> md . selector = identifierStack [ identifierPtr ] ; long selectorSource = identifierPositionStack [ ( ( identifierPtr ) -- ) ] ; ( identifierLengthPtr ) -- ; md . returnType = getTypeReference ( intStack [ ( ( intPtr ) -- ) ] ) ; md . declarationSourceStart = intStack [ ( ( intPtr ) -- ) ] ; md . modifiers = intStack [ ( ( intPtr ) -- ) ] ; md . sourceStart = ( ( int ) ( selectorSource > > > 32 ) ) ; md . selectorEnd = ( ( int ) ( selectorSource ) ) ; pushOnAstStack ( md ) ; md . sourceEnd = lParenPos ; md . bodyStart = ( lParenPos ) + 1 ; listLength = 0 ; this . assistNode = md ; this . lastCheckPoint = md . sourceEnd ; if ( ( currentElement ) != null ) { if ( ( ( currentElement ) instanceof RecoveredType ) || ( ( scanner . searchLineNumber ( md . returnType . sourceStart ) ) == ( scanner . searchLineNumber ( md . sourceStart ) ) ) ) { lastCheckPoint = md . bodyStart ; currentElement = currentElement . add ( md , 0 ) ; lastIgnoredToken = - 1 ; } else { lastCheckPoint = md . sourceStart ; restartRecovery = true ; } } } } 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 ( ) { } 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:
CompletionOnMethodName md = new CompletionOnMethodName ( this . compilationUnit . compilationResult ) ;