Buggy code:
void addContext ( NSGraphicsContext context ) { } public void addFilter ( int eventType , Listener listener ) { } public void addListener ( int eventType , Listener listener ) { } void addMenu ( Menu menu ) { } 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 ( ) { } protected void checkSubclass ( ) { } public Display ( ) { } public Display ( DeviceData data ) { } static void checkDisplay ( Thread thread , boolean multiple ) { } static String convertToLf ( String text ) { } void clearModal ( Shell shell ) { } public void close ( ) { } protected void create ( DeviceData data ) { } void createDisplay ( DeviceData data ) { } static void deregister ( Display display ) { } protected void destroy ( ) { } void destroyDisplay ( ) { } public void disposeExec ( Runnable runnable ) { } void error ( int code ) { } boolean filterEvent ( Event event ) { } boolean filters ( int eventType ) { } public Widget findWidget ( int handle ) { } public Widget findWidget ( int handle , int id ) { } public Widget findWidget ( Widget widget , int id ) { } public static Display findDisplay ( Thread thread ) { } public Shell getActiveShell ( ) { } public Rectangle getBounds ( ) { } Rectangle getBounds ( NSArray screens ) { } public static Display getCurrent ( ) { } int getCaretBlinkTime ( ) { } public Rectangle getClientArea ( ) { } public Control getCursorControl ( ) { } public Point getCursorLocation ( ) { } public Point [ ] getCursorSizes ( ) { } public static Display getDefault ( ) { } public Object getData ( String key ) { } public Object getData ( ) { } public int getDismissalAlignment ( ) { } public int getDoubleClickTime ( ) { } public Control getFocusControl ( ) { } static Control GetFocusControl ( NSWindow window ) { } public boolean getHighContrast ( ) { } public int getIconDepth ( ) { } public Point [ ] getIconSizes ( ) { } int getLastEventTime ( ) { } Menu [ ] getMenus ( Decorations shell ) { } int getMessageCount ( ) { } public Monitor [ ] getMonitors ( ) { } NSRect getPrimaryFrame ( ) { } public Monitor getPrimaryMonitor ( ) { } public Shell [ ] getShells ( ) { } public Synchronizer getSynchronizer ( ) { } public Thread getSyncThread ( ) { } public Color getSystemColor ( int id ) { } public Cursor getSystemCursor ( int id ) { } public Image getSystemImage ( int id ) { } public Tray getSystemTray ( ) { } public Thread getThread ( ) { } int getToolTipTime ( ) { } Widget getWidget ( int id ) { } static Widget GetWidget ( int id ) { } Widget getWidget ( NSView view ) { } protected void init ( ) { super . init ( ) ; initClasses ( ) ; if ( ! ( isEmbedded ) ) { initApplicationDelegate ( ) ; application . finishLaunching ( ) ; } timerDelegate = ( ( SWTWindowDelegate ) ( new SWTWindowDelegate ( ) . alloc ( ) . init ( ) ) ) ; NSTextView textView = ( ( NSTextView ) ( new NSTextView ( ) . alloc ( ) ) ) ; <START_BUG> textView . initWithFrame ( new NSRect ( ) ) ; <END_BUG> markedAttributes = textView . markedTextAttributes ( ) ; markedAttributes . retain ( ) ; textView . release ( ) ; } void initApplicationDelegate ( ) { } void addEventMethods ( int cls , int proc2 , int proc3 , int drawRectProc ) { } void addFrameMethods ( int cls , int setFrameOriginProc , int setFrameSizeProc ) { } void addAccessibilityMethods ( int cls , int proc2 , int proc3 , int proc4 , int accessibilityHitTestProc ) { } int registerCellSubclass ( int cellClass , int size , int align , String types ) { } void initClasses ( ) { } public int internal_new_GC ( GCData data ) { } public void internal_dispose_GC ( int context , GCData data ) { } static boolean isValidClass ( Class clazz ) { } boolean isValidThread ( ) { } public boolean post ( Event event ) { } void postEvent ( Event event ) { } public Point map ( Control from , Control to , Point point ) { } public Point map ( Control from , Control to , int x , int y ) { } public Rectangle map ( Control from , Control to , Rectangle rectangle ) { } public Rectangle map ( Control from , Control to , int x , int y , int width , int height ) { } public boolean readAndDispatch ( ) { } static void register ( Display display ) { } protected void release ( ) { } void releaseDisplay ( ) { } void removeContext ( NSGraphicsContext context ) { } public void removeFilter ( int eventType , Listener listener ) { } public void removeListener ( int eventType , Listener listener ) { } Widget removeWidget ( NSObject view ) { } void removeMenu ( Menu menu ) { } void removePopup ( Menu menu ) { } boolean runAsyncMessages ( boolean all ) { } boolean runContexts ( ) { } boolean runDeferredEvents ( ) { } boolean runPopups ( ) { } boolean runTimers ( ) { } void sendEvent ( int eventType , Event event ) { } public static void setAppName ( String name ) { }

Fix:
textView . init ( ) ;