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 ) { } 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 ) { try { if ( unit == null ) { parseThreshold = 0 ; beginToCompile ( new org . eclipse . jdt . internal . compiler . env . ICompilationUnit [ ] { sourceUnit } ) ; unit = unitsToProcess [ 0 ] ; } else { lookupEnvironment . buildTypeBindings ( unit ) ; lookupEnvironment . completeTypeBindings ( ) ; } <START_BUG> getMethodBodies ( unit , 0 ) ; <END_BUG> if ( ( unit . scope ) != null ) { unit . scope . faultInTypes ( ) ; if ( ( ( unit . scope ) != null ) && verifyMethods ) { unit . scope . verifyMethods ( lookupEnvironment . methodVerifier ( ) ) ; } unit . resolve ( ) ; if ( analyzeCode ) unit . analyseCode ( ) ; if ( generateCode ) unit . generateCode ( ) ; } if ( ( unitsToProcess ) != null ) unitsToProcess [ 0 ] = null ; requestor . acceptResult ( unit . compilationResult . tagAsAccepted ( ) ) ; return unit ; } catch ( org . eclipse . jdt . internal . compiler . problem . AbortCompilation e ) { this . handleInternalException ( e , unit ) ; return unit == null ? unitsToProcess [ 0 ] : unit ; } catch ( java . lang . Error e ) { this . handleInternalException ( e , unit , null ) ; throw e ; } catch ( RuntimeException e ) { this . handleInternalException ( e , unit , null ) ; throw e ; } finally { } } }

Fix:
this . parser . getMethodBodies ( unit ) ;