Buggy code:
int ignoreTextCell ; int ignorePixbufCell ; TreeItem [ ] items ; TreeColumn [ ] columns ; TreeColumn sortColumn ; TreeItem currentItem ; ImageList imageList ; ImageList headerImageList ; boolean firstCustomDraw ; boolean modelChanged ; boolean expandAll ; static final int ID_COLUMN = 0 ; static final int CHECKED_COLUMN = 1 ; static final int GRAYED_COLUMN = 2 ; static final int FOREGROUND_COLUMN = 3 ; static final int BACKGROUND_COLUMN = 4 ; static final int FONT_COLUMN = 5 ; static final int FIRST_COLUMN = ( Tree . FONT_COLUMN ) + 1 ; static final int CELL_PIXBUF = 0 ; static final int CELL_TEXT = 1 ; static final int CELL_FOREGROUND = 2 ; static final int CELL_BACKGROUND = 3 ; static final int CELL_FONT = 4 ; static final int CELL_TYPES = ( Tree . CELL_FONT ) + 1 ; public Tree ( Composite parent , int style ) { } TreeItem _getItem ( int iter ) { } TreeItem _getItem ( int parentIter , int index ) { } int getId ( int iter , boolean queryModel ) { } static int checkStyle ( int style ) { } boolean checkData ( TreeItem item ) { } protected void checkSubclass ( ) { } public void addSelectionListener ( SelectionListener listener ) { } public void addTreeListener ( TreeListener listener ) { } int calculateWidth ( int column , int iter ) { } void clear ( int index , boolean all ) { } void clear ( int parentIter , int index , boolean all ) { } void clearAll ( boolean all ) { } void clearAll ( boolean all , int parentIter ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void copyModel ( int oldModel , int oldStart , int newModel , int newStart , int [ ] types , int oldParent , int newParent , int modelLength ) { } void createColumn ( TreeColumn column , int index ) { } void createHandle ( int index ) { } void createItem ( TreeColumn column , int index ) { } void createItem ( TreeItem item , int parentIter , 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 ) { } void fixChildren ( Shell newShell , Shell oldShell , Decorations newDecorations , Decorations oldDecorations , Menu [ ] menus ) { } GdkColor getBackgroundColor ( ) { } 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 ) { int length = OS . gtk_tree_model_iter_n_children ( modelHandle , parent ) ; TreeItem [ ] result = new TreeItem [ length ] ; if ( length == 0 ) return result ; if ( ( ( style ) & ( SWT . VIRTUAL ) ) != 0 ) { for ( int i = 0 ; i < length ; i ++ ) { <START_BUG> result [ i ] = _getItem ( 0 , i ) ; <END_BUG> } } else { int i = 0 ; int [ ] index = new int [ 1 ] ; int iter = OS . g_malloc ( OS . GtkTreeIter_sizeof ( ) ) ; boolean valid = OS . gtk_tree_model_iter_children ( modelHandle , iter , parent ) ; while ( valid ) { OS . gtk_tree_model_get ( modelHandle , iter , Tree . ID_COLUMN , index , ( - 1 ) ) ; result [ ( i ++ ) ] = items [ index [ 0 ] ] ; valid = OS . gtk_tree_model_iter_next ( modelHandle , iter ) ; } OS . g_free ( iter ) ; } return result ; } 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 ) { }

Fix:
result [ i ] = _getItem ( parent , i ) ;