Buggy code:
public class TableItem extends Item { Table parent ; String [ ] strings ; Image [ ] images ; boolean checked ; boolean grayed ; boolean cached ; int imageIndent ; int background = - 1 ; int foreground = - 1 ; int font = - 1 ; int [ ] cellBackground ; int [ ] cellForeground ; int [ ] cellFont ; 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 ) { } protected void checkSubclass ( ) { } void clear ( ) { } void destroyWidget ( ) { } public Color getBackground ( ) { } public Color getBackground ( int index ) { } public Rectangle getBounds ( ) { } public Rectangle getBounds ( int index ) { } RECT getBounds ( int row , int column , boolean getText , boolean getImage , boolean fullText ) { } RECT getBounds ( int row , int column , boolean getText , boolean getImage , boolean fullText , boolean fullImage , int hDC ) { } 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 ) { } void redraw ( ) { } void redraw ( int column , boolean drawText , boolean drawImage ) { } void releaseHandle ( ) { } void releaseWidget ( ) { } public void setBackground ( Color color ) { } public void setBackground ( int index , Color color ) { } public void setChecked ( boolean checked ) { } void setChecked ( boolean checked , boolean notify ) { } 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 ) { checkWidget ( ) ; if ( ( image != null ) && ( image . isDisposed ( ) ) ) { error ( ERROR_INVALID_ARGUMENT ) ; } Image oldImage = null ; if ( index == 0 ) { if ( ( image != null ) && ( ( image . type ) == ( SWT . ICON ) ) ) { if ( image . equals ( this . image ) ) return ; } oldImage = this . image ; super . setImage ( image ) ; } int count = Math . max ( 1 , parent . getColumnCount ( ) ) ; if ( ( 0 > index ) || ( index > ( count - 1 ) ) ) return ; if ( ( ( images ) == null ) && ( index != 0 ) ) { images = new Image [ count ] ; images [ 0 ] = image ; } if ( ( images ) != null ) { if ( ( image != null ) && ( ( image . type ) == ( SWT . ICON ) ) ) { if ( image . equals ( images [ index ] ) ) return ; } oldImage = images [ index ] ; images [ index ] = image ; } if ( ( ( parent . style ) & ( SWT . VIRTUAL ) ) != 0 ) cached = true ; <START_BUG> parent . imageIndex ( image ) ; <END_BUG> if ( index == 0 ) { parent . setScrollWidth ( this , false ) ; } else { parent . setSubImagesVisible ( true ) ; } boolean drawText = ( ( image == null ) && ( oldImage != null ) ) || ( ( image != null ) && ( oldImage == null ) ) ; redraw ( index , drawText , true ) ; } 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:
parent . imageIndex ( image , index ) ;