Buggy code:
public class ToolBar extends Composite { int lastFocusId ; ToolItem [ ] items ; boolean ignoreResize ; ImageList imageList ; ImageList disabledImageList ; ImageList hotImageList ; static final int ToolBarProc ; static final TCHAR ToolBarClass = new TCHAR ( 0 , OS . TOOLBARCLASSNAME , true ) ; static final int DEFAULT_WIDTH = 24 ; static final int DEFAULT_HEIGHT = 22 ; public ToolBar ( Composite parent , int style ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } void createHandle ( ) { } void createItem ( ToolItem item , int index ) { } void createWidget ( ) { } int defaultBackground ( ) { } void destroyItem ( ToolItem item ) { } ImageList getDisabledImageList ( ) { } ImageList getHotImageList ( ) { } ImageList getImageList ( ) { } public ToolItem getItem ( int index ) { } public ToolItem getItem ( Point point ) { } public int getItemCount ( ) { } public ToolItem [ ] getItems ( ) { } public int getRowCount ( ) { } public int indexOf ( ToolItem item ) { } void layoutItems ( ) { } boolean mnemonicHit ( char ch ) { } boolean mnemonicMatch ( char ch ) { } void releaseWidget ( ) { } void removeControl ( Control control ) { } void setBounds ( int x , int y , int width , int height , int flags ) { } void setDefaultFont ( ) { } void setDisabledImageList ( ImageList imageList ) { } public void setFont ( Font font ) { } void setHotImageList ( ImageList imageList ) { } void setImageList ( ImageList imageList ) { } public boolean setParent ( Composite parent ) { } void setRows ( int count ) { } boolean setTabItemFocus ( ) { } String toolTipText ( NMTTDISPINFO hdr ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT WM_CAPTURECHANGED ( int wParam , int lParam ) { } LRESULT WM_COMMAND ( int wParam , int lParam ) { } LRESULT WM_GETDLGCODE ( int wParam , int lParam ) { } LRESULT WM_KEYDOWN ( int wParam , int lParam ) { } LRESULT WM_KILLFOCUS ( int wParam , int lParam ) { } LRESULT WM_NOTIFY ( int wParam , int lParam ) { } LRESULT WM_SETFOCUS ( int wParam , int lParam ) { } LRESULT WM_SIZE ( int wParam , int lParam ) { } LRESULT WM_WINDOWPOSCHANGING ( int wParam , int lParam ) { } LRESULT wmCommandChild ( int wParam , int lParam ) { } LRESULT wmNotifyChild ( int wParam , int lParam ) { NMHDR hdr = new NMHDR ( ) ; OS . MoveMemory ( hdr , lParam , sizeof ) ; switch ( hdr . code ) { case OS . TBN_DROPDOWN : NMTOOLBAR lpnmtb = new NMTOOLBAR ( ) ; OS . MoveMemory ( lpnmtb , lParam , NMTOOLBAR . sizeof ) ; ToolItem child = items [ lpnmtb . iItem ] ; if ( child != null ) { Event event = new Event ( ) ; event . detail = SWT . ARROW ; int index = OS . SendMessage ( handle , TB_COMMANDTOINDEX , lpnmtb . iItem , 0 ) ; RECT rect = new RECT ( ) ; OS . SendMessage ( handle , TB_GETITEMRECT , index , rect ) ; event . x = rect . left ; event . y = rect . bottom ; child . postEvent ( Selection , event ) ; } break ; case OS . NM_CUSTOMDRAW : <START_BUG> if ( ( background ) == ( - 1 ) ) <END_BUG> break ; NMCUSTOMDRAW nmcd = new NMCUSTOMDRAW ( ) ; OS . MoveMemory ( nmcd , lParam , NMCUSTOMDRAW . sizeof ) ; switch ( nmcd . dwDrawStage ) { case OS . CDDS_PREERASE : return new LRESULT ( OS . CDRF_NOTIFYPOSTERASE ) ; case OS . CDDS_POSTERASE : drawBackground ( nmcd . hdc ) ; return null ; } break ; case OS . TBN_HOTITEMCHANGE : if ( ! ( OS . IsWinCE ) ) { NMTBHOTITEM lpnmhi = new NMTBHOTITEM ( ) ; OS . MoveMemory ( lpnmhi , lParam , NMTBHOTITEM . sizeof ) ; switch ( lpnmhi . dwFlags ) { case OS . HICF_ARROWKEYS : RECT client = new RECT ( ) ; OS . GetClientRect ( handle , client ) ; int index = OS . SendMessage ( handle , TB_COMMANDTOINDEX , lpnmhi . idNew , 0 ) ; RECT rect = new RECT ( ) ; OS . SendMessage ( handle , TB_GETITEMRECT , index , rect ) ; if ( ( ( rect . right ) > ( client . right ) ) || ( ( rect . bottom ) > ( client . bottom ) ) ) { return LRESULT . ONE ; } break ; } } break ; } return super . wmNotifyChild ( wParam , lParam ) ; } }

Fix:
if ( ( ( findThemeControl ( ) ) == null ) && ( ( background ) == ( - 1 ) ) )