Buggy code:
public class Combo extends Composite { boolean noSelection ; boolean ignoreModify ; boolean ignoreCharacter ; int cbtHook ; int scrollWidth ; int visibleCount = 5 ; public static final int LIMIT ; static final int CBID_LIST = 1000 ; static final int CBID_EDIT = 1001 ; static int EditProc ; static int ListProc ; static final int ComboProc ; static final TCHAR ComboClass = new TCHAR ( 0 , "COMBOBOX" , true ) ; public Combo ( Composite parent , int style ) { } public void add ( String string ) { } public void add ( String string , int index ) { } public void addModifyListener ( ModifyListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } public void addVerifyListener ( VerifyListener listener ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } int CBTProc ( int nCode , int wParam , int lParam ) { } boolean checkHandle ( int hwnd ) { } protected void checkSubclass ( ) { } static int checkStyle ( int style ) { } public void clearSelection ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public void copy ( ) { } void createHandle ( ) { } public void cut ( ) { } int defaultBackground ( ) { } void deregister ( ) { } public void deselect ( int index ) { } public void deselectAll ( ) { } public String getItem ( int index ) { } public int getItemCount ( ) { } public int getItemHeight ( ) { } public String [ ] getItems ( ) { } boolean getListVisible ( ) { } String getNameText ( ) { } public int getOrientation ( ) { } public Point getSelection ( ) { } public int getSelectionIndex ( ) { } public String getText ( ) { } public int getTextHeight ( ) { } public int getTextLimit ( ) { checkWidget ( ) ; int hwndText = OS . GetDlgItem ( handle , Combo . CBID_EDIT ) ; if ( hwndText == 0 ) return Combo . LIMIT ; <START_BUG> return OS . SendMessage ( hwndText , EM_GETLIMITTEXT , 0 , 0 ) ; <END_BUG> } public int getVisibleItemCount ( ) { } boolean hasFocus ( ) { } public int indexOf ( String string ) { } public int indexOf ( String string , int start ) { } int mbcsToWcsPos ( int mbcsPos ) { } public void paste ( ) { } void register ( ) { } public void remove ( int index ) { } void remove ( int index , boolean notify ) { } public void remove ( int start , int end ) { } public void remove ( String string ) { } public void removeAll ( ) { } public void removeModifyListener ( ModifyListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void removeVerifyListener ( VerifyListener listener ) { } boolean sendKeyEvent ( int type , int msg , int wParam , int lParam , Event event ) { } public void select ( int index ) { } void setBackgroundImage ( int hBitmap ) { } void setBackgroundPixel ( int pixel ) { } void setBounds ( int x , int y , int width , int height , int flags ) { } public void setFont ( Font font ) { } void setForegroundPixel ( int pixel ) { } public void setItem ( int index , String string ) { } public void setItems ( String [ ] items ) { } void setListVisible ( boolean visible ) { } public void setOrientation ( int orientation ) { } void setScrollWidth ( ) { } void setScrollWidth ( int scrollWidth ) { } void setScrollWidth ( TCHAR buffer , boolean grow ) { } void setScrollWidth ( int newWidth , boolean grow ) { } public void setSelection ( Point selection ) { } public void setText ( String string ) { } public void setTextLimit ( int limit ) { } void setToolTipText ( Shell shell , String string ) { } public void setVisibleItemCount ( int count ) { } void subclass ( ) { } boolean translateTraversal ( MSG msg ) { } boolean traverseEscape ( ) { } void unsubclass ( ) { } String verifyText ( String string , int start , int end , Event keyEvent ) { } int wcsToMbcsPos ( int wcsPos ) { } int widgetExtStyle ( ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } int windowProc ( int hwnd , int msg , int wParam , int lParam ) { } LRESULT WM_CTLCOLOR ( int wParam , int lParam ) { } LRESULT WM_GETDLGCODE ( int wParam , int lParam ) { } LRESULT WM_KILLFOCUS ( int wParam , int lParam ) { } LRESULT WM_LBUTTONDOWN ( int wParam , int lParam ) { } LRESULT WM_SETFOCUS ( 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 ) { } LRESULT wmIMEChar ( int hwnd , int wParam , int lParam ) { } LRESULT wmSysKeyDown ( int hwnd , int wParam , int lParam ) { } }

Fix:
return ( OS . SendMessage ( hwndText , EM_GETLIMITTEXT , 0 , 0 ) ) & 2147483647 ;