Buggy code:
TableItem _getItem ( int index ) { } public void addSelectionListener ( SelectionListener listener ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } boolean checkData ( TableItem item , boolean redraw ) { } protected void checkSubclass ( ) { } public void clear ( int index ) { } public void clear ( int start , int end ) { } public void clear ( int [ ] indices ) { } public void clearAll ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } void createItem ( TableColumn column , int index ) { } void createItem ( TableItem item , int index ) { } void createWidget ( ) { } int defaultBackground ( ) { } public void deselect ( int [ ] indices ) { } public void deselect ( int index ) { } public void deselect ( int start , int end ) { } public void deselectAll ( ) { } void destroyItem ( TableColumn column ) { } void destroyItem ( TableItem item ) { } void fixCheckboxImageList ( ) { } int getBackgroundPixel ( ) { } public TableColumn getColumn ( int index ) { } public int getColumnCount ( ) { } public TableColumn [ ] getColumns ( ) { } int getFocusIndex ( ) { } int getForegroundPixel ( ) { } public int getGridLineWidth ( ) { } public int getHeaderHeight ( ) { } public boolean getHeaderVisible ( ) { } public TableItem getItem ( int index ) { } public TableItem getItem ( Point point ) { } public int getItemCount ( ) { } public int getItemHeight ( ) { } public TableItem [ ] getItems ( ) { } public boolean getLinesVisible ( ) { } public TableItem [ ] getSelection ( ) { } public int getSelectionCount ( ) { } public int getSelectionIndex ( ) { } public int [ ] getSelectionIndices ( ) { } public int getTopIndex ( ) { } int imageIndex ( Image image ) { } public int indexOf ( TableColumn column ) { } public int indexOf ( TableItem item ) { } public boolean isSelected ( int index ) { } void releaseWidget ( ) { } public void remove ( int [ ] indices ) { } public void remove ( int index ) { } public void remove ( int start , int end ) { } public void removeAll ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void select ( int [ ] indices ) { } public void select ( int index ) { } public void select ( int start , int end ) { } public void selectAll ( ) { } LRESULT sendMouseDownEvent ( int type , int button , int msg , int wParam , int lParam ) { } void setBackgroundPixel ( int pixel ) { } void setCheckboxImageListColor ( ) { } void setCheckboxImageList ( int width , int height ) { if ( ( ( style ) & ( SWT . CHECK ) ) == 0 ) return ; int count = 4 ; <START_BUG> int flags = ImageList . CREATE_FLAGS ; <END_BUG> if ( ( ( style ) & ( SWT . RIGHT_TO_LEFT ) ) != 0 ) flags |= OS . ILC_MIRROR ; int hImageList = OS . ImageList_Create ( width , height , flags , count , count ) ; int hDC = OS . GetDC ( handle ) ; int memDC = OS . CreateCompatibleDC ( hDC ) ; int hBitmap = OS . CreateCompatibleBitmap ( hDC , ( width * count ) , height ) ; int hOldBitmap = OS . SelectObject ( memDC , hBitmap ) ; RECT rect = new RECT ( ) ; OS . SetRect ( rect , 0 , 0 , ( width * count ) , height ) ; int hBrush = OS . CreateSolidBrush ( getBackgroundPixel ( ) ) ; OS . FillRect ( memDC , rect , hBrush ) ; OS . DeleteObject ( hBrush ) ; int oldFont = OS . SelectObject ( hDC , defaultFont ( ) ) ; TEXTMETRIC tm = ( OS . IsUnicode ) ? ( ( TEXTMETRIC ) ( new TEXTMETRICW ( ) ) ) : new TEXTMETRICA ( ) ; OS . GetTextMetrics ( hDC , tm ) ; OS . SelectObject ( hDC , oldFont ) ; int itemWidth = Math . min ( tm . tmHeight , width ) ; int itemHeight = Math . min ( tm . tmHeight , height ) ; int left = ( width - itemWidth ) // 2 ; int top = ( ( height - itemHeight ) // 2 ) + 1 ; OS . SetRect ( rect , left , top , ( left + itemWidth ) , ( top + itemHeight ) ) ; if ( ( ( OS . COMCTL32_MAJOR ) >= 6 ) && ( OS . IsAppThemed ( ) ) ) { int hTheme = OS . OpenThemeData ( handle , Table . BUTTON ) ; OS . DrawThemeBackground ( hTheme , memDC , BP_CHECKBOX , CBS_UNCHECKEDNORMAL , rect , null ) ; rect . left += width ; rect . right += width ; OS . DrawThemeBackground ( hTheme , memDC , BP_CHECKBOX , CBS_CHECKEDNORMAL , rect , null ) ; rect . left += width ; rect . right += width ; OS . DrawThemeBackground ( hTheme , memDC , BP_CHECKBOX , CBS_UNCHECKEDNORMAL , rect , null ) ; rect . left += width ; rect . right += width ; OS . DrawThemeBackground ( hTheme , memDC , BP_CHECKBOX , CBS_MIXEDNORMAL , rect , null ) ;

Fix:
int flags = ImageList . COLOR_FLAGS ;