Buggy code:
public class Shell extends Decorations { Menu activeMenu ; ToolTip [ ] toolTips ; int hIMC ; int hwndMDIClient ; int lpstrTip ; int toolTipHandle ; int balloonTipHandle ; int minWidth = SWT . DEFAULT ; int minHeight = SWT . DEFAULT ; int [ ] brushes ; boolean showWithParent ; boolean fullScreen ; boolean wasMaximized ; boolean modified ; boolean center ; String toolTitle ; String balloonTitle ; int toolIcon ; int balloonIcon ; int windowProc ; Control lastActive ; SHACTIVATEINFO psai ; static int ToolTipProc ; static final int DialogProc ; static final TCHAR DialogClass = new TCHAR ( 0 , ( OS . IsWinCE ? "Dialog" : "#32770" ) , true ) ; static final int [ ] SYSTEM_COLORS = new int [ ] { OS . COLOR_BTNFACE , OS . COLOR_WINDOW , OS . COLOR_BTNTEXT , OS . COLOR_WINDOWTEXT , OS . COLOR_HIGHLIGHT , OS . COLOR_SCROLLBAR } ; static final int BRUSHES_SIZE = 32 ; 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 win32_new ( Display display , int handle ) { } public static Shell internal_new ( Display display , int handle ) { } static int checkStyle ( Shell parent , int style ) { } public void addShellListener ( ShellListener listener ) { } int balloonTipHandle ( ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } void center ( ) { } public void close ( ) { } void createBalloonTipHandle ( ) { } void createHandle ( ) { boolean embedded = ( ( handle ) != 0 ) && ( ( ( state ) & ( FOREIGN_HANDLE ) ) == 0 ) ; if ( ( ( handle ) == 0 ) || embedded ) { super . createHandle ( ) ; } else { state |= CANVAS ; if ( ( ( style ) & ( ( SWT . H_SCROLL ) | ( SWT . V_SCROLL ) ) ) == 0 ) { state |= THEME_BACKGROUND ; } <START_BUG> windowProc = OS . GetWindowLong ( handle , GWL_WNDPROC ) ; <END_BUG> } if ( ! embedded ) { int bits = OS . GetWindowLong ( handle , GWL_STYLE ) ; bits &= ~ ( ( OS . WS_OVERLAPPED ) | ( OS . WS_CAPTION ) ) ; if ( ! ( OS . IsWinCE ) ) bits |= OS . WS_POPUP ; if ( ( ( style ) & ( SWT . TITLE ) ) != 0 ) bits |= OS . WS_CAPTION ; if ( ( ( style ) & ( SWT . NO_TRIM ) ) == 0 ) { if ( ( ( style ) & ( ( SWT . BORDER ) | ( SWT . RESIZE ) ) ) == 0 ) bits |= OS . WS_BORDER ; } OS . SetWindowLong ( handle , GWL_STYLE , bits ) ; int flags = ( ( ( ( OS . SWP_DRAWFRAME ) | ( OS . SWP_NOMOVE ) ) | ( OS . SWP_NOSIZE ) ) | ( OS . SWP_NOZORDER ) ) | ( OS . SWP_NOACTIVATE ) ; SetWindowPos ( handle , 0 , 0 , 0 , 0 , 0 , flags ) ; if ( OS . IsWinCE ) _setMaximized ( true ) ; if ( OS . IsPPC ) { psai = new SHACTIVATEINFO ( ) ; psai . cbSize = SHACTIVATEINFO . sizeof ; } } if ( OS . IsDBLocale ) { hIMC = OS . ImmCreateContext ( ) ; if ( ( hIMC ) != 0 ) OS . ImmAssociateContext ( handle , hIMC ) ; } } void createToolTip ( ToolTip toolTip ) { } void createToolTipHandle ( ) { } void deregister ( ) { } void destroyToolTip ( ToolTip toolTip ) { } void destroyWidget ( ) { } public void dispose ( ) { } void enableWidget ( boolean enabled ) { } int findBrush ( int value , int lbStyle ) { } Control findBackgroundControl ( ) { } Cursor findCursor ( ) { } Control findThemeControl ( ) { } ToolTip findToolTip ( int id ) { } void fixActiveShell ( ) { } void fixShell ( Shell newShell , Control control ) { } void fixToolTip ( ) { } public void forceActive ( ) { } void forceResize ( ) { } public int getAlpha ( ) { } public Rectangle getBounds ( ) { } ToolTip getCurrentToolTip ( ) { } ToolTip getCurrentToolTip ( int hwndToolTip ) { } public boolean getEnabled ( ) { } public boolean getFullScreen ( ) { } public int getImeInputMode ( ) { } public Point getLocation ( ) { } public boolean getMaximized ( ) { } public Point getMinimumSize ( ) { } public boolean getModified ( ) { } public Region getRegion ( ) { } public Shell getShell ( ) { } public Point getSize ( ) { } public Shell [ ] getShells ( ) { } Composite findDeferredControl ( ) { } public boolean isEnabled ( ) { } public boolean isVisible ( ) { } int hwndMDIClient ( ) { } public void open ( ) { } public boolean print ( GC gc ) { } void register ( ) { } void releaseBrushes ( ) { } void releaseChildren ( boolean destroy ) { } void releaseHandle ( ) { } void releaseParent ( ) { } void releaseWidget ( ) { } void removeMenu ( Menu menu ) { }

Fix:
windowProc = OS . GetWindowLongPtr ( handle , GWL_WNDPROC ) ;