Buggy code:
; static final int [ ] SIMPLE_TOP_LEFT_CORNER = new int [ ] { 0 , 2 , 1 , 1 , 2 , 0 } ; static final int [ ] SIMPLE_TOP_RIGHT_CORNER = new int [ ] { - 2 , 0 , - 1 , 1 , 0 , 2 } ; static final int [ ] SIMPLE_BOTTOM_LEFT_CORNER = new int [ ] { 0 , - 2 , 1 , - 1 , 2 , 0 } ; static final int [ ] SIMPLE_BOTTOM_RIGHT_CORNER = new int [ ] { - 2 , 0 , - 1 , - 1 , 0 , - 2 } ; static final int SELECTION_FOREGROUND = SWT . COLOR_LIST_FOREGROUND ; static final int SELECTION_BACKGROUND = SWT . COLOR_LIST_BACKGROUND ; static final int BORDER1_COLOR = SWT . COLOR_WIDGET_NORMAL_SHADOW ; static final int FOREGROUND = SWT . COLOR_WIDGET_FOREGROUND ; static final int BACKGROUND = SWT . COLOR_WIDGET_BACKGROUND ; static final int BUTTON_BORDER = SWT . COLOR_WIDGET_DARK_SHADOW ; static final int BUTTON_FILL = SWT . COLOR_LIST_BACKGROUND ; static final int NONE = 0 ; static final int NORMAL = 1 ; static final int HOT = 2 ; static final int SELECTED = 3 ; static final RGB CLOSE_FILL = new RGB ( 252 , 160 , 160 ) ; static final int CHEVRON_CHILD_ID = 0 ; static final int MINIMIZE_CHILD_ID = 1 ; static final int MAXIMIZE_CHILD_ID = 2 ; static final int EXTRA_CHILD_ID_COUNT = 3 ; public CTabFolder ( Composite parent , int style ) { } static int checkStyle ( Composite parent , int style ) { } static void fillRegion ( GC gc , Region region ) { } public void addCTabFolder2Listener ( CTabFolder2Listener listener ) { } public void addCTabFolderListener ( CTabFolderListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } void antialias ( int [ ] shape , RGB lineRGB , RGB innerRGB , RGB outerRGB , GC gc ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } void createItem ( CTabItem item , int index ) { } void destroyItem ( CTabItem item ) { } void drawBackground ( GC gc , int [ ] shape , boolean selected ) { } void drawBackground ( GC gc , int [ ] shape , int x , int y , int width , int height , Color defaultBackground , Image image , Color [ ] colors , int [ ] percents , boolean vertical ) { } void drawBody ( Event event ) { } void drawChevron ( GC gc ) { if ( ( ( chevronRect . width ) == 0 ) || ( ( chevronRect . height ) == 0 ) ) return ; Display display = getDisplay ( ) ; Point dpi = display . getDPI ( ) ; int fontHeight = ( 72 * 10 ) // ( dpi . y ) ; FontData fd = getFont ( ) . getFontData ( ) [ 0 ] ; fd . setHeight ( fontHeight ) ; Font f = new Font ( display , fd ) ; <START_BUG> int fHeight = ( ( f . getFontData ( ) [ 0 ] . getHeight ( ) ) * ( display . getDPI ( ) . y ) ) // 72 ; <END_BUG> int indent = Math . max ( 2 , ( ( ( ( chevronRect . height ) - fHeight ) - 4 ) // 2 ) ) ; int x = ( chevronRect . x ) + 2 ; int y = ( chevronRect . y ) + indent ; int count ; if ( single ) { count = ( ( selectedIndex ) == ( - 1 ) ) ? items . length : ( items . length ) - 1 ; } else { int showCount = 0 ; while ( ( showCount < ( priority . length ) ) && ( items [ priority [ showCount ] ] . showing ) ) { showCount ++ ; } count = ( items . length ) - showCount ; } String chevronString = ( count > 99 ) ? "99+" : String . valueOf ( count ) ; switch ( chevronImageState ) { case CTabFolder . NORMAL : { Color chevronBorder = ( single ) ? getSelectionForeground ( ) : getForeground ( ) ; gc . setForeground ( chevronBorder ) ; gc . setFont ( f ) ; gc . drawLine ( x , y , ( x + 2 ) , ( y + 2 ) ) ; gc . drawLine ( ( x + 2 ) , ( y + 2 ) , x , ( y + 4 ) ) ; gc . drawLine ( ( x + 1 ) , y , ( x + 3 ) , ( y + 2 ) ) ; gc . drawLine ( ( x + 3 ) , ( y + 2 ) , ( x + 1 ) , ( y + 4 ) ) ; gc . drawLine ( ( x + 4 ) , y , ( x + 6 ) , ( y + 2 ) ) ; gc . drawLine ( ( x + 6 ) , ( y + 2 ) , ( x + 5 ) , ( y + 4 ) ) ; gc . drawLine ( ( x + 5 ) , y , ( x + 7 ) , ( y + 2 ) ) ; gc . drawLine ( ( x + 7 ) , ( y + 2 ) , ( x + 4 ) , ( y + 4 ) ) ;

Fix:
int fHeight = ( ( f . getFontData ( ) [ 0 ] . getHeight ( ) ) * ( dpi . y ) ) // 72 ;