Buggy code:
public void deconfigure ( ) throws CoreException { } protected IClasspathEntry [ ] defaultClasspath ( ) { } protected IPath defaultOutputLocation ( ) { } protected String encodeClasspath ( IClasspathEntry [ ] classpath , IPath outputLocation , boolean indent ) throws JavaModelException { } public boolean equals ( Object o ) { } public boolean exists ( ) { } public IJavaElement findElement ( IPath path ) throws JavaModelException { } public IJavaElement findElement ( IPath path , WorkingCopyOwner owner ) throws JavaModelException { } public IPackageFragment findPackageFragment ( IPath path ) throws JavaModelException { } private IPackageFragment findPackageFragment0 ( IPath path ) throws JavaModelException { } public IPackageFragmentRoot findPackageFragmentRoot ( IPath path ) throws JavaModelException { } public IPackageFragmentRoot findPackageFragmentRoot0 ( IPath path ) throws JavaModelException { } public IPackageFragmentRoot [ ] findPackageFragmentRoots ( IClasspathEntry entry ) { } public IType findType ( String fullyQualifiedName ) throws JavaModelException { } public IType findType ( String packageName , String typeQualifiedName ) throws JavaModelException { } public IType findType ( String packageName , String typeQualifiedName , WorkingCopyOwner owner ) throws JavaModelException { } public IType findType ( String fullyQualifiedName , WorkingCopyOwner owner ) throws JavaModelException { } protected void flushClasspathProblemMarkers ( boolean flushCycleMarkers , boolean flushClasspathFormatMarkers ) { } protected void forceClasspathReload ( IProgressMonitor monitor ) throws JavaModelException { } public IPath [ ] getAccessRestrictions ( String optionName ) { } public IPackageFragmentRoot [ ] getAllPackageFragmentRoots ( ) throws JavaModelException { } public IPackageFragmentRoot [ ] getAllPackageFragmentRoots ( Map rootToResolvedEntries ) throws JavaModelException { } public IClasspathEntry getClasspathEntryFor ( IPath path ) throws JavaModelException { } public IMarker getCycleMarker ( ) { } public IEclipsePreferences getEclipsePreferences ( ) { } public String getElementName ( ) { } public int getElementType ( ) { } public IClasspathEntry [ ] getExpandedClasspath ( boolean ignoreUnresolvedVariable ) throws JavaModelException { } public IClasspathEntry [ ] getExpandedClasspath ( boolean ignoreUnresolvedVariable , boolean generateMarkerOnError , Map preferredClasspaths , Map preferredOutputs ) throws JavaModelException { } public IPackageFragmentRoot getFolderPackageFragmentRoot ( IPath path ) { } public IJavaElement getHandleFromMemento ( String token , MementoTokenizer memento , WorkingCopyOwner owner ) { } protected char getHandleMementoDelimiter ( ) { } private int getJavaCommandIndex ( ICommand [ ] buildSpec ) { } protected JavaProjectElementInfo getJavaProjectElementInfo ( ) throws JavaModelException { } public Object [ ] getNonJavaResources ( ) throws JavaModelException { } public String getOption ( String optionName , boolean inheritJavaCoreOptions ) { } public Map getOptions ( boolean inheritJavaCoreOptions ) { Map options = ( inheritJavaCoreOptions ) ? JavaCore . getOptions ( ) : new Hashtable ( 5 ) ; JavaModelManager . PerProjectInfo perProjectInfo = null ; Hashtable projectOptions = null ; HashSet optionNames = JavaModelManager . getJavaModelManager ( ) . optionNames ; try { perProjectInfo = getPerProjectInfo ( ) ; projectOptions = perProjectInfo . options ; if ( projectOptions == null ) { IEclipsePreferences projectPreferences = getEclipsePreferences ( ) ; if ( projectPreferences == null ) return options ; String [ ] propertyNames = projectPreferences . keys ( ) ; projectOptions = new Hashtable ( propertyNames . length ) ; for ( int i = 0 ; i < ( propertyNames . length ) ; i ++ ) { String propertyName = propertyNames [ i ] ; String value = projectPreferences . get ( propertyName , null ) ; if ( ( value != null ) && ( optionNames . contains ( propertyName ) ) ) { projectOptions . put ( propertyName , value . trim ( ) ) ; } } perProjectInfo . options = projectOptions ; } } catch ( JavaModelException jme ) { projectOptions = new Hashtable ( ) ; } catch ( BackingStoreException e ) { projectOptions = new Hashtable ( ) ; } if ( inheritJavaCoreOptions ) { Iterator propertyNames = projectOptions . keySet ( ) . iterator ( ) ; while ( propertyNames . hasNext ( ) ) { String propertyName = ( ( String ) ( propertyNames . next ( ) ) ) ; <START_BUG> String propertyValue = ( ( String ) ( perProjectInfo . options . get ( propertyName ) ) ) ; <END_BUG> if ( ( propertyValue != null ) && ( optionNames . contains ( propertyName ) ) ) { options . put ( propertyName , propertyValue . trim ( ) ) ; } } return options ; } return projectOptions ; } public IPath getOutputLocation ( ) throws JavaModelException { } public IPath getOutputLocation ( boolean createMarkers , boolean logProblems ) throws JavaModelException { } public IPackageFragmentRoot getPackageFragmentRoot ( IPath path ) { } public IPackageFragmentRoot getPackageFragmentRoot ( IResource resource ) { } public IPackageFragmentRoot getPackageFragmentRoot ( String jarPath ) { } public IPackageFragmentRoot getPackageFragmentRoot0 ( IPath jarPath ) { } public IPackageFragmentRoot [ ] getPackageFragmentRoots ( ) throws JavaModelException { } public IPackageFragmentRoot [ ] getPackageFragmentRoots ( IClasspathEntry entry ) { } protected IPackageFragmentRoot [ ] getPackageFragmentRoots ( IPath path ) throws JavaModelException { } public IPackageFragment [ ] getPackageFragments ( ) throws JavaModelException { } public IPackageFragment [ ] getPackageFragmentsInRoots ( IPackageFragmentRoot [ ] roots ) { } public IPath getPath ( ) { } public JavaModelManager . PerProjectInfo getPerProjectInfo ( ) throws JavaModelException { } private IPath getPluginWorkingLocation ( ) { } public Preferences getPreferences ( ) { } public IProject getProject ( ) { } public IClasspathEntry [ ] getRawClasspath ( ) throws JavaModelException { } public IClasspathEntry [ ] getRawClasspath ( boolean createMarkers , boolean logProblems ) throws JavaModelException { } public String [ ] getRequiredProjectNames ( ) throws JavaModelException { } public IClasspathEntry [ ] getResolvedClasspath ( boolean ignoreUnresolvedEntry ) throws JavaModelException { } public IClasspathEntry [ ] getResolvedClasspath ( boolean ignoreUnresolvedEntry , boolean generateMarkerOnError ) throws JavaModelException { } public IClasspathEntry [ ] getResolvedClasspath ( boolean ignoreUnresolvedEntry , boolean generateMarkerOnError , boolean returnResolutionInProgress ) throws JavaModelException { } public IClasspathEntry [ ] getResolvedClasspath ( IClasspathEntry [ ] classpathEntries , IPath projectOutputLocation , boolean ignoreUnresolvedEntry , boolean generateMarkerOnError , Map rawReverseMap ) throws JavaModelException { } public IResource getResource ( ) { }

Fix:
String propertyValue = ( ( String ) ( projectOptions . get ( propertyName ) ) ) ;