Buggy code:
public class TreeItem extends Item { Tree parent ; TreeItem parentItem ; TreeItem [ ] items = Tree . NO_ITEMS ; int availableIndex = - 1 ; int depth = 0 ; boolean checked ; boolean grayed ; boolean expanded ; boolean cached ; String [ ] texts ; int [ ] textWidths = new int [ 1 ] ; int customWidth = - 1 ; int fontHeight ; int [ ] fontHeights ; Image [ ] images ; Color foreground ; Color background ; String [ ] displayTexts ; Color [ ] cellForegrounds ; Color [ ] cellBackgrounds ; Font font ; Font [ ] cellFonts ; static final int INDENT_HIERARCHY = 6 ; static final int MARGIN_TEXT = 3 ; public TreeItem ( Tree parent , int style ) { } public TreeItem ( Tree parent , int style , int index ) { } public TreeItem ( TreeItem parentItem , int style ) { } public TreeItem ( TreeItem parentItem , int style , int index ) { } TreeItem ( TreeItem parentItem , int style , int index , boolean notifyParent ) { } TreeItem ( Tree parent , int style , int index , boolean notifyParent ) { } void addColumn ( TreeColumn column ) { } void addItem ( TreeItem item , int index ) { } static Tree checkNull ( Tree tree ) { } static TreeItem checkNull ( TreeItem item ) { } protected void checkSubclass ( ) { } void clear ( ) { } public void clear ( int index , boolean recursive ) { } public void clearAll ( boolean recursive ) { } void clearAll ( boolean recursive , boolean doVisualUpdate ) { } TreeItem [ ] computeAllDescendents ( ) { } int computeAvailableDescendentCount ( ) { } TreeItem [ ] computeAvailableDescendents ( ) { } void computeDisplayText ( int columnIndex , GC gc ) { } void computeDisplayTexts ( GC gc ) { } void computeTextWidths ( GC gc ) { } public void dispose ( ) { } void dispose ( boolean notifyParent ) { } void expandAncestors ( ) { } public Color getBackground ( ) { } public Color getBackground ( int columnIndex ) { } public Rectangle getBounds ( ) { } Rectangle getBounds ( boolean checkData ) { if ( checkData && ( ! ( parent . checkData ( this , true ) ) ) ) error ( ERROR_WIDGET_DISPOSED ) ; if ( ! ( isAvailable ( ) ) ) return new Rectangle ( 0 , 0 , 0 , 0 ) ; TreeColumn [ ] orderedColumns = parent . getOrderedColumns ( ) ; int orderedCol0Index = ( ( orderedColumns . length ) == 0 ) ? 0 : orderedColumns [ 0 ] . getIndex ( ) ; int x = getTextX ( orderedCol0Index ) ; int width = ( textWidths [ orderedCol0Index ] ) + ( 2 * ( TreeItem . MARGIN_TEXT ) ) ; if ( ( orderedColumns . length ) > 0 ) { TreeColumn column = orderedColumns [ 0 ] ; int right = ( column . getX ( ) ) + ( column . width ) ; if ( ( x + width ) > right ) { width = Math . max ( 0 , ( right - x ) ) ; } } <START_BUG> return new Rectangle ( x , parent . getItemY ( this ) , width , ( ( parent . itemHeight ) - 1 ) ) ; <END_BUG> } public Rectangle getBounds ( int columnIndex ) { } Rectangle getCellBounds ( int columnIndex ) { } Rectangle getCheckboxBounds ( ) { } public boolean getChecked ( ) { } int getContentWidth ( int columnIndex ) { } int getContentX ( int columnIndex ) { } String getDisplayText ( int columnIndex ) { } public boolean getExpanded ( ) { } Rectangle getExpanderBounds ( ) { } Rectangle getFocusBounds ( ) { } public Font getFont ( ) { } Font getFont ( boolean checkData ) { } public Font getFont ( int columnIndex ) { } Font getFont ( int columnIndex , boolean checkData ) { } int getFontHeight ( ) { } int getFontHeight ( int columnIndex ) { } public Color getForeground ( ) { } public Color getForeground ( int columnIndex ) { } public boolean getGrayed ( ) { } Point [ ] getHconnectorEndpoints ( ) { } Rectangle getHitBounds ( ) { } public Image getImage ( ) { } public Image getImage ( int columnIndex ) { } Image getImage ( int columnIndex , boolean checkData ) { } public Rectangle getImageBounds ( int columnIndex ) { } int getIndex ( ) { } public TreeItem getItem ( int index ) { } public int getItemCount ( ) { } String getNameText ( ) { } public TreeItem [ ] getItems ( ) { } public Tree getParent ( ) { } public TreeItem getParentItem ( ) { } int getPreferredWidth ( int columnIndex ) { } public String getText ( ) { } public String getText ( int columnIndex ) { } String getText ( int columnIndex , boolean checkData ) { } public Rectangle getTextBounds ( int columnIndex ) { } int getTextX ( int columnIndex ) { } boolean hasAncestor ( TreeItem item ) { } public int indexOf ( TreeItem item ) { } boolean isAvailable ( ) { } boolean isInViewport ( ) { } boolean isLastChild ( ) { } boolean isSelected ( ) { } boolean paint ( GC gc , TreeColumn column , boolean backgroundOnly ) { } void redraw ( int x , int y , int width , int height , int columnIndex ) { } void redrawItem ( ) { } void removeColumn ( TreeColumn column , int index , int orderedIndex ) { } public void removeAll ( ) { } void removeItem ( TreeItem item , int index ) { }

Fix:
return new Rectangle ( x , parent . getItemY ( this ) , width , parent . itemHeight ) ;