Buggy code:
public class EditorWorkbook extends LayoutPart implements ILayoutContainer , IPropertyListener { private static final int INACTIVE = 0 ; private static final int ACTIVE_FOCUS = 1 ; private static final int ACTIVE_NOFOCUS = 2 ; private static int tabLocation = - 1 ; private int activeState = EditorWorkbook . INACTIVE ; private boolean assignFocusOnSelection = true ; private boolean ignoreTabFocusHide = false ; private boolean handleTabSelection = true ; private boolean mouseDownListenerAdded = false ; private boolean isZoomed = false ; private Composite parent ; private CTabFolder tabFolder ; private IPropertyChangeListener tabFolderListener ; private EditorArea editorArea ; private EditorPane visibleEditor ; private Map mapPartToDragMonitor = new HashMap ( ) ; private Map mapTabToEditor = new HashMap ( ) ; private List editors = new ArrayList ( ) ; private ToolBar pullDownBar ; private ToolItem pullDownButton ; private EditorList editorList ; private ViewForm listComposite ; private ToolItem closeBoxButton ; public EditorWorkbook ( EditorArea editorArea ) { } public void add ( LayoutPart part ) { } public boolean allowsBorder ( ) { } public void becomeActiveWorkbook ( boolean hasFocus ) { } public void createControl ( Composite parent ) { } private void closeEditorList ( ) { } public void openEditorList ( ) { } private void setEditorListBounds ( Shell parent , Point point ) { } public void resizeEditorList ( ) { } public void showPaneMenu ( ) { } boolean overImage ( EditorPane pane , int x ) { } private boolean overImage ( CTabItem item , int x ) { } private void createPage ( EditorPane editorPane ) { } private CTabItem createTab ( EditorPane editorPane ) { } private CTabItem createTab ( EditorPane editorPane , int index ) { } private void disableTabDrag ( LayoutPart part ) { } public void dispose ( ) { } private void doZoom ( ) { } void drawGradient ( ) { } private void enableDrop ( LayoutPart part ) { } private void enableTabDrag ( LayoutPart part , CTabItem tab ) { } public Rectangle getBounds ( ) { } public int getMinimumHeight ( ) { } public LayoutPart [ ] getChildren ( ) { } public Control getControl ( ) { } public EditorArea getEditorArea ( ) { } public int getItemCount ( ) { } public Composite getParent ( ) { } private CTabItem getTab ( IEditorReference editorRef ) { } private CTabItem getTab ( LayoutPart child ) { } public Control [ ] getTabList ( ) { } public EditorPane getVisibleEditor ( ) { } public boolean isActiveWorkbook ( ) { } public boolean isDragAllowed ( Point p ) { } public void openTracker ( LayoutPart part ) { } public void propertyChanged ( Object source , int property ) { } public void remove ( LayoutPart child ) { } public void removeAll ( ) { } private void removeListeners ( EditorPane editor ) { } private void removeTab ( CTabItem tab ) { } public void reorderTab ( EditorPane pane , int x , int y ) { } public void reorderTab ( EditorPane pane , int newIndex ) { } private void reorderTab ( EditorPane pane , CTabItem sourceTab , int newIndex ) { } public void replace ( LayoutPart oldPart , LayoutPart newPart ) { } private void setActiveState ( int state ) { } public void setBounds ( Rectangle r ) { } public void setContainer ( ILayoutContainer container ) { } private void setControlSize ( ) { } public void setVisibleEditor ( EditorPane comp ) { } public void tabFocusHide ( ) { } public void tabFocusShow ( boolean hasFocus ) { } public LayoutPart targetPartFor ( LayoutPart dragSource ) { } public void updateEditorTab ( IEditorPart part ) { } public void updateEditorTab ( IEditorReference ref ) { } public void updateEditorTab ( PartPane pane , String title , boolean isDirty , Image image , String toolTip ) { CTabItem tab = getTab ( pane ) ; if ( tab == null ) return ; if ( isDirty ) title = "*" + title ; tab . setText ( title ) ; <START_BUG> if ( image == null ) { <END_BUG> tab . setImage ( null ) ; Image disableImage = tab . getDisabledImage ( ) ; if ( disableImage != null ) { disableImage . dispose ( ) ; tab . setDisabledImage ( null ) ; } } else if ( ! ( image . equals ( tab . getImage ( ) ) ) ) { tab . setImage ( image ) ; Image disableImage = tab . getDisabledImage ( ) ; if ( disableImage != null ) disableImage . dispose ( ) ; Display display = tab . getDisplay ( ) ; disableImage = new Image ( display , image , SWT . IMAGE_DISABLE ) ; tab . setDisabledImage ( disableImage ) ; } tab . setToolTipText ( toolTip ) ; tab . getParent ( ) . update ( ) ; } public void zoomIn ( ) { } public void zoomOut ( ) { } public EditorPane [ ] getEditors ( ) { } }

Fix:
if ( ( image == null ) || ( image . isDisposed ( ) ) ) {