Buggy code:
public class AboutDialog extends TrayDialog { private static final int MAX_IMAGE_WIDTH_FOR_TEXT = 250 ; private static final int DETAILS_ID = ( IDialogConstants . CLIENT_ID ) + 1 ; private String productName ; private IProduct product ; private AboutBundleGroupData [ ] bundleGroupInfos ; private ArrayList images = new ArrayList ( ) ; private AboutFeaturesButtonManager buttonManager = new AboutFeaturesButtonManager ( ) ; private StyledText text ; private AboutTextManager aboutTextManager ; public AboutDialog ( Shell parentShell ) { } protected void buttonPressed ( int buttonId ) { } public boolean close ( ) { } protected void configureShell ( Shell newShell ) { } protected void createButtonsForButtonBar ( Composite parent ) { } protected Control createDialogArea ( Composite parent ) { Image aboutImage = null ; AboutItem item = null ; if ( ( product ) != null ) { ImageDescriptor imageDescriptor = ProductProperties . getAboutImage ( product ) ; if ( imageDescriptor != null ) { aboutImage = imageDescriptor . createImage ( ) ; } if ( ( aboutImage == null ) || ( ( aboutImage . getBounds ( ) . width ) <= ( AboutDialog . MAX_IMAGE_WIDTH_FOR_TEXT ) ) ) { String aboutText = ProductProperties . getAboutText ( product ) ; if ( aboutText != null ) { item = AboutTextManager . scan ( aboutText ) ; } } if ( aboutImage != null ) { images . add ( aboutImage ) ; } } Composite workArea = new Composite ( parent , SWT . NONE ) ; GridLayout workLayout = new GridLayout ( ) ; workLayout . marginHeight = 0 ; workLayout . marginWidth = 0 ; workLayout . verticalSpacing = 0 ; workLayout . horizontalSpacing = 0 ; workArea . setLayout ( workLayout ) ; workArea . setLayoutData ( new GridData ( GridData . FILL_BOTH ) ) ; Color background = JFaceColors . getBannerBackground ( parent . getDisplay ( ) ) ; Color foreground = JFaceColors . getBannerForeground ( parent . getDisplay ( ) ) ; Composite top = ( ( Composite ) ( super . createDialogArea ( workArea ) ) ) ; GridLayout layout = new GridLayout ( ) ; layout . marginHeight = 0 ; layout . marginWidth = 0 ; layout . verticalSpacing = 0 ; layout . horizontalSpacing = 0 ; top . setLayout ( layout ) ; top . setLayoutData ( new GridData ( GridData . FILL_BOTH ) ) ; top . setBackground ( background ) ; top . setForeground ( foreground ) ; final Composite topContainer = new Composite ( top , SWT . NONE ) ; topContainer . setBackground ( background ) ; topContainer . setForeground ( foreground ) ; layout = new GridLayout ( ) ; layout . numColumns = ( ( aboutImage == null ) || ( item == null ) ) ? 1 : 2 ; layout . marginWidth = 0 ; layout . marginHeight = 0 ; layout . verticalSpacing = 0 ; layout . horizontalSpacing = 0 ; topContainer . setLayout ( layout ) ; GC gc = new GC ( parent ) ; int lineHeight = gc . getFontMetrics ( ) . getHeight ( ) ; gc . dispose ( ) ; int topContainerHeightHint = 100 ; <START_BUG> topContainerHeightHint = Math . max ( topContainerHeightHint , ( lineHeight * 11 ) ) ; <END_BUG> if ( aboutImage != null ) { Label imageLabel = new Label ( topContainer , SWT . NONE ) ; imageLabel . setBackground ( background ) ; imageLabel . setForeground ( foreground ) ; GridData data = new GridData ( ) ; data . horizontalAlignment = GridData . FILL ; data . verticalAlignment = GridData . BEGINNING ; data . grabExcessHorizontalSpace = false ; imageLabel . setLayoutData ( data ) ; imageLabel . setImage ( aboutImage ) ; topContainerHeightHint = Math . max ( topContainerHeightHint , aboutImage . getBounds ( ) . height ) ; } GridData data = new GridData ( ) ; data . horizontalAlignment = GridData . FILL ; data . verticalAlignment = GridData . FILL ; data . grabExcessHorizontalSpace = true ; data . grabExcessVerticalSpace = true ; data . heightHint = topContainerHeightHint ; topContainer . setLayoutData ( data ) ; if ( item != null ) { final int minWidth = 432 ; final ScrolledComposite scroller = new ScrolledComposite ( topContainer , ( ( SWT . V_SCROLL ) | ( SWT . H_SCROLL ) ) ) ; data = new GridData ( GridData . FILL_BOTH ) ; data . widthHint = minWidth ; scroller . setLayoutData ( data ) ; final Composite textComposite = new Composite ( scroller , SWT . NONE ) ; textComposite . setBackground ( background ) ; layout = new GridLayout ( ) ; textComposite . setLayout ( layout ) ; text = new StyledText ( textComposite , ( ( ( SWT . MULTI ) | ( SWT . WRAP ) ) | ( SWT . READ_ONLY ) ) ) ; text . setCaret ( null ) ; text . setFont ( parent . getFont ( ) ) ; text . setText ( item . getText ( ) ) ; text . setCursor ( null ) ; text . setBackground ( background ) ; text . setForeground ( foreground ) ; aboutTextManager = new AboutTextManager ( text ) ; aboutTextManager . setItem ( item ) ; createTextMenu ( ) ; GridData gd = new GridData ( ) ; gd . verticalAlignment = GridData . BEGINNING ; gd . horizontalAlignment = GridData . FILL ; gd . grabExcessHorizontalSpace = true ; text . setLayoutData ( gd ) ; scroller . getHorizontalBar ( ) . setIncrement ( 20 ) ; scroller . getVerticalBar ( ) . setIncrement ( 20 ) ; final boolean [ ] inresize = new boolean [ 1 ] ; textComposite . addControlListener ( new ControlAdapter ( ) { public void controlResized ( ControlEvent e ) { if ( inresize [ 0 ] ) return ; inresize [ 0 ] = true ; textComposite . layout ( true ) ;

Fix:
topContainerHeightHint = Math . max ( topContainerHeightHint , ( lineHeight * 6 ) ) ;