Buggy code:
public abstract class Control extends Widget implements Drawable { public NSView view ; Composite parent ; String toolTipText ; Object layoutData ; int drawCount ; Menu menu ; Color foreground ; Color background ; Image backgroundImage ; Font font ; Cursor cursor ; Region region ; Accessible accessible ; Control ( ) { } public Control ( Composite parent , int style ) { } boolean becomeFirstResponder ( int id , int sel ) { } boolean resignFirstResponder ( int id , int sel ) { } public void addControlListener ( ControlListener listener ) { } public void addDragDetectListener ( DragDetectListener listener ) { } public void addFocusListener ( FocusListener listener ) { } public void addHelpListener ( HelpListener listener ) { } public void addKeyListener ( KeyListener listener ) { } public void addMenuDetectListener ( MenuDetectListener listener ) { } public void addMouseListener ( MouseListener listener ) { } public void addMouseTrackListener ( MouseTrackListener listener ) { } public void addMouseMoveListener ( MouseMoveListener listener ) { } public void addMouseWheelListener ( MouseWheelListener listener ) { } public void addPaintListener ( PaintListener listener ) { } public void addTraverseListener ( TraverseListener listener ) { } void checkBackground ( ) { } void checkBuffered ( ) { } public Point computeSize ( int wHint , int hHint ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } Control computeTabGroup ( ) { } Control [ ] computeTabList ( ) { } Control computeTabRoot ( ) { } NSView contentView ( ) { } void createWidget ( ) { } Color defaultBackground ( ) { } Font defaultFont ( ) { } Color defaultForeground ( ) { } void deregister ( ) { } void destroyWidget ( ) { } boolean doCommandBySelector ( int id , int sel , int selector ) { } public boolean dragDetect ( Event event ) { } public boolean dragDetect ( MouseEvent event ) { } boolean dragDetect ( int button , int count , int stateMask , int x , int y ) { } boolean dragDetect ( int x , int y , boolean filter , boolean [ ] consume ) { } boolean drawGripper ( int x , int y , int width , int height , boolean vertical ) { } void drawWidget ( int id , NSRect rect ) { } void enableWidget ( boolean enabled ) { } void fillBackground ( NSView view , NSGraphicsContext context , NSRect rect ) { Control control = findBackgroundControl ( ) ; if ( control == null ) control = this ; Image image = control . backgroundImage ; if ( ( image != null ) && ( ! ( image . isDisposed ( ) ) ) ) { context . saveGraphicsState ( ) ; NSColor . colorWithPatternImage ( image . handle ) . setFill ( ) ; NSPoint phase = new NSPoint ( ) ; NSView controlView = control . view ; NSView contentView = controlView . window ( ) . contentView ( ) ; phase = controlView . convertPoint_toView_ ( phase , contentView ) ; phase . y = ( contentView . bounds ( ) . height ) - ( phase . y ) ; context . setPatternPhase ( phase ) ; NSBezierPath . fillRect ( rect ) ; context . restoreGraphicsState ( ) ; return ; } <START_BUG> Color background = control . background ; <END_BUG> if ( ( background != null ) && ( ! ( background . isDisposed ( ) ) ) ) { float [ ] color = background . handle ; context . saveGraphicsState ( ) ; NSColor . colorWithDeviceRed ( color [ 0 ] , color [ 1 ] , color [ 2 ] , color [ 3 ] ) . setFill ( ) ; NSBezierPath . fillRect ( rect ) ; context . restoreGraphicsState ( ) ; return ; } } Cursor findCursor ( ) { } Control findBackgroundControl ( ) { } Menu [ ] findMenus ( Control control ) { } void fixChildren ( Shell newShell , Shell oldShell , Decorations newDecorations , Decorations oldDecorations , Menu [ ] menus ) { } void fixFocus ( Control focusControl ) { } void flagsChanged ( int id , int sel , int theEvent ) { } NSView focusView ( ) { } public boolean forceFocus ( ) { } public Accessible getAccessible ( ) { } public Color getBackground ( ) { } Color getBackgroundColor ( ) { } public Image getBackgroundImage ( ) { } public int getBorderWidth ( ) { } public Rectangle getBounds ( ) { } public boolean getDragDetect ( ) { } NSBezierPath getClipping ( ) { } public Cursor getCursor ( ) { } public boolean getEnabled ( ) { } public Font getFont ( ) { } public Color getForeground ( ) { } Color getForegroundColor ( ) { } public Object getLayoutData ( ) { } public Point getLocation ( ) { } public Menu getMenu ( ) { } int getMininumHeight ( ) { } public Monitor getMonitor ( ) { } public Composite getParent ( ) { } Control [ ] getPath ( ) { } public Region getRegion ( ) { } public Shell getShell ( ) { } public Point getSize ( ) { } public String getToolTipText ( ) { } public boolean getVisible ( ) { } boolean hasBorder ( ) { } boolean hasFocus ( ) { } int hitTest ( int id , int sel , NSPoint point ) { } boolean insertText ( int id , int sel , int string ) { } public int internal_new_GC ( GCData data ) { } public void internal_dispose_GC ( int context , GCData data ) { } public boolean isEnabled ( ) { } boolean isEnabledCursor ( ) { } boolean isFocusAncestor ( Control control ) { } public boolean isFocusControl ( ) { }

Fix:
Color background = control . getBackgroundColor ( ) ;