Buggy code:
public class Composite extends Scrollable { public int embeddedHandle ; int imHandle ; int socketHandle ; Layout layout ; Control [ ] tabList ; int layoutCount = 0 ; Composite ( ) { } public Composite ( Composite parent , int style ) { } Control [ ] _getChildren ( ) { } Control [ ] _getTabList ( ) { } public void changed ( Control [ ] changed ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } Control [ ] computeTabList ( ) { } void createHandle ( int index ) { } void createHandle ( int index , boolean scrolled ) { } void deregister ( ) { } void enableWidget ( boolean enabled ) { } Menu [ ] findMenus ( Control control ) { } void fixChildren ( Shell newShell , Shell oldShell , Decorations newDecorations , Decorations oldDecorations , Menu [ ] menus ) { } void fixTabList ( Control control ) { } void fixZOrder ( ) { } int focusHandle ( ) { } boolean forceFocus ( int focusHandle ) { } public Control [ ] getChildren ( ) { } int getChildrenCount ( ) { } public Rectangle getClientArea ( ) { } public Layout getLayout ( ) { } public boolean getLayoutDeferred ( ) { } public Control [ ] getTabList ( ) { } int gtk_button_press_event ( int widget , int event ) { } int gtk_expose_event ( int widget , int eventPtr ) { } int gtk_key_press_event ( int widget , int event ) { int result = super . gtk_key_press_event ( widget , event ) ; if ( result != 0 ) return result ; <START_BUG> if ( ( ( state ) & ( CANVAS ) ) != 0 ) { <END_BUG> GdkEventKey keyEvent = new GdkEventKey ( ) ; OS . memmove ( keyEvent , event , sizeof ) ; int key = keyEvent . keyval ; switch ( key ) { case OS . GDK_Return : case OS . GDK_KP_Enter : return 1 ; } } return result ; } int gtk_focus ( int widget , int directionType ) { } int gtk_focus_in_event ( int widget , int event ) { } int gtk_focus_out_event ( int widget , int event ) { } int gtk_map ( int widget ) { } int gtk_realize ( int widget ) { } int gtk_scroll_child ( int widget , int scrollType , int horizontal ) { } int gtk_style_set ( int widget , int previousStyle ) { } boolean hasBorder ( ) { } void hookEvents ( ) { } boolean hooksKeys ( ) { } int imHandle ( ) { } 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 ) { } void moveAbove ( int child , int sibling ) { } void moveBelow ( int child , int sibling ) { } Point minimumSize ( int wHint , int hHint , boolean changed ) { } int parentingHandle ( ) { } void register ( ) { } void releaseChildren ( ) { } void releaseWidget ( ) { } void removeControl ( Control control ) { } void resizeHandle ( int width , int height ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize ) { } public boolean setFocus ( ) { } public void setLayout ( Layout layout ) { } public void setLayoutDeferred ( boolean defer ) { } boolean setScrollBarVisible ( ScrollBar bar , boolean visible ) { } boolean setTabGroupFocus ( boolean next ) { } boolean setTabItemFocus ( boolean next ) { } public void setTabList ( Control [ ] tabList ) { } void showWidget ( ) { } boolean translateMnemonic ( Event event , Control control ) { } int traversalCode ( int key , GdkEventKey event ) { } boolean translateTraversal ( GdkEventKey keyEvent ) { } void updateLayout ( boolean all ) { } }

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