Buggy code:
int getRightItemEdge ( GC gc ) { } public CTabItem getSelection ( ) { } public Color getSelectionBackground ( ) { } public Color getSelectionForeground ( ) { } public int getSelectionIndex ( ) { } public boolean getSimple ( ) { } public boolean getSingle ( ) { } public int getStyle ( ) { } public int getTabHeight ( ) { } public int getTabPosition ( ) { } public Control getTopRight ( ) { } public int getTopRightAlignment ( ) { } public boolean getUnselectedCloseVisible ( ) { } public boolean getUnselectedImageVisible ( ) { } public int indexOf ( CTabItem item ) { } void initAccessible ( ) { } void onKeyDown ( Event event ) { } void onDispose ( Event event ) { } void onDragDetect ( Event event ) { } void onFocus ( Event event ) { } boolean onMnemonic ( Event event , boolean doit ) { } void onMouseDoubleClick ( Event event ) { } void onMouse ( Event event ) { } void onPageTraversal ( Event event ) { } void onPaint ( Event event ) { } void onResize ( ) { } void onTraverse ( Event event ) { } void redrawTabs ( ) { } public void removeCTabFolder2Listener ( CTabFolder2Listener listener ) { } public void removeCTabFolderListener ( CTabFolderListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void reskin ( int flags ) { } public void setBackground ( Color color ) { } public void setBackground ( Color [ ] colors , int [ ] percents ) { } public void setBackground ( Color [ ] colors , int [ ] percents , boolean vertical ) { } public void setBackgroundImage ( Image image ) { } public void setBorderVisible ( boolean show ) { } void setButtonBounds ( GC gc ) { } public void setFont ( Font font ) { } public void setForeground ( Color color ) { } public void setInsertMark ( CTabItem item , boolean after ) { } public void setInsertMark ( int index , boolean after ) { } boolean setItemLocation ( GC gc ) { } boolean setItemSize ( GC gc ) { } public void setMaximizeVisible ( boolean visible ) { } public void setLayout ( Layout layout ) { } public void setMaximized ( boolean maximize ) { } public void setMinimizeVisible ( boolean visible ) { } public void setMinimized ( boolean minimize ) { } public void setMinimumCharacters ( int count ) { } public void setMRUVisible ( boolean show ) { } public void setRenderer ( CTabFolderRenderer renderer ) { } public void setSelection ( CTabItem item ) { } public void setSelection ( int index ) { } void setSelection ( int index , boolean notify ) { } public void setSelectionBackground ( Color color ) { } public void setSelectionBackground ( Color [ ] colors , int [ ] percents ) { } public void setSelectionBackground ( Color [ ] colors , int [ ] percents , boolean vertical ) { } void setSelectionHighlightGradientColor ( Color start ) { } public void setSelectionBackground ( Image image ) { } public void setSelectionForeground ( Color color ) { } public void setSimple ( boolean simple ) { } public void setSingle ( boolean single ) { } public void setTabHeight ( int height ) { } public void setTabPosition ( int position ) { } public void setTopRight ( Control control ) { } public void setTopRight ( Control control , int alignment ) { } public void setUnselectedCloseVisible ( boolean visible ) { } public void setUnselectedImageVisible ( boolean visible ) { } public void showItem ( CTabItem item ) { } void showList ( Rectangle rect ) { if ( ( ( items . length ) == 0 ) || ( ! ( showChevron ) ) ) return ; if ( ( ( showMenu ) == null ) || ( showMenu . isDisposed ( ) ) ) { <START_BUG> showMenu = new Menu ( this ) ; <END_BUG> } else { MenuItem [ ] items = showMenu . getItems ( ) ; for ( int i = 0 ; i < ( items . length ) ; i ++ ) { items [ i ] . dispose ( ) ; } } final String id = "CTabFolder_showList_Index" ; for ( int i = 0 ; i < ( items . length ) ; i ++ ) { CTabItem tab = items [ i ] ; if ( tab . showing ) continue ; MenuItem item = new MenuItem ( showMenu , SWT . NONE ) ; item . setText ( tab . getText ( ) ) ; item . setImage ( tab . getImage ( ) ) ; item . setData ( id , tab ) ; item . addSelectionListener ( new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent e ) { MenuItem menuItem = ( ( MenuItem ) ( e . widget ) ) ; int index = indexOf ( ( ( CTabItem ) ( menuItem . getData ( id ) ) ) ) ; CTabFolder . this . setSelection ( index , true ) ; } } ) ; } int x = rect . x ; int y = ( rect . y ) + ( rect . height ) ; Point location = getDisplay ( ) . map ( this , null , x , y ) ; showMenu . setLocation ( location . x , location . y ) ; showMenu . setVisible ( true ) ; } public void showSelection ( ) { } void _setToolTipText ( int x , int y ) { } boolean updateItems ( ) { } boolean updateItems ( int showIndex ) { } boolean updateTabHeight ( boolean force ) { } String _getToolTip ( int x , int y ) { } }

Fix:
showMenu = new Menu ( getShell ( ) , ( ( getStyle ( ) ) & ( ( SWT . LEFT_TO_RIGHT ) | ( SWT . RIGHT_TO_LEFT ) ) ) ) ;