Buggy code:
class SashFormLayout extends Layout { protected Point computeSize ( Composite composite , int wHint , int hHint , boolean flushCache ) { } protected boolean flushCache ( Control control ) { } protected void layout ( Composite composite , boolean flushCache ) { SashForm sashForm = ( ( SashForm ) ( composite ) ) ; Rectangle area = sashForm . getClientArea ( ) ; <START_BUG> if ( ( ( area . width ) == 0 ) || ( ( area . height ) == 0 ) ) <END_BUG> return ; Control [ ] newControls = sashForm . getControls ( true ) ; if ( ( ( sashForm . controls . length ) == 0 ) && ( ( newControls . length ) == 0 ) ) return ; sashForm . controls = newControls ; Control [ ] controls = sashForm . controls ; if ( ( ( sashForm . maxControl ) != null ) && ( ! ( sashForm . maxControl . isDisposed ( ) ) ) ) { for ( int i = 0 ; i < ( controls . length ) ; i ++ ) { if ( ( controls [ i ] ) != ( sashForm . maxControl ) ) { controls [ i ] . setBounds ( ( - 200 ) , ( - 200 ) , 0 , 0 ) ; } else { controls [ i ] . setBounds ( area ) ; } } return ; } if ( ( sashForm . sashes . length ) < ( ( controls . length ) - 1 ) ) { Sash [ ] newSashes = new Sash [ ( controls . length ) - 1 ] ; System . arraycopy ( sashForm . sashes , 0 , newSashes , 0 , sashForm . sashes . length ) ; for ( int i = sashForm . sashes . length ; i < ( newSashes . length ) ; i ++ ) { newSashes [ i ] = new Sash ( sashForm , sashForm . sashStyle ) ; newSashes [ i ] . setBackground ( sashForm . background ) ; newSashes [ i ] . setForeground ( sashForm . foreground ) ; newSashes [ i ] . addListener ( Selection , sashForm . sashListener ) ; } sashForm . sashes = newSashes ; } if ( ( sashForm . sashes . length ) > ( ( controls . length ) - 1 ) ) { if ( ( controls . length ) == 0 ) { for ( int i = 0 ; i < ( sashForm . sashes . length ) ; i ++ ) { sashForm . sashes [ i ] . dispose ( ) ; } sashForm . sashes = new Sash [ 0 ] ; } else { Sash [ ] newSashes = new Sash [ ( controls . length ) - 1 ] ; System . arraycopy ( sashForm . sashes , 0 , newSashes , 0 , newSashes . length ) ; for ( int i = ( controls . length ) - 1 ; i < ( sashForm . sashes . length ) ; i ++ ) { sashForm . sashes [ i ] . dispose ( ) ; } sashForm . sashes = newSashes ; } } if ( ( controls . length ) == 0 ) return ; Sash [ ] sashes = sashForm . sashes ; long [ ] ratios = new long [ controls . length ] ; long total = 0 ; for ( int i = 0 ; i < ( controls . length ) ; i ++ ) { Object data = controls [ i ] . getLayoutData ( ) ; if ( ( data != null ) && ( data instanceof SashFormData ) ) { ratios [ i ] = ( ( SashFormData ) ( data ) ) . weight ; } else { data = new SashFormData ( ) ; controls [ i ] . setLayoutData ( data ) ; ( ( SashFormData ) ( data ) ) . weight = ratios [ i ] = ( ( 200 << 16 ) + 999 ) // 1000 ; } total += ratios [ i ] ; } int sashwidth = ( ( sashes . length ) > 0 ) ? ( sashForm . SASH_WIDTH ) + ( ( sashes [ 0 ] . getBorderWidth ( ) ) * 2 ) : sashForm . SASH_WIDTH ; if ( ( sashForm . getOrientation ( ) ) == ( SWT . HORIZONTAL ) ) { int width = ( ( int ) ( ( ( ratios [ 0 ] ) * ( ( area . width ) - ( ( sashes . length ) * sashwidth ) ) ) // total ) ) ; int x = area . x ; controls [ 0 ] . setBounds ( x , area . y , width , area . height ) ; x += width ; for ( int i = 1 ; i < ( ( controls . length ) - 1 ) ; i ++ ) { sashes [ ( i - 1 ) ] . setBounds ( x , area . y , sashwidth , area . height ) ; x += sashwidth ; width = ( ( int ) ( ( ( ratios [ i ] ) * ( ( area . width ) - ( ( sashes . length ) * sashwidth ) ) ) // total ) ) ; controls [ i ] . setBounds ( x , area . y , width , area . height ) ; x += width ; } if ( ( controls . length ) > 1 ) { sashes [ ( ( sashes . length ) - 1 ) ] . setBounds ( x , area . y , sashwidth , area . height ) ; x += sashwidth ; width = ( area . width ) - x ;

Fix:
if ( ( ( area . width ) <= 1 ) || ( ( area . height ) <= 1 ) )