Buggy code:
public IStatus restoreState ( IMemento memento , IPerspectiveDescriptor activeDescriptor ) { Assert . isNotNull ( getShell ( ) ) ; MultiStatus result = new MultiStatus ( PlatformUI . PLUGIN_ID , IStatus . OK , WorkbenchMessages . getString ( "WorkbenchWindow.problemsRestoringWindow" ) , null ) ; Rectangle displayBounds = getShell ( ) . getDisplay ( ) . getBounds ( ) ; Rectangle shellBounds = new Rectangle ( 0 , 0 , 0 , 0 ) ; Integer bigInt ; bigInt = memento . getInteger ( TAG_X ) ; shellBounds . x = ( bigInt == null ) ? 0 : bigInt . intValue ( ) ; bigInt = memento . getInteger ( TAG_Y ) ; shellBounds . y = ( bigInt == null ) ? 0 : bigInt . intValue ( ) ; bigInt = memento . getInteger ( TAG_WIDTH ) ; shellBounds . width = ( bigInt == null ) ? 0 : bigInt . intValue ( ) ; bigInt = memento . getInteger ( TAG_HEIGHT ) ; shellBounds . height = ( bigInt == null ) ? 0 : bigInt . intValue ( ) ; if ( ! ( shellBounds . isEmpty ( ) ) ) { if ( ! ( shellBounds . intersects ( displayBounds ) ) ) { Rectangle clientArea = getShell ( ) . getDisplay ( ) . getClientArea ( ) ; shellBounds . x = clientArea . x ; shellBounds . y = clientArea . y ; } getShell ( ) . setBounds ( shellBounds ) ; } if ( "true" . equals ( memento . getString ( TAG_MAXIMIZED ) ) ) { getShell ( ) . setMaximized ( true ) ; } if ( "true" . equals ( memento . getString ( TAG_MINIMIZED ) ) ) { } IWorkbenchPage newActivePage = null ; IMemento [ ] pageArray = memento . getChildren ( TAG_PAGE ) ; for ( int i = 0 ; i < ( pageArray . length ) ; i ++ ) { IMemento pageMem = pageArray [ i ] ; String strFocus = pageMem . getString ( TAG_FOCUS ) ; if ( ( strFocus == null ) || ( ( strFocus . length ( ) ) == 0 ) ) continue ; IMemento inputMem = pageMem . getChild ( TAG_INPUT ) ; String factoryID = inputMem . getString ( TAG_FACTORY_ID ) ; if ( factoryID == null ) { WorkbenchPlugin . log ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>restore<seq2seq4repair_space>page<seq2seq4repair_space>-<seq2seq4repair_space>no<seq2seq4repair_space>input<seq2seq4repair_space>factory<seq2seq4repair_space>ID." ) ; result . add ( unableToRestorePage ( pageMem ) ) ; continue ; } IAdaptable input ; try { UIStats . start ( RESTORE_WORKBENCH , "WorkbenchPageFactory" ) ; IElementFactory factory = PlatformUI . getWorkbench ( ) . getElementFactory ( factoryID ) ; if ( factory == null ) { WorkbenchPlugin . log ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>restore<seq2seq4repair_space>page<seq2seq4repair_space>-<seq2seq4repair_space>cannot<seq2seq4repair_space>instantiate<seq2seq4repair_space>input<seq2seq4repair_space>factory:<seq2seq4repair_space>" + factoryID ) ) ; result . add ( unableToRestorePage ( pageMem ) ) ; continue ; } input = factory . createElement ( inputMem ) ; if ( input == null ) { WorkbenchPlugin . log ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>restore<seq2seq4repair_space>page<seq2seq4repair_space>-<seq2seq4repair_space>cannot<seq2seq4repair_space>instantiate<seq2seq4repair_space>input<seq2seq4repair_space>element:<seq2seq4repair_space>" + factoryID ) ) ; result . add ( unableToRestorePage ( pageMem ) ) ; continue ; } } finally { UIStats . end ( RESTORE_WORKBENCH , "WorkbenchPageFactory" ) ; } WorkbenchPage newPage = null ; try { newPage = new WorkbenchPage ( this , input ) ; result . add ( newPage . restoreState ( pageMem , activeDescriptor ) ) ; pageList . add ( newPage ) ; firePageOpened ( newPage ) ; } catch ( WorkbenchException e ) { WorkbenchPlugin . log ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>restore<seq2seq4repair_space>perspective<seq2seq4repair_space>-<seq2seq4repair_space>constructor<seq2seq4repair_space>failed." ) ; result . add ( e . getStatus ( ) ) ; continue ; } if ( ( strFocus != null ) && ( ( strFocus . length ( ) ) > 0 ) ) newActivePage = newPage ; } if ( pageList . isEmpty ( ) ) { try { String defPerspID = getWorkbenchImpl ( ) . getPerspectiveRegistry ( ) . getDefaultPerspective ( ) ; WorkbenchPage newPage = new WorkbenchPage ( this , defPerspID , getAdviser ( ) . getDefaultWindowInput ( ) ) ; pageList . add ( newPage ) ; firePageOpened ( newPage ) ; } catch ( WorkbenchException e ) { WorkbenchPlugin . log ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>default<seq2seq4repair_space>perspective<seq2seq4repair_space>-<seq2seq4repair_space>constructor<seq2seq4repair_space>failed." ) ; result . add ( e . getStatus ( ) ) ; <START_BUG> String productName = getWorkbenchImpl ( ) . getProductName ( ) ; <END_BUG> if ( productName == null ) { productName = "" ; } getShell ( ) . setText ( productName ) ; } } if ( newActivePage == null ) newActivePage = ( ( IWorkbenchPage ) ( pageList . getNextActive ( ) ) ) ; setActivePage ( newActivePage ) ; IMemento coolBarMem = memento . getChild ( TAG_TOOLBAR_LAYOUT ) ; if ( coolBarMem != null ) getCoolBarManager ( ) . restoreState ( coolBarMem ) ; return result ; } public void run ( boolean fork , boolean cancelable , IRunnableWithProgress runnable ) throws InterruptedException , InvocationTargetException { } private boolean saveAllPages ( boolean bConfirm ) { } public IStatus saveState ( IMemento memento ) { } void selectPerspectiveShortcut ( IPerspectiveDescriptor perspective , WorkbenchPage page , boolean selected ) { } public void setActivePage ( final IWorkbenchPage in ) { } private void showShortcutBarPopup ( Point pt ) { } protected boolean toolBarChildrenExist ( ) { } private void trackShellActivation ( Shell shell ) { } private void trackShellResize ( Shell newShell ) { } public void updateActionBars ( ) { } public void updateActionSets ( ) { } void updatePerspectiveShortcut ( IPerspectiveDescriptor oldDesc , IPerspectiveDescriptor newDesc , WorkbenchPage page ) { } private boolean showProgressIndicator ( ) { } private void createProgressIndicator ( Shell shell ) { } class PageList { private List pageList ; private List pageStack ; private Object active ; public PageList ( ) { } public boolean add ( Object object ) { } public Iterator iterator ( ) { } public boolean contains ( Object object ) { } public boolean remove ( Object object ) { } public boolean isEmpty ( ) { }

Fix:
String productName = WorkbenchPlugin . getDefault ( ) . getProductName ( ) ;