Buggy code:
public class AssociatedWindow extends Window { protected static final int TRACK_OUTER_TOP_RHS = 0 ; protected static final int TRACK_INNER_TOP_RHS = 1 ; protected static final int TRACK_OUTER_BOTTOM_RHS = 2 ; protected static final int TRACK_INNER_BOTTOM_RHS = 3 ; protected static final int HORIZONTAL_VISIBLE = 0 ; protected static final int ALWAYS_VISIBLE = 1 ; private Control owner ; private ControlListener controlListener ; private int trackStyle ; private int moveType ; private Region roundRegion ; public AssociatedWindow ( Shell parent , Control associatedControl , int trackStyle ) { } protected void configureShell ( Shell newShell ) { } protected void moveShell ( Shell shellToMove , int moveConstant ) { } private Point getLocation ( Shell shellToMove ) { } private Point getLocationOuterTopRHS ( Shell shellToMove ) { } private Point getLocationInnerTopRHS ( Shell shellToMove ) { } private Point getLocationOuterBottomRHS ( Shell shellToMove ) { } private Point getLocationInnerBottomRHS ( Shell shellToMove ) { } private void associate ( final Shell floatingShell ) { } protected Control createContents ( Composite parent ) { } protected void addRoundBorder ( final Shell paintShell , final int borderSize ) { paintShell . addPaintListener ( new PaintListener ( ) { public void paintControl ( PaintEvent event ) { if ( ( paintShell == null ) || ( paintShell . isDisposed ( ) ) ) return ; if ( ( ( 2 * borderSize ) >= ( paintShell . getBounds ( ) . width ) ) || ( ( 2 * borderSize ) >= ( paintShell . getBounds ( ) . height ) ) ) return ; Rectangle outerShellSize = paintShell . getClientArea ( ) ; GC gc = event . gc ; gc . setClipping ( getBorderRegion ( outerShellSize , paintShell ) ) ; <START_BUG> gc . setBackground ( paintShell . getDisplay ( ) . getSystemColor ( COLOR_BLACK ) ) ; <END_BUG> gc . fillRoundRectangle ( 0 , 0 , outerShellSize . width , outerShellSize . height , 5 , 5 ) ; } private Region getBorderRegion ( Rectangle outerShellSize , Shell newShell ) { if ( ( roundRegion ) != null ) return roundRegion ; Rectangle innerShellSize = new Rectangle ( borderSize , borderSize , ( ( outerShellSize . width ) - ( 2 * borderSize ) ) , ( ( outerShellSize . height ) - ( 2 * borderSize ) ) ) ; roundRegion = new Region ( getShell ( ) . getDisplay ( ) ) ; Region outerRegion = newShell . getRegion ( ) ; boolean tempRegion = false ; if ( outerRegion == null ) { outerRegion = getRoundCorners ( outerShellSize , newShell ) ; tempRegion = true ; } Region innerRegion = getRoundCorners ( innerShellSize , newShell ) ; roundRegion . add ( outerRegion ) ; roundRegion . subtract ( innerRegion ) ; if ( tempRegion ) outerRegion . dispose ( ) ; innerRegion . dispose ( ) ; return roundRegion ; } } ) ; } private Region getRoundCorners ( Rectangle size , Shell roundShell ) { } private void addTopRightCorner ( Region cornerRegion , Rectangle shellSize ) { } private void addBottomRightCorner ( Region cornerRegion , Rectangle shellSize ) { } private void addTopLeftCorner ( Region cornerRegion , Rectangle shellSize ) { } private void addBottomLeftCorner ( Region cornerRegion , Rectangle shellSize ) { } public boolean close ( ) { } }

Fix:
gc . setBackground ( paintShell . getDisplay ( ) . getSystemColor ( COLOR_WIDGET_NORMAL_SHADOW ) ) ;