Buggy code:
public class OleClientSite extends Composite { private COMObject iUnknown ; COMObject iOleClientSite ; private COMObject iAdviseSink ; private COMObject iOleInPlaceSite ; private COMObject iOleDocumentSite ; protected GUID appClsid ; private GUID objClsid ; private int refCount ; protected OleFrame frame ; protected IUnknown objIUnknown ; protected IOleObject objIOleObject ; protected IViewObject2 objIViewObject2 ; protected IOleInPlaceObject objIOleInPlaceObject ; protected IOleCommandTarget objIOleCommandTarget ; protected IOleDocumentView objDocumentView ; protected IStorage tempStorage ; private int aspect ; private int type ; private boolean isStatic ; private RECT borderWidths = new RECT ( ) ; private RECT indent = new RECT ( ) ; private boolean inUpdate = false ; private boolean inInit = true ; private boolean inDispose = false ; private static final String WORDPROGID = "Word.Document" ; private Listener listener ; static final int STATE_NONE = 0 ; static final int STATE_RUNNING = 1 ; static final int STATE_INPLACEACTIVE = 2 ; static final int STATE_UIACTIVE = 3 ; static final int STATE_ACTIVE = 4 ; int state = OleClientSite . STATE_NONE ; protected OleClientSite ( Composite parent , int style ) { } public OleClientSite ( Composite parent , int style , File file ) { } public OleClientSite ( Composite parent , int style , String progId ) { } public OleClientSite ( Composite parent , int style , String progId , File file ) { } protected void addObjectReferences ( ) { } protected int AddRef ( ) { } private int CanInPlaceActivate ( ) { } private int ContextSensitiveHelp ( int fEnterMode ) { } protected void createCOMInterfaces ( ) { } protected IStorage createTempStorage ( ) { } public void deactivateInPlaceClient ( ) { } private void deleteTempStorage ( ) { } protected void disposeCOMInterfaces ( ) { } public int doVerb ( int verb ) { } public int exec ( int cmdID , int options , Variant in , Variant out ) { } IDispatch getAutomationObject ( ) { } protected GUID getClassID ( String clientName ) { } private int GetContainer ( int ppContainer ) { } private SIZE getExtent ( ) { } public Rectangle getIndent ( ) { } public String getProgramID ( ) { } int ActivateMe ( int pViewToActivate ) { } protected int GetWindow ( int phwnd ) { } RECT getRect ( ) { } private int GetWindowContext ( int ppFrame , int ppDoc , int lprcPosRect , int lprcClipRect , int lpFrameInfo ) { } public boolean isDirty ( ) { int [ ] address = new int [ 1 ] ; if ( ( objIOleObject . QueryInterface ( IIDIPersistFile , address ) ) != ( COM . S_OK ) ) return true ; <START_BUG> IPersistStorage permStorage = new IPersistStorage ( address [ 0 ] ) ; <END_BUG> int result = permStorage . IsDirty ( ) ; permStorage . Release ( ) ; if ( result == ( COM . S_FALSE ) ) return false ; return true ; } public boolean isFocusControl ( ) { } private boolean isOffice2007 ( ) { } private int OnClose ( ) { } private int OnDataChange ( int pFormatetc , int pStgmed ) { } private void onDispose ( Event e ) { } void onFocusIn ( Event e ) { } void onFocusOut ( Event e ) { } private int OnInPlaceActivate ( ) { } private int OnInPlaceDeactivate ( ) { } private int OnPosRectChange ( int lprcPosRect ) { } private void onPaint ( Event e ) { } private void onResize ( Event e ) { } private void OnSave ( ) { } private int OnShowWindow ( int fShow ) { } private int OnUIActivate ( ) { } int OnUIDeactivate ( int fUndoable ) { } private void onTraverse ( Event event ) { } private int OnViewChange ( int dwAspect , int lindex ) { } protected int QueryInterface ( int riid , int ppvObject ) { } public int queryStatus ( int cmd ) { } protected int Release ( ) { } protected void releaseObjectInterfaces ( ) { } public boolean save ( File file , boolean includeOleInfo ) { } private boolean saveFromContents ( int address , File file ) { } private boolean saveFromOle10Native ( int address , File file ) { } private int SaveObject ( ) { } private boolean saveToStorageFile ( File file ) { } private boolean saveToTraditionalFile ( File file ) { } private int Scroll_64 ( int scrollExtent ) { } private int Scroll ( int scrollExtent_cx , int scrollExtent_cy ) { } void setBorderSpace ( RECT newBorderwidth ) { } void setBounds ( ) { } private void setExtent ( int width , int height ) { } public void setIndent ( Rectangle newIndent ) { } private void setObjectRects ( ) { } private int ShowObject ( ) { } public void showProperties ( String title ) { } private boolean updateStorage ( ) { } private SIZE xFormHimetricToPixels ( SIZE aSize ) { } private SIZE xFormPixelsToHimetric ( SIZE aSize ) { } }

Fix:
IPersistFile permStorage = new IPersistFile ( address [ 0 ] ) ;