Buggy code:
protected ArrayList perspectiveShortcuts ; protected FastViewManager fastViewManager = null ; private Map mapIDtoViewLayoutRec ; protected boolean fixed ; protected ArrayList showInPartIds ; protected HashMap showInTimes = new HashMap ( ) ; private IViewReference activeFastView ; protected IMemento memento ; protected PerspectiveHelper presentation ; private static final String VERSION_STRING = "0.016" ; private FastViewPane fastViewPane = new FastViewPane ( ) ; private static final int FASTVIEW_HIDE_STEPS = 5 ; private IWorkbenchPartReference oldPartRef = null ; protected boolean shouldHideEditorsOnActivate = false ; protected PageLayout layout ; public Perspective ( PerspectiveDescriptor desc , WorkbenchPage page ) throws WorkbenchException { } protected Perspective ( WorkbenchPage page ) throws WorkbenchException { } public void makeFastView ( IViewReference ref ) { } public void addFastView ( IViewReference ref , boolean handleLayout ) { } public boolean bringToTop ( IViewReference ref ) { } public boolean containsView ( IViewPart view ) { } protected void createInitialActionSets ( List outputList , List stringList ) { } private void createPresentation ( PerspectiveDescriptor persp ) throws WorkbenchException { } public void dispose ( ) { } private void disposeViewRefs ( ) { } public IViewReference findView ( String viewId ) { } public IViewReference findView ( String id , String secondaryId ) { } public Composite getClientComposite ( ) { } public IPerspectiveDescriptor getDesc ( ) { } Rectangle getFastViewBounds ( IViewReference ref ) { } public IViewReference [ ] getFastViews ( ) { } public String [ ] getNewWizardShortcuts ( ) { } protected ViewPane getPane ( IViewReference ref ) { } public String [ ] getPerspectiveShortcuts ( ) { } public PerspectiveHelper getPresentation ( ) { } public float getFastViewWidthRatio ( IViewReference ref ) { } public ArrayList getShowInPartIds ( ) { } public long getShowInTime ( String partId ) { } public String [ ] getShowViewShortcuts ( ) { } public ViewFactory getViewFactory ( ) { } public IViewReference [ ] getViewReferences ( ) { } protected void hideEditorArea ( ) { } protected void hideEditorAreaLocal ( ) { } private void hideFastView ( IViewReference ref , int steps ) { } void hideFastViewSash ( ) { } public boolean hideView ( IViewReference ref ) { } protected boolean isEditorAreaVisible ( ) { } public boolean isFastView ( IViewReference ref ) { } public ViewLayoutRec getViewLayoutRec ( IViewReference ref , boolean create ) { } private ViewLayoutRec getViewLayoutRec ( String viewId , boolean create ) { } public boolean isFixedLayout ( ) { } public boolean isStandaloneView ( IViewReference ref ) { } public boolean getShowTitleView ( IViewReference ref ) { } private void loadCustomPersp ( PerspectiveDescriptor persp ) { } private void unableToOpenPerspective ( PerspectiveDescriptor persp , IStatus status ) { } protected void loadPredefinedPersp ( PerspectiveDescriptor persp ) throws WorkbenchException { } private void removeAlwaysOn ( IActionSetDescriptor descriptor ) { } protected void addAlwaysOff ( IActionSetDescriptor descriptor ) { } protected void addAlwaysOn ( IActionSetDescriptor descriptor ) { } private void removeAlwaysOff ( IActionSetDescriptor descriptor ) { } protected void onActivate ( ) { } protected void onDeactivate ( ) { } public void partActivated ( IWorkbenchPart activePart ) { } public void performedShowIn ( String partId ) { } public void removeFastView ( IViewReference ref ) { } public void removeFastView ( IViewReference ref , boolean handleLayout ) { } public IStatus restoreState ( IMemento memento ) { } IStatus createReferences ( IMemento [ ] views ) { } public IStatus restoreState ( ) { } public IViewReference restoreFastView ( IMemento fvMemento , MultiStatus result ) { String viewID = fvMemento . getString ( TAG_ID ) ; String secondaryId = ViewFactory . extractSecondaryId ( viewID ) ; if ( secondaryId != null ) { viewID = ViewFactory . extractPrimaryId ( viewID ) ; } <START_BUG> IViewReference viewRef = getViewReference ( viewID , secondaryId ) ; <END_BUG> if ( viewRef == null ) { String key = ViewFactory . getKey ( viewID , secondaryId ) ; WorkbenchPlugin . log ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>create<seq2seq4repair_space>view:<seq2seq4repair_space>'" + key ) + "'." ) ) ; result . add ( new Status ( IStatus . ERROR , PlatformUI . PLUGIN_ID , 0 , NLS . bind ( Perspective_couldNotFind , key ) , null ) ) ; return null ; } Float ratio = fvMemento . getFloat ( TAG_RATIO ) ; if ( ratio == null ) { Integer viewWidth = fvMemento . getInteger ( TAG_WIDTH ) ; if ( viewWidth == null ) { ratio = new Float ( IPageLayout . DEFAULT_FASTVIEW_RATIO ) ; } else { ratio = new Float ( ( ( ( float ) ( viewWidth . intValue ( ) ) ) // ( ( float ) ( getClientComposite ( ) . getSize ( ) . x ) ) ) ) ; } } ViewLayoutRec rec = getViewLayoutRec ( viewRef , true ) ; rec . fastViewWidthRatio = ratio . floatValue ( ) ; return viewRef ; } protected ArrayList getPerspectiveExtensionActionSets ( ) { } protected ArrayList getShowInIdsFromRegistry ( ) { } public void saveDesc ( ) { } public void saveDescAs ( IPerspectiveDescriptor desc ) { } public IStatus saveState ( IMemento memento ) { } private IStatus saveState ( IMemento memento , PerspectiveDescriptor p , boolean saveInnerViewState ) { } public void turnOnActionSets ( IActionSetDescriptor [ ] newArray ) { } public void turnOffActionSets ( IActionSetDescriptor [ ] toDisable ) { } public void turnOffActionSet ( IActionSetDescriptor toDisable ) { } public IViewReference getActiveFastView ( ) { } void setActiveFastView ( IViewReference ref , int steps ) { } void setActiveFastView ( IViewReference ref ) { } protected void setAllPinsVisible ( boolean visible ) { } private void setFastViewIconSelection ( IViewReference ref , boolean selected ) { } public void setNewWizardActionIds ( ArrayList newList ) { } public void setPerspectiveActionIds ( ArrayList list ) { } public void setShowInPartIds ( ArrayList list ) { } public void setShowViewActionIds ( ArrayList list ) { } protected void showEditorArea ( ) { } protected void showEditorAreaLocal ( ) { }

Fix:
IViewReference viewRef = getViewFactory ( ) . getView ( viewID , secondaryId ) ;