Buggy code:
public void removeMouseMoveListener ( MouseMoveListener listener ) { } public void removeMouseTrackListener ( MouseTrackListener listener ) { } public void removeMouseWheelListener ( MouseWheelListener listener ) { } public void removePaintListener ( PaintListener listener ) { } void removeRelation ( ) { } public void removeTraverseListener ( TraverseListener listener ) { } void resetVisibleRegion ( int control ) { } boolean sendDragEvent ( int button , int stateMask , int x , int y ) { } boolean sendDragEvent ( int button , int chord , int modifiers , int x , int y ) { } void sendFocusEvent ( int type , boolean post ) { } boolean sendMouseEvent ( int type , short button , int count , int detail , boolean send , int theEvent ) { } boolean sendMouseEvent ( int type , short button , int count , boolean send , int chord , short x , short y , int modifiers ) { } boolean sendMouseEvent ( int type , short button , int count , int detail , boolean send , int chord , short x , short y , int modifiers ) { } boolean sendMouseWheel ( short wheelAxis , int wheelDelta ) { } void sendTrackEvents ( ) { } void setBackground ( ) { } public void setBackground ( Color color ) { } public void setBackgroundImage ( Image image ) { } void setBackground ( float [ ] color ) { } void setBackground ( int control , float [ ] color ) { } public void setBounds ( int x , int y , int width , int height ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } public void setBounds ( Rectangle rect ) { } public void setCapture ( boolean capture ) { } public void setCursor ( Cursor cursor ) { } void setDefaultFont ( ) { } public void setDragDetect ( boolean dragDetect ) { } public void setEnabled ( boolean enabled ) { } public boolean setFocus ( ) { } public void setFont ( Font font ) { } void setFontStyle ( Font font ) { } void setFontStyle ( int control , Font font ) { } public void setForeground ( Color color ) { } void setForeground ( float [ ] color ) { } void setForeground ( int control , float [ ] color ) { } public void setLayoutData ( Object layoutData ) { } public void setLocation ( int x , int y ) { } public void setLocation ( Point location ) { } public void setMenu ( Menu menu ) { } public boolean setParent ( Composite parent ) { } public void setRedraw ( boolean redraw ) { } public void setRegion ( Region region ) { } boolean setRadioSelection ( boolean value ) { } void setRelations ( ) { } public void setSize ( int width , int height ) { } public void setSize ( Point size ) { } boolean setTabGroupFocus ( ) { } boolean setTabItemFocus ( ) { } public void setToolTipText ( String string ) { } public void setVisible ( boolean visible ) { } void setZOrder ( ) { } void setZOrder ( Control sibling , boolean above ) { } void sort ( int [ ] items ) { } Point textExtent ( int ptr , int wHint ) { } Point textExtent ( char [ ] chars , int wHint ) { } public Point toControl ( int x , int y ) { } public Point toControl ( Point point ) { } public Point toDisplay ( int x , int y ) { } public Point toDisplay ( Point point ) { } int topHandle ( ) { } boolean translateTraversal ( int key , int theEvent , boolean [ ] consume ) { } int traversalCode ( int key , int theEvent ) { } boolean traverseMnemonic ( char key ) { } public boolean traverse ( int traversal , Event event ) { } public boolean traverse ( int traversal , KeyEvent event ) { } boolean traverse ( int traversal , char character , int keyCode , int keyLocation , int stateMask , boolean doit ) { if ( traversal == ( SWT . TRAVERSE_NONE ) ) { switch ( keyCode ) { case SWT . ESC : { traversal = SWT . TRAVERSE_ESCAPE ; doit = true ; break ; } case SWT . CR : { traversal = SWT . TRAVERSE_RETURN ; <START_BUG> doit = false ; <END_BUG> break ; } case SWT . ARROW_DOWN : case SWT . ARROW_RIGHT : { traversal = SWT . TRAVERSE_ARROW_NEXT ; doit = false ; break ; } case SWT . ARROW_UP : case SWT . ARROW_LEFT : { traversal = SWT . TRAVERSE_ARROW_PREVIOUS ; doit = false ; break ; } case SWT . TAB : { traversal = ( ( stateMask & ( SWT . SHIFT ) ) != 0 ) ? SWT . TRAVERSE_TAB_PREVIOUS : SWT . TRAVERSE_TAB_NEXT ; doit = true ; break ; } case SWT . PAGE_DOWN : { if ( ( stateMask & ( SWT . CTRL ) ) != 0 ) { traversal = SWT . TRAVERSE_PAGE_NEXT ; doit = true ; } break ; } case SWT . PAGE_UP : { if ( ( stateMask & ( SWT . CTRL ) ) != 0 ) { traversal = SWT . TRAVERSE_PAGE_PREVIOUS ; doit = true ; } break ; } default : { return false ; } } } Event event = new Event ( ) ; event . character = character ; event . detail = traversal ; event . doit = doit ; event . keyCode = keyCode ; event . keyLocation = keyLocation ; event . stateMask = stateMask ;

Fix:
doit = true ;