Buggy code:
public class CompilationUnitStructureRequestor extends ReferenceInfoAdapter implements ISourceElementRequestor { protected ICompilationUnit unit ; protected CompilationUnitElementInfo unitInfo ; protected JavaElementInfo importContainerInfo = null ; protected Map newElements ; private HashtableOfObjectToInt occurenceCounts ; protected Stack infoStack ; protected HashMap children ; protected Stack handleStack ; protected int referenceCount = 0 ; protected boolean hasSyntaxErrors = false ; protected Parser parser ; protected static byte [ ] NO_BYTES = new byte [ ] { } ; protected HashtableOfObject fieldRefCache ; protected HashtableOfObject messageRefCache ; protected HashtableOfObject typeRefCache ; protected HashtableOfObject unknownRefCache ; protected CompilationUnitStructureRequestor ( ICompilationUnit unit , CompilationUnitElementInfo unitInfo , Map newElements ) { } public void acceptImport ( int declarationStart , int declarationEnd , char [ ] [ ] tokens , boolean onDemand , int modifiers ) { } public void acceptLineSeparatorPositions ( int [ ] positions ) { } public void acceptPackage ( ImportReference importReference ) { } public void acceptProblem ( CategorizedProblem problem ) { } private void addToChildren ( JavaElementInfo parentInfo , JavaElement handle ) { } protected Annotation createAnnotation ( JavaElement parent , String name ) { } protected SourceField createField ( JavaElement parent , ISourceElementRequestor . FieldInfo fieldInfo ) { } protected ImportContainer createImportContainer ( ICompilationUnit parent ) { } protected ImportDeclaration createImportDeclaration ( ImportContainer parent , String name , boolean onDemand ) { } protected Initializer createInitializer ( JavaElement parent ) { } protected SourceMethod createMethod ( JavaElement parent , ISourceElementRequestor . MethodInfo methodInfo ) { } protected PackageDeclaration createPackageDeclaration ( JavaElement parent , String name ) { } protected SourceType createType ( JavaElement parent , ISourceElementRequestor . TypeInfo typeInfo ) { } protected TypeParameter createTypeParameter ( JavaElement parent , String name ) { } protected static String [ ] convertTypeNamesToSigs ( char [ ] [ ] typeNames ) { } protected IAnnotation enterAnnotation ( org . eclipse . jdt . internal . compiler . ast . Annotation annotation , AnnotatableInfo parentInfo , JavaElement parentHandle ) { } public void enterCompilationUnit ( ) { } public void enterConstructor ( ISourceElementRequestor . MethodInfo methodInfo ) { } public void enterField ( ISourceElementRequestor . FieldInfo fieldInfo ) { } public void enterInitializer ( int declarationSourceStart , int modifiers ) { } public void enterMethod ( ISourceElementRequestor . MethodInfo methodInfo ) { } public void enterType ( ISourceElementRequestor . TypeInfo typeInfo ) { JavaElementInfo parentInfo = ( ( JavaElementInfo ) ( this . infoStack . peek ( ) ) ) ; JavaElement parentHandle = ( ( JavaElement ) ( this . handleStack . peek ( ) ) ) ; <START_BUG> SourceType handle = this . createType ( parentHandle , typeInfo ) ; <END_BUG> resolveDuplicates ( handle ) ; SourceTypeElementInfo info = ( typeInfo . anonymousMember ) ? new SourceTypeElementInfo ( ) { public boolean isAnonymousMember ( ) { return true ; } } : new SourceTypeElementInfo ( ) ; info . setHandle ( handle ) ; info . setSourceRangeStart ( typeInfo . declarationStart ) ; info . setFlags ( typeInfo . modifiers ) ; info . setNameSourceStart ( typeInfo . nameSourceStart ) ; info . setNameSourceEnd ( typeInfo . nameSourceEnd ) ; JavaModelManager manager = JavaModelManager . getJavaModelManager ( ) ; char [ ] superclass = typeInfo . superclass ; info . setSuperclassName ( ( superclass == null ? null : manager . intern ( superclass ) ) ) ; char [ ] [ ] superinterfaces = typeInfo . superinterfaces ; for ( int i = 0 , length = ( superinterfaces == null ) ? 0 : superinterfaces . length ; i < length ; i ++ ) superinterfaces [ i ] = manager . intern ( superinterfaces [ i ] ) ; info . setSuperInterfaceNames ( superinterfaces ) ; info . addCategories ( handle , typeInfo . categories ) ; if ( ( parentHandle . getElementType ( ) ) == ( IJavaElement . TYPE ) ) ( ( SourceTypeElementInfo ) ( parentInfo ) ) . addCategories ( handle , typeInfo . categories ) ; addToChildren ( parentInfo , handle ) ; this . newElements . put ( handle , info ) ; this . infoStack . push ( info ) ; this . handleStack . push ( handle ) ; if ( ( typeInfo . typeParameters ) != null ) { for ( int i = 0 , length = typeInfo . typeParameters . length ; i < length ; i ++ ) { ISourceElementRequestor . TypeParameterInfo typeParameterInfo = typeInfo . typeParameters [ i ] ; enterTypeParameter ( typeParameterInfo ) ; exitMember ( typeParameterInfo . declarationEnd ) ; } } if ( ( typeInfo . annotations ) != null ) { int length = typeInfo . annotations . length ; this . unitInfo . annotationNumber += length ; for ( int i = 0 ; i < length ; i ++ ) { org . eclipse . jdt . internal . compiler . ast . Annotation annotation = typeInfo . annotations [ i ] ; enterAnnotation ( annotation , info , handle ) ; exitMember ( annotation . declarationSourceEnd ) ; } } } protected void enterTypeParameter ( ISourceElementRequestor . TypeParameterInfo typeParameterInfo ) { } public void exitCompilationUnit ( int declarationEnd ) { } public void exitConstructor ( int declarationEnd ) { } public void exitField ( int initializationStart , int declarationEnd , int declarationSourceEnd ) { } public void exitInitializer ( int declarationEnd ) { } protected void exitMember ( int declarationEnd ) { } public void exitMethod ( int declarationEnd , Expression defaultValue ) { } public void exitType ( int declarationEnd ) { } protected void resolveDuplicates ( SourceRefElement handle ) { } protected IMemberValuePair getMemberValuePair ( MemberValuePair memberValuePair ) { } protected IMemberValuePair [ ] getMemberValuePairs ( MemberValuePair [ ] memberValuePairs ) { } protected Object getMemberValue ( MemberValuePair memberValuePair , Expression expression ) { } private void setChildren ( JavaElementInfo info ) { } }

Fix:
SourceType handle = createType ( parentHandle , typeInfo ) ;