Buggy code:
void createColumn ( TreeColumn column , int index ) { } void createHandle ( int index ) { } void createItem ( TreeColumn column , int index ) { } void createItem ( TreeItem item , int iter , int index ) { } void createRenderers ( int columnHandle , int modelIndex , boolean check , int columnStyle ) { } void createWidget ( int index ) { } GdkColor defaultBackground ( ) { } GdkColor defaultForeground ( ) { } void deregister ( ) { } public void deselectAll ( ) { } void destroyItem ( TreeColumn column ) { } void destroyItem ( TreeItem item ) { } GdkColor getBackgroundColor ( ) { } public TreeColumn getColumn ( int index ) { } public int getColumnCount ( ) { } int [ ] getColumnTypes ( int columnCount ) { } public TreeColumn [ ] getColumns ( ) { } TreeItem getFocusItem ( ) { } GdkColor getForegroundColor ( ) { } public int getGridLineWidth ( ) { } public int getHeaderHeight ( ) { } public boolean getHeaderVisible ( ) { } public TreeItem getItem ( int index ) { } public TreeItem getItem ( Point point ) { } public int getItemCount ( ) { } public int getItemHeight ( ) { } public TreeItem [ ] getItems ( ) { } TreeItem [ ] getItems ( int parent ) { } public boolean getLinesVisible ( ) { } public TreeItem getParentItem ( ) { } int getPixbufRenderer ( int column ) { } public TreeItem [ ] getSelection ( ) { } public int getSelectionCount ( ) { } int getTextRenderer ( int column ) { } public TreeItem getTopItem ( ) { } int gtk_button_press_event ( int widget , int event ) { } int gtk_button_release_event ( int widget , int event ) { } int gtk_changed ( int widget ) { } int gtk_key_press_event ( int widget , int eventPtr ) { } int gtk_motion_notify_event ( int widget , int event ) { } int gtk_row_activated ( int tree , int path , int column ) { } int gtk_test_collapse_row ( int tree , int iter , int path ) { } int gtk_test_expand_row ( int tree , int iter , int path ) { } int gtk_toggled ( int renderer , int pathStr ) { } void hookEvents ( ) { } public int indexOf ( TreeColumn column ) { } public int indexOf ( TreeItem item ) { } boolean mnemonicHit ( char key ) { } boolean mnemonicMatch ( char key ) { } int paintWindow ( ) { } int pixbufCellDataProc ( int tree_column , int cell , int tree_model , int iter , int data ) { } void register ( ) { } void releaseItem ( TreeItem item , int [ ] index , boolean releaseResources ) { } void releaseItems ( TreeItem [ ] nodes , int [ ] index ) { } void releaseWidget ( ) { } public void removeAll ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void removeTreeListener ( TreeListener listener ) { } void resetCustomDraw ( ) { } public void setInsertMark ( TreeItem item , boolean before ) { } public void selectAll ( ) { } void setBackgroundColor ( GdkColor color ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize ) { } boolean setCellData ( int tree_model , int iter ) { } void setFontDescription ( int font ) { } void setForegroundColor ( GdkColor color ) { } public void setHeaderVisible ( boolean show ) { } public void setLinesVisible ( boolean show ) { } void setScrollWidth ( int column , int iter ) { } public void setSelection ( TreeItem [ ] items ) { checkWidget ( ) ; if ( items == null ) error ( ERROR_NULL_ARGUMENT ) ; deselectAll ( ) ; int length = items . length ; if ( ( length == 0 ) || ( ( ( ( style ) & ( SWT . SINGLE ) ) != 0 ) && ( length > 1 ) ) ) return ; int selection = OS . gtk_tree_view_get_selection ( handle ) ; OS . g_signal_handlers_block_matched ( selection , G_SIGNAL_MATCH_DATA , 0 , 0 , 0 , 0 , CHANGED ) ; boolean first = true ; for ( int i = 0 ; i < length ; i ++ ) { TreeItem item = items [ i ] ; if ( item == null ) continue ; if ( item . isDisposed ( ) ) break ; if ( ( item . parent ) != ( this ) ) continue ; int path = OS . gtk_tree_model_get_path ( modelHandle , item . handle ) ; <START_BUG> showItem ( path , first ) ; <END_BUG> if ( first ) { OS . gtk_tree_view_set_cursor ( handle , path , 0 , false ) ; } OS . gtk_tree_selection_select_iter ( selection , item . handle ) ; OS . gtk_tree_path_free ( path ) ; first = false ; } OS . g_signal_handlers_unblock_matched ( selection , G_SIGNAL_MATCH_DATA , 0 , 0 , 0 , 0 , CHANGED ) ; } public void setTopItem ( TreeItem item ) { } public void showColumn ( TreeColumn column ) { } public void showSelection ( ) { } void showItem ( int path , boolean scroll ) { } public void showItem ( TreeItem item ) { } int textCellDataProc ( int tree_column , int cell , int tree_model , int iter , int data ) { } int treeSelectionProc ( int model , int path , int iter , int [ ] selection , int length ) { } }

Fix:
showItem ( path , false ) ;