Buggy code:
public class Composite extends Scrollable { Layout layout ; Control [ ] tabList ; int scrolledVisibleRgn ; int siblingsVisibleRgn ; int layoutCount ; int backgroundMode ; Composite ( ) { } public Composite ( Composite parent , int style ) { } Control [ ] _getChildren ( ) { } Control [ ] _getTabList ( ) { } int callFocusEventHandler ( int nextHandler , int theEvent ) { } public void changed ( Control [ ] changed ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } protected void checkSubclass ( ) { } Control [ ] computeTabList ( ) { } void createHandle ( ) { } void createHandle ( int parentHandle ) { } void createScrolledHandle ( int parentHandle ) { } void drawBackground ( int control , int context ) { } void enableWidget ( boolean enabled ) { } Composite findDeferredControl ( ) { } Menu [ ] findMenus ( Control control ) { } void fixChildren ( Shell newShell , Shell oldShell , Decorations newDecorations , Decorations oldDecorations , Menu [ ] menus ) { } void fixTabList ( Control control ) { } public int getBackgroundMode ( ) { } public Control [ ] getChildren ( ) { } int getChildrenCount ( ) { } public Layout getLayout ( ) { } public boolean getLayoutDeferred ( ) { } public Control [ ] getTabList ( ) { } int getVisibleRegion ( int control , boolean clipChildren ) { } int kEventControlClick ( int nextHandler , int theEvent , int userData ) { } int kEventControlGetFocusPart ( int nextHandler , int theEvent , int userData ) { } int kEventControlSetFocusPart ( int nextHandler , int theEvent , int userData ) { } int kEventMouseDown ( int nextHandler , int theEvent , int userData ) { } int kEventRawKeyPressed ( int nextHandler , int theEvent , int userData ) { } int kEventUnicodeKeyPressed ( int nextHandler , int theEvent , int userData ) { } boolean hooksKeys ( ) { } void invalidateChildrenVisibleRegion ( int control ) { } 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 markLayout ( boolean changed , boolean all ) { } Point minimumSize ( int wHint , int Hint , boolean changed ) { } void releaseChildren ( boolean destroy ) { } void releaseWidget ( ) { } void removeControl ( Control control ) { } void resetVisibleRegion ( int control ) { } public void setBackgroundMode ( int mode ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } public boolean setFocus ( ) { } public void setLayout ( Layout layout ) { } public void setLayoutDeferred ( boolean defer ) { } boolean setScrollBarVisible ( ScrollBar bar , boolean visible ) { } boolean setTabGroupFocus ( ) { if ( isTabItem ( ) ) return setTabItemFocus ( ) ; boolean takeFocus = ( ( style ) & ( SWT . NO_FOCUS ) ) == 0 ; <START_BUG> if ( takeFocus && ( ( ( state ) & ( CANVAS ) ) != 0 ) ) <END_BUG> takeFocus = hooksKeys ( ) ; 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 ; } public void setTabList ( Control [ ] tabList ) { } int traversalCode ( int key , int theEvent ) { } void updateBackgroundMode ( ) { } void updateLayout ( boolean all ) { } }

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