Buggy code:
class CompilationUnitResolver extends Compiler { HashtableOfObject requestedSources ; HashtableOfObject requestedKeys ; DefaultBindingResolver . BindingTables bindingTables ; public CompilationUnitResolver ( INameEnvironment environment , IErrorHandlingPolicy policy , Map settings , ICompilerRequestor requestor , IProblemFactory problemFactory ) { } public void accept ( ISourceType [ ] sourceTypes , PackageBinding packageBinding , AccessRestriction accessRestriction ) { } protected void beginToCompile ( ICompilationUnit [ ] sourceUnits , String [ ] bindingKeys ) { } IBinding createBinding ( String key ) { } public static ASTNode convert ( CompilationUnitDeclaration compilationUnitDeclaration , char [ ] source , int apiLevel , Map options , boolean needToResolveBindings , WorkingCopyOwner owner , DefaultBindingResolver . BindingTables bindingTables , IProgressMonitor monitor ) { } protected static IErrorHandlingPolicy getHandlingPolicy ( ) { } 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 void parse ( org . eclipse . jdt . core . ICompilationUnit [ ] compilationUnits , ASTRequestor astRequestor , int apiLevel , Map options , IProgressMonitor monitor ) { } public static CompilationUnitDeclaration parse ( ICompilationUnit sourceUnit , NodeSearcher nodeSearcher , Map settings ) { if ( sourceUnit == null ) { <START_BUG> throw new IllegalArgumentException ( ) ; <END_BUG> } CompilerOptions compilerOptions = new CompilerOptions ( settings ) ; 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 ; return null ; } if ( nodeSearcher != null ) { char [ ] source = sourceUnit . getContents ( ) ; int searchPosition = nodeSearcher . position ; if ( ( searchPosition < 0 ) || ( searchPosition > ( source . length ) ) ) { return compilationUnitDeclaration ; } compilationUnitDeclaration . traverse ( nodeSearcher , compilationUnitDeclaration . scope ) ; org . eclipse . jdt . internal . compiler . ast . 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 { ( ( TypeDeclaration ) ( node ) ) . parseMethod ( parser , compilationUnitDeclaration ) ; } } } else { parser . scanner . setSource ( compilationResult ) ; TypeDeclaration [ ] types = compilationUnitDeclaration . types ; if ( types != null ) { for ( int i = types . length ; ( -- i ) >= 0 ; ) types [ i ] . parseMethod ( 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 , IProgressMonitor monitor ) { } public static CompilationUnitDeclaration resolve ( ICompilationUnit sourceUnit , IJavaProject javaProject , NodeSearcher nodeSearcher , Map options , WorkingCopyOwner owner , IProgressMonitor monitor ) throws JavaModelException { } 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 , IProgressMonitor monitor ) { } 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 ) { } }

Fix:
throw new IllegalStateException ( ) ;