Buggy code:
public class Text extends Scrollable { int bufferHandle ; int tabs = 8 ; int lastEventTime = 0 ; int gdkEventKey = 0 ; int fixStart = - 1 ; int fixEnd = - 1 ; boolean doubleClick ; String message = "" ; static final int INNER_BORDER = 2 ; static final int ITER_SIZEOF = OS . GtkTextIter_sizeof ( ) ; public static final int LIMIT ; public static final String DELIMITER ; public Text ( Composite parent , int style ) { } static int checkStyle ( int style ) { } void createHandle ( int index ) { state |= ( HANDLE ) | ( MENU ) ; if ( ( ( style ) & ( SWT . READ_ONLY ) ) != 0 ) { if ( ( ( style ) & ( ( ( SWT . BORDER ) | ( SWT . H_SCROLL ) ) | ( SWT . V_SCROLL ) ) ) == 0 ) { state |= THEME_BACKGROUND ; } } fixedHandle = OS . g_object_new ( display . gtk_fixed_get_type ( ) , 0 ) ; if ( ( fixedHandle ) == 0 ) error ( ERROR_NO_HANDLES ) ; OS . gtk_fixed_set_has_window ( fixedHandle , true ) ; if ( ( ( style ) & ( SWT . SINGLE ) ) != 0 ) { handle = OS . gtk_entry_new ( ) ; if ( ( handle ) == 0 ) error ( ERROR_NO_HANDLES ) ; OS . gtk_container_add ( fixedHandle , handle ) ; OS . gtk_editable_set_editable ( handle , ( ( ( style ) & ( SWT . READ_ONLY ) ) == 0 ) ) ; OS . gtk_entry_set_has_frame ( handle , ( ( ( style ) & ( SWT . BORDER ) ) != 0 ) ) ; OS . gtk_entry_set_visibility ( handle , ( ( ( style ) & ( SWT . PASSWORD ) ) == 0 ) ) ; float alignment = 0.0F ; if ( ( ( style ) & ( SWT . CENTER ) ) != 0 ) alignment = 0.5F ; if ( ( ( style ) & ( SWT . RIGHT ) ) != 0 ) alignment = 1.0F ; if ( alignment > 0.0F ) { OS . gtk_entry_set_alignment ( handle , alignment ) ; } } else { scrolledHandle = OS . gtk_scrolled_window_new ( 0 , 0 ) ; if ( ( scrolledHandle ) == 0 ) error ( ERROR_NO_HANDLES ) ; handle = OS . gtk_text_view_new ( ) ; if ( ( handle ) == 0 ) error ( ERROR_NO_HANDLES ) ; bufferHandle = OS . gtk_text_view_get_buffer ( handle ) ; if ( ( bufferHandle ) == 0 ) error ( ERROR_NO_HANDLES ) ; OS . gtk_container_add ( fixedHandle , scrolledHandle ) ; OS . gtk_container_add ( scrolledHandle , handle ) ; OS . gtk_text_view_set_editable ( handle , ( ( ( style ) & ( SWT . READ_ONLY ) ) == 0 ) ) ; if ( ( ( style ) & ( SWT . WRAP ) ) != 0 ) <START_BUG> OS . gtk_text_view_set_wrap_mode ( handle , GTK_WRAP_WORD_CHAR ) ; <END_BUG> int hsp = ( ( ( style ) & ( SWT . H_SCROLL ) ) != 0 ) ? OS . GTK_POLICY_ALWAYS : OS . GTK_POLICY_NEVER ; int vsp = ( ( ( style ) & ( SWT . V_SCROLL ) ) != 0 ) ? OS . GTK_POLICY_ALWAYS : OS . GTK_POLICY_NEVER ; OS . gtk_scrolled_window_set_policy ( scrolledHandle , hsp , vsp ) ; if ( ( ( style ) & ( SWT . BORDER ) ) != 0 ) { OS . gtk_scrolled_window_set_shadow_type ( scrolledHandle , GTK_SHADOW_ETCHED_IN ) ; } int just = OS . GTK_JUSTIFY_LEFT ; if ( ( ( style ) & ( SWT . CENTER ) ) != 0 ) just = OS . GTK_JUSTIFY_CENTER ; if ( ( ( style ) & ( SWT . RIGHT ) ) != 0 ) just = OS . GTK_JUSTIFY_RIGHT ; OS . gtk_text_view_set_justification ( handle , just ) ; } } void createWidget ( int index ) { } public void addModifyListener ( ModifyListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } public void addVerifyListener ( VerifyListener listener ) { } public void append ( String string ) { } 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 ( ) { } public void cut ( ) { } void deregister ( ) { } boolean dragDetect ( int x , int y , boolean filter , boolean [ ] consume ) { } int eventWindow ( ) { } boolean filterKey ( int keyval , int event ) { } void fixIM ( ) { } GdkColor getBackgroundColor ( ) { } public int getBorderWidth ( ) { } public int getCaretLineNumber ( ) { } public Point getCaretLocation ( ) { } public int getCaretPosition ( ) { } public int getCharCount ( ) { } public boolean getDoubleClickEnabled ( ) { } public char getEchoChar ( ) { } public boolean getEditable ( ) { } GdkColor getForegroundColor ( ) { } public int getLineCount ( ) { } public String getLineDelimiter ( ) { } public int getLineHeight ( ) { } public String getMessage ( ) { } public int getOrientation ( ) { } int getPosition ( Point point ) { } 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 ( ) { }

Fix:
OS . gtk_text_view_set_wrap_mode ( handle , ( ( OS . GTK_VERSION ) < ( OS . VERSION ( 2 , 4 , 0 ) ) ? OS . GTK_WRAP_WORD : OS . GTK_WRAP_WORD_CHAR ) ) ;