Buggy code:
NSBezierPath regionPath ; int visibleRgn ; Accessible accessible ; static final int CLIPPING = 1 << 10 ; static final int VISIBLE_REGION = 1 << 12 ; static final int DEFAULT_DRAG_HYSTERESIS = 5 ; Control ( ) { } public Control ( Composite parent , int style ) { } boolean acceptsFirstMouse ( int id , int sel , int theEvent ) { } int accessibilityActionNames ( int id , int sel ) { } int accessibilityAttributeNames ( int id , int sel ) { } int accessibilityParameterizedAttributeNames ( int id , int sel ) { } int accessibilityFocusedUIElement ( int id , int sel ) { } int accessibilityHitTest ( int id , int sel , NSPoint point ) { } int accessibilityAttributeValue ( int id , int sel , int arg0 ) { } int accessibilityAttributeValue_forParameter ( int id , int sel , int arg0 , int arg1 ) { } public void addControlListener ( ControlListener listener ) { } public void addDragDetectListener ( DragDetectListener listener ) { } public void addFocusListener ( FocusListener listener ) { } public void addHelpListener ( HelpListener listener ) { } public void addKeyListener ( KeyListener listener ) { } public void addMenuDetectListener ( MenuDetectListener listener ) { } public void addMouseListener ( MouseListener listener ) { } public void addMouseTrackListener ( MouseTrackListener listener ) { } public void addMouseMoveListener ( MouseMoveListener listener ) { } public void addMouseWheelListener ( MouseWheelListener listener ) { } void addRelation ( Control control ) { } public void addPaintListener ( PaintListener listener ) { } static final double SYNTHETIC_BOLD = - 2.5 ; static final double SYNTHETIC_ITALIC = 0.2 ; void addTraits ( NSMutableDictionary dict , Font font ) { } public void addTraverseListener ( TraverseListener listener ) { } boolean becomeFirstResponder ( int id , int sel ) { } void calculateVisibleRegion ( NSView view , int visibleRgn , boolean clipChildren ) { } void checkBackground ( ) { } void checkBuffered ( ) { } void checkToolTip ( Widget target ) { } public Point computeSize ( int wHint , int hHint ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } Widget computeTabGroup ( ) { } Widget [ ] computeTabList ( ) { } Control computeTabRoot ( ) { } NSView contentView ( ) { } NSAttributedString createString ( String string , Font font , float [ ] foreground , int alignment , boolean wrap , boolean enabled , boolean mnemonics ) { } void createWidget ( ) { } Color defaultBackground ( ) { } Font defaultFont ( ) { } Color defaultForeground ( ) { } NSFont defaultNSFont ( ) { } void deregister ( ) { } void destroyWidget ( ) { } void doCommandBySelector ( int id , int sel , int selector ) { } public boolean dragDetect ( Event event ) { } public boolean dragDetect ( MouseEvent event ) { } boolean dragDetect ( int button , int count , int stateMask , int x , int y ) { } boolean dragDetect ( int x , int y , boolean filter , boolean [ ] consume ) { } boolean drawGripper ( int x , int y , int width , int height , boolean vertical ) { } void drawWidget ( int id , NSGraphicsContext context , NSRect rect ) { } void enableWidget ( boolean enabled ) { } boolean equals ( float [ ] color1 , float [ ] color2 ) { } NSView eventView ( ) { } void fillBackground ( NSView view , NSGraphicsContext context , NSRect rect , int imgHeight ) { } Cursor findCursor ( ) { } Control findBackgroundControl ( ) { } Menu [ ] findMenus ( Control control ) { } Widget findTooltip ( NSPoint pt ) { } void fixChildren ( Shell newShell , Shell oldShell , Decorations newDecorations , Decorations oldDecorations , Menu [ ] menus ) { } void fixFocus ( Control focusControl ) { Shell shell = getShell ( ) ; Control control = this ; while ( ( control != shell ) && ( ( control = control . parent ) != null ) ) { if ( control . setFocus ( ) ) return ; } shell . setSavedFocus ( focusControl ) ; NSWindow window = view . window ( ) ; <START_BUG> window . makeFirstResponder ( window ) ; <END_BUG> } void flagsChanged ( int id , int sel , int theEvent ) { } NSView focusView ( ) { } public boolean forceFocus ( ) { } public Accessible getAccessible ( ) { } public Color getBackground ( ) { } Color getBackgroundColor ( ) { } public Image getBackgroundImage ( ) { } public int getBorderWidth ( ) { } public Rectangle getBounds ( ) { } public boolean getDragDetect ( ) { } boolean getDrawing ( ) { } public Cursor getCursor ( ) { } public boolean getEnabled ( ) { } public Font getFont ( ) { } public Color getForeground ( ) { } Color getForegroundColor ( ) { } public Object getLayoutData ( ) { } public Point getLocation ( ) { } public Menu getMenu ( ) { } int getMininumHeight ( ) { } public Monitor getMonitor ( ) { } public Composite getParent ( ) { } Control [ ] getPath ( ) { } NSBezierPath getPath ( Region region ) { } NSBezierPath getPath ( int region ) { } public Region getRegion ( ) { } public Shell getShell ( ) { } public Point getSize ( ) { } float getThemeAlpha ( ) { } public String getToolTipText ( ) { } public boolean getVisible ( ) { } int getVisibleRegion ( ) { } boolean hasBorder ( ) { } boolean hasFocus ( ) { } int hitTest ( int id , int sel , NSPoint point ) { }

Fix:
window . becomeKeyWindow ( ) ;