Buggy code:
private static final int STATE_RESTORED = 1 ; private static final int STATE_MAXIMIZED = 2 ; private static int tabLocation = - 1 ; private IPreferenceStore preferenceStore = WorkbenchPlugin . getDefault ( ) . getPreferenceStore ( ) ; private CTabFolder2 tabFolder ; private Map mapTabToPart = new HashMap ( ) ; private LayoutPart current ; private boolean assignFocusOnSelection = true ; private int viewState = PartTabFolder . STATE_RESTORED ; private WorkbenchPage page ; private LayoutPart inactiveCurrent ; private Composite parent ; private boolean active = false ; private int mousedownState = - 1 ; CTabFolderMinMaxAdapter expandListener = new CTabFolderMinMaxAdapter ( ) { public void minimize ( CTabFolderEvent event ) { } public void restore ( CTabFolderEvent event ) { } public void maximize ( CTabFolderEvent event ) { } } ; private MouseListener mouseListener = new MouseAdapter ( ) { public void mouseDown ( MouseEvent e ) { } } ; private class TabInfo { private String tabText ; private LayoutPart part ; private Image partImage ; private boolean fixed ; } private PartTabFolder . TabInfo [ ] invisibleChildren ; private String themeid ; private ITabThemeDescriptor tabThemeDescriptor ; private int tabPosition = - 1 ; public PartTabFolder ( WorkbenchPage page ) { } public void add ( String name , int index , LayoutPart part ) { } public void add ( String name , int index , LayoutPart part , Image partImage ) { } public void add ( LayoutPart child ) { } public boolean allowsBorder ( ) { } private PartTabFolder . TabInfo [ ] arrayAdd ( PartTabFolder . TabInfo [ ] array , PartTabFolder . TabInfo item , int index ) { } private PartTabFolder . TabInfo [ ] arrayRemove ( PartTabFolder . TabInfo [ ] array , LayoutPart item ) { } protected static Rectangle calculatePageBounds ( CTabFolder2 folder ) { } private final IPropertyChangeListener propertyChangeListener = new IPropertyChangeListener ( ) { public void propertyChange ( PropertyChangeEvent propertyChangeEvent ) { } } ; public void createControl ( Composite parent ) { } private CTabItem2 createPartTab ( LayoutPart part , String tabName , Image tabImage , int tabIndex ) { } public void dispose ( ) { } public void openTracker ( LayoutPart part ) { } public Rectangle getBounds ( ) { } public int getMinimumHeight ( ) { } private void checkPart ( ) { } public LayoutPart [ ] getChildren ( ) { } public Control getControl ( ) { } public int getItemCount ( ) { } public Composite getParent ( ) { } public int getSelection ( ) { } private CTabItem2 getTab ( LayoutPart child ) { } public LayoutPart getVisiblePart ( ) { } public int indexOf ( LayoutPart item ) { } public void remove ( LayoutPart child ) { } private void removeTab ( CTabItem2 tab ) { } public void reorderTab ( ViewPane pane , int x , int y ) { } private void reorderTab ( ViewPane pane , CTabItem2 sourceTab , int newIndex ) { } public void reparent ( Composite newParent ) { } public void replace ( LayoutPart oldChild , LayoutPart newChild ) { } private void replaceChild ( LayoutPart oldChild , PartPlaceholder newChild ) { } private void replaceChild ( PartPlaceholder oldChild , LayoutPart newChild ) { } public IStatus restoreState ( IMemento memento ) { } public IStatus saveState ( IMemento memento ) { } public void setBounds ( Rectangle r ) { } private void setControlSize ( ) { } private boolean isMinimized ( ) { } public void setSelection ( int index ) { } private void setSelection ( LayoutPart part ) { if ( ! ( active ) ) return ; if ( part instanceof PartPlaceholder ) return ; if ( ( ( current ) != null ) && ( ( current ) != part ) ) { current . setVisible ( false ) ; } current = part ; if ( ( current ) != null ) { setControlSize ( ) ; <START_BUG> current . setVisible ( ( ! ( isMinimized ( ) ) ) ) ; <END_BUG> } Window window = getWindow ( ) ; if ( window instanceof DetachedWindow ) { if ( ( ( current ) == null ) || ( ! ( ( current ) instanceof PartPane ) ) ) window . getShell ( ) . setText ( "" ) ; else window . getShell ( ) . setText ( ( ( PartPane ) ( current ) ) . getPartReference ( ) . getTitle ( ) ) ; } } public void addDropTargets ( Collection result ) { } public int getType ( ) { } public boolean isDragAllowed ( Point point ) { } public LayoutPart targetPartFor ( IWorkbenchDragSource dragSource ) { } public void setActive ( boolean activeState ) { } void drawGradient ( boolean activeState ) { } protected void drawGradient ( Color fgColor , Color [ ] bgColors , int [ ] bgPercents , boolean active ) { } private void useThemeInfo ( ) { } public void propertyChanged ( Object source , int property ) { } public String getTheme ( ) { } public void setTheme ( String theme ) { } private void updateImage ( final PartPane part , final Image image ) { } public void showBusy ( PartPane partPane ) { } public void clearBusy ( PartPane partPane ) { } private void updateTab ( PartPane part , final Image image ) { } public void setContainer ( ILayoutContainer container ) { } private void showMinMaxButtons ( boolean b ) { } private void setState ( int newState ) { } private void updateControlBounds ( ) { } private void forceLayout ( ) { } private void updateControlState ( ) { } public void findSashes ( LayoutPart part , ViewPane . Sashes sashes ) { } private void updateContainerVisibleTab ( ) { } public boolean resizesVertically ( ) { } public boolean allowsAutoFocus ( ) { } }

Fix:
current . setVisible ( true ) ;