Buggy code:
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 ) { } 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 ( ) { } public Color getBackground ( ) { } Color getBackgroundColor ( ) { } public Image getBackgroundImage ( ) { } public int getBorderWidth ( ) { } public Rectangle getBounds ( ) { } public boolean getDragDetect ( ) { } boolean getDrawing ( ) { } 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 ( ) { } NSBezierPath getPath ( Region region ) { } NSBezierPath getPath ( int region ) { } public Region getRegion ( ) { } public Shell getShell ( ) { } public Point getSize ( ) { } float getThemeAlpha ( ) { } public String getToolTipText ( ) { } public boolean getVisible ( ) { } int getVisibleRegion ( ) { } boolean hasBorder ( ) { } boolean hasFocus ( ) { } int hitTest ( int id , int sel , NSPoint point ) { } boolean imeInComposition ( ) { } boolean insertText ( int id , int sel , int string ) { } public int internal_new_GC ( GCData data ) { } public void internal_dispose_GC ( int context , GCData data ) { } void invalidateChildrenVisibleRegion ( ) { } void invalidateVisibleRegion ( ) { } boolean isActive ( ) { <START_BUG> return ( getShell ( ) . getModalShell ( ) ) == null ; <END_BUG> } boolean isDescribedByLabel ( ) { } boolean isDrawing ( ) { } public boolean isEnabled ( ) { } boolean isEnabledCursor ( ) { } boolean isFocusAncestor ( Control control ) { } public boolean isFocusControl ( ) { } boolean isObscured ( ) { } public boolean isReparentable ( ) { } boolean isShowing ( ) { } boolean isTabGroup ( ) { } boolean isTabItem ( ) { } boolean isTrim ( NSView view ) { } public boolean isVisible ( ) { } void keyDown ( int id , int sel , int theEvent ) { } void keyUp ( int id , int sel , int theEvent ) { } void markLayout ( boolean changed , boolean all ) { } int menuForEvent ( int id , int sel , int theEvent ) { } Decorations menuShell ( ) { } void scrollWheel ( int id , int sel , int theEvent ) { } boolean isEventView ( int id ) { } boolean mouseEvent ( int id , int sel , int theEvent , int type ) { } void mouseDown ( int id , int sel , int theEvent ) { } void mouseUp ( int id , int sel , int theEvent ) { } void mouseDragged ( int id , int sel , int theEvent ) { } void rightMouseDown ( int id , int sel , int theEvent ) { } void rightMouseUp ( int id , int sel , int theEvent ) { } void rightMouseDragged ( int id , int sel , int theEvent ) { } void otherMouseDown ( int id , int sel , int theEvent ) { } void otherMouseUp ( int id , int sel , int theEvent ) { } void otherMouseDragged ( int id , int sel , int theEvent ) { } void moved ( ) { } public void moveAbove ( Control control ) { } public void moveBelow ( Control control ) { } Accessible new_Accessible ( Control control ) { } public void pack ( ) { }

Fix:
return ( ( getShell ( ) . getModalShell ( ) ) == null ) && ( ( display . getModalDialog ( ) ) == null ) ;