Buggy code:
public class ClassFile extends Openable implements IClassFile , SuffixConstants { protected String name ; protected BinaryType binaryType = null ; protected ClassFile ( PackageFragment parent , String nameWithoutExtension ) { } public ICompilationUnit becomeWorkingCopy ( IProblemRequestor problemRequestor , WorkingCopyOwner owner , IProgressMonitor monitor ) throws JavaModelException { } protected boolean buildStructure ( OpenableElementInfo info , IProgressMonitor pm , Map newElements , IResource underlyingResource ) throws JavaModelException { IStatus status = validateClassFile ( ) ; if ( ! ( status . isOK ( ) ) ) throw newJavaModelException ( status ) ; if ( ( underlyingResource != null ) && ( ! ( underlyingResource . isAccessible ( ) ) ) ) throw newNotPresentException ( ) ; IBinaryType typeInfo = getBinaryTypeInfo ( ( ( IFile ) ( underlyingResource ) ) ) ; if ( typeInfo == null ) { info . setChildren ( new IJavaElement [ ] { } ) ; return false ; } <START_BUG> IType type = new BinaryType ( this , ClassFile . simpleName ( typeInfo . getName ( ) ) ) ; <END_BUG> info . setChildren ( new IJavaElement [ ] { type } ) ; newElements . put ( type , typeInfo ) ; ( ( ClassFileInfo ) ( info ) ) . readBinaryChildren ( this , ( ( HashMap ) ( newElements ) ) , typeInfo ) ; return true ; } public void codeComplete ( int offset , ICompletionRequestor requestor ) throws JavaModelException { } public void codeComplete ( int offset , ICompletionRequestor requestor , WorkingCopyOwner owner ) throws JavaModelException { } public void codeComplete ( int offset , CompletionRequestor requestor ) throws JavaModelException { } public void codeComplete ( int offset , CompletionRequestor requestor , WorkingCopyOwner owner ) throws JavaModelException { } public IJavaElement [ ] codeSelect ( int offset , int length ) throws JavaModelException { } public IJavaElement [ ] codeSelect ( int offset , int length , WorkingCopyOwner owner ) throws JavaModelException { } protected Object createElementInfo ( ) { } public boolean equals ( Object o ) { } public boolean exists ( ) { } public boolean existsUsingJarTypeCache ( ) { } protected IJavaElement findElement ( IJavaElement elt , int position , SourceMapper mapper ) { } public String getAttachedJavadoc ( IProgressMonitor monitor ) throws JavaModelException { } public IBinaryType getBinaryTypeInfo ( IFile file ) throws JavaModelException { } private IBinaryType getJarBinaryTypeInfo ( PackageFragment pkg ) throws IOException , CoreException , ClassFormatException { } public IBuffer getBuffer ( ) throws JavaModelException { } public IClassFile getClassFile ( ) { } public IResource getCorrespondingResource ( ) throws JavaModelException { } public IJavaElement getElementAt ( int position ) throws JavaModelException { } public IJavaElement getElementAtConsideringSibling ( int position ) throws JavaModelException { } public String getElementName ( ) { } public int getElementType ( ) { } public IJavaElement getHandleFromMemento ( String token , MementoTokenizer memento , WorkingCopyOwner owner ) { } protected char getHandleMementoDelimiter ( ) { } public IPath getPath ( ) { } public IResource getResource ( ) { } public String getSource ( ) throws JavaModelException { } public ISourceRange getSourceRange ( ) throws JavaModelException { } public String getTopLevelTypeName ( ) { } public IType getType ( ) { } public String getTypeName ( ) { } public ICompilationUnit getWorkingCopy ( WorkingCopyOwner owner , IProgressMonitor monitor ) throws JavaModelException { } public IJavaElement getWorkingCopy ( IProgressMonitor monitor , IBufferFactory factory ) throws JavaModelException { } protected boolean hasBuffer ( ) { } public int hashCode ( ) { } public boolean isClass ( ) throws JavaModelException { } public boolean isInterface ( ) throws JavaModelException { } public boolean isReadOnly ( ) { } private IStatus validateClassFile ( ) { } protected IBuffer openBuffer ( IProgressMonitor pm , Object info ) throws JavaModelException { } private IBuffer mapSource ( SourceMapper mapper , IBinaryType info ) { } static String simpleName ( char [ ] className ) { } public static char [ ] translatedName ( char [ ] name ) { } static char [ ] [ ] translatedNames ( char [ ] [ ] names ) { } static char [ ] unqualifiedName ( char [ ] className ) { } public void codeComplete ( int offset , final ICodeCompletionRequestor requestor ) throws JavaModelException { } }

Fix:
IType type = getType ( ) ;