Buggy code:
void setBackgroundPixel ( int pixel ) { } boolean setBounds ( int x , int y , int width , int height , boolean move , boolean resize ) { } void setClientWindow ( int window ) { } public boolean setFocus ( ) { } public void setFont ( Font font ) { } void setForegroundPixel ( int pixel ) { } public void setLayout ( Layout layout ) { } public void setLayoutDeferred ( boolean defer ) { } public void setTabList ( Control [ ] tabList ) { } void setParentBackground ( ) { } boolean setScrollBarVisible ( ScrollBar bar , boolean visible ) { } boolean setTabGroupFocus ( boolean next ) { } boolean setTabItemFocus ( boolean next ) { } int traversalCode ( int key , XKeyEvent xEvent ) { } boolean translateMnemonic ( Event event , Control control ) { } boolean translateTraversal ( int key , XKeyEvent xEvent ) { } void updateBackgroundMode ( ) { } void updateLayout ( boolean all ) { } int XButtonPress ( int w , int client_data , int call_data , int continue_to_dispatch ) { } int XExposure ( int w , int client_data , int call_data , int continue_to_dispatch ) { if ( ( ( state ) & ( CANVAS ) ) == 0 ) { return super . XExposure ( w , client_data , call_data , continue_to_dispatch ) ; } if ( ( ! ( hooks ( Paint ) ) ) && ( ! ( filters ( Paint ) ) ) ) return 0 ; if ( ( damagedRegion ) == 0 ) damagedRegion = OS . XCreateRegion ( ) ; OS . XtAddExposureToRegion ( call_data , damagedRegion ) ; if ( ( ( style ) & ( SWT . NO_MERGE_PAINTS ) ) == 0 ) { XExposeEvent xEvent = new XExposeEvent ( ) ; OS . memmove ( xEvent , call_data , sizeof ) ; int exposeCount = xEvent . count ; if ( exposeCount == 0 ) { if ( ( OS . XEventsQueued ( xEvent . display , QueuedAfterReading ) ) != 0 ) { int xEvent1 = OS . XtMalloc ( XEvent . sizeof ) ; display . exposeCount = display . lastExpose = 0 ; int checkExposeProc = display . checkExposeProc ; OS . XCheckIfEvent ( xEvent . display , xEvent1 , checkExposeProc , xEvent . window ) ; exposeCount = display . exposeCount ; int lastExpose = display . lastExpose ; if ( ( exposeCount != 0 ) && ( lastExpose != 0 ) ) { XExposeEvent xExposeEvent = display . xExposeEvent ; OS . memmove ( xExposeEvent , lastExpose , sizeof ) ; xExposeEvent . count = 0 ; OS . memmove ( lastExpose , xExposeEvent , sizeof ) ; } OS . XtFree ( xEvent1 ) ; } } if ( exposeCount != 0 ) return 0 ; } int xDisplay = OS . XtDisplay ( handle ) ; if ( xDisplay == 0 ) return 0 ; int damageRgn = damagedRegion ; damagedRegion = 0 ; GCData data = new GCData ( ) ; data . damageRgn = damageRgn ; GC gc = GC . motif_new ( this , data ) ; OS . XSetRegion ( xDisplay , gc . handle , damageRgn ) ; XRectangle rect = new XRectangle ( ) ; OS . XClipBox ( damageRgn , rect ) ; GC paintGC = null ; Image image = null ; if ( ( ( style ) & ( SWT . DOUBLE_BUFFERED ) ) != 0 ) { Rectangle client = getClientArea ( ) ; int width = Math . min ( client . width , ( ( rect . x ) + ( rect . width ) ) ) ; int height = Math . min ( client . height , ( ( rect . y ) + ( rect . height ) ) ) ; image = new Image ( display , width , height ) ; paintGC = gc ; GCData imageGCData = new GCData ( ) ; imageGCData . damageRgn = damageRgn ; gc = GC . motif_new ( image , imageGCData ) ; gc . setForeground ( getForeground ( ) ) ; gc . setBackground ( getBackground ( ) ) ; gc . setFont ( getFont ( ) ) ; if ( ( ( style ) & ( SWT . NO_BACKGROUND ) ) != 0 ) { } else { <START_BUG> gc . fillRectangle ( 0 , 0 , width , height ) ; <END_BUG> } } Event event = new Event ( ) ; event . x = rect . x ; event . y = rect . y ; event . width = rect . width ; event . height = rect . height ; event . gc = gc ; sendEvent ( Paint , event ) ; event . gc = null ; if ( ( ( style ) & ( SWT . DOUBLE_BUFFERED ) ) != 0 ) { gc . dispose ( ) ; if ( ! ( isDisposed ( ) ) ) { paintGC . drawImage ( image , 0 , 0 ) ; } image . dispose ( ) ; gc = paintGC ; } gc . dispose ( ) ; OS . XDestroyRegion ( damageRgn ) ; return 0 ; } int xFocusIn ( XFocusChangeEvent xEvent ) { } int xFocusOut ( XFocusChangeEvent xEvent ) { } int XKeyPress ( int w , int client_data , int call_data , int continue_to_dispatch ) { } int XKeyRelease ( int w , int client_data , int call_data , int continue_to_dispatch ) { } int XNonMaskable ( int w , int client_data , int call_data , int continue_to_dispatch ) { } int XPropertyChange ( int w , int client_data , int call_data , int continue_to_dispatch ) { } int XStructureNotify ( int w , int client_data , int call_data , int continue_to_dispatch ) { } void updateMapped ( ) { } }

Fix:
drawBackground ( gc , 0 , 0 , width , height ) ;