Buggy code:
public class Decorations extends Canvas { Image image ; Image smallImage ; Image largeImage ; Image [ ] images ; Menu menuBar ; Menu [ ] menus ; Control savedFocus ; Button defaultButton ; Button saveDefault ; int swFlags ; int hAccel ; int nAccel ; boolean moved ; boolean resized ; boolean opened ; int oldX = OS . CW_USEDEFAULT ; int oldY = OS . CW_USEDEFAULT ; int oldWidth = OS . CW_USEDEFAULT ; int oldHeight = OS . CW_USEDEFAULT ; Decorations ( ) { } public Decorations ( Composite parent , int style ) { } void addMenu ( Menu menu ) { } void bringToTop ( ) { } static int checkStyle ( int style ) { } void checkBorder ( ) { } void checkOpened ( ) { } protected void checkSubclass ( ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } void closeWidget ( ) { } int compare ( ImageData data1 , ImageData data2 , int width , int height , int depth ) { } Control computeTabGroup ( ) { } Control computeTabRoot ( ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } void createAccelerators ( ) { } void createHandle ( ) { } void createWidget ( ) { } void destroyAccelerators ( ) { } public void dispose ( ) { } Menu findMenu ( int hMenu ) { } void fixDecorations ( Decorations newDecorations , Control control , Menu [ ] menus ) { } public Rectangle getBounds ( ) { } public Rectangle getClientArea ( ) { checkWidget ( ) ; if ( OS . IsHPC ) { Rectangle rect = super . getClientArea ( ) ; if ( ( menuBar ) != null ) { int hwndCB = menuBar . hwndCB ; int height = OS . CommandBar_Height ( hwndCB ) ; rect . y += height ; <START_BUG> rect . height -= height ; <END_BUG> } return rect ; } if ( ! ( OS . IsWinCE ) ) { if ( OS . IsIconic ( handle ) ) { WINDOWPLACEMENT lpwndpl = new WINDOWPLACEMENT ( ) ; lpwndpl . length = WINDOWPLACEMENT . sizeof ; OS . GetWindowPlacement ( handle , lpwndpl ) ; int width = ( lpwndpl . right ) - ( lpwndpl . left ) ; int height = ( lpwndpl . bottom ) - ( lpwndpl . top ) ; if ( ( horizontalBar ) != null ) width -= OS . GetSystemMetrics ( SM_CYHSCROLL ) ; if ( ( verticalBar ) != null ) height -= OS . GetSystemMetrics ( SM_CXVSCROLL ) ; RECT rect = new RECT ( ) ; int bits1 = OS . GetWindowLong ( handle , GWL_STYLE ) ; int bits2 = OS . GetWindowLong ( handle , GWL_EXSTYLE ) ; boolean hasMenu = ( OS . IsWinCE ) ? false : ( OS . GetMenu ( handle ) ) != 0 ; OS . AdjustWindowRectEx ( rect , bits1 , hasMenu , bits2 ) ; width = Math . max ( 0 , ( width - ( ( rect . right ) - ( rect . left ) ) ) ) ; height = Math . max ( 0 , ( height - ( ( rect . bottom ) - ( rect . top ) ) ) ) ; return new Rectangle ( 0 , 0 , width , height ) ; } } return super . getClientArea ( ) ; } public Button getDefaultButton ( ) { } public Image getImage ( ) { } public Image [ ] getImages ( ) { } public Point getLocation ( ) { } public boolean getMaximized ( ) { } public Menu getMenuBar ( ) { } public boolean getMinimized ( ) { } String getNameText ( ) { } public Point getSize ( ) { } public String getText ( ) { } public boolean isReparentable ( ) { } boolean isTabGroup ( ) { } boolean isTabItem ( ) { } Decorations menuShell ( ) { } void releaseChildren ( boolean destroy ) { } void releaseWidget ( ) { } void removeMenu ( Menu menu ) { } boolean restoreFocus ( ) { } void saveFocus ( ) { } void setBounds ( int x , int y , int width , int height , int flags , boolean defer ) { } public void setDefaultButton ( Button button ) { } void setDefaultButton ( Button button , boolean save ) { } public void setImage ( Image image ) { } void setImages ( Image image , Image [ ] images ) { } public void setImages ( Image [ ] images ) { } public void setMaximized ( boolean maximized ) { } public void setMenuBar ( Menu menu ) { } public void setMinimized ( boolean minimized ) { } void setParent ( ) { } void setPlacement ( int x , int y , int width , int height , int flags ) { } void setSavedFocus ( Control control ) { } void setSystemMenu ( ) { } public void setText ( String string ) { } public void setVisible ( boolean visible ) { } void sort ( Image [ ] images , ImageData [ ] datas , int width , int height , int depth ) { } boolean translateAccelerator ( MSG msg ) { } boolean translateMenuAccelerator ( MSG msg ) { } boolean translateMDIAccelerator ( MSG msg ) { } boolean traverseDecorations ( boolean next ) { } boolean traverseItem ( boolean next ) { } boolean traverseReturn ( ) { } CREATESTRUCT widgetCreateStruct ( ) { } int widgetExtStyle ( ) { } int widgetParent ( ) { } int widgetStyle ( ) { }

Fix:
rect . height = Math . max ( 0 , ( ( rect . height ) - height ) ) ;