Buggy code:
public abstract class PartPane extends LayoutPart implements Listener { private boolean isZoomed = false ; private MenuManager paneMenuManager ; protected IWorkbenchPartReference partReference ; protected WorkbenchPage page ; protected ViewForm control ; public static class Sashes { public Sash left ; public Sash right ; public Sash top ; public Sash bottom ; } private class PaneContribution extends ContributionItem { public boolean isDynamic ( ) { } public void fill ( Menu menu , int index ) { } } public PartPane ( IWorkbenchPartReference partReference , WorkbenchPage workbenchPage ) { } protected void createChildControl ( ) { final IWorkbenchPart [ ] part = new IWorkbenchPart [ ] { partReference . getPart ( false ) } ; if ( ( part [ 0 ] ) == null ) return ; if ( ( ( control ) == null ) || ( ( control . getContent ( ) ) != null ) ) return ; final Composite content = new Composite ( control , SWT . NONE ) ; content . setLayout ( new FillLayout ( ) ) ; String error = WorkbenchMessages . format ( "PartPane.unableToCreate" , new Object [ ] { partReference . getTitle ( ) } ) ; Platform . run ( new SafeRunnable ( error ) { public void run ( ) { try { UIStats . start ( CREATE_PART_CONTROL , id ) ; part [ 0 ] . createPartControl ( content ) ; } finally { UIStats . end ( CREATE_PART_CONTROL , id ) ; } } public void handleException ( Throwable e ) { <START_BUG> Workbench wb = ( ( Workbench ) ( WorkbenchPlugin . getDefault ( ) . getWorkbench ( ) ) ) ; <END_BUG> if ( ! ( wb . isStarting ( ) ) ) super . handleException ( e ) ; Control [ ] children = content . getChildren ( ) ; for ( int i = 0 ; i < ( children . length ) ; i ++ ) { children [ i ] . dispose ( ) ; } IWorkbenchPart newPart = createErrorPart ( ( ( WorkbenchPart ) ( part [ 0 ] ) ) ) ; part [ 0 ] . getSite ( ) . setSelectionProvider ( null ) ; newPart . createPartControl ( content ) ; ( ( WorkbenchPartReference ) ( partReference ) ) . setPart ( newPart ) ; part [ 0 ] = newPart ; } } ) ; control . setContent ( content ) ; page . addPart ( partReference ) ; page . firePartOpened ( part [ 0 ] ) ; } public void createControl ( Composite parent ) { } protected abstract WorkbenchPart createErrorPart ( WorkbenchPart oldPart ) { } protected abstract void createTitleBar ( ) { } public void dispose ( ) { } public abstract void doHide ( ) { } protected void doZoom ( ) { } public Rectangle getBounds ( ) { } public Control getControl ( ) { } public int getMinimumHeight ( ) { } protected ViewForm getPane ( ) { } public IWorkbenchPartReference getPartReference ( ) { } int getStyle ( ) { } protected ViewForm getViewForm ( ) { } public void handleEvent ( Event event ) { } public boolean isZoomed ( ) { } public void moveAbove ( Control refControl ) { } protected void requestActivation ( ) { } public void setContainer ( ILayoutContainer container ) { } public void setVisible ( boolean makeVisible ) { } public void setFocus ( ) { } public void setWorkbenchPage ( WorkbenchPage workbenchPage ) { } public void setZoomed ( boolean isZoomed ) { } abstract void shellActivated ( ) { } abstract void shellDeactivated ( ) { } public abstract void showFocus ( boolean inFocus ) { } public LayoutPart targetPartFor ( LayoutPart dragSource ) { } public abstract void showPaneMenu ( ) { } public abstract void showViewMenu ( ) { } protected final void showPaneMenu ( Control parent , Point point ) { } protected abstract PartPane . Sashes findSashes ( ) { } protected void moveSash ( final Sash sash ) { } protected void addSizeItem ( Menu sizeMenu , String labelKey , final Sash sash ) { } public WorkbenchPage getPage ( ) { } protected void addSizeItems ( Menu sizeMenu ) { } protected void addPinEditorItem ( Menu parent ) { } protected void addMoveItems ( Menu parent ) { } protected void addFastViewMenuItem ( Menu parent , boolean isFastView ) { } protected void doDock ( ) { } }

Fix:
Workbench wb = ( ( Workbench ) ( PlatformUI . getWorkbench ( ) ) ) ;