Buggy code:
public class Text extends Scrollable { int tabs ; int oldStart ; int oldEnd ; boolean doubleClick ; boolean ignoreModify ; boolean ignoreVerify ; boolean ignoreCharacter ; public static final int LIMIT ; public static final String DELIMITER ; static final int EditProc ; static final TCHAR EditClass = new TCHAR ( 0 , "EDIT" , true ) ; public Text ( Composite parent , int style ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } void createHandle ( ) { } public void addModifyListener ( ModifyListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } public void addVerifyListener ( VerifyListener listener ) { } public void append ( String string ) { } static int checkStyle ( int style ) { } public void clearSelection ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } public void copy ( ) { } void createWidget ( ) { } public void cut ( ) { } int defaultBackground ( ) { } boolean dragDetect ( int x , int y ) { if ( hooks ( DragDetect ) ) { int [ ] start = new int [ 1 ] ; int [ ] end = new int [ 1 ] ; OS . SendMessage ( handle , EM_GETSEL , start , end ) ; if ( ( start [ 0 ] ) < ( end [ 0 ] ) ) { <START_BUG> int pt = x | ( y << 16 ) ; <END_BUG> int charFromPos = OS . SendMessage ( handle , EM_CHARFROMPOS , 0 , pt ) ; int position = charFromPos & 65535 ; return ( position > ( start [ 0 ] ) ) && ( position < ( end [ 0 ] ) ) ; } } return false ; } boolean dragOverride ( ) { } void fixAlignment ( ) { } public int getBorderWidth ( ) { } public int getCaretLineNumber ( ) { } public Point getCaretLocation ( ) { } public int getCaretPosition ( ) { } public int getCharCount ( ) { } public boolean getDoubleClickEnabled ( ) { } public char getEchoChar ( ) { } public boolean getEditable ( ) { } public int getLineCount ( ) { } public String getLineDelimiter ( ) { } public int getLineHeight ( ) { } public int getOrientation ( ) { } public Point getSelection ( ) { } public int getSelectionCount ( ) { } public String getSelectionText ( ) { } public int getTabs ( ) { } int getTabWidth ( int tabs ) { } public String getText ( ) { } public String getText ( int start , int end ) { } public int getTextLimit ( ) { } public int getTopIndex ( ) { } public int getTopPixel ( ) { } public void insert ( String string ) { } int mbcsToWcsPos ( int mbcsPos ) { } public void paste ( ) { } public void removeModifyListener ( ModifyListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void removeVerifyListener ( VerifyListener listener ) { } public void selectAll ( ) { } boolean sendKeyEvent ( int type , int msg , int wParam , int lParam , Event event ) { } void setBounds ( int x , int y , int width , int height , int flags ) { } public void setDoubleClickEnabled ( boolean doubleClick ) { } public void setEchoChar ( char echo ) { } public void setEditable ( boolean editable ) { } public void setFont ( Font font ) { } public void setOrientation ( int orientation ) { } public void setSelection ( int start ) { } public void setSelection ( int start , int end ) { } public void setRedraw ( boolean redraw ) { } public void setSelection ( Point selection ) { } public void setTabs ( int tabs ) { } void setTabStops ( int tabs ) { } public void setText ( String string ) { } public void setTextLimit ( int limit ) { } public void setTopIndex ( int index ) { } public void showSelection ( ) { } String verifyText ( String string , int start , int end , Event keyEvent ) { } int wcsToMbcsPos ( int wcsPos ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } int windowProc ( int hwnd , int msg , int wParam , int lParam ) { } LRESULT WM_CHAR ( int wParam , int lParam ) { } LRESULT WM_CLEAR ( int wParam , int lParam ) { } LRESULT WM_CUT ( int wParam , int lParam ) { } LRESULT WM_GETDLGCODE ( int wParam , int lParam ) { } LRESULT WM_IME_CHAR ( int wParam , int lParam ) { } LRESULT WM_LBUTTONDBLCLK ( int wParam , int lParam ) { } LRESULT WM_LBUTTONDOWN ( int wParam , int lParam ) { } LRESULT WM_PASTE ( int wParam , int lParam ) { } LRESULT WM_UNDO ( int wParam , int lParam ) { } LRESULT wmClipboard ( int msg , int wParam , int lParam ) { } LRESULT wmCommandChild ( int wParam , int lParam ) { } }

Fix:
int pt = ( x & 65535 ) | ( ( y << 16 ) & - 65536 ) ;