Buggy code:
public final class Program { String name ; String command ; String iconPath ; Display display ; boolean gnomeExpectUri ; static int cdeShell ; static final String [ ] CDE_ICON_EXT = new String [ ] { ".m.pm" , ".l.pm" , ".s.pm" , ".t.pm" } ; static final String [ ] CDE_MASK_EXT = new String [ ] { ".m_m.bm" , ".l_m.bm" , ".s_m.bm" , ".t_m.bm" } ; static final String DESKTOP_DATA = "Program_DESKTOP" ; static final String ICON_THEME_DATA = "Program_GNOME_ICON_THEME" ; static final String PREFIX_HTTP = "http:////" ; static final String PREFIX_HTTPS = "https:////" ; static final int DESKTOP_UNKNOWN = 0 ; static final int DESKTOP_GNOME = 1 ; static final int DESKTOP_GNOME_24 = 2 ; static final int DESKTOP_CDE = 3 ; static final int PREFERRED_ICON_SIZE = 16 ; Program ( ) { } static int getDesktop ( final Display display ) { if ( display == null ) return Program . DESKTOP_UNKNOWN ; Integer desktopValue = ( ( Integer ) ( display . getData ( Program . DESKTOP_DATA ) ) ) ; if ( desktopValue != null ) return desktopValue . intValue ( ) ; int desktop = Program . DESKTOP_UNKNOWN ; int xDisplay = OS . GDK_DISPLAY ( ) ; int rootWindow = OS . XDefaultRootWindow ( xDisplay ) ; int [ ] numProp = new int [ 1 ] ; int propList = OS . XListProperties ( xDisplay , rootWindow , numProp ) ; int [ ] property = new int [ numProp [ 0 ] ] ; if ( propList != 0 ) { OS . memmove ( property , propList , ( ( property . length ) * ( OS . PTR_SIZEOF ) ) ) ; OS . XFree ( propList ) ; } if ( desktop == ( Program . DESKTOP_UNKNOWN ) ) { byte [ ] gnomeName = Converter . wcsToMbcs ( null , "_NET_SUPPORTING_WM_CHECK" , true ) ; int gnome = OS . XInternAtom ( xDisplay , gnomeName , true ) ; <START_BUG> if ( ( gnome != ( OS . None ) ) && ( Program . gnome_init ( ) ) ) { <END_BUG> desktop = Program . DESKTOP_GNOME ; int icon_theme = GNOME . gnome_icon_theme_new ( ) ; display . setData ( Program . ICON_THEME_DATA , new LONG ( icon_theme ) ) ; display . addListener ( Dispose , new Listener ( ) { public void handleEvent ( Event event ) { LONG gnomeIconTheme = ( ( LONG ) ( display . getData ( Program . ICON_THEME_DATA ) ) ) ; if ( gnomeIconTheme == null ) return ; display . setData ( Program . ICON_THEME_DATA , null ) ; if ( ( gnomeIconTheme . value ) != 0 ) GNOME . g_object_unref ( gnomeIconTheme . value ) ; } } ) ; byte [ ] buffer = Converter . wcsToMbcs ( null , "libgnomevfs-2.so.0" , true ) ; int libgnomevfs = OS . dlopen ( buffer , RTLD_LAZY ) ; if ( libgnomevfs != 0 ) { buffer = Converter . wcsToMbcs ( null , "gnome_vfs_url_show" , true ) ; int gnome_vfs_url_show = OS . dlsym ( libgnomevfs , buffer ) ; if ( gnome_vfs_url_show != 0 ) { desktop = Program . DESKTOP_GNOME_24 ; } OS . dlclose ( libgnomevfs ) ; } } } if ( desktop == ( Program . DESKTOP_UNKNOWN ) ) { byte [ ] cdeName = Converter . wcsToMbcs ( null , "_DT_SM_PREFERENCES" , true ) ; int cde = OS . XInternAtom ( xDisplay , cdeName , true ) ; for ( int index = 0 ; ( desktop == ( Program . DESKTOP_UNKNOWN ) ) && ( index < ( property . length ) ) ; index ++ ) { if ( ( property [ index ] ) == ( OS . None ) ) continue ; if ( ( ( property [ index ] ) == cde ) && ( Program . cde_init ( display ) ) ) desktop = Program . DESKTOP_CDE ; } } display . setData ( Program . DESKTOP_DATA , new Integer ( desktop ) ) ; return desktop ; } boolean cde_execute ( String fileName ) { } static String cde_getAction ( String dataType ) { } static String cde_getAttribute ( String dataType , String attrName ) { } static Hashtable cde_getDataTypeInfo ( ) { } static String cde_getExtension ( String dataType ) { } ImageData cde_getImageData ( ) { } static String cde_getMimeType ( String extension ) { } static Program cde_getProgram ( Display display , String mimeType ) { } static boolean cde_init ( Display display ) { } static String [ ] parseCommand ( String cmd ) { } boolean gnome_24_execute ( String fileName ) { } static boolean gnome_24_launch ( String fileName ) { } boolean gnome_execute ( String fileName ) { } ImageData gnome_getImageData ( ) { } static Hashtable gnome_getMimeInfo ( ) { } static String gnome_getMimeType ( String extension ) { } static Program gnome_getProgram ( Display display , String mimeType ) { } static boolean gnome_init ( ) { } public static Program findProgram ( String extension ) { } static Program findProgram ( Display display , String extension ) { } public static String [ ] getExtensions ( ) { } static String [ ] getExtensions ( Display display ) { } public static Program [ ] getPrograms ( ) { } static Program [ ] getPrograms ( Display display ) { } public static boolean launch ( String fileName ) { } static boolean launch ( Display display , String fileName ) { } public boolean equals ( Object other ) { } public boolean execute ( String fileName ) { } public ImageData getImageData ( ) { } public String getName ( ) { } public int hashCode ( ) { } public String toString ( ) { } }

Fix:
if ( ( ( gnome != ( OS . None ) ) && ( ( OS . GTK_VERSION ) >= ( OS . VERSION ( 2 , 2 , 0 ) ) ) ) && ( Program . gnome_init ( ) ) ) {