Buggy code:
public class Text extends Scrollable { int txnObject ; int txnFrameID ; int textLimit = Text . LIMIT ; char echoCharacter ; public static final int LIMIT ; public static final String DELIMITER ; static final char PASSWORD = '¥' ; public Text ( Composite parent , int style ) { } 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 createHandle ( ) { } ScrollBar createScrollBar ( int style ) { } void createWidget ( ) { } public void cut ( ) { } Color defaultBackground ( ) { } Color defaultForeground ( ) { } void drawBackground ( int control ) { } void drawWidget ( int control , int damageRgn , int visibleRgn , int theEvent ) { } public int getCaretLineNumber ( ) { } public Point getCaretLocation ( ) { } public int getCaretPosition ( ) { } public int getCharCount ( ) { } String getClipboardText ( ) { } 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 ( ) { } public String getText ( ) { } public String getText ( int start , int end ) { } public int getTextLimit ( ) { } public int getTopIndex ( ) { } public int getTopPixel ( ) { } String getTXNText ( int iStartOffset , int iEndOffset ) { } Rect inset ( ) { } public void insert ( String string ) { } int kEventControlActivate ( int nextHandler , int theEvent , int userData ) { } int kEventControlBoundsChanged ( int nextHandler , int theEvent , int userData ) { } int kEventControlClick ( int nextHandler , int theEvent , int userData ) { } int kEventControlDeactivate ( int nextHandler , int theEvent , int userData ) { } int kEventControlSetCursor ( int nextHandler , int theEvent , int userData ) { } int kEventControlSetFocusPart ( int nextHandler , int theEvent , int userData ) { } int kEventTextInputUnicodeForKeyEvent ( int nextHandler , int theEvent , int userData ) { } public void paste ( ) { checkWidget ( ) ; if ( ( ( style ) & ( SWT . READ_ONLY ) ) != 0 ) return ; boolean paste = true ; if ( ( hooks ( Verify ) ) || ( filters ( Verify ) ) ) { String oldText = getClipboardText ( ) ; if ( oldText != null ) { Point selection = getSelection ( ) ; String newText = verifyText ( oldText , selection . x , selection . y , null ) ; if ( newText == null ) return ; <START_BUG> if ( newText != oldText ) { <END_BUG> setTXNText ( kTXNUseCurrentSelection , kTXNUseCurrentSelection , newText ) ; OS . TXNShowSelection ( txnObject , false ) ; paste = false ; } } } if ( paste ) OS . TXNPaste ( txnObject ) ; sendEvent ( Modify ) ; } void releaseWidget ( ) { } public void removeModifyListener ( ModifyListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void removeVerifyListener ( VerifyListener listener ) { } void resetVisibleRegion ( int control ) { } public void selectAll ( ) { } boolean sendKeyEvent ( int type , Event event ) { } void setBackground ( float [ ] color ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } public void setDoubleClickEnabled ( boolean doubleClick ) { } public void setEchoChar ( char echo ) { } public void setEditable ( boolean editable ) { } void setForeground ( float [ ] color ) { } void setFontStyle ( Font font ) { } public void setOrientation ( int orientation ) { } public void setSelection ( int start ) { } public void setSelection ( int start , int end ) { } public void setSelection ( Point selection ) { } public void setTabs ( int tabs ) { } public void setText ( String string ) { } void setTXNBounds ( ) { } void setTXNText ( int iStartOffset , int iEndOffset , String string ) { } public void setTextLimit ( int limit ) { } public void setTopIndex ( int index ) { } public void showSelection ( ) { } int traversalCode ( int key , int theEvent ) { } String verifyText ( String string , int start , int end , Event keyEvent ) { } }

Fix:
if ( ! ( newText . equals ( oldText ) ) ) {