Buggy code:
public boolean forceFocus ( ) { } boolean forceFocus ( int focusHandle ) { } public Color getBackground ( ) { } GdkColor getBackgroundColor ( ) { } GdkColor getBgColor ( ) { } GdkColor getBaseColor ( ) { } public int getBorderWidth ( ) { } public boolean getEnabled ( ) { } public Font getFont ( ) { } int getFontDescription ( ) { } public Color getForeground ( ) { } GdkColor getForegroundColor ( ) { } GdkColor getFgColor ( ) { } Point getIMCaretPos ( ) { } GdkColor getTextColor ( ) { } public Object getLayoutData ( ) { } public Menu getMenu ( ) { } public Monitor getMonitor ( ) { } public Composite getParent ( ) { } Control [ ] getPath ( ) { } public Shell getShell ( ) { } Shell _getShell ( ) { } public String getToolTipText ( ) { } public boolean getVisible ( ) { } int gtk_button_press_event ( int widget , int event ) { } int gtk_button_release_event ( int widget , int event ) { } int gtk_commit ( int imcontext , int text ) { } int gtk_enter_notify_event ( int widget , int event ) { } int gtk_event_after ( int widget , int gdkEvent ) { } int gtk_expose_event ( int widget , int eventPtr ) { } 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_key_press_event ( int widget , int event ) { } int gtk_key_release_event ( int widget , int event ) { } int gtk_leave_notify_event ( int widget , int event ) { } int gtk_mnemonic_activate ( int widget , int arg1 ) { } int gtk_motion_notify_event ( int widget , int event ) { } int gtk_popup_menu ( int widget ) { } int gtk_preedit_changed ( int imcontext ) { } int gtk_realize ( int widget ) { } int gtk_scroll_event ( int widget , int eventPtr ) { } int gtk_show_help ( int widget , int helpType ) { } int gtk_unrealize ( int widget ) { } int gtk_visibility_notify_event ( int widget , int event ) { } public int internal_new_GC ( GCData data ) { } int imHandle ( ) { } public void internal_dispose_GC ( int gdkGC , GCData data ) { } public boolean isReparentable ( ) { } boolean isShowing ( ) { } boolean isTabGroup ( ) { } boolean isTabItem ( ) { } public boolean isEnabled ( ) { } boolean isFocusAncestor ( Control control ) { } public boolean isFocusControl ( ) { } public boolean isVisible ( ) { } Decorations menuShell ( ) { } boolean mnemonicHit ( char key ) { } boolean mnemonicMatch ( char key ) { } void register ( ) { } public void redraw ( ) { } public void redraw ( int x , int y , int width , int height , boolean all ) { } void redrawWidget ( int x , int y , int width , int height , boolean all ) { } void releaseChild ( ) { } void releaseHandle ( ) { } void releaseWidget ( ) { } void sendFocusEvent ( int type ) { Shell shell = _getShell ( ) ; Display display = this . display ; display . focusControl = this ; display . focusEvent = type ; sendEvent ( type ) ; display . focusControl = null ; display . focusEvent = SWT . None ; if ( ! ( shell . isDisposed ( ) ) ) { switch ( type ) { case SWT . FocusIn : shell . setActiveControl ( this ) ; break ; case SWT . FocusOut : <START_BUG> if ( shell != ( display . getActiveShell ( ) ) ) { <END_BUG> shell . setActiveControl ( null ) ; } break ; } } } boolean sendHelpEvent ( int helpType ) { } boolean sendMouseEvent ( int type , int button , int time , double x_root , double y_root , int state , int eventPtr ) { } boolean sendMouseEvent ( int type , int button , int count , int detail , boolean send , int time , double x_root , double y_root , int state , int eventPtr ) { } public void setBackground ( Color color ) { } void setBackgroundColor ( int handle , GdkColor color ) { } void setBackgroundColor ( GdkColor color ) { } public void setCapture ( boolean capture ) { } public void setCursor ( Cursor cursor ) { } void setCursor ( int cursor ) { } public void setEnabled ( boolean enabled ) { } public boolean setFocus ( ) { } public void setFont ( Font font ) { } void setFontDescription ( int font ) { } public void setForeground ( Color color ) { } void setForegroundColor ( GdkColor color ) { } void setInitialBounds ( ) { } public void setMenu ( Menu menu ) { } public boolean setParent ( Composite parent ) { } boolean setRadioSelection ( boolean value ) { } public void setRedraw ( boolean redraw ) { } boolean setTabGroupFocus ( boolean next ) { } boolean setTabItemFocus ( boolean next ) { } public void setToolTipText ( String string ) { } public void setVisible ( boolean visible ) { } void setZOrder ( Control sibling , boolean above ) { } void setZOrder ( Control sibling , boolean above , boolean fixChildren ) { } boolean showMenu ( int x , int y ) { } void showWidget ( ) { } void sort ( int [ ] items ) { } public boolean traverse ( int traversal ) { } boolean translateMnemonic ( Event event , Control control ) { }

Fix:
if ( shell != ( display . activeShell ) ) {