Buggy code:
, new int [ ] { 89 , SWT . KEYPAD_7 } , new int [ ] { 91 , SWT . KEYPAD_8 } , new int [ ] { 92 , SWT . KEYPAD_9 } , new int [ ] { 81 , SWT . KEYPAD_EQUAL } , new int [ ] { 57 , SWT . CAPS_LOCK } , new int [ ] { 71 , SWT . NUM_LOCK } , new int [ ] { 114 , SWT . HELP } } ; static String APP_NAME ; static final String ADD_WIDGET_KEY = "org.eclipse.swt.internal.addWidget" ; static final byte [ ] SWT_OBJECT = new byte [ ] { 'S' , 'W' , 'T' , '_' , 'O' , 'B' , 'J' , 'E' , 'C' , 'T' , '' } ; static final byte [ ] SWT_IMAGE = new byte [ ] { 'S' , 'W' , 'T' , '_' , 'I' , 'M' , 'A' , 'G' , 'E' , '' } ; static final byte [ ] SWT_ROW = new byte [ ] { 'S' , 'W' , 'T' , '_' , 'R' , 'O' , 'W' , '' } ; static final byte [ ] SWT_COLUMN = new byte [ ] { 'S' , 'W' , 'T' , '_' , 'C' , 'O' , 'L' , 'U' , 'M' , 'N' , '' } ; static Display Default ; static Display [ ] Displays = new Display [ 4 ] ; static final String PACKAGE_PREFIX = "org.eclipse.swt.widgets." ; Runnable [ ] timerList ; NSTimer [ ] nsTimers ; SWTWindowDelegate timerDelegate ; static SWTApplicationDelegate applicationDelegate ; boolean runSettings ; SWTWindowDelegate settingsDelegate ; static final int DEFAULT_BUTTON_INTERVAL = 30 ; Object data ; String [ ] keys ; Object [ ] values ; static void setDevice ( Device device ) { } static byte [ ] ascii ( String name ) { } static int translateKey ( int key ) { } static int untranslateKey ( int key ) { } void addContext ( GCData context ) { } public void addFilter ( int eventType , Listener listener ) { } public void addListener ( int eventType , Listener listener ) { } void addMenu ( Menu menu ) { } void addPool ( ) { } void addPool ( NSAutoreleasePool pool ) { } void addPopup ( Menu menu ) { } void addWidget ( NSObject view , Widget widget ) { } public void asyncExec ( Runnable runnable ) { } public void beep ( ) { } void cascadeWindow ( NSWindow window , NSScreen screen ) { } protected void checkDevice ( ) { } void checkEnterExit ( Control control , NSEvent nsEvent , boolean send ) { } void checkFocus ( ) { } protected void checkSubclass ( ) { } public Display ( ) { } public Display ( DeviceData data ) { } static void checkDisplay ( Thread thread , boolean multiple ) { } static NSRect convertRect ( NSScreen screen , NSRect frame ) { } static String convertToLf ( String text ) { } void clearModal ( Shell shell ) { } void clearPool ( ) { } public void close ( ) { } protected void create ( DeviceData data ) { } void createDisplay ( DeviceData data ) { } void createMainMenu ( ) { NSString appName = Display . getAppName ( ) ; <START_BUG> NSString emptyStr = NSString . stringWith ( "" ) ; <END_BUG> NSMenu mainMenu = ( ( NSMenu ) ( new NSMenu ( ) . alloc ( ) ) ) ; mainMenu . initWithTitle ( emptyStr ) ; NSMenuItem menuItem ; NSMenu appleMenu ; NSString format = NSString . stringWith ( "%@<seq2seq4repair_space>%@" ) ; NSString title ; NSMenuItem appItem = menuItem = mainMenu . addItemWithTitle ( emptyStr , 0 , emptyStr ) ; appleMenu = ( ( NSMenu ) ( new NSMenu ( ) . alloc ( ) ) ) ; appleMenu . initWithTitle ( emptyStr ) ; OS . objc_msgSend ( application . id , OS . sel_registerName ( "setAppleMenu:" ) , appleMenu . id ) ; title = new NSString ( OS . objc_msgSend ( class_NSString , sel_stringWithFormat_ , format . id , NSString . stringWith ( SWT . getMessage ( "About" ) ) . id , appName . id ) ) ; menuItem = appleMenu . addItemWithTitle ( title , sel_orderFrontStandardAboutPanel_ , emptyStr ) ; menuItem . setTarget ( Display . applicationDelegate ) ; appleMenu . addItem ( NSMenuItem . separatorItem ( ) ) ; title = NSString . stringWith ( SWT . getMessage ( "Preferences..." ) ) ; menuItem = appleMenu . addItemWithTitle ( title , 0 , NSString . stringWith ( "," ) ) ; appleMenu . addItem ( NSMenuItem . separatorItem ( ) ) ; title = NSString . stringWith ( SWT . getMessage ( "Services" ) ) ; menuItem = appleMenu . addItemWithTitle ( title , 0 , emptyStr ) ; NSMenu servicesMenu = ( ( NSMenu ) ( new NSMenu ( ) . alloc ( ) ) ) ; servicesMenu . initWithTitle ( emptyStr ) ; appleMenu . setSubmenu ( servicesMenu , menuItem ) ; servicesMenu . release ( ) ; application . setServicesMenu ( servicesMenu ) ; appleMenu . addItem ( NSMenuItem . separatorItem ( ) ) ; title = new NSString ( OS . objc_msgSend ( class_NSString , sel_stringWithFormat_ , format . id , NSString . stringWith ( SWT . getMessage ( "Hide" ) ) . id , appName . id ) ) ; menuItem = appleMenu . addItemWithTitle ( title , sel_hide_ , NSString . stringWith ( "h" ) ) ; menuItem . setTarget ( Display . applicationDelegate ) ; title = NSString . stringWith ( SWT . getMessage ( "Hide<seq2seq4repair_space>Others" ) ) ; menuItem = appleMenu . addItemWithTitle ( title , sel_hideOtherApplications_ , NSString . stringWith ( "h" ) ) ; menuItem . setKeyEquivalentModifierMask ( ( ( OS . NSCommandKeyMask ) | ( OS . NSAlternateKeyMask ) ) ) ;

Fix:
NSString emptyStr = NSString . string ( ) ;