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 ) { } Rectangle getBounds ( ) { } public Rectangle getBounds ( int index ) { } RECT getBounds ( int row , int column , boolean getText , boolean getImage , boolean full ) { } RECT getBounds ( int row , int column , boolean getText , boolean getImage , boolean fullText , boolean fullImage , int hDC ) { if ( ( ! getText ) && ( ! getImage ) ) return new RECT ( ) ; int columnCount = parent . getColumnCount ( ) ; if ( ! ( ( 0 <= column ) && ( column < ( Math . max ( 1 , columnCount ) ) ) ) ) { return new RECT ( ) ; } if ( parent . fixScrollWidth ) parent . setScrollWidth ( null , true ) ; RECT rect = new RECT ( ) ; int hwnd = parent . handle ; if ( column == 0 ) { if ( getText && getImage ) { rect . left = OS . LVIR_SELECTBOUNDS ; } else { rect . left = ( getText ) ? OS . LVIR_LABEL : OS . LVIR_ICON ; } if ( ( OS . SendMessage ( hwnd , LVM_GETITEMRECT , row , rect ) ) == 0 ) { return new RECT ( ) ; } <START_BUG> if ( ( columnCount != 0 ) && ( fullText || fullImage ) ) { <END_BUG> RECT headerRect = new RECT ( ) ; int hwndHeader = OS . SendMessage ( hwnd , LVM_GETHEADER , 0 , 0 ) ; OS . SendMessage ( hwndHeader , HDM_GETITEMRECT , 0 , headerRect ) ; if ( getText && fullText ) rect . right = headerRect . right ; if ( getImage && fullImage ) rect . left = headerRect . left ; } } else { boolean hasImage = ( ( images ) != null ) && ( ( images [ column ] ) != null ) ; rect . top = column ; if ( ( fullText || fullImage ) || ( hDC == 0 ) ) { rect . left = ( getText ) ? OS . LVIR_LABEL : OS . LVIR_ICON ; if ( ( OS . SendMessage ( hwnd , LVM_GETSUBITEMRECT , row , rect ) ) == 0 ) { return new RECT ( ) ; } if ( hasImage ) { if ( getText && ( ! getImage ) ) { RECT iconRect = new RECT ( ) ; iconRect . top = column ; iconRect . left = OS . LVIR_ICON ; if ( ( OS . SendMessage ( hwnd , LVM_GETSUBITEMRECT , row , iconRect ) ) != 0 ) { rect . left = ( iconRect . right ) + ( ( Table . INSET ) // 2 ) ; } } } else { if ( getImage && ( ! getText ) ) rect . right = rect . left ; } } else { rect . left = OS . LVIR_ICON ; if ( ( OS . SendMessage ( hwnd , LVM_GETSUBITEMRECT , row , rect ) ) == 0 ) { return new RECT ( ) ; } if ( ! hasImage ) rect . right = rect . left ; if ( getText ) { String string = ( column == 0 ) ? text : ( strings ) != null ? strings [ column ] : null ; if ( string != null ) { RECT textRect = new RECT ( ) ; TCHAR buffer = new TCHAR ( parent . getCodePage ( ) , string , false ) ; int flags = ( ( OS . DT_NOPREFIX ) | ( OS . DT_SINGLELINE ) ) | ( OS . DT_CALCRECT ) ; OS . DrawText ( hDC , buffer , buffer . length ( ) , textRect , flags ) ; rect . right += ( ( ( textRect . right ) - ( textRect . left ) ) + ( ( Table . INSET ) * 3 ) ) + 1 ; } } } } int gridWidth = ( parent . getLinesVisible ( ) ) ? Table . GRID_WIDTH : 0 ; if ( ( OS . COMCTL32_VERSION ) >= ( OS . VERSION ( 5 , 80 ) ) ) rect . top -= gridWidth ; if ( column != 0 ) rect . left += gridWidth ; rect . right = Math . max ( rect . right , rect . left ) ; rect . top += gridWidth ; rect . bottom = Math . max ( ( ( rect . bottom ) - gridWidth ) , rect . top ) ; return rect ; } 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 ) { }

Fix:
if ( fullText || fullImage ) {