Buggy code:
} ; private Map stickyPerspectives = new HashMap ( 7 ) ; private WorkbenchPage . ActionSwitcher actionSwitcher = new WorkbenchPage . ActionSwitcher ( ) ; private IExtensionTracker tracker ; private int deferCount = 0 ; private List pendingDisposals = new ArrayList ( ) ; private IExtensionChangeHandler perspectiveChangeHandler = new IExtensionChangeHandler ( ) { public void removeExtension ( IExtension extension , Object [ ] objects ) { } public void addExtension ( IExtensionTracker tracker , IExtension extension ) { } } ; private IExtensionPoint getPerspectiveExtensionPoint ( ) { } private class ActionSwitcher { private IWorkbenchPart activePart ; private IEditorPart topEditor ; private ArrayList oldActionSets = new ArrayList ( ) ; public void updateActivePart ( IWorkbenchPart newPart ) { } public void updateTopEditor ( IEditorPart newEditor ) { } private void activateContributions ( IWorkbenchPart part , boolean enable ) { } private void deactivateContributions ( IWorkbenchPart part , boolean remove ) { } private ArrayList calculateActionSets ( IWorkbenchPart part , IEditorPart editor ) { } private boolean updateActionSets ( ArrayList newActionSets ) { } } public WorkbenchPage ( WorkbenchWindow w , String layoutID , IAdaptable input ) throws WorkbenchException { } public WorkbenchPage ( WorkbenchWindow w , IAdaptable input ) throws WorkbenchException { } public void activate ( IWorkbenchPart part ) { } private void activatePart ( final IWorkbenchPart part ) { } public void addFastView ( IViewReference ref ) { } public void addPartListener ( IPartListener l ) { } public void addPartListener ( IPartListener2 l ) { } public void addPropertyChangeListener ( IPropertyChangeListener listener ) { } public void addSelectionListener ( ISelectionListener listener ) { } public void addSelectionListener ( String partId , ISelectionListener listener ) { } public void addPostSelectionListener ( ISelectionListener listener ) { } public void addPostSelectionListener ( String partId , ISelectionListener listener ) { } private ILayoutContainer getContainer ( IWorkbenchPart part ) { } private ILayoutContainer getContainer ( IWorkbenchPartReference part ) { } private PartPane getPane ( IWorkbenchPart part ) { } private PartPane getPane ( IWorkbenchPartReference part ) { } private boolean internalBringToTop ( IWorkbenchPartReference part ) { } public void bringToTop ( IWorkbenchPart part ) { } private void busyResetPerspective ( ) { } private void busySetPerspective ( IPerspectiveDescriptor desc ) { } private IViewPart busyShowView ( String viewID , String secondaryID , int mode ) throws PartInitException { } private void busyShowView ( IViewPart part , int mode ) { } private boolean certifyPart ( IWorkbenchPart part ) { } public boolean close ( ) { } public boolean closeAllSavedEditors ( ) { } public boolean closeAllEditors ( boolean save ) { } private void updateActivePart ( ) { } private void makeActive ( IWorkbenchPartReference ref ) { } private void makeActiveEditor ( IEditorReference ref ) { } public boolean closeEditors ( IEditorReference [ ] refArray , boolean save ) { } private void deferUpdates ( boolean shouldDefer ) { } private void startDeferring ( ) { } private void handleDeferredEvents ( ) { } private boolean isDeferred ( ) { } public boolean closeEditor ( IEditorReference editorRef , boolean save ) { } public boolean closeEditor ( IEditorPart editor , boolean save ) { } public void closePerspective ( IPerspectiveDescriptor desc , boolean saveEditors , boolean closePage ) { } void closePerspective ( Perspective persp , boolean saveEditors , boolean closePage ) { } public void closeAllPerspectives ( boolean saveEditors , boolean closePage ) { } private void createClientComposite ( ) { } private Perspective createPerspective ( PerspectiveDescriptor desc ) { } public void openTracker ( ViewPane pane ) { } void partAdded ( WorkbenchPartReference ref ) { } void partRemoved ( WorkbenchPartReference ref ) { } private void disposePart ( WorkbenchPartReference ref ) { } private void deactivatePart ( IWorkbenchPart part ) { } public void detachView ( IViewReference ref ) { } public void attachView ( IViewReference ref ) { } public void dispose ( ) { } private void disposePerspective ( Perspective persp ) { perspList . remove ( persp ) ; window . firePerspectiveClosed ( this , persp . getDesc ( ) ) ; persp . dispose ( ) ; <START_BUG> stickyPerspectives . remove ( persp . getDesc ( ) ) ; <END_BUG> } public INavigationHistory getNavigationHistory ( ) { } public boolean editActionSets ( ) { } public Perspective findPerspective ( IPerspectiveDescriptor desc ) { } public IViewPart findView ( String id ) { } public IViewReference findViewReference ( String viewId ) { } public IViewReference findViewReference ( String viewId , String secondaryId ) { } private void firePropertyChange ( String changeId , Object oldValue , Object newValue ) { } public IActionBars getActionBars ( ) { } public IActionSetDescriptor [ ] getActionSets ( ) { } public IEditorPart getActiveEditor ( ) { } public IEditorReference getActiveEditorReference ( ) { } public IWorkbenchPart getActivePart ( ) { } public IWorkbenchPartReference getActivePartReference ( ) { } public Perspective getActivePerspective ( ) { } public Composite getClientComposite ( ) { } protected EditorManager getEditorManager ( ) { } public PerspectiveHelper getPerspectivePresentation ( ) { } public EditorAreaHelper getEditorPresentation ( ) { } public IEditorPart [ ] getEditors ( ) { } public IEditorPart [ ] getDirtyEditors ( ) { } public ISaveablePart [ ] getDirtyParts ( ) { } public IEditorPart findEditor ( IEditorInput input ) { } public IEditorReference [ ] getEditorReferences ( ) { } public IViewReference [ ] getFastViews ( ) { } public IAdaptable getInput ( ) { } public String getLabel ( ) { } public IPerspectiveDescriptor getPerspective ( ) { } public ISelection getSelection ( ) { } public ISelection getSelection ( String partId ) { } public ArrayList getShowInPartIds ( ) { } public void performedShowIn ( String partId ) { } public void sortShowInPartIds ( ArrayList partIds ) { } protected WorkbenchWindow getUnprotectedWindow ( ) { } public ViewFactory getViewFactory ( ) { } public IViewReference [ ] getViewReferences ( ) { } public IViewPart [ ] getViews ( ) { }

Fix:
stickyPerspectives . remove ( persp . getDesc ( ) . getId ( ) ) ;