Buggy code:
public class Link extends Control { String text ; TextLayout layout ; Color linkColor ; Color disabledColor ; Point [ ] offsets ; Point selection ; String [ ] ids ; int [ ] mnemonics ; int focusIndex ; static final RGB LINK_FOREGROUND = new RGB ( 0 , 51 , 153 ) ; static final RGB LINK_DISABLED_FOREGROUND = new RGB ( 172 , 168 , 153 ) ; public Link ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } int callFocusEventHandler ( int nextHandler , int theEvent ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } void createWidget ( ) { } void drawBackground ( int control , int context ) { } void drawWidget ( int control , int context , int damageRgn , int visibleRgn , int theEvent ) { } void enableWidget ( boolean enabled ) { } String getNameText ( ) { } Rectangle [ ] getRectangles ( int linkIndex ) { } public String getText ( ) { } int kEventAccessibleGetNamedAttribute ( int nextHandler , int theEvent , int userData ) { int code = OS . CallNextEventHandler ( nextHandler , theEvent ) ; int [ ] stringRef = new int [ 1 ] ; OS . GetEventParameter ( theEvent , kEventParamAccessibleAttributeName , typeCFStringRef , null , 4 , null , stringRef ) ; int length = 0 ; if ( ( stringRef [ 0 ] ) != 0 ) length = OS . CFStringGetLength ( stringRef [ 0 ] ) ; char [ ] buffer = new char [ length ] ; CFRange range = new CFRange ( ) ; range . length = length ; OS . CFStringGetCharacters ( stringRef [ 0 ] , range , buffer ) ; String attributeName = new String ( buffer ) ; if ( ( attributeName . equals ( kAXRoleAttribute ) ) || ( attributeName . equals ( kAXRoleDescriptionAttribute ) ) ) { String roleText = OS . kAXLinkRole ; buffer = new char [ roleText . length ( ) ] ; roleText . getChars ( 0 , buffer . length , buffer , 0 ) ; stringRef [ 0 ] = OS . CFStringCreateWithCharacters ( kCFAllocatorDefault , buffer , buffer . length ) ; if ( attributeName . equals ( kAXRoleAttribute ) ) { if ( ( stringRef [ 0 ] ) != 0 ) { OS . SetEventParameter ( theEvent , kEventParamAccessibleAttributeValue , typeCFStringRef , 4 , stringRef ) ; OS . CFRelease ( stringRef [ 0 ] ) ; return OS . noErr ; } } if ( attributeName . equals ( kAXRoleDescriptionAttribute ) ) { if ( ( stringRef [ 0 ] ) != 0 ) { int stringRef2 = OS . HICopyAccessibilityRoleDescription ( stringRef [ 0 ] , 0 ) ; OS . SetEventParameter ( theEvent , kEventParamAccessibleAttributeValue , typeCFStringRef , 4 , new int [ ] { stringRef2 } ) ; OS . CFRelease ( stringRef [ 0 ] ) ; OS . CFRelease ( stringRef2 ) ; return OS . noErr ; } } } if ( ( attributeName . equals ( kAXTitleAttribute ) ) || ( attributeName . equals ( kAXDescriptionAttribute ) ) ) { <START_BUG> String text = getText ( ) ; <END_BUG> if ( text != null ) { buffer = new char [ text . length ( ) ] ; text . getChars ( 0 , buffer . length , buffer , 0 ) ; stringRef [ 0 ] = OS . CFStringCreateWithCharacters ( kCFAllocatorDefault , buffer , buffer . length ) ; if ( ( stringRef [ 0 ] ) != 0 ) { OS . SetEventParameter ( theEvent , kEventParamAccessibleAttributeValue , typeCFStringRef , 4 , stringRef ) ; OS . CFRelease ( stringRef [ 0 ] ) ; return OS . noErr ; } } } if ( ( accessible ) != null ) { return accessible . internal_kEventAccessibleGetNamedAttribute ( nextHandler , theEvent , userData ) ; } return code ; } int kEventControlGetFocusPart ( int nextHandler , int theEvent , int userData ) { } int kEventControlSetFocusPart ( int nextHandler , int theEvent , int userData ) { } int kEventMouseMoved ( int nextHandler , int theEvent , int userData ) { } int kEventUnicodeKeyPressed ( int nextHandler , int theEvent , int userData ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } String parse ( String string ) { } int parseMnemonics ( char [ ] buffer , int start , int end , StringBuffer result ) { } boolean sendMouseEvent ( int type , short button , int count , int detail , boolean send , int chord , short x , short y , int modifiers ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } void setFontStyle ( Font font ) { } public void setText ( String string ) { } int traversalCode ( int key , int theEvent ) { } }

Fix:
String text = parse ( getText ( ) ) ;