Buggy code:
public class Composite extends Scrollable { Layout layout ; Control [ ] tabList ; int layoutCount ; int backgroundMode ; Composite ( ) { } public Composite ( Composite parent , int style ) { } static int checkStyle ( int style ) { } int getCaretHandle ( ) { } Control [ ] _getChildren ( ) { } Control [ ] _getTabList ( ) { } void addChild ( Control control ) { } int backgoundProperty ( ) { } public void changed ( Control [ ] changed ) { } protected void checkSubclass ( ) { } Control [ ] computeTabList ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } void createHandle ( boolean scrolled , boolean menubar ) { } int defaultBackground ( ) { } void enableWidget ( boolean enabled ) { } Composite findDeferredControl ( ) { } Menu [ ] findMenus ( Control control ) { } void fixScrollbarVisibility ( ) { } void fixTabList ( Control control ) { } public int getBackgroundMode ( ) { } public Control [ ] getChildren ( ) { } public Layout getLayout ( ) { } Point getLocation ( Control child ) { } public Control [ ] getTabList ( ) { } boolean hooksKeys ( ) { } public boolean getLayoutDeferred ( ) { } void HandlePreviewKeyDown ( int sender , int e ) { } void HandlePreviewMouseDown ( int sender , int e ) { } void HandlePreviewTextInput ( int sender , int e ) { } public boolean isLayoutDeferred ( ) { } boolean isTabGroup ( ) { } public void layout ( ) { } public void layout ( boolean changed ) { } public void layout ( boolean changed , boolean all ) { } public void layout ( Control [ ] changed ) { } void OnRender ( int drawingContext ) { } void markLayout ( boolean changed , boolean all ) { } Point minimumSize ( int wHint , int hHint , boolean changed ) { } int parentingHandle ( ) { } void releaseChildren ( boolean destroy ) { } void releaseWidget ( ) { } void removeChild ( Control control ) { } void removeControl ( Control control ) { } void setBackgroundBrush ( int brush ) { } public void setBackgroundMode ( int mode ) { } int setBounds ( int x , int y , int width , int height , int flags ) { } void setClipping ( ) { } public boolean setFocus ( ) { } void setFont ( int font , double size ) { } void setForegroundBrush ( int brush ) { } public void setLayout ( Layout layout ) { } public void setLayoutDeferred ( boolean defer ) { } public void setTabList ( Control [ ] tabList ) { } boolean setTabGroupFocus ( ) { if ( isTabItem ( ) ) return setTabItemFocus ( ) ; boolean takeFocus = ( ( style ) & ( SWT . NO_FOCUS ) ) == 0 ; <START_BUG> if ( ( ( state ) & ( CANVAS ) ) != 0 ) { <END_BUG> takeFocus = hooksKeys ( ) ; if ( ( ( style ) & ( SWT . EMBEDDED ) ) != 0 ) takeFocus = true ; } if ( takeFocus && ( setTabItemFocus ( ) ) ) return true ; Control [ ] children = _getChildren ( ) ; for ( int i = 0 ; i < ( children . length ) ; i ++ ) { Control child = children [ i ] ; if ( ( child . isTabItem ( ) ) && ( child . setTabItemFocus ( ) ) ) return true ; } return false ; } boolean translateMnemonic ( Event event , Control control ) { } int traversalCode ( int key , int event ) { } boolean translateTraversal ( int msg ) { } void updateBackgroundColor ( ) { } void updateBackgroundImage ( ) { } void updateBackgroundMode ( ) { } void updateFont ( Font oldFont , Font newFont ) { } void updateLayout ( boolean resize , boolean all ) { } }

Fix:
if ( takeFocus && ( ( ( state ) & ( CANVAS ) ) != 0 ) ) {