Buggy code:
public class JavaModelManager implements IResourceChangeListener , ISaveParticipant { public static Hashtable fOptions ; private static ArrayList fOptionIDs ; protected static JavaModelManager fgManager = null ; protected JavaModelInfo fModelInfo = null ; protected boolean fFire = true ; protected Vector fJavaModelDeltas = new Vector ( ) ; protected Vector fResourceDeltas = new Vector ( ) ; protected Vector fElementChangedListeners = new Vector ( ) ; protected Vector fProjectsBeingDeleted = new Vector ( ) ; protected DeltaProcessor fDeltaProcessor = new DeltaProcessor ( ) ; public static boolean ENABLE_INDEXING = true ; private static final String WKS_PROP_FILENAME = "workspace.properties" ; private static final String ATT_HANDLE_ID = "org.eclipse.jdt.internal.core.JavaModelManager.handleId" ; protected Hashtable perProjectInfo = new Hashtable ( 5 ) ; static class PerProjectInfo { IProject project ; IDevelopmentContext developmentContext = new JavaDevelopmentContextImpl ( ) ; byte [ ] savedStateFingerprint ; boolean triedRead = false ; PerProjectInfo ( IProject project ) { } IState getLastBuiltState ( ) { } void setLastBuiltState ( IState state ) { } } public static final boolean VERBOSE = false ; public static String LINE_SEPARATOR = System . getProperty ( "line.separator" ) ; private JavaModelManager ( ) { } public void addElementChangedListener ( IElementChangedListener listener ) { } public void checkProjectBeingAdded ( IResourceDelta delta ) { } public void closeAffectedElements ( IResourceDelta delta ) { } public void deleted ( IProject project ) { } public void deleting ( IProject project ) { } public void doneSaving ( ISaveContext context ) { } public void ensureLocal ( IResource resource ) throws CoreException { } public void fire ( ) { } protected void flush ( ) { } public IDevelopmentContext getDevelopmentContext ( IProject project ) { } protected Hashtable getElementsOutOfSynchWithBuffers ( ) { } public IJavaElement getHandleFromMemento ( String memento ) throws JavaModelException { } public IndexManager getIndexManager ( ) { } protected Object getInfo ( IJavaElement element ) { } public IJavaModel getJavaModel ( ) { } public static JavaModel getJavaModel ( IWorkspace workspace ) { } public static synchronized JavaModelManager getJavaModelManager ( ) { } public IState getLastBuiltState ( IProject project , IProgressMonitor monitor ) { } public INameEnvironment getNameEnvironment ( IProject project ) { } private JavaModelManager . PerProjectInfo getPerProjectInfo ( IProject project ) { } private File getSerializationFile ( IProject project ) { } public String getVariablesAsXMLString ( ) throws CoreException { } public String getOptionsAsXMLString ( ) throws CoreException { } public ZipFile getZipFile ( IPath path ) throws CoreException { } public boolean isBeingDeleted ( IProject project ) { } public boolean isFiring ( ) { } public void loadVariables ( ) throws CoreException { } public void loadOptions ( ) throws CoreException { } public void mergeDeltas ( ) { } protected Object peekAtInfo ( IJavaElement element ) { } public void prepareToSave ( ISaveContext context ) throws CoreException { } protected void putInfo ( IJavaElement element , Object info ) { } protected IState readState ( JavaModelManager . PerProjectInfo info ) throws CoreException { } public void readVariables ( String xmlString ) throws IOException { } public void readOptions ( String xmlString ) throws IOException { if ( ( JavaModelManager . fOptions ) == null ) <START_BUG> org . eclipse . jdt . core . JavaCore . setOptionsToDefault ( ) ; <END_BUG> StringReader reader = new StringReader ( xmlString ) ; Element cpElement ; try { DocumentBuilder parser = DocumentBuilderFactory . newInstance ( ) . newDocumentBuilder ( ) ; cpElement = parser . parse ( new InputSource ( reader ) ) . getDocumentElement ( ) ; } catch ( SAXException e ) { throw new IOException ( Util . bind ( "option.badFormat" ) ) ; } catch ( ParserConfigurationException e ) { reader . close ( ) ; throw new IOException ( Util . bind ( "option.badFormat" ) ) ; } finally { reader . close ( ) ; } if ( ! ( cpElement . getNodeName ( ) . equalsIgnoreCase ( "options" ) ) ) { throw new IOException ( Util . bind ( "option.badFormat" ) ) ; } NodeList list = cpElement . getChildNodes ( ) ; int length = list . getLength ( ) ; for ( int i = 0 ; i < length ; ++ i ) { Node node = list . item ( i ) ; short type = node . getNodeType ( ) ; if ( type == ( Node . ELEMENT_NODE ) ) { Element element = ( ( Element ) ( node ) ) ; if ( element . getNodeName ( ) . equalsIgnoreCase ( "option" ) ) { String id = element . getAttribute ( "id" ) ; ConfigurableOption option = ( ( ConfigurableOption ) ( JavaModelManager . fOptions . get ( id ) ) ) ; String [ ] possible = option . getPossibleValues ( ) ; if ( possible == ( ConfigurableOption . NoDiscreteValue ) ) { String value = element . getAttribute ( "value" ) ; option . setValue ( value ) ; } else { int valueIndex = Integer . parseInt ( element . getAttribute ( "index" ) ) ; option . setValueIndex ( valueIndex ) ; } } } } } protected void registerJavaModelDelta ( IJavaElementDelta delta ) { } public void registerResourceDelta ( IJavaElementDelta delta ) { } public void removeElementChangedListener ( IElementChangedListener listener ) { } protected void removeInfo ( IJavaElement element ) { } void removePerProjectInfo ( JavaProject javaProject ) { } public void resourceChanged ( IResourceChangeEvent event ) { } public void rollback ( ISaveContext context ) { } public void runOperation ( JavaModelOperation operation , IProgressMonitor monitor ) throws JavaModelException { } private void saveBuildState ( ) throws CoreException { } private void saveState ( JavaModelManager . PerProjectInfo info ) throws CoreException { } private void saveStateIfNecessary ( JavaModelManager . PerProjectInfo info ) throws CoreException { } public void saveVariables ( ) throws CoreException { } public void saveOptions ( ) throws CoreException { } public void saving ( ISaveContext context ) throws CoreException { }

Fix:
org . eclipse . jdt . core . JavaCore . resetOptions ( ) ;