Buggy code:
public Control ( Composite parent , int style ) { } public void addControlListener ( ControlListener listener ) { } public void addFocusListener ( FocusListener listener ) { } public void addHelpListener ( HelpListener listener ) { } public void addKeyListener ( KeyListener listener ) { } public void addMouseListener ( MouseListener listener ) { } public void addMouseTrackListener ( MouseTrackListener listener ) { } public void addMouseMoveListener ( MouseMoveListener listener ) { } public void addPaintListener ( PaintListener listener ) { } public void addTraverseListener ( TraverseListener listener ) { } int borderHandle ( ) { } void checkBackground ( ) { } void checkBorder ( ) { } void checkBuffered ( ) { } boolean checkHandle ( int hwnd ) { } void checkMirrored ( ) { } public Point computeSize ( int wHint , int hHint ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } Control computeTabGroup ( ) { } Control computeTabRoot ( ) { } Control [ ] computeTabList ( ) { } void createHandle ( ) { } void createWidget ( ) { } int defaultBackground ( ) { } int defaultFont ( ) { } int defaultForeground ( ) { } void deregister ( ) { } void destroyWidget ( ) { } Event dragDetect ( Event event ) { } void drawBackground ( int hDC ) { } void drawBackground ( int hDC , RECT rect ) { } void drawBackground ( int hDC , RECT rect , int pixel ) { } void drawImageBackground ( int hDC , int hwnd , int hBitmap , RECT rect ) { } void drawThemeBackground ( int hDC , int hwnd , RECT rect ) { } void enableDrag ( boolean enabled ) { } void enableWidget ( boolean enabled ) { } void fillBackground ( int hDC , int pixel , RECT rect ) { } void fillImageBackground ( int hDC , Control control , RECT rect ) { } void fillThemeBackground ( int hDC , Control control , RECT rect ) { } Control findBackgroundControl ( ) { } int findBrush ( int value , int lbStyle ) { } Cursor findCursor ( ) { } Control findImageControl ( ) { } Control findThemeControl ( ) { } Menu [ ] findMenus ( Control control ) { } char findMnemonic ( String string ) { } void fixChildren ( Shell newShell , Shell oldShell , Decorations newDecorations , Decorations oldDecorations , Menu [ ] menus ) { } void fixFocus ( Control focusControl ) { } public boolean forceFocus ( ) { } void forceResize ( ) { } public Accessible getAccessible ( ) { } public Color getBackground ( ) { } public Image getBackgroundImage ( ) { } int getBackgroundPixel ( ) { } public int getBorderWidth ( ) { } public Rectangle getBounds ( ) { } int getCodePage ( ) { } String getClipboardText ( ) { } public Cursor getCursor ( ) { } boolean getDragDetect ( ) { } public boolean getEnabled ( ) { } public Font getFont ( ) { } public Color getForeground ( ) { } int getForegroundPixel ( ) { } public Object getLayoutData ( ) { } public Point getLocation ( ) { } public Menu getMenu ( ) { } public Monitor getMonitor ( ) { } public Composite getParent ( ) { } Control [ ] getPath ( ) { } public Shell getShell ( ) { } public Point getSize ( ) { } public String getToolTipText ( ) { } public boolean getVisible ( ) { } boolean hasCursor ( ) { } boolean hasFocus ( ) { } public int internal_new_GC ( GCData data ) { } public void internal_dispose_GC ( int hDC , GCData data ) { } boolean isActive ( ) { } public boolean isEnabled ( ) { } public boolean isFocusControl ( ) { } boolean isFocusAncestor ( Control control ) { <START_BUG> while ( ( control != null ) && ( control != ( this ) ) ) { <END_BUG> control = control . parent ; } return control == ( this ) ; } public boolean isReparentable ( ) { } boolean isShowing ( ) { } boolean isTabGroup ( ) { } boolean isTabItem ( ) { } public boolean isVisible ( ) { } void mapEvent ( int hwnd , Event event ) { } void markLayout ( boolean changed , boolean all ) { } Decorations menuShell ( ) { } boolean mnemonicHit ( char key ) { } boolean mnemonicMatch ( char key ) { } public void moveAbove ( Control control ) { } public void moveBelow ( Control control ) { } Accessible new_Accessible ( Control control ) { } GC new_GC ( GCData data ) { } public void pack ( ) { } public void pack ( boolean changed ) { } public void redraw ( ) { } void redraw ( boolean all ) { } public void redraw ( int x , int y , int width , int height , boolean all ) { } boolean redrawChildren ( ) { } void register ( ) { } void releaseHandle ( ) { } void releaseParent ( ) { } void releaseWidget ( ) { } public void removeControlListener ( ControlListener listener ) { } public void removeFocusListener ( FocusListener listener ) { } public void removeHelpListener ( HelpListener listener ) { } public void removeKeyListener ( KeyListener listener ) { } public void removeMouseTrackListener ( MouseTrackListener listener ) { } public void removeMouseListener ( MouseListener listener ) { } public void removeMouseMoveListener ( MouseMoveListener listener ) { } public void removePaintListener ( PaintListener listener ) { } public void removeTraverseListener ( TraverseListener listener ) { } void showWidget ( boolean visible ) { } boolean sendFocusEvent ( int type ) { } void setBackground ( ) { }

Fix:
while ( ( ( control != null ) && ( control != ( this ) ) ) && ( ! ( control instanceof Shell ) ) ) {