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 ; boolean center ; 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 ( Shell parent , 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 ( ) { } void center ( ) { } 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 makeKeyAndOrderFront ( ) { } void noResponderFor ( int id , int sel , int selector ) { } public void open ( ) { checkWidget ( ) ; int mask = ( ( SWT . PRIMARY_MODAL ) | ( SWT . APPLICATION_MODAL ) ) | ( SWT . SYSTEM_MODAL ) ; if ( ( ( style ) & mask ) != 0 ) { display . setModalShell ( this ) ; } else { updateModal ( ) ; } bringToTop ( false ) ; setWindowVisible ( true , true ) ; if ( isDisposed ( ) ) return ; if ( ( ! ( restoreFocus ( ) ) ) && ( ! ( traverseGroup ( true ) ) ) ) { <START_BUG> if ( ( ( parent ) != null ) && ( ! ( ( ( Shell ) ( parent ) ) . window . isMiniaturized ( ) ) ) ) { <END_BUG> setFocus ( ) ; } } } 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 ) { } 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 ) { } public void setVisible ( boolean visible ) { } void setWindowVisible ( boolean visible , boolean key ) { } void setZOrder ( ) { } void setZOrder ( Control control , boolean above ) { } boolean traverseEscape ( ) { } void updateModal ( ) { } void updateParent ( boolean visible ) { } void updateSystemUIMode ( ) { } int view_stringForToolTip_point_userData ( int id , int sel , int view , int tag , int point , int userData ) { } void windowDidBecomeKey ( int id , int sel , int notification ) { } void windowDidMove ( int id , int sel , int notification ) { }

Fix:
if ( ( ( parent ) == null ) || ( ! ( ( ( Shell ) ( parent ) ) . window . isMiniaturized ( ) ) ) ) {