Buggy code:
class CompilationUnitResolver extends Compiler { static class IntArrayList { public int [ ] list = new int [ 5 ] ; public int length = 0 ; public void add ( int i ) { } } HashtableOfObject requestedSources ; HashtableOfObject requestedKeys ; DefaultBindingResolver . BindingTables bindingTables ; boolean hasCompilationAborted ; private IProgressMonitor monitor ; public CompilationUnitResolver ( INameEnvironment environment , IErrorHandlingPolicy policy , CompilerOptions compilerOptions , ICompilerRequestor requestor , IProblemFactory problemFactory , IProgressMonitor monitor ) { } public void accept ( ISourceType [ ] sourceTypes , PackageBinding packageBinding , AccessRestriction accessRestriction ) { } protected void beginToCompile ( ICompilationUnit [ ] sourceUnits , String [ ] bindingKeys ) { } IBinding createBinding ( String key ) { } public static CompilationUnit convert ( CompilationUnitDeclaration compilationUnitDeclaration , char [ ] source , int apiLevel , Map options , boolean needToResolveBindings , WorkingCopyOwner owner , DefaultBindingResolver . BindingTables bindingTables , int flags , IProgressMonitor monitor ) { } protected static CompilerOptions getCompilerOptions ( Map options , boolean statementsRecovery ) { } protected static IErrorHandlingPolicy getHandlingPolicy ( ) { } protected static ICompilerRequestor getRequestor ( ) { } public void initializeParser ( ) { } public void process ( CompilationUnitDeclaration unit , int i ) { } protected void handleInternalException ( Throwable internalException , CompilationUnitDeclaration unit , CompilationResult result ) { } protected void handleInternalException ( org . eclipse . jdt . internal . compiler . problem . AbortCompilation abortException , CompilationUnitDeclaration unit ) { } public static void parse ( org . eclipse . jdt . core . ICompilationUnit [ ] compilationUnits , ASTRequestor astRequestor , int apiLevel , Map options , int flags , IProgressMonitor monitor ) { } public static CompilationUnitDeclaration parse ( ICompilationUnit sourceUnit , NodeSearcher nodeSearcher , Map settings , int flags ) { if ( sourceUnit == null ) { throw new IllegalStateException ( ) ; } CompilerOptions compilerOptions = new CompilerOptions ( settings ) ; boolean statementsRecovery = ( flags & ( org . eclipse . jdt . core . ICompilationUnit . ENABLE_STATEMENTS_RECOVERY ) ) != 0 ; compilerOptions . performMethodsFullRecovery = statementsRecovery ; compilerOptions . performStatementsRecovery = statementsRecovery ; Parser parser = new CommentRecorderParser ( new ProblemReporter ( DefaultErrorHandlingPolicies . proceedWithAllProblems ( ) , compilerOptions , new DefaultProblemFactory ( ) ) , false ) ; CompilationResult compilationResult = new CompilationResult ( sourceUnit , 0 , 0 , compilerOptions . maxProblemsPerUnit ) ; CompilationUnitDeclaration compilationUnitDeclaration = parser . dietParse ( sourceUnit , compilationResult ) ; if ( compilationUnitDeclaration . ignoreMethodBodies ) { compilationUnitDeclaration . ignoreFurtherInvestigation = true ; <START_BUG> return null ; <END_BUG> } if ( nodeSearcher != null ) { char [ ] source = parser . scanner . getSource ( ) ; int searchPosition = nodeSearcher . position ; if ( ( searchPosition < 0 ) || ( searchPosition > ( source . length ) ) ) { return compilationUnitDeclaration ; } compilationUnitDeclaration . traverse ( nodeSearcher , compilationUnitDeclaration . scope ) ; ASTNode node = nodeSearcher . found ; if ( node == null ) { return compilationUnitDeclaration ; } TypeDeclaration enclosingTypeDeclaration = nodeSearcher . enclosingType ; if ( node instanceof AbstractMethodDeclaration ) { ( ( AbstractMethodDeclaration ) ( node ) ) . parseStatements ( parser , compilationUnitDeclaration ) ; } else if ( enclosingTypeDeclaration != null ) { if ( node instanceof Initializer ) { ( ( Initializer ) ( node ) ) . parseStatements ( parser , enclosingTypeDeclaration , compilationUnitDeclaration ) ; } else if ( node instanceof TypeDeclaration ) { ( ( TypeDeclaration ) ( node ) ) . parseMethods ( parser , compilationUnitDeclaration ) ; } } } else { TypeDeclaration [ ] types = compilationUnitDeclaration . types ; if ( types != null ) { for ( int i = 0 , length = types . length ; i < length ; i ++ ) types [ i ] . parseMethods ( parser , compilationUnitDeclaration ) ; } } return compilationUnitDeclaration ; } public static void resolve ( org . eclipse . jdt . core . ICompilationUnit [ ] compilationUnits , String [ ] bindingKeys , ASTRequestor requestor , int apiLevel , Map options , IJavaProject javaProject , WorkingCopyOwner owner , int flags , IProgressMonitor monitor ) { } public static CompilationUnitDeclaration resolve ( ICompilationUnit sourceUnit , IJavaProject javaProject , NodeSearcher nodeSearcher , Map options , WorkingCopyOwner owner , int flags , IProgressMonitor monitor ) throws JavaModelException { } public static IBinding [ ] resolve ( final IJavaElement [ ] elements , int apiLevel , Map compilerOptions , IJavaProject javaProject , WorkingCopyOwner owner , int flags , IProgressMonitor monitor ) { } public void removeUnresolvedBindings ( CompilationUnitDeclaration compilationUnitDeclaration ) { } private void removeUnresolvedBindings ( TypeDeclaration type ) { } private void resolve ( org . eclipse . jdt . core . ICompilationUnit [ ] compilationUnits , String [ ] bindingKeys , ASTRequestor astRequestor , int apiLevel , Map compilerOptions , WorkingCopyOwner owner , int flags ) { } private void reportBinding ( Object key , ASTRequestor astRequestor , WorkingCopyOwner owner , CompilationUnitDeclaration unit ) { } private CompilationUnitDeclaration resolve ( CompilationUnitDeclaration unit , ICompilationUnit sourceUnit , NodeSearcher nodeSearcher , boolean verifyMethods , boolean analyzeCode , boolean generateCode ) { } public CompilationUnitDeclaration resolve ( ICompilationUnit sourceUnit , boolean verifyMethods , boolean analyzeCode , boolean generateCode ) { } public CompilationUnitDeclaration resolve ( CompilationUnitDeclaration unit , ICompilationUnit sourceUnit , boolean verifyMethods , boolean analyzeCode , boolean generateCode ) { } private void worked ( int work ) { } }

Fix:
return compilationUnitDeclaration ;