Buggy code:
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 ) { int columnIndex = 0 ; int x = 0 ; if ( column != null ) { columnIndex = column . getIndex ( ) ; x = column . getX ( ) ; } Rectangle clientArea = parent . getClientArea ( ) ; if ( ( ( clientArea . x ) + ( clientArea . width ) ) < x ) return ; Rectangle cellBounds = getCellBounds ( columnIndex ) ; int cellRightX = 0 ; if ( column != null ) { cellRightX = ( column . getX ( ) ) + ( column . width ) ; } else { cellRightX = ( cellBounds . x ) + ( cellBounds . width ) ; } if ( cellRightX < 0 ) return ; gc . setClipping ( x , cellBounds . y , ( cellRightX - x ) , cellBounds . height ) ; int y = parent . getItemY ( this ) ; int padding = parent . getCellPadding ( ) ; int itemHeight = parent . itemHeight ; Color background = getBackground ( columnIndex ) ; if ( ! ( background . equals ( parent . getBackground ( ) ) ) ) { Color oldBackground = gc . getBackground ( ) ; gc . setBackground ( background ) ; if ( columnIndex == 0 ) { Rectangle focusBounds = getFocusBounds ( ) ; int fillWidth = 0 ; if ( column == null ) { fillWidth = focusBounds . width ; } else { fillWidth = ( column . width ) - ( focusBounds . x ) ; if ( parent . linesVisible ) fillWidth -- ; } gc . fillRectangle ( focusBounds . x , focusBounds . y , fillWidth , focusBounds . height ) ; } else { int fillWidth = cellBounds . width ; if ( parent . linesVisible ) fillWidth -- ; gc . fillRectangle ( cellBounds . x , ( ( cellBounds . y ) + 1 ) , fillWidth , ( ( cellBounds . height ) - 1 ) ) ; } gc . setBackground ( oldBackground ) ; } if ( ( isSelected ( ) ) && ( ( columnIndex == 0 ) || ( ( ( parent . style ) & ( SWT . FULL_SELECTION ) ) != 0 ) ) ) { Color oldBackground = gc . getBackground ( ) ; gc . setBackground ( display . getSystemColor ( COLOR_LIST_SELECTION ) ) ; if ( columnIndex == 0 ) { Rectangle focusBounds = getFocusBounds ( ) ; int fillWidth = focusBounds . width ; <START_BUG> if ( ( ( parent . columns . length ) == 1 ) || ( ( ( parent . style ) & ( SWT . FULL_SELECTION ) ) == 0 ) ) { <END_BUG> fillWidth -= 2 ; } gc . fillRectangle ( ( ( focusBounds . x ) + 1 ) , ( ( focusBounds . y ) + 1 ) , fillWidth , ( ( focusBounds . height ) - 2 ) ) ; } else { int fillWidth = column . width ; if ( columnIndex == ( ( parent . columns . length ) - 1 ) ) { fillWidth -= 2 ; } gc . fillRectangle ( column . getX ( ) , ( y + 2 ) , fillWidth , ( itemHeight - 3 ) ) ; } gc . setBackground ( oldBackground ) ; } if ( ! paintCellContent ) return ; if ( columnIndex == 0 ) { Rectangle expanderBounds = getExpanderBounds ( ) ; Color oldForeground = gc . getForeground ( ) ; gc . setForeground ( parent . getConnectorColor ( ) ) ; int lineX = ( expanderBounds . x ) + ( ( expanderBounds . width ) // 2 ) ; int y2 = expanderBounds . y ; if ( ( items . length ) == 0 ) { y2 += ( expanderBounds . height ) // 2 ; } if ( ( ( parentItem ) != null ) || ( ( getIndex ( ) ) != 0 ) ) { gc . drawLine ( lineX , y , lineX , y2 ) ; } if ( ! ( isLastChild ( ) ) ) { if ( ( items . length ) != 0 ) y2 += expanderBounds . height ; gc . drawLine ( lineX , y2 , lineX , ( y + itemHeight ) ) ; } Point [ ] endpoints = getHconnectorEndpoints ( ) ; gc . drawLine ( endpoints [ 0 ] . x , endpoints [ 0 ] . y , ( ( endpoints [ 1 ] . x ) - ( Tree . MARGIN_IMAGE ) ) , endpoints [ 1 ] . y ) ; TreeItem item = parentItem ; while ( item != null ) { if ( ! ( item . isLastChild ( ) ) ) { Rectangle itemExpanderBounds = item . getExpanderBounds ( ) ; lineX = ( itemExpanderBounds . x ) + ( ( itemExpanderBounds . width ) // 2 ) ;

Fix:
if ( ( ( parent . columns . length ) < 2 ) || ( ( ( parent . style ) & ( SWT . FULL_SELECTION ) ) == 0 ) ) {