Buggy code:
public class IncrementalImageBuilder extends AbstractImageBuilder { protected IProject fNewProject ; protected IImageContext fImageContext ; protected Hashtable fSourceDeltas ; protected IDelta fImageDelta = null ; protected IImageContext fContextOfLastDelta = null ; protected Vector fAddedPkgOrZips ; protected Vector fRemovedPkgOrZips ; protected Vector fChangedPkgOrZips ; protected Vector fAddedPackageHandles ; protected Vector fRemovedPackageHandles ; protected Vector fChangedPackageHandles ; protected Hashtable fAffectedPackages ; protected Vector fAddedClasses ; protected Vector fRemovedClasses ; protected Vector fChangedClasses ; protected Vector fChangedZips ; protected Hashtable fBuilderTypeTable ; protected IncrementalImageBuilder ( StateImpl oldState , IProject newProject , IImageContext context ) { } protected void addChangedFileNamesFromChangedPackage ( IResourceDelta pkgDelta , Hashtable table ) { } protected void addNewClasses ( ) { } protected void addSourceElement ( SourceEntry newEntry ) { } public void applySourceDelta ( Hashtable deltas ) { fNotifier = new BuildNotifier ( fDC , false ) ; fNotifier . begin ( ) ; fNotifier . subTask ( org . eclipse . jdt . internal . compiler . util . Util . bind ( "build.preparingBuild" ) ) ; fSourceDeltas = deltas ; fNewState = fOldState . copy ( fNewProject , fImageContext ) ; <START_BUG> fCompilerOptions = JavaModelManager . getOptions ( ) ; <END_BUG> try { fNotifier . subTask ( org . eclipse . jdt . internal . compiler . util . Util . bind ( "build.analyzingPackages" ) ) ; computeAllPackages ( ) ; checkCancel ( ) ; updatePackageMap ( ) ; fNewState . canonicalizeBuildContext ( ) ; fNotifier . updateProgressDelta ( 0.05F ) ; checkCancel ( ) ; for ( Enumeration e = fRemovedPackageHandles . elements ( ) ; e . hasMoreElements ( ) ; ) { IPackage pkgHandle = ( ( IPackage ) ( e . nextElement ( ) ) ) ; fNewState . getSourceElementTable ( ) . removePackage ( pkgHandle ) ; } recomputeSourceEntriesForChangedPackages ( ) ; checkCancel ( ) ; fWorkQueue = new WorkQueue ( ) ; computeNamespaceChanges ( ) ; for ( Enumeration e = fWorkQueue . getElementsToCompile ( ) . elements ( ) ; e . hasMoreElements ( ) ; ) { markDependentsAsNeedingCompile ( e . nextElement ( ) ) ; } fNotifier . subTask ( org . eclipse . jdt . internal . compiler . util . Util . bind ( "build.analyzingSources" ) ) ; computeAllClasses ( ) ; checkCancel ( ) ; markDependentsOfChangedZips ( ) ; removeOldClasses ( ) ; checkCancel ( ) ; updateChangedClasses ( ) ; checkCancel ( ) ; addNewClasses ( ) ; checkCancel ( ) ; float amountPerIteration = 0.6F ; Vector vToCompile = fWorkQueue . getElementsToCompile ( ) ; while ( ( vToCompile . size ( ) ) != 0 ) { fNotifier . setProgressPerCompilationUnit ( ( amountPerIteration // ( vToCompile . size ( ) ) ) ) ; compile ( vToCompile ) ; vToCompile = fWorkQueue . getElementsToCompile ( ) ; amountPerIteration *= 0.25F ; } IResourceDelta projectDelta = ( ( IResourceDelta ) ( deltas . get ( fNewProject ) ) ) ; if ( projectDelta != null ) { ProjectResourceCopier copier = new ProjectResourceCopier ( fNewState . getJavaProject ( ) , fDC , fNotifier , 0.1F ) ; copier . updateAffectedResources ( projectDelta ) ; } cleanupUnusedNamespaceNodes ( ) ; checkCancel ( ) ; fNotifier . done ( ) ; } finally { cleanUp ( ) ; } } public void applySourceDelta ( IResourceDelta projectDelta ) { } protected void changedSourceElement ( SourceEntry newEntry ) { } protected void cleanUp ( ) { } protected void cleanupUnusedNamespaceNodes ( ) { } protected boolean compareVisibilityAndGender ( TypeStructureEntry tsEntry , IType type ) throws JavaModelException { } protected void compiling ( CompilerCompilationUnit unit ) { } protected void computeAllClasses ( ) { } protected void computeAllPackages ( ) { } protected void computeAllPackages ( IResourceDelta delta , IPackageFragmentRoot [ ] oldRoots , IPackageFragmentRoot [ ] newRoots ) { } protected void computeNamespaceChanges ( ) { } protected void computeNamespaceChanges ( Hashtable oldTSEntries , String parentTypeName , IType type , Vector vTypeNames ) throws JavaModelException { } protected void computeNamespaceChanges ( PackageElement element , Vector vTypeNames ) { } protected void computeNamespaceChanges ( IPackage pkg ) { } protected void computePackagePrefixChanges ( ) { } protected Hashtable computePackagePrefixes ( PackageMap packageMap ) { } static void dump ( IResourceDelta delta ) { } protected Enumeration getAffectedPackages ( ) { } protected BuilderType getBuilderType ( TypeStructureEntry oldEntry , TypeStructureEntry newEntry ) { } protected BuilderType getBuilderType ( org . eclipse . jdt . internal . core . builder . IType type ) { } public IDelta getImageDelta ( IImageContext imageContext ) { } protected Dictionary getSourceChanges ( IPackage pkgHandle ) { } protected boolean hasPackageMapChanges ( ) { } protected boolean hasSourceEntryChanges ( IPackage pkgHandle ) { } protected void issueIndictments ( Object element , IndictmentSet indicts , boolean transitive ) { } protected void issueIndictments ( DependencyGraph graph , Object element , IndictmentSet indicts , boolean transitive , Hashtable seen ) { } protected void markDependentsAsNeedingCompile ( Object element ) { } protected void markDependentsOfChangedZips ( ) { } protected void markOverlappingTypesAsNeedingCompile ( IPackage pkg ) { } protected void maybeForce ( IPackage pkg ) { } protected void propagatePrincipalStructureByPackageTable ( ) { } protected void recomputeSourceEntriesForChangedPackages ( ) { } protected void removeOldClasses ( ) { } protected void removeSourceElement ( SourceEntry entry ) { } protected void saveBinaryTypes ( PackageElement element ) { } protected void sort ( PackageElement [ ] compileArray ) { } public String toString ( ) { } protected boolean tryAbstractMethodIndictments ( PackageElement unit , IndictmentSet indictments ) { } protected boolean tryMethodDeclarations ( BuilderType builderType , IndictmentSet indictments ) { } protected boolean tryMethodDeclarations ( PackageElement unit , IndictmentSet indictments ) { } protected boolean tryUnit ( PackageElement unit , IndictmentSet indictments ) { } protected boolean tryZeroArgConstructorInSuperclass ( PackageElement unit , IndictmentSet indictments ) { } protected void updateChangedClasses ( ) { } protected void updatePackageMap ( ) { } protected void updateState ( ConvertedCompilationResult [ ] results ) { } }

Fix:
fCompilerOptions = JavaCore . getOptions ( ) ;