Buggy code:
void addColumn ( TreeColumn column ) { } void addItem ( TreeItem item , int index ) { } static Tree checkNull ( Tree tree ) { } static TreeItem checkNull ( TreeItem item ) { } 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 ) { } 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 ) { } int getTextX ( int columnIndex ) { } boolean hasAncestor ( TreeItem item ) { } public int indexOf ( TreeItem item ) { } boolean isAvailable ( ) { } 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 ) { } public void setBackground ( Color value ) { } public void setBackground ( int columnIndex , Color value ) { } public void setChecked ( boolean value ) { } public void setExpanded ( boolean value ) { } public void setFont ( Font value ) { } public void setFont ( int columnIndex , Font value ) { } public void setForeground ( Color value ) { } public void setForeground ( int columnIndex , Color value ) { } public void setGrayed ( boolean value ) { } public void setImage ( Image value ) { } public void setImage ( Image [ ] value ) { } public void setImage ( int columnIndex , Image value ) { } public void setItemCount ( int count ) { } public void setText ( String value ) { } public void setText ( String [ ] value ) { } public void setText ( int columnIndex , String value ) { } void updateColumnWidth ( TreeColumn column , GC gc ) { int columnIndex = column . getIndex ( ) ; gc . setFont ( getFont ( columnIndex , false ) ) ; String oldDisplayText = displayTexts [ columnIndex ] ; computeDisplayText ( columnIndex , gc ) ; if ( ( availableIndex ) != ( - 1 ) ) { boolean columnIsLeft = ( ( column . style ) & ( SWT . LEFT ) ) != 0 ; if ( ( ( ! columnIsLeft ) || ( parent . hooks ( EraseItem ) ) ) || ( parent . hooks ( PaintItem ) ) ) { Rectangle cellBounds = getCellBounds ( columnIndex ) ; parent . redraw ( cellBounds . x , cellBounds . y , cellBounds . width , cellBounds . height , false ) ; } else { <START_BUG> if ( ! ( oldDisplayText . equals ( displayTexts [ columnIndex ] ) ) ) { <END_BUG> Rectangle cellBounds = getCellBounds ( columnIndex ) ; int textX = getTextX ( columnIndex ) ; parent . redraw ( textX , cellBounds . y , ( ( ( cellBounds . x ) + ( cellBounds . width ) ) - textX ) , cellBounds . height , false ) ; } } } for ( int i = 0 ; i < ( items . length ) ; i ++ ) { items [ i ] . updateColumnWidth ( column , gc ) ; } } void updateFont ( GC gc ) { } }

Fix:
if ( ( oldDisplayText == null ) || ( ! ( oldDisplayText . equals ( displayTexts [ columnIndex ] ) ) ) ) {