Buggy code:
public class Browser extends Composite { OleFrame frame ; OleControlSite site ; OleAutomation auto ; boolean back ; boolean forward ; Point location ; Point size ; boolean addressBar = true ; boolean menuBar = true ; boolean statusBar = true ; boolean toolBar = true ; int info ; int globalDispatch ; String html ; CloseWindowListener [ ] closeWindowListeners = new CloseWindowListener [ 0 ] ; LocationListener [ ] locationListeners = new LocationListener [ 0 ] ; OpenWindowListener [ ] openWindowListeners = new OpenWindowListener [ 0 ] ; ProgressListener [ ] progressListeners = new ProgressListener [ 0 ] ; StatusTextListener [ ] statusTextListeners = new StatusTextListener [ 0 ] ; TitleListener [ ] titleListeners = new TitleListener [ 0 ] ; VisibilityWindowListener [ ] visibilityWindowListeners = new VisibilityWindowListener [ 0 ] ; static final int BeforeNavigate2 = 250 ; static final int CommandStateChange = 105 ; static final int DocumentComplete = 259 ; static final int NavigateComplete2 = 252 ; static final int NewWindow2 = 251 ; static final int OnMenuBar = 256 ; static final int OnStatusBar = 257 ; static final int OnToolBar = 255 ; static final int OnVisible = 254 ; static final int ProgressChange = 108 ; static final int RegisterAsBrowser = 552 ; static final int StatusTextChange = 102 ; static final int TitleChange = 113 ; static final int WindowClosing = 263 ; static final int WindowSetHeight = 267 ; static final int WindowSetLeft = 264 ; static final int WindowSetResizable = 262 ; static final int WindowSetTop = 265 ; static final int WindowSetWidth = 266 ; static final short CSC_NAVIGATEFORWARD = 1 ; static final short CSC_NAVIGATEBACK = 2 ; static final int INET_E_DEFAULT_ACTION = - 2146697199 ; static final int URLPOLICY_ALLOW = 0 ; static final int URLPOLICY_DISALLOW = 3 ; static final int URLZONE_LOCAL_MACHINE = 0 ; static final int URLZONE_INTRANET = 1 ; static final int URLACTION_ACTIVEX_MIN = 4608 ; static final int URLACTION_ACTIVEX_MAX = 5119 ; static final int URLACTION_JAVA_MIN = 7168 ; static final int URLPOLICY_JAVA_LOW = 196608 ; static final int URLACTION_JAVA_MAX = 7423 ; static final int DISPID_AMBIENT_DLCONTROL = - 5512 ; static final int DLCTL_DLIMAGES = 16 ; static final int DLCTL_VIDEOS = 32 ; static final int DLCTL_BGSOUNDS = 64 ; static final int DLCTL_NO_SCRIPTS = 128 ; static final int DLCTL_NO_JAVA = 256 ; static final int DLCTL_NO_RUNACTIVEXCTLS = 512 ; static final int DLCTL_NO_DLACTIVEXCTLS = 1024 ; static final int DLCTL_DOWNLOADONLY = 2048 ; static final int DLCTL_NO_FRAMEDOWNLOAD = 4096 ; static final int DLCTL_RESYNCHRONIZE = 8192 ; static final int DLCTL_PRAGMA_NO_CACHE = 16384 ; static final int DLCTL_FORCEOFFLINE = 268435456 ; static final int DLCTL_NO_CLIENTPULL = 536870912 ; static final int DLCTL_SILENT = 1073741824 ; static final int DOCHOSTUIFLAG_THEME = 262144 ; static final int DOCHOSTUIFLAG_NO3DBORDER = 4 ; static final int DOCHOSTUIFLAG_NO3DOUTERBORDER = 2097152 ; static final String ABOUT_BLANK = "about:blank" ; static final String URL_CAB = ".cab" ; static final String URL_DIRECTOR = "http:////download.macromedia.com//pub//shockwave//cabs//director//sw.cab" ; static final String URL_JAVA = "http:////java.sun.com//products//plugin//autodl//jinstall" ; static final String URL_JAVA_15 = "http:////java.sun.com//update" ; static final String PACKAGE_PREFIX = "org.eclipse.swt.browser." ; public Browser ( Composite parent , int style ) { } public void addCloseWindowListener ( CloseWindowListener listener ) { } public void addLocationListener ( LocationListener listener ) { } public void addOpenWindowListener ( OpenWindowListener listener ) { } public void addProgressListener ( ProgressListener listener ) { } public void addStatusTextListener ( StatusTextListener listener ) { } public void addTitleListener ( TitleListener listener ) { } public void addVisibilityWindowListener ( VisibilityWindowListener listener ) { } public boolean back ( ) { } protected void checkSubclass ( ) { } public boolean execute ( String script ) { checkWidget ( ) ; if ( script == null ) SWT . error ( ERROR_NULL_ARGUMENT ) ; int [ ] rgdispid = auto . getIDsOfNames ( new String [ ] { "Document" } ) ; int dispIdMember = rgdispid [ 0 ] ; Variant pVarResult = auto . getProperty ( dispIdMember ) ; <START_BUG> if ( pVarResult == null ) <END_BUG> return false ; OleAutomation document = pVarResult . getAutomation ( ) ; rgdispid = document . getIDsOfNames ( new String [ ] { "parentWindow" } ) ; dispIdMember = rgdispid [ 0 ] ; pVarResult = document . getProperty ( dispIdMember ) ; if ( pVarResult == null ) return false ; OleAutomation ihtmlWindow2 = pVarResult . getAutomation ( ) ; rgdispid = ihtmlWindow2 . getIDsOfNames ( new String [ ] { "ExecScript" , "CODE" } ) ; Variant [ ] rgvarg = new Variant [ 1 ] ; rgvarg [ 0 ] = new Variant ( script ) ; int [ ] rgdispidNamedArgs = new int [ 1 ] ; rgdispidNamedArgs [ 0 ] = rgdispid [ 1 ] ; pVarResult = ihtmlWindow2 . invoke ( rgdispid [ 0 ] , rgvarg , rgdispidNamedArgs ) ; return pVarResult != null ; } public boolean forward ( ) { } public boolean isBackEnabled ( ) { } public boolean isForwardEnabled ( ) { } public String getUrl ( ) { } public void refresh ( ) { } public void removeCloseWindowListener ( CloseWindowListener listener ) { } public void removeLocationListener ( LocationListener listener ) { } public void removeOpenWindowListener ( OpenWindowListener listener ) { } public void removeProgressListener ( ProgressListener listener ) { } public void removeStatusTextListener ( StatusTextListener listener ) { } public void removeTitleListener ( TitleListener listener ) { } public void removeVisibilityWindowListener ( VisibilityWindowListener listener ) { } public boolean setText ( String html ) { } public boolean setUrl ( String url ) { } public void stop ( ) { } }

Fix:
if ( ( pVarResult == null ) || ( ( pVarResult . getType ( ) ) == ( COM . VT_EMPTY ) ) )