Buggy code:
class CompilationUnitResolver extends Compiler { public CompilationUnitResolver ( INameEnvironment environment , IErrorHandlingPolicy policy , Map settings , ICompilerRequestor requestor , IProblemFactory problemFactory ) { } public void accept ( ISourceType [ ] sourceTypes , PackageBinding packageBinding ) { CompilationResult result = new CompilationResult ( sourceTypes [ 0 ] . getFileName ( ) , 1 , 1 , this . options . maxProblemsPerUnit ) ; <START_BUG> CompilationUnitDeclaration unit = SourceTypeConverter . buildCompilationUnit ( sourceTypes , true , true , false , lookupEnvironment . problemReporter , result ) ; <END_BUG> if ( unit != null ) { this . lookupEnvironment . buildTypeBindings ( unit ) ; this . lookupEnvironment . completeTypeBindings ( unit , true ) ; } } private static Parser createDomParser ( ProblemReporter problemReporter ) { } protected static IErrorHandlingPolicy getHandlingPolicy ( ) { } protected static INameEnvironment getNameEnvironment ( ICompilationUnit sourceUnit ) throws JavaModelException { } protected static INameEnvironment getNameEnvironment ( IJavaProject javaProject ) throws JavaModelException { } protected static ICompilerRequestor getRequestor ( ) { } public void initializeParser ( ) { } protected void handleInternalException ( Throwable internalException , CompilationUnitDeclaration unit , CompilationResult result ) { } protected void handleInternalException ( org . eclipse . jdt . internal . compiler . problem . AbortCompilation abortException , CompilationUnitDeclaration unit ) { } public static CompilationUnitDeclaration resolve ( ICompilationUnit unitElement ) throws JavaModelException { } public static CompilationUnitDeclaration parse ( char [ ] source , Map settings ) { } public static CompilationUnitDeclaration parse ( char [ ] source , NodeSearcher nodeSearcher , Map settings ) { } public static CompilationUnitDeclaration resolve ( char [ ] source , String unitName , IJavaProject javaProject ) throws JavaModelException { } public static CompilationUnitDeclaration resolve ( ICompilationUnit unitElement , NodeSearcher nodeSearcher ) throws JavaModelException { } public static CompilationUnitDeclaration resolve ( char [ ] source , char [ ] [ ] packageName , String unitName , IJavaProject javaProject ) throws JavaModelException { } public void removeUnresolvedBindings ( CompilationUnitDeclaration compilationUnitDeclaration ) { } private void removeUnresolvedBindings ( TypeDeclaration type ) { } public CompilationUnitDeclaration resolve ( org . eclipse . jdt . internal . compiler . env . ICompilationUnit compilationUnit , NodeSearcher nodeSearcher , boolean verifyMethods , boolean analyzeCode , boolean generateCode ) { } public CompilationUnitDeclaration resolve ( org . eclipse . jdt . internal . compiler . env . ICompilationUnit sourceUnit , boolean verifyMethods , boolean analyzeCode , boolean generateCode ) { } public CompilationUnitDeclaration resolve ( CompilationUnitDeclaration unit , org . eclipse . jdt . internal . compiler . env . ICompilationUnit sourceUnit , boolean verifyMethods , boolean analyzeCode , boolean generateCode ) { } }

Fix:
CompilationUnitDeclaration unit = SourceTypeConverter . buildCompilationUnit ( sourceTypes , true , true , true , lookupEnvironment . problemReporter , result ) ;