Buggy code:
GdkColor getBackgroundColor ( ) { } public Rectangle getClientArea ( ) { } public TreeColumn getColumn ( int index ) { } public int getColumnCount ( ) { } public int [ ] getColumnOrder ( ) { } 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 ( ) { } public TreeColumn getSortColumn ( ) { } public int getSortDirection ( ) { } 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_expand_collapse_cursor_row ( int widget , int logical , int expand , int open_all ) { } 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 hideFirstColumn ( ) { } void hookEvents ( ) { } public int indexOf ( TreeColumn column ) { } public int indexOf ( TreeItem item ) { } boolean mnemonicHit ( char key ) { } boolean mnemonicMatch ( char key ) { } int paintWindow ( ) { } void recreateRenderers ( ) { } void redrawBackgroundImage ( ) { } void register ( ) { } void releaseItem ( TreeItem item , boolean release ) { } void releaseItems ( int parentIter ) { } void releaseChildren ( boolean destroy ) { } void releaseWidget ( ) { } void remove ( int parentIter , int start , int end ) { } public void removeAll ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void removeTreeListener ( TreeListener listener ) { } int rendererGetSizeProc ( int cell , int widget , int cell_area , int x_offset , int y_offset , int width , int height ) { } int rendererRenderProc ( int cell , int window , int widget , int background_area , int cell_area , int expose_area , int flags ) { } void resetCustomDraw ( ) { } public void setInsertMark ( TreeItem item , boolean before ) { } void setItemCount ( int parentIter , int count ) { int itemCount = OS . gtk_tree_model_iter_n_children ( modelHandle , parentIter ) ; if ( count == itemCount ) return ; boolean isVirtual = ( ( style ) & ( SWT . VIRTUAL ) ) != 0 ; if ( ! isVirtual ) setRedraw ( false ) ; remove ( parentIter , count , ( itemCount - 1 ) ) ; if ( isVirtual ) { for ( int i = itemCount ; i < count ; i ++ ) { int iter = OS . g_malloc ( OS . GtkTreeIter_sizeof ( ) ) ; if ( iter == 0 ) error ( ERROR_NO_HANDLES ) ; OS . gtk_tree_store_append ( modelHandle , iter , parentIter ) ; OS . gtk_tree_store_set ( modelHandle , iter , Tree . ID_COLUMN , ( - 1 ) , ( - 1 ) ) ; OS . g_free ( iter ) ; } } else { for ( int i = itemCount ; i < count ; i ++ ) { <START_BUG> items [ i ] = new TreeItem ( this , parentIter , SWT . NONE , i , true ) ; <END_BUG> } } if ( ! isVirtual ) setRedraw ( true ) ; modelChanged = true ; } public void setItemCount ( int count ) { } public void selectAll ( ) { } void setBackgroundColor ( GdkColor color ) { } void setBackgroundPixmap ( int pixmap ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize ) { } public void setColumnOrder ( int [ ] order ) { } void setFontDescription ( int font ) { } void setForegroundColor ( GdkColor color ) { } public void setHeaderVisible ( boolean show ) { } public void setLinesVisible ( boolean show ) { } void setParentBackground ( ) { } void setParentWindow ( int widget ) { } void setScrollWidth ( int column , int iter ) { } public void setSelection ( TreeItem [ ] items ) { } public void setSortColumn ( TreeColumn column ) { } public void setSortDirection ( int direction ) { } public void setTopItem ( TreeItem item ) { } public void showColumn ( TreeColumn column ) { } boolean showFirstColumn ( ) { } public void showSelection ( ) { } void showItem ( int path , boolean scroll ) { } public void showItem ( TreeItem item ) { } int treeSelectionProc ( int model , int path , int iter , int [ ] selection , int length ) { } }

Fix:
new TreeItem ( this , parentIter , SWT . NONE , i , true ) ;