Buggy code:
String headerGetToolTip ( int x ) { } void headerHideToolTip ( ) { } void headerOnMouseDoubleClick ( Event event ) { } void headerOnMouseDown ( Event event ) { } void headerOnMouseExit ( ) { } void headerOnMouseHover ( Event event ) { } void headerOnMouseMove ( Event event ) { } void headerOnMouseUp ( Event event ) { } void headerOnPaint ( Event event ) { } void headerPaintHShadows ( GC gc , int x , int y , int width , int height ) { } void headerPaintVShadows ( GC gc , int x , int y , int width , int height ) { } void headerShowToolTip ( int x ) { } boolean headerUpdateToolTip ( int x ) { } public int indexOf ( TableColumn column ) { } public int indexOf ( TableItem item ) { } static void initImages ( final Display display ) { } public boolean isSelected ( int index ) { } void onArrowDown ( int stateMask ) { } void onArrowLeft ( int stateMask ) { } void onArrowRight ( int stateMask ) { } void onArrowUp ( int stateMask ) { } void onCR ( ) { } void onDispose ( Event event ) { } void onEnd ( int stateMask ) { } void onFocusIn ( ) { } void onFocusOut ( ) { } void onHome ( int stateMask ) { } void onKeyDown ( Event event ) { } void onMouseDoubleClick ( Event event ) { } void onMouseDown ( Event event ) { } void onMouseUp ( Event event ) { } void onPageDown ( int stateMask ) { } void onPageUp ( int stateMask ) { } void onPaint ( Event event ) { } void onResize ( Event event ) { } void onScrollHorizontal ( Event event ) { } void onScrollVertical ( Event event ) { } void onSpace ( ) { } void reassignFocus ( ) { } public void redraw ( ) { } public void redraw ( int x , int y , int width , int height , boolean all ) { } void redrawFromItemDownwards ( int index ) { } void redrawItem ( int itemIndex , boolean focusBoundsOnly ) { } void redrawItems ( int startIndex , int endIndex , boolean focusBoundsOnly ) { } public void remove ( int index ) { } public void remove ( int start , int end ) { } public void remove ( int [ ] indices ) { } public void removeAll ( ) { } void removeSelectedItem ( int index ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void select ( int index ) { } public void select ( int start , int end ) { } public void select ( int [ ] indices ) { } public void selectAll ( ) { } void selectItem ( TableItem item , boolean addToSelection ) { } public void setColumnOrder ( int [ ] order ) { } void setFocusItem ( TableItem item , boolean redrawOldFocus ) { } public void setFont ( Font value ) { } void setHeaderImageHeight ( int value ) { } public void setHeaderVisible ( boolean value ) { } void setImageHeight ( int value ) { } public void setItemCount ( int count ) { } public void setLinesVisible ( boolean value ) { } public void setRedraw ( boolean value ) { } public void setSelection ( TableItem item ) { } public void setSelection ( TableItem [ ] items ) { } public void setSortColumn ( TableColumn column ) { } public void setSortDirection ( int direction ) { } public void setSelection ( int index ) { } public void setSelection ( int start , int end ) { } public void setSelection ( int [ ] indices ) { } public void setTopIndex ( int index ) { } public void showColumn ( TableColumn column ) { } public void showItem ( TableItem item ) { } public void showSelection ( ) { } void sort ( int [ ] items ) { } void updateColumnWidth ( TableColumn column , int width ) { } void updateHorizontalBar ( ) { if ( ( drawCount ) != 0 ) return ; ScrollBar hBar = getHorizontalBar ( ) ; int maxX = 0 ; if ( ( columns . length ) > 0 ) { for ( int i = 0 ; i < ( columns . length ) ; i ++ ) { maxX += columns [ i ] . width ; } } else { for ( int i = 0 ; i < ( itemsCount ) ; i ++ ) { <START_BUG> Rectangle itemBounds = items [ i ] . getPaintBounds ( ) ; <END_BUG> maxX = Math . max ( maxX , ( ( ( itemBounds . x ) + ( itemBounds . width ) ) + ( horizontalOffset ) ) ) ; } } int clientWidth = getClientArea ( ) . width ; if ( maxX != ( hBar . getMaximum ( ) ) ) { hBar . setMaximum ( maxX ) ; } int thumb = Math . min ( clientWidth , maxX ) ; if ( thumb != ( hBar . getThumb ( ) ) ) { hBar . setThumb ( thumb ) ; hBar . setPageIncrement ( thumb ) ; } hBar . setVisible ( ( clientWidth < maxX ) ) ; if ( maxX < ( ( horizontalOffset ) + thumb ) ) { horizontalOffset = maxX - thumb ; hBar . setSelection ( horizontalOffset ) ; redraw ( ) ; } else { int selection = hBar . getSelection ( ) ; if ( selection != ( horizontalOffset ) ) { horizontalOffset = selection ; redraw ( ) ; } } } void updateHorizontalBar ( int newRightX , int rightXchange ) { } void updateVerticalBar ( ) { } }

Fix:
Rectangle itemBounds = items [ i ] . getCellBounds ( 0 ) ;