Buggy code:
public class Shell extends Decorations { int shellHandle ; int tooltipsHandle ; int tooltipWindow ; int group ; int modalGroup ; boolean mapped ; boolean moved ; boolean resized ; boolean opened ; boolean fullScreen ; boolean showWithParent ; boolean modified ; boolean center ; int oldX ; int oldY ; int oldWidth ; int oldHeight ; int minWidth ; int minHeight ; int resizeMode ; Control lastActive ; ToolTip [ ] toolTips ; static final int MAXIMUM_TRIM = 128 ; static final int BORDER = 3 ; 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 gtk_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 ) { } void addToolTip ( ToolTip toolTip ) { } void adjustTrim ( ) { } void bringToTop ( boolean force ) { } void center ( ) { } void checkBorder ( ) { } void checkOpen ( ) { } int childStyle ( ) { } public void close ( ) { } void closeWidget ( ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } void createHandle ( int index ) { } int filterProc ( int xEvent , int gdkEvent , int data2 ) { } Control findBackgroundControl ( ) { } Composite findDeferredControl ( ) { } boolean hasBorder ( ) { } void hookEvents ( ) { super . hookEvents ( ) ; OS . g_signal_connect_closure_by_id ( shellHandle , display . signalIds [ KEY_PRESS_EVENT ] , 0 , display . closures [ KEY_PRESS_EVENT ] , false ) ; OS . g_signal_connect_closure_by_id ( shellHandle , display . signalIds [ WINDOW_STATE_EVENT ] , 0 , display . closures [ WINDOW_STATE_EVENT ] , false ) ; OS . g_signal_connect_closure_by_id ( shellHandle , display . signalIds [ SIZE_ALLOCATE ] , 0 , display . closures [ SIZE_ALLOCATE ] , false ) ; OS . g_signal_connect_closure_by_id ( shellHandle , display . signalIds [ CONFIGURE_EVENT ] , 0 , display . closures [ CONFIGURE_EVENT ] , false ) ; OS . g_signal_connect_closure_by_id ( shellHandle , display . signalIds [ DELETE_EVENT ] , 0 , display . closures [ DELETE_EVENT ] , false ) ; OS . g_signal_connect_closure_by_id ( shellHandle , display . signalIds [ MAP_EVENT ] , 0 , shellMapProcClosure , false ) ; OS . g_signal_connect_closure_by_id ( shellHandle , display . signalIds [ ENTER_NOTIFY_EVENT ] , 0 , display . closures [ ENTER_NOTIFY_EVENT ] , false ) ; OS . g_signal_connect_closure ( shellHandle , move_focus , display . closures [ MOVE_FOCUS ] , false ) ; int window = OS . GTK_WIDGET_WINDOW ( shellHandle ) ; OS . gdk_window_add_filter ( window , filterProc , shellHandle ) ; <START_BUG> if ( ( ( ( style ) & ( SWT . ON_TOP ) ) != 0 ) && ( ( ( style ) & ( SWT . RESIZE ) ) != 0 ) ) { <END_BUG> int mask = ( ( ( ( OS . GDK_POINTER_MOTION_MASK ) | ( OS . GDK_BUTTON_RELEASE_MASK ) ) | ( OS . GDK_BUTTON_PRESS_MASK ) ) | ( OS . GDK_ENTER_NOTIFY_MASK ) ) | ( OS . GDK_LEAVE_NOTIFY_MASK ) ; OS . gtk_widget_add_events ( shellHandle , mask ) ; OS . g_signal_connect_closure_by_id ( shellHandle , display . signalIds [ EXPOSE_EVENT ] , 0 , display . closures [ EXPOSE_EVENT ] , false ) ; OS . g_signal_connect_closure_by_id ( shellHandle , display . signalIds [ LEAVE_NOTIFY_EVENT ] , 0 , display . closures [ LEAVE_NOTIFY_EVENT ] , false ) ; OS . g_signal_connect_closure_by_id ( shellHandle , display . signalIds [ MOTION_NOTIFY_EVENT ] , 0 , display . closures [ MOTION_NOTIFY_EVENT ] , false ) ; OS . g_signal_connect_closure_by_id ( shellHandle , display . signalIds [ BUTTON_PRESS_EVENT ] , 0 , display . closures [ BUTTON_PRESS_EVENT ] , false ) ; } } public boolean isEnabled ( ) { } boolean isUndecorated ( ) { } boolean isCustomResize ( ) { } public boolean isVisible ( ) { } void register ( ) { } void releaseParent ( ) { } int topHandle ( ) { } void fixActiveShell ( ) { } void fixShell ( Shell newShell , Control control ) { } int fixedSizeAllocateProc ( int widget , int allocationPtr ) { } void fixStyle ( int handle ) { } void forceResize ( ) { } void forceResize ( int width , int height ) { } public int getAlpha ( ) { } int getResizeMode ( double x , double y ) { } public boolean getFullScreen ( ) { } public Point getLocation ( ) { } public boolean getMaximized ( ) { } public Point getMinimumSize ( ) { } Shell getModalShell ( ) { } public boolean getModified ( ) { } public Point getSize ( ) { } public boolean getVisible ( ) { } public Region getRegion ( ) { } public int getImeInputMode ( ) { } Shell _getShell ( ) { } public Shell [ ] getShells ( ) { } int gtk_button_press_event ( int widget , int event ) { } int gtk_configure_event ( int widget , int event ) { } int gtk_delete_event ( int widget , int event ) { } int gtk_enter_notify_event ( int widget , int event ) { } int gtk_expose_event ( int widget , int event ) { } int gtk_focus ( int widget , int directionType ) { }

Fix:
if ( isCustomResize ( ) ) {