Buggy code:
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 ) { if ( ( ( style ) & ( SWT . READ_ONLY ) ) != 0 ) return null ; if ( ( ! ( hooks ( Verify ) ) ) && ( ! ( filters ( Verify ) ) ) ) return null ; boolean call = false ; int [ ] start = new int [ 1 ] ; int [ ] end = new int [ 1 ] ; String oldText = null ; String newText = null ; switch ( msg ) { case OS . WM_CLEAR : case OS . WM_CUT : OS . SendMessage ( handle , EM_GETSEL , start , end ) ; if ( ( start [ 0 ] ) != ( end [ 0 ] ) ) { newText = "" ; call = true ; } break ; case OS . WM_PASTE : OS . SendMessage ( handle , EM_GETSEL , start , end ) ; newText = getClipboardText ( ) ; break ; case OS . EM_UNDO : case OS . WM_UNDO : if ( ( OS . SendMessage ( handle , EM_CANUNDO , 0 , 0 ) ) != 0 ) { OS . SendMessage ( handle , EM_GETSEL , start , end ) ; ignoreModify = ignoreCharacter = true ; callWindowProc ( msg , wParam , lParam ) ; newText = getSelectionText ( ) ; callWindowProc ( msg , wParam , lParam ) ; ignoreModify = ignoreCharacter = false ; } break ; } <START_BUG> if ( ( newText != null ) && ( ! ( newText . equals ( oldText ) ) ) ) { <END_BUG> oldText = newText ; newText = verifyText ( newText , start [ 0 ] , end [ 0 ] , null ) ; if ( newText == null ) return LRESULT . ZERO ; if ( ! ( newText . equals ( oldText ) ) ) { if ( call ) { callWindowProc ( msg , wParam , lParam ) ; } newText = Display . withCrLf ( newText ) ; TCHAR buffer = new TCHAR ( getCodePage ( ) , newText , true ) ; ignoreCharacter = true ; OS . SendMessage ( handle , EM_REPLACESEL , 0 , buffer ) ; ignoreCharacter = false ; return LRESULT . ZERO ; } } if ( msg == ( OS . WM_UNDO ) ) { ignoreVerify = ignoreCharacter = true ; callWindowProc ( WM_UNDO , wParam , lParam ) ; ignoreVerify = ignoreCharacter = false ; return LRESULT . ONE ; } return null ; } LRESULT wmCommandChild ( int wParam , int lParam ) { } }

Fix:
if ( newText != null ) {