Buggy code:
int accessibilityAttributeValue_forParameter ( int id , int sel , int arg0 , int arg1 ) { } boolean accessibilityIsAttributeSettable ( int id , int sel , int arg0 ) { } void accessibilitySetValue_forAttribute ( int id , int sel , int arg0 , int arg1 ) { } 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 ) { } void addRelation ( Control control ) { } public void addPaintListener ( PaintListener listener ) { } static final double SYNTHETIC_BOLD = - 2.5 ; static final double SYNTHETIC_ITALIC = 0.2 ; void addTraits ( NSMutableDictionary dict , Font font ) { } public void addTraverseListener ( TraverseListener listener ) { } boolean becomeFirstResponder ( int id , int sel ) { } void calculateVisibleRegion ( NSView view , int visibleRgn , boolean clipChildren ) { } void checkBackground ( ) { } void checkBuffered ( ) { } void checkToolTip ( Widget target ) { } public Point computeSize ( int wHint , int hHint ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } Widget computeTabGroup ( ) { } Widget [ ] computeTabList ( ) { } Control computeTabRoot ( ) { } NSView contentView ( ) { } NSAttributedString createString ( String string , Font font , float [ ] foreground , int alignment , boolean wrap , boolean enabled , boolean mnemonics ) { } void createWidget ( ) { } Color defaultBackground ( ) { } Font defaultFont ( ) { } Color defaultForeground ( ) { } NSFont defaultNSFont ( ) { } void deregister ( ) { } void destroyWidget ( ) { } void 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 , NSGraphicsContext context , NSRect rect ) { } void enableWidget ( boolean enabled ) { } boolean equals ( float [ ] color1 , float [ ] color2 ) { } NSView eventView ( ) { } void fillBackground ( NSView view , NSGraphicsContext context , NSRect rect , int imgHeight ) { } void fillBackground ( NSView view , NSGraphicsContext context , NSRect rect , int imgHeight , NSView gcView , int tx , int ty ) { 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 ; if ( ! ( controlView . isFlipped ( ) ) ) { phase . y = controlView . bounds ( ) . height ; } if ( imgHeight == ( - 1 ) ) { NSView contentView = controlView . window ( ) . contentView ( ) ; phase = controlView . convertPoint_toView_ ( phase , contentView ) ; phase . y = ( contentView . bounds ( ) . height ) - ( phase . y ) ; } else { phase = view . convertPoint_toView_ ( phase , controlView ) ; phase . y += imgHeight - ( backgroundImage . getBounds ( ) . height ) ; } if ( gcView != null ) { <START_BUG> NSPoint pt = gcView . convertPoint_toView_ ( new NSPoint ( ) , controlView ) ; <END_BUG> phase . x += pt . x ; phase . y -= pt . y ; } phase . x -= tx ; phase . y += ty ; context . setPatternPhase ( phase ) ; NSBezierPath . fillRect ( rect ) ; context . restoreGraphicsState ( ) ; return ; } float [ ] background = control . background ; float alpha ; if ( background == null ) { if ( isTransparent ( ) ) return ; background = control . defaultBackground ( ) . handle ; alpha = getThemeAlpha ( ) ; } else { alpha = background [ 3 ] ; } context . saveGraphicsState ( ) ; NSColor . colorWithDeviceRed ( background [ 0 ] , background [ 1 ] , background [ 2 ] , alpha ) . setFill ( ) ; NSBezierPath . fillRect ( rect ) ; context . restoreGraphicsState ( ) ; } Cursor findCursor ( ) { } Control findBackgroundControl ( ) { } Menu [ ] findMenus ( Control control ) { } Widget findTooltip ( NSPoint pt ) { } 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 ( ) { }

Fix:
NSPoint pt = gcView . convertPoint_toView_ ( new NSPoint ( ) , view ) ;