Buggy code:
public class Tree extends Composite { NSTableColumn firstColumn ; NSTableColumn checkColumn ; NSTableHeaderView headerView ; TreeItem [ ] items ; int itemCount ; TreeColumn [ ] columns ; TreeColumn sortColumn ; int columnCount ; int sortDirection ; public Tree ( Composite parent , int style ) { } void _addListener ( int eventType , Listener listener ) { } TreeItem _getItem ( TreeItem parentItem , int index ) { } public void addSelectionListener ( SelectionListener listener ) { } public void addTreeListener ( TreeListener listener ) { } boolean checkData ( TreeItem item , boolean redraw ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } void clear ( TreeItem parentItem , int index , boolean all ) { } void clearAll ( TreeItem parentItem , boolean all ) { } public void clear ( int index , boolean all ) { } public void clearAll ( boolean all ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } void createItem ( TreeColumn column , int index ) { } void createItem ( TreeItem item , TreeItem parentItem , int index ) { } void createWidget ( ) { } Color defaultBackground ( ) { } Color defaultForeground ( ) { } public void deselectAll ( ) { } public void deselect ( TreeItem item ) { } void destroyItem ( TreeColumn column ) { } void destroyItem ( TreeItem item ) { } void fixScrollBar ( ) { } public TreeColumn getColumn ( int index ) { } public int getColumnCount ( ) { } public int [ ] getColumnOrder ( ) { } public TreeColumn [ ] getColumns ( ) { } 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 ( ) { } public boolean getLinesVisible ( ) { } public TreeItem getParentItem ( ) { } public TreeItem [ ] getSelection ( ) { checkWidget ( ) ; <START_BUG> return null ; <END_BUG> } public int getSelectionCount ( ) { } public TreeColumn getSortColumn ( ) { } public int getSortDirection ( ) { } public TreeItem getTopItem ( ) { } public int indexOf ( TreeColumn column ) { } public int indexOf ( TreeItem item ) { } int outlineView_child_ofItem ( int outlineView , int index , int ref ) { } int outlineView_objectValueForTableColumn_byItem ( int outlineView , int tableColumn , int ref ) { } boolean outlineView_isItemExpandable ( int outlineView , int ref ) { } int outlineView_numberOfChildrenOfItem ( int outlineView , int ref ) { } void outlineView_willDisplayCell_forTableColumn_item ( int outlineView , int cell , int tableColumn , int ref ) { } void outlineView_setObjectValue_forTableColumn_byItem ( int outlineView , int object , int tableColumn , int ref ) { } void releaseChildren ( boolean destroy ) { } void releaseHandle ( ) { } void releaseWidget ( ) { } public void removeAll ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void removeTreeListener ( TreeListener listener ) { } public void setInsertMark ( TreeItem item , boolean before ) { } public void selectAll ( ) { } public void select ( TreeItem item ) { } public void setColumnOrder ( int [ ] order ) { } public void setHeaderVisible ( boolean show ) { } public void setItemCount ( int count ) { } void setItemCount ( TreeItem parentItem , int count ) { } void setItemHeight ( int itemHeight ) { } void setItemHeight ( Image image ) { } public void setLinesVisible ( boolean show ) { } public void setRedraw ( boolean redraw ) { } boolean setScrollWidth ( TreeItem item ) { } boolean setScrollWidth ( boolean set ) { } boolean setScrollWidth ( boolean set , int [ ] childIds , boolean recurse ) { } public void setSelection ( TreeItem item ) { } 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 ) { } public void showItem ( TreeItem item ) { } void showItem ( TreeItem item , boolean scroll ) { } public void showSelection ( ) { } }

Fix:
return new TreeItem [ 0 ] ;