Buggy code:
public class SourceElementParser extends Parser { ISourceElementRequestor requestor ; private int fieldCount ; private int localIntPtr ; private int lastFieldEndPosition ; private ISourceType sourceType ; private boolean reportReferenceInfo ; private char [ ] [ ] typeNames ; private char [ ] [ ] superTypeNames ; private int nestedTypeIndex ; private static final char [ ] JAVA_LANG_OBJECT = "java.lang.Object" . toCharArray ( ) ; public SourceElementParser ( final ISourceElementRequestor requestor , IProblemFactory problemFactory ) { } protected void classInstanceCreation ( boolean alwaysQualified ) { } protected void consumeConstructorHeaderName ( ) { } protected void consumeExitVariableWithInitialization ( ) { } protected void consumeExitVariableWithoutInitialization ( ) { } protected void consumeFieldAccess ( boolean isSuperAccess ) { } protected void consumeMethodHeaderName ( ) { } protected void consumeMethodInvocationName ( ) { } protected void consumeMethodInvocationPrimary ( ) { } protected void consumeMethodInvocationSuper ( ) { } protected void consumeSingleTypeImportDeclarationName ( ) { } protected void consumeTypeImportOnDemandDeclarationName ( ) { } protected FieldDeclaration createFieldDeclaration ( Expression initialization , char [ ] name , int sourceStart , int sourceEnd ) { } protected CompilationUnitDeclaration endParse ( int act ) { } public int flushAnnotationsDefinedPriorTo ( int position ) { } public TypeReference getTypeReference ( int dim ) { } public NameReference getUnspecifiedReference ( ) { } public NameReference getUnspecifiedReferenceOptimized ( ) { } private boolean isLocalDeclaration ( ) { } public void notifySourceElementRequestor ( ) { } public void notifySourceElementRequestor ( AbstractMethodDeclaration methodDeclaration ) { } public void notifySourceElementRequestor ( FieldDeclaration fieldDeclaration ) { } public void notifySourceElementRequestor ( ImportReference importReference , boolean isPackage ) { } public void notifySourceElementRequestor ( TypeDeclaration typeDeclaration , boolean notifyTypePresence ) { } public void parseCompilationUnit ( ICompilationUnit unit , int start , int end , boolean needReferenceInfo ) { } public void parseCompilationUnit ( ICompilationUnit unit , boolean needReferenceInfo ) { } public void parseTypeMemberDeclarations ( ISourceType sourceType , ICompilationUnit sourceUnit , int start , int end , boolean needReferenceInfo ) { boolean old = diet ; try { diet = ! needReferenceInfo ; reportReferenceInfo = needReferenceInfo ; CompilationResult compilationUnitResult = new CompilationResult ( sourceUnit , 0 , 0 ) ; <START_BUG> CompilationUnitDeclaration unit = SourceTypeConverter . buildCompilationUnit ( sourceType , false , false , problemReporter ( ) , compilationUnitResult ) ; <END_BUG> if ( ( ( unit == null ) || ( ( unit . types ) == null ) ) || ( ( unit . types . length ) != 1 ) ) return ; this . sourceType = sourceType ; try { initialize ( ) ; goForClassBodyDeclarations ( ) ; scanner . setSourceBuffer ( sourceUnit . getContents ( ) ) ; int sourceLength = scanner . source . length ; scanner . resetTo ( start , end ) ; referenceContext = compilationUnit = unit ; pushOnAstStack ( unit . types [ 0 ] ) ; parse ( ) ; } finally { unit = compilationUnit ; compilationUnit = null ; } } catch ( AbortCompilation e ) { } finally { if ( scanner . recordLineSeparator ) { requestor . acceptLineSeparatorPositions ( scanner . lineEnds ( ) ) ; } diet = old ; } } private char [ ] returnTypeName ( TypeReference type ) { } private TypeReference typeReference ( int dim , int localIdentifierPtr , int localIdentifierLengthPtr ) { } }

Fix:
CompilationUnitDeclaration unit = SourceTypeConverter . buildCompilationUnit ( new ISourceType [ ] { sourceType } , false , false , problemReporter ( ) , compilationUnitResult ) ;