Buggy code:
static final byte [ ] _NET_WM_STATE_MAXIMIZED_HORZ = Converter . wcsToMbcs ( null , "_NET_WM_STATE_MAXIMIZED_HORZ" ) ; 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 ) { } public Shell ( Shell parent ) { } public Shell ( Shell parent , int style ) { } static int checkStyle ( int style ) { } public static Shell motif_new ( Display display , int handle ) { } public void addShellListener ( ShellListener listener ) { } void adjustTrim ( ) { } int borderHandle ( ) { } void bringToTop ( boolean force ) { } public void close ( ) { } void closeWidget ( ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } void createFocusProxy ( ) { } void createHandle ( int index ) { } void deregister ( ) { } void destroyWidget ( ) { } public void dispose ( ) { } void enableWidget ( boolean enabled ) { } public void forceActive ( ) { } public int getBorderWidth ( ) { } public Rectangle getBounds ( ) { } void getBounds ( Point location , Point size , Rectangle bounds ) { } public int getImeInputMode ( ) { } public Point getLocation ( ) { } public boolean getMaximized ( ) { } public Point getMinimumSize ( ) { } public Region getRegion ( ) { } public Shell getShell ( ) { } public Shell [ ] getShells ( ) { } public Point getSize ( ) { } public boolean getVisible ( ) { } boolean hasBorder ( ) { } void hookEvents ( ) { } int imeHeight ( ) { } public boolean isEnabled ( ) { } boolean isModal ( ) { } public boolean isVisible ( ) { } void manageChildren ( ) { } public void open ( ) { } void propagateWidget ( boolean enabled ) { } void realizeWidget ( ) { } void register ( ) { } void releaseChild ( ) { } void releaseHandle ( ) { } void releaseShells ( ) { } void releaseWidget ( ) { } public void removeShellListener ( ShellListener listener ) { } public void setActive ( ) { } void setActiveControl ( Control control ) { } public void setImeInputMode ( int mode ) { } boolean setBounds ( int x , int y , int width , int height , boolean move , boolean resize ) { } public void setEnabled ( boolean enabled ) { } public void setMaximized ( boolean maximized ) { } public void setMinimized ( boolean minimized ) { } public void setMinimumSize ( int width , int height ) { } public void setMinimumSize ( Point size ) { } void setParentTraversal ( ) { } public void setRegion ( Region region ) { } public void setText ( String string ) { } public void setVisible ( boolean visible ) { checkWidget ( ) ; realizeWidget ( ) ; if ( visible ) { sendEvent ( Show ) ; if ( isDisposed ( ) ) return ; OS . XtSetMappedWhenManaged ( shellHandle , true ) ; if ( OS . XtIsTopLevelShell ( shellHandle ) ) { OS . XtMapWidget ( shellHandle ) ; } else { OS . XtPopup ( shellHandle , XtGrabNone ) ; } boolean iconic = false ; Shell shell = ( ( parent ) != null ) ? parent . getShell ( ) : null ; do { display . update ( ) ; if ( isDisposed ( ) ) return ; <START_BUG> iconic = ( shell != null ) && ( shell . minimized ) ; <END_BUG> } while ( ( ! ( isVisible ( ) ) ) && ( ! iconic ) ) ; if ( ! iconic ) adjustTrim ( ) ; int mask = ( ( SWT . PRIMARY_MODAL ) | ( SWT . APPLICATION_MODAL ) ) | ( SWT . APPLICATION_MODAL ) ; if ( ( ( style ) & mask ) != 0 ) { OS . XUngrabPointer ( xDisplay , CurrentTime ) ; } if ( ! ( moved ) ) { moved = true ; Point location = getLocation ( ) ; oldX = ( location . x ) + ( trimLeft ( ) ) ; oldY = ( location . x ) + ( trimTop ( ) ) ; sendEvent ( Move ) ; if ( isDisposed ( ) ) return ; } if ( ! ( resized ) ) { resized = true ; Point size = getSize ( ) ; oldWidth = ( size . x ) - ( trimWidth ( ) ) ; oldHeight = ( size . y ) - ( trimHeight ( ) ) ; sendEvent ( Resize ) ; if ( isDisposed ( ) ) return ; if ( ( layout ) != null ) layout . layout ( this , false ) ; } } else { OS . XtSetMappedWhenManaged ( shellHandle , false ) ; if ( OS . XtIsTopLevelShell ( shellHandle ) ) { OS . XtUnmapWidget ( shellHandle ) ; } else { OS . XtPopdown ( shellHandle ) ; } int xDisplay = OS . XtDisplay ( shellHandle ) ; if ( xDisplay == 0 ) return ; int xWindow = OS . XtWindow ( shellHandle ) ; if ( xWindow == 0 ) return ; OS . XWithdrawWindow ( xDisplay , xWindow , OS . XDefaultScreen ( xDisplay ) ) ; sendEvent ( Hide ) ; } } void setZOrder ( Control control , boolean above ) { } int topHandle ( ) { } boolean traverseEscape ( ) { } int trimHeight ( ) { }

Fix:
iconic = ( minimized ) || ( ( shell != null ) && ( shell . minimized ) ) ;