Buggy code:
public class TreeItem extends Item { Tree parent ; TreeItem parentItem ; TreeItem [ ] items = TreeItem . NO_ITEMS ; int availableIndex = - 1 ; int depth = 0 ; boolean checked ; boolean grayed ; boolean expanded ; String [ ] texts ; int [ ] textWidths = new int [ 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 ; static final TreeItem [ ] NO_ITEMS = new TreeItem [ 0 ] ; 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 ) { } void addColumn ( TreeColumn column ) { } void addItem ( TreeItem item , int index ) { } static Tree checkNull ( Tree tree ) { } static TreeItem checkNull ( TreeItem item ) { } TreeItem [ ] computeAllDescendents ( ) { } int computeAvailableDescendentCount ( ) { } TreeItem [ ] computeAvailableDescendents ( ) { } void computeDisplayText ( int columnIndex , GC gc ) { int columnCount = parent . columns . length ; if ( columnCount == 0 ) return ; TreeColumn column = parent . columns [ columnIndex ] ; int availableWidth ; if ( columnIndex == 0 ) { availableWidth = ( ( ( column . getX ( ) ) + ( column . width ) ) - ( getTextX ( columnIndex ) ) ) - ( 2 * ( TreeItem . MARGIN_TEXT ) ) ; } else { availableWidth = ( ( column . width ) - ( 2 * ( parent . getCellPadding ( ) ) ) ) - ( 2 * ( TreeItem . MARGIN_TEXT ) ) ; if ( ( images [ columnIndex ] ) != null ) { <START_BUG> availableWidth -= image . getBounds ( ) . width ; <END_BUG> availableWidth -= Tree . MARGIN_IMAGE ; } } String text = getText ( columnIndex ) ; int textWidth = gc . textExtent ( text ) . x ; if ( textWidth <= availableWidth ) { displayTexts [ columnIndex ] = text ; return ; } int ellipsisWidth = gc . textExtent ( ELLIPSIS ) . x ; availableWidth -= ellipsisWidth ; if ( availableWidth <= 0 ) { displayTexts [ columnIndex ] = Tree . ELLIPSIS ; return ; } int index = availableWidth // ( gc . getFontMetrics ( ) . getAverageCharWidth ( ) ) ; textWidth = gc . textExtent ( text . substring ( 0 , index ) ) . x ; if ( availableWidth == textWidth ) { displayTexts [ columnIndex ] = ( text . substring ( 0 , index ) ) + ( Tree . ELLIPSIS ) ; return ; } if ( availableWidth < textWidth ) { do { index -- ; if ( index < 0 ) { displayTexts [ columnIndex ] = Tree . ELLIPSIS ; return ; } text = text . substring ( 0 , index ) ; textWidth = gc . textExtent ( text ) . x ; } while ( availableWidth < textWidth ) ; displayTexts [ columnIndex ] = text + ( Tree . ELLIPSIS ) ; return ; } while ( textWidth < availableWidth ) { index ++ ; textWidth = gc . textExtent ( text . substring ( 0 , index ) ) . x ; } displayTexts [ columnIndex ] = ( text . substring ( 0 , ( index - 1 ) ) ) + ( Tree . ELLIPSIS ) ; } void computeDisplayTexts ( GC gc ) { } public void dispose ( ) { } void dispose ( boolean notifyParent ) { } void expandAncestors ( ) { } public Color getBackground ( ) { } public Color getBackground ( int columnIndex ) { } public Rectangle getBounds ( ) { } public Rectangle getBounds ( int columnIndex ) { } Rectangle getCellBounds ( int columnIndex ) { } Rectangle getCheckboxBounds ( ) { } public boolean getChecked ( ) { } int getContentWidth ( int columnIndex ) { } String getDisplayText ( int columnIndex ) { } int getContentX ( int columnIndex ) { } public boolean getExpanded ( ) { } Rectangle getExpanderBounds ( ) { } Rectangle getFocusBounds ( ) { } int getFocusX ( ) { } public Font getFont ( ) { } public Font getFont ( int columnIndex ) { } 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 ) { } public Rectangle getImageBounds ( int columnIndex ) { } int getIndex ( ) { } public int getItemCount ( ) { } public TreeItem [ ] getItems ( ) { } public Tree getParent ( ) { } public TreeItem getParentItem ( ) { } int getPreferredWidth ( int columnIndex ) { } public String getText ( ) { } public String getText ( int columnIndex ) { } int getTextX ( int columnIndex ) { } boolean hasAncestor ( TreeItem item ) { } boolean isAvailable ( ) { } boolean isLastChild ( ) { } boolean isSelected ( ) { } void paint ( GC gc , TreeColumn column , boolean paintCellContent ) { } void recomputeTextWidths ( GC gc ) { }

Fix:
availableWidth -= images [ columnIndex ] . getBounds ( ) . width ;