Buggy code:
public final class Program { String name ; String command ; String iconPath ; Display display ; boolean gnomeExpectUri ; static final String SHELL_HANDLE_KEY = "org.eclipse.swt.internal.motif.shellHandle" ; 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 ) { } boolean cde_execute ( String fileName ) { } static boolean cde_isExecutable ( 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 ( ) { } 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 ) { } 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_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 ) ) ) {