Buggy code:
public TableColumn [ ] getColumns ( ) { } Image getGrayUncheckedImage ( ) { } public int getGridLineWidth ( ) { } public int getHeaderHeight ( ) { } int getHeaderPadding ( ) { } public boolean getHeaderVisible ( ) { } public TableItem getItem ( int index ) { } public TableItem getItem ( Point point ) { } public int getItemCount ( ) { } public int getItemHeight ( ) { } public TableItem [ ] getItems ( ) { } int getItemY ( TableItem item ) { } public boolean getLinesVisible ( ) { } TableColumn [ ] getOrderedColumns ( ) { } public TableItem [ ] getSelection ( ) { } public int getSelectionCount ( ) { } public int getSelectionIndex ( ) { } int getSelectionIndex ( TableItem item ) { } public int [ ] getSelectionIndices ( ) { } public int getTopIndex ( ) { } Image getUncheckedImage ( ) { } void handleEvents ( Event event ) { } void headerOnMouseDoubleClick ( Event event ) { } void headerOnMouseDown ( Event event ) { } void headerOnMouseExit ( ) { } 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 ) { } 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 ( ) { } 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 [ ] items ) { } public void setSelection ( int index ) { } public void setSelection ( int start , int end ) { } public void setSelection ( int [ ] indices ) { } public void setTopIndex ( int index ) { checkWidget ( ) ; if ( ! ( ( 0 <= index ) && ( index < ( itemsCount ) ) ) ) return ; Rectangle clientArea = getClientArea ( ) ; int visibleItemCount = ( ( clientArea . height ) - ( getHeaderHeight ( ) ) ) // ( itemHeight ) ; if ( ( itemsCount ) <= visibleItemCount ) return ; index = Math . min ( index , ( ( itemsCount ) - visibleItemCount ) ) ; if ( index == ( topIndex ) ) return ; update ( ) ; int change = ( topIndex ) - index ; topIndex = index ; getVerticalBar ( ) . setSelection ( topIndex ) ; <START_BUG> if ( ( parent . drawCount ) == 0 ) { <END_BUG> GC gc = new GC ( this ) ; gc . copyArea ( 0 , 0 , clientArea . width , clientArea . height , 0 , ( change * ( itemHeight ) ) ) ; gc . dispose ( ) ; } } 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 ( ) { } void updateHorizontalBar ( int newRightX , int rightXchange ) { } void updateVerticalBar ( ) { } }

Fix:
if ( ( drawCount ) == 0 ) {