Buggy code:
int kEventMenuOpening ( int nextHandler , int theEvent , int userData ) { } int kEventMenuTargetItem ( int nextHandler , int theEvent , int userData ) { } int kEventMouseDown ( int nextHandler , int theEvent , int userData ) { } int kEventMouseDragged ( int nextHandler , int theEvent , int userData ) { } int kEventMouseMoved ( int nextHandler , int theEvent , int userData ) { } int kEventMouseUp ( int nextHandler , int theEvent , int userData ) { } int kEventMouseWheelMoved ( int nextHandler , int theEvent , int userData ) { } int kEventSearchFieldCancelClicked ( int nextHandler , int theEvent , int userData ) { } int kEventSearchFieldSearchClicked ( int nextHandler , int theEvent , int userData ) { } int kEventRawKeyDown ( int nextHandler , int theEvent , int userData ) { } int kEventRawKeyModifiersChanged ( int nextHandler , int theEvent , int userData ) { } int kEventRawKeyPressed ( int nextHandler , int theEvent , int userData ) { } int kEventRawKeyRepeat ( int nextHandler , int theEvent , int userData ) { } int kEventRawKeyUp ( int nextHandler , int theEvent , int userData ) { } int kEventTextInputUnicodeForKeyEvent ( int nextHandler , int theEvent , int userData ) { } int kEventTextInputUpdateActiveInputArea ( int nextHandler , int theEvent , int userData ) { } int kEventTextInputOffsetToPos ( int nextHandler , int theEvent , int userData ) { } int kEventTextInputPosToOffset ( int nextHandler , int theEvent , int userData ) { } int kEventTextInputGetSelectedText ( int nextHandler , int theEvent , int userData ) { } int kEventWindowActivated ( int nextHandler , int theEvent , int userData ) { } int kEventWindowBoundsChanged ( int nextHandler , int theEvent , int userData ) { } int kEventWindowClose ( int nextHandler , int theEvent , int userData ) { } int kEventWindowCollapsed ( int nextHandler , int theEvent , int userData ) { } int kEventWindowCollapsing ( int nextHandler , int theEvent , int userData ) { } int kEventWindowDeactivated ( int nextHandler , int theEvent , int userData ) { } int kEventWindowDrawContent ( int nextHandler , int theEvent , int userData ) { } int kEventWindowExpanded ( int nextHandler , int theEvent , int userData ) { } int kEventWindowGetClickModality ( int nextHandler , int theEvent , int userData ) { } int kEventWindowGetRegion ( int nextHandler , int theEvent , int userData ) { } int kEventWindowHidden ( int nextHandler , int theEvent , int userData ) { } int kEventWindowHitTest ( int nextHandler , int theEvent , int userData ) { } int kEventWindowShown ( int nextHandler , int theEvent , int userData ) { } int kEventWindowUpdate ( int nextHandler , int theEvent , int userData ) { } int keyboardProc ( int nextHandler , int theEvent , int userData ) { } int menuProc ( int nextHandler , int theEvent , int userData ) { } int mouseProc ( int nextHandler , int theEvent , int userData ) { } public void notifyListeners ( int eventType , Event event ) { } void postEvent ( int eventType ) { } void postEvent ( int eventType , Event event ) { } void redrawChildren ( int control ) { } void redrawChildren ( int control , int rgn ) { } void redrawWidget ( int control , boolean children ) { } void redrawWidget ( int control , int x , int y , int width , int height , boolean children ) { } void register ( ) { } void release ( boolean destroy ) { } void releaseChildren ( boolean destroy ) { } void releaseHandle ( ) { } void releaseParent ( ) { } void releaseWidget ( ) { } public void removeListener ( int eventType , Listener handler ) { } protected void removeListener ( int eventType , SWTEventListener handler ) { } public void removeDisposeListener ( DisposeListener listener ) { } int searchProc ( int nextHandler , int theEvent , int userData ) { } void sendEvent ( Event event ) { } void sendEvent ( int eventType ) { } void sendEvent ( int eventType , Event event ) { } void sendEvent ( int eventType , Event event , boolean send ) { } boolean sendKeyEvent ( int type , int theEvent ) { } boolean sendKeyEvent ( int type , Event event ) { } int setBounds ( int control , int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } public void setData ( Object data ) { } public void setData ( String key , Object value ) { } boolean setInputState ( Event event , int type , int chord , int modifiers ) { } boolean setKeyState ( Event event , int type , int theEvent ) { } void setLocationMask ( Event event , int keyCode ) { switch ( keyCode ) { case 67 : case 69 : case 76 : case 78 : case 65 : case 75 : case 82 : case 83 : case 84 : case 85 : case 86 : case 87 : case 88 : case 89 : case 91 : case 92 : case 81 : <START_BUG> event . stateMask |= SWT . LOCATION_KEYPAD ; <END_BUG> break ; } } void setVisible ( int control , boolean visible ) { } void setZOrder ( int control , int otheControl , boolean above ) { } int textInputProc ( int nextHandler , int theEvent , int userData ) { } RGBColor toRGBColor ( float [ ] color ) { } public String toString ( ) { } int trackingProc ( int browser , int itemID , int property , int theRect , int startPt , int modifiers ) { } int windowProc ( int nextHandler , int theEvent , int userData ) { } }

Fix:
event . keyLocation = SWT . KEYPAD ;