Buggy code:
public class Shell extends Decorations { NSWindow window ; SWTWindowDelegate windowDelegate ; boolean opened ; boolean moved ; boolean resized ; boolean fullScreen ; Control lastActive ; Region region ; Rectangle normalBounds ; 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 ) { } static int checkStyle ( int style ) { } public void addShellListener ( ShellListener listener ) { } void bringToTop ( boolean force ) { } void checkOpen ( ) { } public void close ( ) { } void closeWidget ( ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } void createHandle ( ) { state |= CANVAS ; if ( ( window ) != null ) { } else { window = ( ( NSWindow ) ( new NSWindow ( ) . alloc ( ) ) ) ; NSRect rect = new NSRect ( ) ; Monitor monitor = getMonitor ( ) ; Rectangle clientArea = monitor . getClientArea ( ) ; rect . width = ( ( clientArea . width ) * 5 ) // 8 ; rect . height = ( ( clientArea . height ) * 5 ) // 8 ; int styleMask = OS . NSBorderlessWindowMask ; if ( ( ( style ) & ( SWT . NO_TRIM ) ) == 0 ) { styleMask = OS . NSTitledWindowMask ; if ( ( ( style ) & ( SWT . CLOSE ) ) != 0 ) styleMask |= OS . NSClosableWindowMask ; if ( ( ( style ) & ( SWT . MIN ) ) != 0 ) styleMask |= OS . NSMiniaturizableWindowMask ; if ( ( ( style ) & ( SWT . RESIZE ) ) != 0 ) styleMask |= OS . NSResizableWindowMask ; } window = window . initWithContentRect_styleMask_backing_defer_ ( rect , styleMask , NSBackingStoreBuffered , false ) ; display . cascade = window . cascadeTopLeftFromPoint ( cascade ) ; if ( ( ( style ) & ( SWT . ON_TOP ) ) != 0 ) { window . setLevel ( NSFloatingWindowLevel ) ; } } createHandle ( null ) ; <START_BUG> window . setContentView ( view ) ; <END_BUG> windowDelegate = ( ( SWTWindowDelegate ) ( new SWTWindowDelegate ( ) . alloc ( ) . init ( ) ) ) ; windowDelegate . setTag ( jniRef ) ; window . setDelegate ( windowDelegate ) ; } void destroyWidget ( ) { } Control findBackgroundControl ( ) { } Composite findDeferredControl ( ) { } Cursor findCursor ( ) { } void fixShell ( Shell newShell , Control control ) { } public void forceActive ( ) { } public int getAlpha ( ) { } public Rectangle getBounds ( ) { } public Rectangle getClientArea ( ) { } int getDrawCount ( int control ) { } public boolean getFullScreen ( ) { } public int getImeInputMode ( ) { } public Point getLocation ( ) { } public boolean getMaximized ( ) { } public boolean getMinimized ( ) { } public Point getMinimumSize ( ) { } float [ ] getParentBackground ( ) { } public Region getRegion ( ) { } public Shell getShell ( ) { } public Shell [ ] getShells ( ) { } public Point getSize ( ) { } boolean hasBorder ( ) { } public boolean isEnabled ( ) { } boolean isEnabledCursor ( ) { } public boolean isVisible ( ) { } public void open ( ) { } void releaseChildren ( boolean destroy ) { } void releaseHandle ( ) { } void releaseParent ( ) { } void releaseWidget ( ) { } public void removeShellListener ( ShellListener listener ) { } public void setActive ( ) { } void setActiveControl ( Control control ) { } public void setAlpha ( int alpha ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize ) { } 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 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 updateSystemUIMode ( ) { } void windowDidBecomeKey ( int notification ) { } void windowDidMove ( int notification ) { } void windowDidResize ( int notification ) { } void windowDidResignKey ( int notification ) { } boolean windowShouldClose ( int window ) { } void windowWillClose ( int notification ) { } }

Fix:
window . setContentView ( topView ( ) ) ;