Buggy code:
public abstract class Openable extends JavaElement implements IBufferChangedListener , IOpenable { protected Openable ( JavaElement parent , String name ) { } public void bufferChanged ( BufferChangedEvent event ) { } protected abstract boolean buildStructure ( OpenableElementInfo info , IProgressMonitor pm , Map newElements , IResource underlyingResource ) throws JavaModelException { } public boolean canBeRemovedFromCache ( ) { } public boolean canBufferBeRemovedFromCache ( IBuffer buffer ) { } protected void closeBuffer ( ) { } protected void closing ( Object info ) throws JavaModelException { } protected void codeComplete ( ICompilationUnit cu , ICompilationUnit unitToSkip , int position , ICompletionRequestor requestor , WorkingCopyOwner owner ) throws JavaModelException { } protected IJavaElement [ ] codeSelect ( ICompilationUnit cu , int offset , int length , WorkingCopyOwner owner ) throws JavaModelException { } protected Object createElementInfo ( ) { } protected void generateInfos ( Object info , HashMap newElements , IProgressMonitor monitor ) throws JavaModelException { } public IBuffer getBuffer ( ) throws JavaModelException { } public IBufferFactory getBufferFactory ( ) { } protected BufferManager getBufferManager ( ) { } public IResource getCorrespondingResource ( ) throws JavaModelException { } public IOpenable getOpenable ( ) { } public IResource getUnderlyingResource ( ) throws JavaModelException { } protected boolean hasBuffer ( ) { } public boolean hasChildren ( ) throws JavaModelException { } public boolean hasUnsavedChanges ( ) throws JavaModelException { } public boolean isConsistent ( ) throws JavaModelException { } public boolean isOpen ( ) { } protected boolean isSourceElement ( ) { } public void makeConsistent ( IProgressMonitor monitor ) throws JavaModelException { } public void open ( IProgressMonitor pm ) throws JavaModelException { } protected IBuffer openBuffer ( IProgressMonitor pm , Object info ) throws JavaModelException { } protected void openParent ( Object childInfo , HashMap newElements , IProgressMonitor pm ) throws JavaModelException { } protected boolean parentExists ( ) { } protected boolean resourceExists ( ) { } public void save ( IProgressMonitor pm , boolean force ) throws JavaModelException { } public PackageFragmentRoot getPackageFragmentRoot ( ) { } protected void codeComplete ( ICompilationUnit cu , ICompilationUnit unitToSkip , int position , final ICodeCompletionRequestor requestor ) throws JavaModelException { if ( requestor == null ) { <START_BUG> codeComplete ( cu , unitToSkip , position , ( ( ICompletionRequestor ) ( null ) ) , DefaultWorkingCopyOwner . PRIMARY ) ; <END_BUG> return ; } codeComplete ( cu , unitToSkip , position , new ICompletionRequestor ( ) { public void acceptAnonymousType ( char [ ] superTypePackageName , char [ ] superTypeName , char [ ] [ ] parameterPackageNames , char [ ] [ ] parameterTypeNames , char [ ] [ ] parameterNames , char [ ] completionName , int modifiers , int completionStart , int completionEnd , int relevance ) { } public void acceptClass ( char [ ] packageName , char [ ] className , char [ ] completionName , int modifiers , int completionStart , int completionEnd , int relevance ) { requestor . acceptClass ( packageName , className , completionName , modifiers , completionStart , completionEnd ) ; } public void acceptError ( IProblem error ) { if ( true ) return ; try { IMarker marker = ResourcesPlugin . getWorkspace ( ) . getRoot ( ) . createMarker ( IJavaModelMarker . TRANSIENT_PROBLEM ) ; marker . setAttribute ( IJavaModelMarker . ID , error . getID ( ) ) ; marker . setAttribute ( IMarker . CHAR_START , error . getSourceStart ( ) ) ; marker . setAttribute ( IMarker . CHAR_END , ( ( error . getSourceEnd ( ) ) + 1 ) ) ; marker . setAttribute ( IMarker . LINE_NUMBER , error . getSourceLineNumber ( ) ) ; marker . setAttribute ( IMarker . MESSAGE , error . getMessage ( ) ) ; marker . setAttribute ( IMarker . SEVERITY , IMarker . SEVERITY_ERROR ) ; requestor . acceptError ( marker ) ; } catch ( CoreException e ) { } } public void acceptField ( char [ ] declaringTypePackageName , char [ ] declaringTypeName , char [ ] name , char [ ] typePackageName , char [ ] typeName , char [ ] completionName , int modifiers , int completionStart , int completionEnd , int relevance ) { requestor . acceptField ( declaringTypePackageName , declaringTypeName , name , typePackageName , typeName , completionName , modifiers , completionStart , completionEnd ) ; } public void acceptInterface ( char [ ] packageName , char [ ] interfaceName , char [ ] completionName , int modifiers , int completionStart , int completionEnd , int relevance ) { requestor . acceptInterface ( packageName , interfaceName , completionName , modifiers , completionStart , completionEnd ) ; } public void acceptKeyword ( char [ ] keywordName , int completionStart , int completionEnd , int relevance ) { requestor . acceptKeyword ( keywordName , completionStart , completionEnd ) ; } public void acceptLabel ( char [ ] labelName , int completionStart , int completionEnd , int relevance ) { requestor . acceptLabel ( labelName , completionStart , completionEnd ) ; } public void acceptLocalVariable ( char [ ] name , char [ ] typePackageName , char [ ] typeName , int modifiers , int completionStart , int completionEnd , int relevance ) { } public void acceptMethod ( char [ ] declaringTypePackageName , char [ ] declaringTypeName , char [ ] selector , char [ ] [ ] parameterPackageNames , char [ ] [ ] parameterTypeNames , char [ ] [ ] parameterNames , char [ ] returnTypePackageName , char [ ] returnTypeName , char [ ] completionName , int modifiers , int completionStart , int completionEnd , int relevance ) { requestor . acceptMethod ( declaringTypePackageName , declaringTypeName , selector , parameterPackageNames , parameterTypeNames , returnTypePackageName , returnTypeName , completionName , modifiers , completionStart , completionEnd ) ; }

Fix:
codeComplete ( cu , unitToSkip , position , null , DefaultWorkingCopyOwner . PRIMARY ) ;