Buggy code:
public class CBanner extends Composite { Control left ; Control right ; Control bottom ; boolean simple = true ; int [ ] curve ; int curveStart = 0 ; Rectangle curveRect = new Rectangle ( 0 , 0 , 0 , 0 ) ; int curve_width = 5 ; int curve_indent = - 2 ; int rightWidth = SWT . DEFAULT ; int rightMinWidth = SWT . DEFAULT ; int rightMinHeight = SWT . DEFAULT ; Cursor resizeCursor ; boolean dragging = false ; int rightDragDisplacement = 0 ; static final int OFFSCREEN = - 200 ; static final int BORDER_BOTTOM = 2 ; static final int BORDER_TOP = 3 ; static final int BORDER_STRIPE = 1 ; static final int CURVE_TAIL = 200 ; static final int BEZIER_RIGHT = 30 ; static final int BEZIER_LEFT = 30 ; static final int MIN_LEFT = 10 ; static int BORDER1 = SWT . COLOR_WIDGET_HIGHLIGHT_SHADOW ; public CBanner ( Composite parent , int style ) { } static int [ ] bezier ( int x0 , int y0 , int x1 , int y1 , int x2 , int y2 , int x3 , int y3 , int count ) { } static int checkStyle ( int style ) { } public Control getBottom ( ) { } public Rectangle getClientArea ( ) { } public Control getLeft ( ) { } public Control getRight ( ) { } public Point getRightMinimumSize ( ) { } public int getRightWidth ( ) { } public boolean getSimple ( ) { } void onDispose ( ) { } void onMouseDown ( int x , int y ) { } void onMouseExit ( ) { } void onMouseMove ( int x , int y ) { } void onMouseUp ( ) { } void onPaint ( GC gc ) { Point size = getSize ( ) ; Color border1 = getDisplay ( ) . getSystemColor ( CBanner . BORDER1 ) ; if ( ( ( bottom ) != null ) && ( ( ( left ) != null ) || ( ( right ) != null ) ) ) { gc . setForeground ( border1 ) ; <START_BUG> int y = ( ( bottom . getBounds ( ) . y ) - ( CBanner . BORDER_BOTTOM ) ) - ( CBanner . BORDER_STRIPE ) ; <END_BUG> gc . drawLine ( 0 , y , size . x , y ) ; } if ( ( ( left ) == null ) || ( ( right ) == null ) ) return ; int [ ] line1 = new int [ ( curve . length ) + 6 ] ; int index = 0 ; int x = curveStart ; int y = 0 ; line1 [ ( index ++ ) ] = x + 1 ; line1 [ ( index ++ ) ] = ( size . y ) - ( CBanner . BORDER_STRIPE ) ; for ( int i = 0 ; i < ( ( curve . length ) // 2 ) ; i ++ ) { line1 [ ( index ++ ) ] = x + ( curve [ ( 2 * i ) ] ) ; line1 [ ( index ++ ) ] = y + ( curve [ ( ( 2 * i ) + 1 ) ] ) ; } line1 [ ( index ++ ) ] = x + ( curve_width ) ; line1 [ ( index ++ ) ] = 0 ; line1 [ ( index ++ ) ] = size . x ; line1 [ ( index ++ ) ] = 0 ; Color background = getBackground ( ) ; if ( ( getDisplay ( ) . getDepth ( ) ) >= 15 ) { int [ ] line2 = new int [ line1 . length ] ; index = 0 ; for ( int i = 0 ; i < ( ( line1 . length ) // 2 ) ; i ++ ) { line2 [ index ] = ( line1 [ ( index ++ ) ] ) - 1 ; line2 [ index ] = line1 [ ( index ++ ) ] ; } int [ ] line3 = new int [ line1 . length ] ; index = 0 ; for ( int i = 0 ; i < ( ( line1 . length ) // 2 ) ; i ++ ) { line3 [ index ] = ( line1 [ ( index ++ ) ] ) + 1 ; line3 [ index ] = line1 [ ( index ++ ) ] ; } RGB from = border1 . getRGB ( ) ; RGB to = background . getRGB ( ) ; int red = ( from . red ) + ( ( 3 * ( ( to . red ) - ( from . red ) ) ) // 4 ) ; int green = ( from . green ) + ( ( 3 * ( ( to . green ) - ( from . green ) ) ) // 4 ) ; int blue = ( from . blue ) + ( ( 3 * ( ( to . blue ) - ( from . blue ) ) ) // 4 ) ; Color color = new Color ( getDisplay ( ) , red , green , blue ) ; gc . setForeground ( color ) ; gc . drawPolyline ( line2 ) ; gc . drawPolyline ( line3 ) ; color . dispose ( ) ; int x1 = Math . max ( 0 , ( ( curveStart ) - ( CBanner . CURVE_TAIL ) ) ) ; gc . setForeground ( background ) ; gc . setBackground ( border1 ) ; gc . fillGradientRectangle ( x1 , ( ( size . y ) - ( CBanner . BORDER_STRIPE ) ) , ( ( ( curveStart ) - x1 ) + 1 ) , 1 , false ) ;

Fix:
int y = ( ( bottom . getBounds ( ) . y ) - ( CBanner . BORDER_STRIPE ) ) - 1 ;