Buggy code:
public final class Program { String name ; String command ; String iconPath ; Display display ; boolean gnomeExpectUri ; static int modTime ; static Hashtable mimeTable ; 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_GIO = 3 ; static final int DESKTOP_CDE = 4 ; static final int PREFERRED_ICON_SIZE = 16 ; Program ( ) { } static int getDesktop ( final Display display ) { } 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 boolean cde_isExecutable ( String fileName ) { } 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 ( ) { } static boolean gnome_isExecutable ( String fileName ) { } 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 ) { } ImageData gio_getImageData ( ) { } static Hashtable gio_getMimeInfo ( ) { } static String gio_getMimeType ( String extension ) { } static Program gio_getProgram ( Display display , String mimeType ) { } static Program gio_getProgram ( Display display , int application ) { } static Program [ ] gio_getPrograms ( Display display ) { } static boolean gio_isExecutable ( String fileName ) { } static boolean gio_launch ( String fileName ) { } boolean gio_execute ( String fileName ) { } static String [ ] gio_getExtensions ( ) { } static boolean isExecutable ( Display display , String fileName ) { } public static boolean launch ( String fileName ) { } public static boolean launch ( String fileName , String workingDir ) { } static boolean launch ( Display display , String fileName , String workingDir ) { if ( fileName == null ) SWT . error ( ERROR_NULL_ARGUMENT ) ; <START_BUG> if ( Program . isExecutable ( display , fileName ) ) { <END_BUG> try { Compatibility . exec ( new String [ ] { fileName } , null , workingDir ) ; return true ; } catch ( IOException e ) { } } switch ( Program . getDesktop ( display ) ) { case Program . DESKTOP_GIO : if ( Program . gio_launch ( fileName ) ) return true ; case Program . DESKTOP_GNOME_24 : if ( Program . gnome_24_launch ( fileName ) ) return true ; default : int index = fileName . lastIndexOf ( '.' ) ; if ( index != ( - 1 ) ) { String extension = fileName . substring ( index ) ; Program program = Program . findProgram ( display , extension ) ; if ( ( program != null ) && ( program . execute ( fileName ) ) ) return true ; } String lowercaseName = fileName . toLowerCase ( ) ; if ( ( lowercaseName . startsWith ( Program . PREFIX_HTTP ) ) || ( lowercaseName . startsWith ( Program . PREFIX_HTTPS ) ) ) { Program program = Program . findProgram ( display , ".html" ) ; if ( program == null ) { program = Program . findProgram ( display , ".htm" ) ; } if ( ( program != null ) && ( program . execute ( fileName ) ) ) return true ; } break ; } return false ; } public boolean equals ( Object other ) { } public boolean execute ( String fileName ) { } public ImageData getImageData ( ) { } public String getName ( ) { } public int hashCode ( ) { } public String toString ( ) { } }

Fix:
if ( ( workingDir != null ) && ( Program . isExecutable ( display , fileName ) ) ) {