Buggy code:
protected ClassFileInfo getClassFileInfo ( ) throws JavaModelException { } public IType getDeclaringType ( ) { } public Object getElementInfo ( IProgressMonitor monitor ) throws JavaModelException { } public int getElementType ( ) { } public IField getField ( String fieldName ) { } public IField [ ] getFields ( ) throws JavaModelException { } public int getFlags ( ) throws JavaModelException { } public String getFullyQualifiedName ( ) { } public String getFullyQualifiedName ( char enclosingTypeSeparator ) { } public String getFullyQualifiedParameterizedName ( ) throws JavaModelException { } public IJavaElement getHandleFromMemento ( String token , MementoTokenizer memento , WorkingCopyOwner workingCopyOwner ) { } public IInitializer getInitializer ( int count ) { } public IInitializer [ ] getInitializers ( ) { } public String getKey ( boolean forceOpen ) throws JavaModelException { } public IMethod getMethod ( String selector , String [ ] parameterTypeSignatures ) { } public IMethod [ ] getMethods ( ) throws JavaModelException { } public IPackageFragment getPackageFragment ( ) { } public String getSuperclassTypeSignature ( ) throws JavaModelException { } public String getSourceFileName ( IBinaryType info ) { } public String getSuperclassName ( ) throws JavaModelException { } public String [ ] getSuperInterfaceNames ( ) throws JavaModelException { } public String [ ] getSuperInterfaceTypeSignatures ( ) throws JavaModelException { } public ITypeParameter [ ] getTypeParameters ( ) throws JavaModelException { } public String [ ] getTypeParameterSignatures ( ) throws JavaModelException { } public IType getType ( String typeName ) { } public ITypeParameter getTypeParameter ( String typeParameterName ) { } public String getTypeQualifiedName ( ) { } public String getTypeQualifiedName ( char enclosingTypeSeparator ) { } public IType [ ] getTypes ( ) throws JavaModelException { } public boolean isAnonymous ( ) throws JavaModelException { } public boolean isClass ( ) throws JavaModelException { } public boolean isEnum ( ) throws JavaModelException { } public boolean isInterface ( ) throws JavaModelException { } public boolean isAnnotation ( ) throws JavaModelException { } public boolean isLocal ( ) throws JavaModelException { } public boolean isMember ( ) throws JavaModelException { } public boolean isResolved ( ) { } public ITypeHierarchy loadTypeHierachy ( InputStream input , IProgressMonitor monitor ) throws JavaModelException { } public ITypeHierarchy loadTypeHierachy ( InputStream input , WorkingCopyOwner owner , IProgressMonitor monitor ) throws JavaModelException { } public ITypeHierarchy newSupertypeHierarchy ( IProgressMonitor monitor ) throws JavaModelException { } public ITypeHierarchy newSupertypeHierarchy ( ICompilationUnit [ ] workingCopies , IProgressMonitor monitor ) throws JavaModelException { } public ITypeHierarchy newSupertypeHierarchy ( IWorkingCopy [ ] workingCopies , IProgressMonitor monitor ) throws JavaModelException { } public ITypeHierarchy newSupertypeHierarchy ( WorkingCopyOwner owner , IProgressMonitor monitor ) throws JavaModelException { } public ITypeHierarchy newTypeHierarchy ( IJavaProject project , IProgressMonitor monitor ) throws JavaModelException { } public ITypeHierarchy newTypeHierarchy ( IJavaProject project , WorkingCopyOwner owner , IProgressMonitor monitor ) throws JavaModelException { } public ITypeHierarchy newTypeHierarchy ( IProgressMonitor monitor ) throws JavaModelException { } public ITypeHierarchy newTypeHierarchy ( ICompilationUnit [ ] workingCopies , IProgressMonitor monitor ) throws JavaModelException { } public ITypeHierarchy newTypeHierarchy ( IWorkingCopy [ ] workingCopies , IProgressMonitor monitor ) throws JavaModelException { } public ITypeHierarchy newTypeHierarchy ( WorkingCopyOwner owner , IProgressMonitor monitor ) throws JavaModelException { } public JavaElement resolved ( Binding binding ) { } public String [ ] [ ] resolveType ( String typeName ) { } public String [ ] [ ] resolveType ( String typeName , WorkingCopyOwner owner ) { } public String sourceFileName ( IBinaryType info ) { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info , boolean showResolvedInfo ) { } protected void toStringName ( StringBuffer buffer ) { } public String getAttachedJavadoc ( IProgressMonitor monitor ) throws JavaModelException { } public String getJavadocContents ( IProgressMonitor monitor ) throws JavaModelException { JavaModelManager . PerProjectInfo projectInfo = JavaModelManager . getJavaModelManager ( ) . getPerProjectInfoCheckExistence ( this . getJavaProject ( ) . getProject ( ) ) ; String cachedJavadoc = null ; synchronized ( projectInfo . javadocCache ) { cachedJavadoc = ( ( String ) ( projectInfo . javadocCache . get ( this ) ) ) ; } if ( ( cachedJavadoc != null ) && ( cachedJavadoc != ( BinaryType . EMPTY_JAVADOC ) ) ) { return cachedJavadoc ; } <START_BUG> String option = this . getJavaProject ( ) . getOption ( ENABLE_JAVADOC_ATTACHMENTS , true ) ; <END_BUG> if ( JavaCore . DISABLED . equals ( option ) ) { return null ; } URL baseLocation = getJavadocBaseLocation ( ) ; if ( baseLocation == null ) { return null ; } StringBuffer pathBuffer = new StringBuffer ( baseLocation . toExternalForm ( ) ) ; if ( ! ( ( pathBuffer . charAt ( ( ( pathBuffer . length ( ) ) - 1 ) ) ) == '//' ) ) { pathBuffer . append ( '//' ) ; } IPackageFragment pack = this . getPackageFragment ( ) ; String typeQualifiedName = null ; if ( this . isMember ( ) ) { IType currentType = this ; StringBuffer typeName = new StringBuffer ( ) ; while ( currentType != null ) { typeName . insert ( 0 , currentType . getElementName ( ) ) ; currentType = currentType . getDeclaringType ( ) ; if ( currentType != null ) { typeName . insert ( 0 , '.' ) ; } } typeQualifiedName = new String ( typeName . toString ( ) ) ; } else { typeQualifiedName = this . getElementName ( ) ; } pathBuffer . append ( pack . getElementName ( ) . replace ( '.' , '//' ) ) . append ( '//' ) . append ( typeQualifiedName ) . append ( JavadocConstants . HTML_EXTENSION ) ; if ( ( monitor != null ) && ( monitor . isCanceled ( ) ) ) throw new OperationCanceledException ( ) ; final String contents = getURLContents ( String . valueOf ( pathBuffer ) ) ; synchronized ( projectInfo . javadocCache ) { projectInfo . javadocCache . put ( this , contents ) ; } return contents ; } }

Fix:
String option = this . getJavaProject ( ) . getOption ( ENABLE_JAVADOC_ATTACHMENTS_ACCESSES , true ) ;