Buggy code:
public class TreeColumn extends Item { NSTableColumn nsColumn ; Tree parent ; String toolTipText ; String displayText ; static final int MARGIN = 2 ; public TreeColumn ( Tree parent , int style ) { } public TreeColumn ( Tree parent , int style , int index ) { } public void addControlListener ( ControlListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } void deregister ( ) { } void destroyWidget ( ) { } void drawInteriorWithFrame_inView ( int id , int sel , int cellFrame , int view ) { } public int getAlignment ( ) { } String getNameText ( ) { } public Tree getParent ( ) { } public boolean getMoveable ( ) { } public boolean getResizable ( ) { } public String getToolTipText ( ) { } public int getWidth ( ) { } public void pack ( ) { checkWidget ( ) ; int width = 0 ; if ( ( displayText ) != null ) { NSMutableDictionary dict = NSMutableDictionary . dictionaryWithCapacity ( 4 ) ; NSTableHeaderCell headerCell = nsColumn . headerCell ( ) ; dict . setObject ( headerCell . font ( ) , NSFontAttributeName ) ; NSString string = NSString . stringWith ( displayText ) ; NSAttributedString attrString = ( ( NSAttributedString ) ( new NSAttributedString ( ) . alloc ( ) ) ) . initWithString ( string , dict ) ; NSSize stringSize = attrString . size ( ) ; attrString . release ( ) ; width += Math . ceil ( stringSize . width ) ; if ( ( image ) != null ) width += TreeColumn . MARGIN ; } if ( ( image ) != null ) { NSSize imageSize = handle . size ( ) ; width += Math . ceil ( imageSize . width ) ; } if ( ( ( parent . sortColumn ) == ( this ) ) && ( ( parent . sortDirection ) != ( SWT . NONE ) ) ) { NSTableHeaderCell headerCell = nsColumn . headerCell ( ) ; NSRect rect = new NSRect ( ) ; rect . width = rect . height = Float . MAX_VALUE ; NSSize cellSize = headerCell . cellSizeForBounds ( rect ) ; rect . height = cellSize . height ; NSRect sortRect = headerCell . sortIndicatorRectForBounds ( rect ) ; width += Math . ceil ( sortRect . width ) ; } GC gc = new GC ( parent ) ; int index = parent . indexOf ( this ) ; for ( int i = 0 ; i < ( parent . itemCount ) ; i ++ ) { TreeItem item = parent . items [ i ] ; <START_BUG> if ( ( ( item != null ) && ( ! ( item . isDisposed ( ) ) ) ) && ( item . cached ) ) { <END_BUG> width = Math . max ( width , item . calculateWidth ( index , gc , true , true ) ) ; if ( isDisposed ( ) ) { gc . dispose ( ) ; return ; } if ( gc . isDisposed ( ) ) gc = new GC ( parent ) ; } } gc . dispose ( ) ; setWidth ( ( width + ( parent . getInsetWidth ( ) ) ) ) ; } void releaseHandle ( ) { } void releaseWidget ( ) { } public void removeControlListener ( ControlListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setAlignment ( int alignment ) { } public void setImage ( Image image ) { } public void setMoveable ( boolean moveable ) { } public void setResizable ( boolean resizable ) { } public void setText ( String string ) { } public void setToolTipText ( String string ) { } public void setWidth ( int width ) { } }

Fix:
if ( ( item != null ) && ( ! ( item . isDisposed ( ) ) ) ) {