Buggy code:
public class Shell extends Decorations { NSWindow window ; SWTWindowDelegate windowDelegate ; int tooltipOwner ; int tooltipTag ; int tooltipUserData ; boolean opened ; boolean moved ; boolean resized ; boolean fullScreen ; Control lastActive ; Rectangle normalBounds ; boolean keyInputHappened ; static int DEFAULT_CLIENT_WIDTH = - 1 ; static int DEFAULT_CLIENT_HEIGHT = - 1 ; public Shell ( ) { } public Shell ( int style ) { } public Shell ( Display display ) { } public Shell ( Display display , int style ) { } Shell ( Display display , Shell parent , int style , int handle , boolean embedded ) { } public Shell ( Shell parent ) { } public Shell ( Shell parent , int style ) { } public static Shell internal_new ( Display display , int handle ) { } public static Shell cocoa_new ( Display display , int handle ) { } static int checkStyle ( int style ) { } boolean accessibilityIsIgnored ( int id , int sel ) { } public void addShellListener ( ShellListener listener ) { } void bringToTop ( boolean force ) { } boolean canBecomeKeyWindow ( int id , int sel ) { } void checkOpen ( ) { } public void close ( ) { } void closeWidget ( ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } void createHandle ( ) { } void deregister ( ) { } void destroyWidget ( ) { } void drawBackground ( int id , NSGraphicsContext context , NSRect rect ) { } Control findBackgroundControl ( ) { } Composite findDeferredControl ( ) { } Cursor findCursor ( ) { } boolean fixResize ( ) { } void fixShell ( Shell newShell , Control control ) { } public void forceActive ( ) { } public int getAlpha ( ) { } public Rectangle getBounds ( ) { } public Rectangle getClientArea ( ) { } public boolean getFullScreen ( ) { } public int getImeInputMode ( ) { } public Point getLocation ( ) { } public boolean getMaximized ( ) { } Shell getModalShell ( ) { } public boolean getModified ( ) { } public boolean getMinimized ( ) { } public Point getMinimumSize ( ) { } public Region getRegion ( ) { } public Shell getShell ( ) { } public Shell [ ] getShells ( ) { } public Point getSize ( ) { } float getThemeAlpha ( ) { } boolean hasBorder ( ) { } void helpRequested ( int id , int sel , int theEvent ) { } void invalidateVisibleRegion ( ) { } boolean isDrawing ( ) { } public boolean isEnabled ( ) { } boolean isEnabledCursor ( ) { } public boolean isVisible ( ) { } boolean makeFirstResponder ( int id , int sel , int notification ) { } void noResponderFor ( int id , int sel , int selector ) { } public void open ( ) { } public boolean print ( GC gc ) { } void register ( ) { } void releaseChildren ( boolean destroy ) { } void releaseHandle ( ) { } void releaseParent ( ) { } void releaseWidget ( ) { } public void removeShellListener ( ShellListener listener ) { } void sendToolTipEvent ( boolean enter ) { <START_BUG> if ( isVisible ( ) ) <END_BUG> return ; if ( ( tooltipTag ) == 0 ) { NSView view = window . contentView ( ) ; tooltipTag = view . addToolTipRect ( new NSRect ( ) , window , 0 ) ; if ( ( tooltipTag ) != 0 ) { NSTrackingArea trackingArea = new NSTrackingArea ( tooltipTag ) ; id owner = trackingArea . owner ( ) ; if ( owner != null ) tooltipOwner = owner . id ; id userInfo = trackingArea . userInfo ( ) ; if ( userInfo != null ) { tooltipUserData = userInfo . id ; } else { int [ ] value = new int [ 1 ] ; OS . object_getInstanceVariable ( tooltipTag , new byte [ ] { '_' , 'u' , 's' , 'e' , 'r' , 'I' , 'n' , 'f' , 'o' } , value ) ; tooltipUserData = value [ 0 ] ; } } } if ( ( ( ( tooltipTag ) == 0 ) || ( ( tooltipOwner ) == 0 ) ) || ( ( tooltipUserData ) == 0 ) ) return ; NSPoint pt = window . convertScreenToBase ( NSEvent . mouseLocation ( ) ) ; NSEvent event = NSEvent . enterExitEventWithType ( ( enter ? OS . NSMouseEntered : OS . NSMouseExited ) , pt , 0 , 0 , window . windowNumber ( ) , null , 0 , tooltipTag , tooltipUserData ) ; OS . objc_msgSend ( tooltipOwner , ( enter ? OS . sel_mouseEntered_ : OS . sel_mouseExited_ ) , event . id ) ; } public void setActive ( ) { } void setActiveControl ( Control control ) { } public void setAlpha ( int alpha ) { } void setBounds ( int x , int y , int width , int height , boolean move , boolean resize ) { } void setClipRegion ( float x , float y ) { } public void setEnabled ( boolean enabled ) { } public void setFullScreen ( boolean fullScreen ) { } public void setMenuBar ( Menu menu ) { } public void setImeInputMode ( int mode ) { } public void setMaximized ( boolean maximized ) { } public void setMinimized ( boolean minimized ) { } public void setMinimumSize ( int width , int height ) { } public void setMinimumSize ( Point size ) { } public void setModified ( boolean modified ) { } public void setRegion ( Region region ) { } public void setText ( String string ) { }

Fix:
if ( ! ( isVisible ( ) ) )