Buggy code:
public class TableItem extends Item { Table parent ; String [ ] strings ; Image [ ] images ; boolean checked ; boolean grayed ; boolean cached ; Color foreground ; Color background ; Color [ ] cellForeground ; Color [ ] cellBackground ; Font font ; Font [ ] cellFont ; int customWidth = - 1 ; public TableItem ( Table parent , int style ) { } public TableItem ( Table parent , int style , int index ) { } TableItem ( Table parent , int style , int index , boolean create ) { } static Table checkNull ( Table control ) { } int calculateWidth ( int columnIndex , GC gc , boolean callMeasureItem ) { if ( ( ! callMeasureItem ) && ( ( customWidth ) != ( - 1 ) ) ) return customWidth ; NSBrowserCell cell = parent . dataCell ; cell . setFont ( getFont ( columnIndex ) . handle ) ; cell . setTitle ( NSString . stringWith ( getText ( columnIndex ) ) ) ; Image image = getImage ( columnIndex ) ; cell . setImage ( ( image != null ? image . handle : null ) ) ; NSSize size = cell . cellSize ( ) ; <START_BUG> int width = ( ( int ) ( 0.5F + ( size . width ) ) ) ; <END_BUG> if ( callMeasureItem && ( parent . hooks ( MeasureItem ) ) ) { NSTableView tableView = ( ( NSTableView ) ( parent . view ) ) ; int nsColumnIndex = 0 ; if ( ( parent . columnCount ) > 0 ) { nsColumnIndex = tableView . columnWithIdentifier ( parent . columns [ columnIndex ] . nsColumn ) ; } int rowIndex = parent . indexOf ( this ) ; NSRect rect = tableView . frameOfCellAtColumn ( nsColumnIndex , rowIndex ) ; NSRect contentRect = cell . titleRectForBounds ( rect ) ; int rowHeight = ( ( int ) ( tableView . rowHeight ( ) ) ) ; Event event = new Event ( ) ; event . item = this ; event . index = columnIndex ; event . gc = gc ; event . x = ( ( int ) ( contentRect . x ) ) ; event . y = ( ( int ) ( contentRect . y ) ) ; event . width = width ; event . height = rowHeight ; parent . sendEvent ( MeasureItem , event ) ; if ( rowHeight < ( event . height ) ) { tableView . setRowHeight ( event . height ) ; } if ( ( parent . columnCount ) == 0 ) { int change = ( event . width ) - ( ( customWidth ) != ( - 1 ) ? customWidth : width ) ; if ( ( ( customWidth ) != ( - 1 ) ) || ( ( event . width ) != width ) ) { customWidth = event . width ; } if ( change != 0 ) parent . setScrollWidth ( this , false ) ; } width = event . width ; } return width ; } protected void checkSubclass ( ) { } void clear ( ) { } NSAttributedString createString ( int index ) { } void destroyWidget ( ) { } public Color getBackground ( ) { } public Color getBackground ( int index ) { } public Rectangle getBounds ( ) { } public Rectangle getBounds ( int index ) { } public boolean getChecked ( ) { } 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 int getImageIndent ( ) { } String getNameText ( ) { } public Table getParent ( ) { } public String getText ( ) { } public String getText ( int index ) { } public Rectangle getTextBounds ( int index ) { } void redraw ( ) { } void releaseHandle ( ) { } void releaseParent ( ) { } void releaseWidget ( ) { } public void setBackground ( Color color ) { } public void setBackground ( int index , Color color ) { } public void setChecked ( boolean checked ) { } public void setFont ( Font font ) { } public void setFont ( int index , Font font ) { } public void setForeground ( Color color ) { } public void setForeground ( int index , Color color ) { } public void setGrayed ( boolean grayed ) { } public void setImage ( Image [ ] images ) { } public void setImage ( int index , Image image ) { } public void setImage ( Image image ) { } public void setImageIndent ( int indent ) { } public void setText ( String [ ] strings ) { } public void setText ( int index , String string ) { } public void setText ( String string ) { } }

Fix:
int width = ( ( int ) ( Math . ceil ( size . width ) ) ) ;