Buggy code:
TreeItem ( Tree parent , int parentIter , int style , int index , boolean create ) { } static int checkIndex ( int index ) { } static TreeItem checkNull ( TreeItem item ) { } static Tree checkNull ( Tree control ) { } protected void checkSubclass ( ) { } Color _getBackground ( ) { } Color _getBackground ( int index ) { } boolean _getChecked ( ) { } Color _getForeground ( ) { } Color _getForeground ( int index ) { } Image _getImage ( int index ) { } String _getText ( int index ) { } void clear ( ) { } public void clear ( int index , boolean all ) { } public void clearAll ( boolean all ) { } void destroyWidget ( ) { } public Color getBackground ( ) { } public Color getBackground ( int index ) { } public Rectangle getBounds ( int index ) { } public Rectangle getBounds ( ) { } public boolean getChecked ( ) { } public boolean getExpanded ( ) { } public Font getFont ( ) { } public Font getFont ( int index ) { } public Color getForeground ( ) { } public Color getForeground ( int index ) { } public boolean getGrayed ( ) { } public Image getImage ( ) { } public Image getImage ( int index ) { } public Rectangle getImageBounds ( int index ) { } public int getItemCount ( ) { } public TreeItem getItem ( int index ) { } public TreeItem [ ] getItems ( ) { } String getNameText ( ) { } public Tree getParent ( ) { } public TreeItem getParentItem ( ) { } public String getText ( ) { } public String getText ( int index ) { } public Rectangle getTextBounds ( int index ) { } public int indexOf ( TreeItem item ) { } void redraw ( ) { } void releaseChildren ( boolean destroy ) { } void releaseHandle ( ) { } void releaseWidget ( ) { } public void removeAll ( ) { } public void setBackground ( Color color ) { } public void setBackground ( int index , Color color ) { } public void setChecked ( boolean checked ) { } public void setExpanded ( boolean expanded ) { } public void setFont ( Font font ) { } public void setFont ( int index , Font font ) { } public void setForeground ( Color color ) { } public void setForeground ( int index , Color color ) { } public void setGrayed ( boolean grayed ) { } public void setImage ( int index , Image image ) { checkWidget ( ) ; if ( ( image != null ) && ( image . isDisposed ( ) ) ) { error ( ERROR_INVALID_ARGUMENT ) ; } if ( ( image != null ) && ( ( image . type ) == ( SWT . ICON ) ) ) { if ( image . equals ( _getImage ( index ) ) ) return ; } int count = Math . max ( 1 , parent . getColumnCount ( ) ) ; if ( ( 0 > index ) || ( index > ( count - 1 ) ) ) return ; int pixbuf = 0 ; if ( image != null ) { ImageList imageList = parent . imageList ; if ( imageList == null ) imageList = parent . imageList = new ImageList ( ) ; int imageIndex = imageList . indexOf ( image ) ; if ( imageIndex == ( - 1 ) ) imageIndex = imageList . add ( image ) ; pixbuf = imageList . getPixbuf ( imageIndex ) ; } int modelIndex = ( ( parent . columnCount ) == 0 ) ? Tree . FIRST_COLUMN : parent . columns [ index ] . modelIndex ; OS . gtk_tree_store_set ( parent . modelHandle , handle , ( modelIndex + ( Tree . CELL_PIXBUF ) ) , pixbuf , ( - 1 ) ) ; if ( ( ( parent . style ) & ( SWT . VIRTUAL ) ) != 0 ) { if ( ( ( OS . GTK_VERSION ) >= ( OS . VERSION ( 2 , 3 , 2 ) ) ) && ( ( OS . GTK_VERSION ) < ( OS . VERSION ( 2 , 6 , 3 ) ) ) ) { if ( ( parent . columnCount ) == 0 ) { redraw ( ) ; } } } if ( ( ( ( parent . style ) & ( SWT . VIRTUAL ) ) != 0 ) && ( ( parent . currentItem ) == null ) ) { if ( ( OS . GTK_VERSION ) >= ( OS . VERSION ( 2 , 3 , 2 ) ) ) { if ( image != null ) { int parentHandle = parent . handle ; int column = OS . gtk_tree_view_get_column ( parentHandle , index ) ; int [ ] w = new int [ 1 ] ; int pixbufRenderer = parent . getPixbufRenderer ( column ) ; OS . gtk_tree_view_column_cell_get_position ( column , pixbufRenderer , null , w ) ; if ( ( w [ 0 ] ) < ( image . getBounds ( ) . width ) ) { int style = OS . gtk_widget_get_modifier_style ( parentHandle ) ; <START_BUG> OS . gtk_widget_modify_style ( parentHandle , style ) ; <END_BUG> } } } } cached = true ; } public void setImage ( Image image ) { } public void setImage ( Image [ ] images ) { } public void setItemCount ( int count ) { } public void setText ( int index , String string ) { } public void setText ( String string ) { } public void setText ( String [ ] strings ) { } }

Fix:
parent . modifyStyle ( parentHandle , style ) ;