Buggy code:
public class TreeItem extends Item { Tree parent ; TreeItem parentItem ; TreeItem [ ] items ; int itemCount ; String [ ] strings ; Image [ ] images ; boolean checked ; boolean grayed ; boolean cached ; boolean expanded ; Color foreground ; Color background ; Color [ ] cellForeground ; Color [ ] cellBackground ; Font font ; Font [ ] cellFont ; int width = - 1 ; public SWTTreeItem handle ; public TreeItem ( Tree parent , int style ) { } public TreeItem ( Tree parent , int style , int index ) { } public TreeItem ( TreeItem parentItem , int style ) { } public TreeItem ( TreeItem parentItem , int style , int index ) { } TreeItem ( Tree parent , TreeItem parentItem , int style , int index , boolean create ) { } static TreeItem checkNull ( TreeItem item ) { } static Tree checkNull ( Tree parent ) { } static int checkIndex ( int index ) { } int calculateWidth ( int index , GC gc ) { if ( ( index == 0 ) && ( ( width ) != ( - 1 ) ) ) return width ; Font font = null ; if ( ( cellFont ) != null ) font = cellFont [ index ] ; if ( font == null ) font = this . font ; if ( font == null ) font = parent . font ; if ( font == null ) font = parent . defaultFont ( ) ; String text = ( index == 0 ) ? this . text : ( strings ) == null ? "" : strings [ index ] ; Image image = ( index == 0 ) ? this . image : ( images ) == null ? null : images [ index ] ; NSCell cell = parent . dataCell ; if ( ( font . extraTraits ) != 0 ) { NSAttributedString attribStr = parent . createString ( text , font , null , 0 , true , false ) ; cell . setAttributedStringValue ( attribStr ) ; attribStr . release ( ) ; } else { cell . setFont ( font . handle ) ; cell . setTitle ( NSString . stringWith ( ( text != null ? text : "" ) ) ) ; } objc_super super_struct = new objc_super ( ) ; super_struct . receiver = cell . id ; super_struct . super_class = OS . objc_msgSend ( cell . id , sel_superclass ) ; NSSize size = new NSSize ( ) ; OS . objc_msgSendSuper_stret ( size , super_struct , sel_cellSize ) ; if ( image != null ) <START_BUG> size . width += ( parent . imageBounds . width ) + ( Table . IMAGE_GAP ) ; <END_BUG> int width = ( ( int ) ( Math . ceil ( size . width ) ) ) ; boolean sendMeasure = true ; if ( ( ( parent . style ) & ( SWT . VIRTUAL ) ) != 0 ) { sendMeasure = cached ; } if ( sendMeasure && ( parent . hooks ( MeasureItem ) ) ) { gc . setFont ( font ) ; Event event = new Event ( ) ; event . item = this ; event . index = index ; event . gc = gc ; NSTableView widget = ( ( NSTableView ) ( parent . view ) ) ; int height = ( ( int ) ( widget . rowHeight ( ) ) ) ; event . width = width ; event . height = height ; parent . sendEvent ( MeasureItem , event ) ; if ( height < ( event . height ) ) { widget . setRowHeight ( event . height ) ; widget . setNeedsDisplay ( true ) ; } width = event . width ; } if ( index == 0 ) { NSOutlineView outlineView = ( ( NSOutlineView ) ( parent . view ) ) ; width += ( outlineView . indentationPerLevel ( ) ) * ( 1 + ( outlineView . levelForItem ( handle ) ) ) ; this . width = width ; } return width ; } protected void checkSubclass ( ) { } void clear ( ) { } public void clear ( int index , boolean all ) { } public void clearAll ( boolean all ) { } void clearSelection ( ) { } NSObject createString ( int index ) { } void deregister ( ) { } void destroyWidget ( ) { } public Color getBackground ( ) { } public Color getBackground ( int index ) { } public Rectangle getBounds ( ) { } public Rectangle getBounds ( int index ) { } public boolean getChecked ( ) { } public boolean getExpanded ( ) { } public Font getFont ( ) { } public Font getFont ( int index ) { } public Color getForeground ( ) { } public Color getForeground ( int index ) { } public boolean getGrayed ( ) { } public Image getImage ( ) { } public Image getImage ( int index ) { } public Rectangle getImageBounds ( int index ) { } public TreeItem getItem ( int index ) { } public int getItemCount ( ) { } public TreeItem [ ] getItems ( ) { } String getNameText ( ) { } public Tree getParent ( ) { } public TreeItem getParentItem ( ) { } public String getText ( ) { } public String getText ( int index ) { } public Rectangle getTextBounds ( int index ) { } public int indexOf ( TreeItem item ) { } void redraw ( int columnIndex ) { } void register ( ) { } void release ( boolean destroy ) { } void releaseChildren ( boolean destroy ) { } void releaseHandle ( ) { }

Fix:
size . width += ( parent . imageBounds . width ) + ( Tree . IMAGE_GAP ) ;