Buggy code:
public class Spinner extends Composite { int hwndText ; int hwndUpDown ; boolean ignoreModify ; int pageIncrement ; int digits ; static final int EditProc ; static final TCHAR EditClass = new TCHAR ( 0 , "EDIT" , true ) ; static final int UpDownProc ; static final TCHAR UpDownClass = new TCHAR ( 0 , OS . UPDOWN_CLASS , true ) ; public Spinner ( Composite parent , int style ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } boolean checkHandle ( int hwnd ) { } protected void checkSubclass ( ) { } void createHandle ( ) { super . createHandle ( ) ; <START_BUG> state &= ~ ( CANVAS ) ; <END_BUG> int hInstance = OS . GetModuleHandle ( null ) ; int textExStyle = ( ( ( style ) & ( SWT . BORDER ) ) != 0 ) ? OS . WS_EX_CLIENTEDGE : 0 ; int textStyle = ( ( OS . WS_CHILD ) | ( OS . WS_VISIBLE ) ) | ( OS . ES_AUTOHSCROLL ) ; if ( ( ( style ) & ( SWT . READ_ONLY ) ) != 0 ) textStyle |= OS . ES_READONLY ; if ( ( OS . WIN32_VERSION ) >= ( OS . VERSION ( 4 , 10 ) ) ) { if ( ( ( style ) & ( SWT . RIGHT_TO_LEFT ) ) != 0 ) textExStyle |= OS . WS_EX_LAYOUTRTL ; } hwndText = OS . CreateWindowEx ( textExStyle , Spinner . EditClass , null , textStyle , 0 , 0 , 0 , 0 , handle , 0 , hInstance , null ) ; if ( ( hwndText ) == 0 ) error ( ERROR_NO_HANDLES ) ; OS . SetWindowLong ( hwndText , GWL_ID , hwndText ) ; int upDownStyle = ( OS . WS_CHILD ) | ( OS . WS_VISIBLE ) ; if ( ( ( style ) & ( SWT . WRAP ) ) != 0 ) upDownStyle |= OS . UDS_WRAP ; hwndUpDown = OS . CreateWindowEx ( 0 , Spinner . UpDownClass , null , upDownStyle , 0 , 0 , 0 , 0 , handle , 0 , hInstance , null ) ; if ( ( hwndUpDown ) == 0 ) error ( ERROR_NO_HANDLES ) ; OS . SetWindowLong ( hwndUpDown , GWL_ID , hwndUpDown ) ; if ( OS . IsDBLocale ) { int hIMC = OS . ImmGetContext ( handle ) ; OS . ImmAssociateContext ( hwndText , hIMC ) ; OS . ImmAssociateContext ( hwndUpDown , hIMC ) ; OS . ImmReleaseContext ( handle , hIMC ) ; } OS . SendMessage ( hwndUpDown , UDM_SETRANGE32 , 0 , 100 ) ; OS . SendMessage ( hwndUpDown , ( OS . IsWinCE ? OS . UDM_SETPOS : OS . UDM_SETPOS32 ) , 0 , 0 ) ; pageIncrement = 10 ; digits = 0 ; TCHAR buffer = new TCHAR ( getCodePage ( ) , "0" , true ) ; OS . SetWindowText ( hwndText , buffer ) ; } public void addModifyListener ( ModifyListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } void addVerifyListener ( VerifyListener listener ) { } int borderHandle ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } public void copy ( ) { } public void cut ( ) { } int defaultBackground ( ) { } void enableWidget ( boolean enabled ) { } void deregister ( ) { } boolean hasFocus ( ) { } public int getDigits ( ) { } String getDecimalSeparator ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public int getSelection ( ) { } int getSelectionText ( ) { } int mbcsToWcsPos ( int mbcsPos ) { } public void paste ( ) { } void register ( ) { } void releaseHandle ( ) { } public void removeModifyListener ( ModifyListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } void removeVerifyListener ( VerifyListener listener ) { } boolean sendKeyEvent ( int type , int msg , int wParam , int lParam , Event event ) { } void setBackgroundPixel ( int pixel ) { } public void setDigits ( int value ) { } void setForegroundPixel ( int pixel ) { } public void setIncrement ( int value ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int value ) { } public void setSelection ( int value ) { } void setSelection ( int value , boolean notify ) { } void subclass ( ) { } void unsubclass ( ) { } String verifyText ( String string , int start , int end , Event keyEvent ) { } int widgetExtStyle ( ) { } int windowProc ( int hwnd , int msg , int wParam , int lParam ) { } LRESULT WM_ERASEBKGND ( int wParam , int lParam ) { } LRESULT WM_KILLFOCUS ( int wParam , int lParam ) { } LRESULT WM_SETFOCUS ( int wParam , int lParam ) { } LRESULT WM_SETFONT ( int wParam , int lParam ) { } LRESULT WM_SIZE ( int wParam , int lParam ) { } LRESULT wmChar ( int hwnd , int wParam , int lParam ) { } LRESULT wmClipboard ( int hwndText , int msg , int wParam , int lParam ) { } LRESULT wmCommandChild ( int wParam , int lParam ) { }

Fix:
state &= ~ ( ( CANVAS ) | ( TRANSPARENT ) ) ;