Buggy code:
public class Combo extends Composite { int textLimit = Combo . LIMIT ; boolean receivingFocus ; NSRange selectionRange ; public static final int LIMIT ; 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 ) { } boolean becomeFirstResponder ( int id , int sel ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public void clearSelection ( ) { } void comboBoxSelectionDidChange ( int id , int sel , int notification ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public void copy ( ) { } void createHandle ( ) { } public void cut ( ) { } Color defaultBackground ( ) { } NSFont defaultNSFont ( ) { } Color defaultForeground ( ) { } void deregister ( ) { } public void deselect ( int index ) { } public void deselectAll ( ) { } boolean dragDetect ( int x , int y , boolean filter , boolean [ ] consume ) { if ( ( ( style ) & ( SWT . READ_ONLY ) ) == 0 ) { NSText fieldEditor = view . window ( ) . fieldEditor ( false , view ) ; NSRange selectedRange = fieldEditor . selectedRange ( ) ; if ( ( selectedRange . length ) > 0 ) { NSPoint mouseLocation = NSEvent . mouseLocation ( ) ; <START_BUG> NSTextView feAsTextView = ( ( NSTextView ) ( fieldEditor ) ) ; <END_BUG> int charPosition = feAsTextView . characterIndexForInsertionAtPoint ( mouseLocation ) ; if ( ( ( charPosition != ( OS . NSNotFound ) ) && ( charPosition >= ( selectedRange . location ) ) ) && ( charPosition < ( ( selectedRange . location ) + ( selectedRange . length ) ) ) ) { if ( super . dragDetect ( x , y , filter , consume ) ) { if ( consume != null ) consume [ 0 ] = true ; return true ; } } } return false ; } return super . dragDetect ( x , y , filter , consume ) ; } int getCharCount ( ) { } public String getItem ( int index ) { } public int getItemCount ( ) { } public int getItemHeight ( ) { } public String [ ] getItems ( ) { } int getMininumHeight ( ) { } public int getOrientation ( ) { } public Point getSelection ( ) { } public int getSelectionIndex ( ) { } public String getText ( ) { } char [ ] getText ( int start , int end ) { } public int getTextHeight ( ) { } public int getTextLimit ( ) { } public int getVisibleItemCount ( ) { } public int indexOf ( String string ) { } public int indexOf ( String string , int start ) { } void insertEditText ( String string ) { } void mouseDown ( int id , int sel , int theEvent ) { } public void paste ( ) { } void register ( ) { } void releaseWidget ( ) { } public void remove ( int index ) { } 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 ) { } public void select ( int index ) { } void sendSelection ( ) { } boolean sendKeyEvent ( NSEvent nsEvent , int type ) { } void setBackground ( float [ ] color ) { } void setBounds ( int x , int y , int width , int height , boolean move , boolean resize ) { } void setForeground ( float [ ] color ) { } public void setItem ( int index , String string ) { } public void setItems ( String [ ] items ) { } public void setListVisible ( boolean visible ) { } public void setOrientation ( int orientation ) { } public void setSelection ( Point selection ) { } public void setText ( String string ) { } void setText ( String string , boolean notify ) { } public void setTextLimit ( int limit ) { } public void setVisibleItemCount ( int count ) { } void textViewDidChangeSelection ( int id , int sel , int aNotification ) { } void textDidChange ( int id , int sel , int aNotification ) { } NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange ( int id , int sel , int aTextView , int oldSelectedCharRange , int newSelectedCharRange ) { } String verifyText ( String string , int start , int end , NSEvent keyEvent ) { } }

Fix:
NSTextView feAsTextView = new NSTextView ( fieldEditor ) ;