Buggy code:
void checkBorder ( ) { } void checkMirrored ( ) { } int childStyle ( ) { } void createWidget ( int index ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } Point computeNativeSize ( int h , int wHint , int hHint , boolean changed ) { } void forceResize ( ) { } public Accessible getAccessible ( ) { } public Rectangle getBounds ( ) { } public void setBounds ( Rectangle rect ) { } public void setBounds ( int x , int y , int width , int height ) { } void markLayout ( boolean changed , boolean all ) { } void modifyStyle ( int handle , int style ) { } void moveHandle ( int x , int y ) { } void resizeHandle ( int width , int height ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize ) { } public Point getLocation ( ) { } public void setLocation ( Point location ) { } public void setLocation ( int x , int y ) { } public Point getSize ( ) { } public void setSize ( Point size ) { } public void setRegion ( Region region ) { } void setRelations ( ) { } public void setSize ( int width , int height ) { } boolean isDescribedByLabel ( ) { } boolean isFocusHandle ( int widget ) { } public void moveAbove ( Control control ) { } public void moveBelow ( Control control ) { } void moveChildren ( int oldWidth ) { } public void pack ( ) { } public void pack ( boolean changed ) { } public void setLayoutData ( Object layoutData ) { } public Point toControl ( int x , int y ) { } public Point toControl ( Point point ) { } public Point toDisplay ( int x , int y ) { } public Point toDisplay ( Point point ) { } 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 addMouseMoveListener ( MouseMoveListener listener ) { } public void addMouseTrackListener ( MouseTrackListener listener ) { } public void addMouseWheelListener ( MouseWheelListener listener ) { } public void addPaintListener ( PaintListener listener ) { } void addRelation ( Control control ) { } public void addTraverseListener ( TraverseListener listener ) { } public void removeControlListener ( ControlListener listener ) { } public void removeDragDetectListener ( DragDetectListener listener ) { } public void removeFocusListener ( FocusListener listener ) { } public void removeHelpListener ( HelpListener listener ) { } public void removeKeyListener ( KeyListener listener ) { } public void removeMenuDetectListener ( MenuDetectListener listener ) { } public void removeMouseListener ( MouseListener listener ) { } public void removeMouseMoveListener ( MouseMoveListener listener ) { } public void removeMouseTrackListener ( MouseTrackListener listener ) { } public void removeMouseWheelListener ( MouseWheelListener listener ) { } public void removePaintListener ( PaintListener listener ) { } void removeRelation ( ) { } public void removeTraverseListener ( TraverseListener listener ) { } 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 filterKey ( int keyval , int event ) { } Control findBackgroundControl ( ) { } Menu [ ] findMenus ( Control control ) { } void fixChildren ( Shell newShell , Shell oldShell , Decorations newDecorations , Decorations oldDecorations , Menu [ ] menus ) { } int fixedMapProc ( int widget ) { } void fixModal ( int group , int modalGroup ) { } public boolean forceFocus ( ) { } boolean forceFocus ( int focusHandle ) { <START_BUG> if ( ( focusHandle != 0 ) && ( OS . GTK_WIDGET_HAS_FOCUS ( focusHandle ) ) ) <END_BUG> return true ; OS . gtk_widget_realize ( focusHandle ) ; OS . gtk_widget_grab_focus ( focusHandle ) ; Shell shell = getShell ( ) ; int shellHandle = shell . shellHandle ; int handle = OS . gtk_window_get_focus ( shellHandle ) ; while ( handle != 0 ) { if ( handle == focusHandle ) return true ; Widget widget = display . getWidget ( handle ) ; if ( ( widget != null ) && ( widget instanceof Control ) ) { return widget == ( this ) ; } handle = OS . gtk_widget_get_parent ( handle ) ; } return false ; } public Color getBackground ( ) { } GdkColor getBackgroundColor ( ) { } public Image getBackgroundImage ( ) { } GdkColor getBgColor ( ) { } GdkColor getBaseColor ( ) { } public int getBorderWidth ( ) { } int getClientWidth ( ) { } public Cursor getCursor ( ) { } public boolean getDragDetect ( ) { } public boolean getEnabled ( ) { } public Font getFont ( ) { } int getFontDescription ( ) { } public Color getForeground ( ) { } GdkColor getForegroundColor ( ) { } GdkColor getFgColor ( ) { } Point getIMCaretPos ( ) { } GdkColor getTextColor ( ) { } public Object getLayoutData ( ) { } public Menu getMenu ( ) { } public Monitor getMonitor ( ) { } public Composite getParent ( ) { } Control [ ] getPath ( ) { } public Region getRegion ( ) { }

Fix:
if ( OS . GTK_WIDGET_HAS_FOCUS ( focusHandle ) )