Buggy code:
public class Accessible { static final String [ ] requiredAttributes = new String [ ] { OS . kAXRoleAttribute , OS . kAXSubroleAttribute , OS . kAXRoleDescriptionAttribute , OS . kAXHelpAttribute , OS . kAXTitleAttribute , OS . kAXValueAttribute , OS . kAXEnabledAttribute , OS . kAXFocusedAttribute , OS . kAXParentAttribute , OS . kAXChildrenAttribute , OS . kAXSelectedChildrenAttribute , OS . kAXVisibleChildrenAttribute , OS . kAXWindowAttribute , OS . kAXTopLevelUIElementAttribute , OS . kAXPositionAttribute , OS . kAXSizeAttribute , OS . kAXDescriptionAttribute } ; static final String [ ] textAttributes = new String [ ] { OS . kAXNumberOfCharactersAttribute , OS . kAXSelectedTextAttribute , OS . kAXSelectedTextRangeAttribute , OS . kAXInsertionPointLineNumberAttribute } ; Vector accessibleListeners = new Vector ( ) ; Vector accessibleControlListeners = new Vector ( ) ; Vector accessibleTextListeners = new Vector ( ) ; Control control ; int axuielementref = 0 ; int [ ] osChildIDCache = new int [ 0 ] ; Accessible ( Control control ) { } public static Accessible internal_new_Accessible ( Control control ) { } public void addAccessibleListener ( AccessibleListener listener ) { } public void addAccessibleControlListener ( AccessibleControlListener listener ) { } public void addAccessibleTextListener ( AccessibleTextListener listener ) { } public Control getControl ( ) { } public void internal_dispose_Accessible ( ) { } public int internal_kEventAccessibleGetChildAtPoint ( int nextHandler , int theEvent , int userData ) { } public int internal_kEventAccessibleGetFocusedChild ( int nextHandler , int theEvent , int userData ) { } public int internal_kEventAccessibleGetAllAttributeNames ( int nextHandler , int theEvent , int userData ) { } boolean contains ( String [ ] array , String element ) { } public int internal_kEventAccessibleGetNamedAttribute ( int nextHandler , int theEvent , int userData ) { } int getAttribute ( int nextHandler , int theEvent , int userData ) { } int getHelpAttribute ( int nextHandler , int theEvent , int userData ) { } int getRoleAttribute ( int nextHandler , int theEvent , int userData ) { } int getSubroleAttribute ( int nextHandler , int theEvent , int userData ) { } int getRoleDescriptionAttribute ( int nextHandler , int theEvent , int userData ) { } int getTitleAttribute ( int nextHandler , int theEvent , int userData ) { } int getValueAttribute ( int nextHandler , int theEvent , int userData ) { } int getEnabledAttribute ( int nextHandler , int theEvent , int userData ) { } int getFocusedAttribute ( int nextHandler , int theEvent , int userData ) { } int getParentAttribute ( int nextHandler , int theEvent , int userData ) { } int getChildrenAttribute ( int nextHandler , int theEvent , int userData ) { } int getSelectedChildrenAttribute ( int nextHandler , int theEvent , int userData ) { } int getVisibleChildrenAttribute ( int nextHandler , int theEvent , int userData ) { } int getPositionAttribute ( int nextHandler , int theEvent , int userData ) { } int getSizeAttribute ( int nextHandler , int theEvent , int userData ) { } int getDescriptionAttribute ( int nextHandler , int theEvent , int userData ) { int code = OS . CallNextEventHandler ( nextHandler , theEvent ) ; String osDescriptionAttribute = null ; int [ ] stringRef = new int [ 1 ] ; if ( code == ( OS . noErr ) ) { int status = OS . GetEventParameter ( theEvent , kEventParamAccessibleAttributeValue , typeCFStringRef , null , 4 , null , stringRef ) ; if ( status == ( OS . noErr ) ) { osDescriptionAttribute = stringRefToString ( stringRef [ 0 ] ) ; } } AccessibleEvent event = new AccessibleEvent ( this ) ; event . childID = getChildIDFromEvent ( theEvent ) ; event . result = osDescriptionAttribute ; for ( int i = 0 ; i < ( accessibleListeners . size ( ) ) ; i ++ ) { AccessibleListener listener = ( ( AccessibleListener ) ( accessibleListeners . elementAt ( i ) ) ) ; <START_BUG> listener . getName ( event ) ; <END_BUG> } if ( ( event . result ) != null ) { stringRef [ 0 ] = stringToStringRef ( event . result ) ; if ( ( stringRef [ 0 ] ) != 0 ) { OS . SetEventParameter ( theEvent , kEventParamAccessibleAttributeValue , typeCFStringRef , 4 , stringRef ) ; OS . CFRelease ( stringRef [ 0 ] ) ; return OS . noErr ; } } return code ; } int getNumberOfCharactersAttribute ( int nextHandler , int theEvent , int userData ) { } int getSelectedTextAttribute ( int nextHandler , int theEvent , int userData ) { } int getSelectedTextRangeAttribute ( int nextHandler , int theEvent , int userData ) { } int getStringForRangeAttribute ( int nextHandler , int theEvent , int userData ) { } public void removeAccessibleListener ( AccessibleListener listener ) { } public void removeAccessibleControlListener ( AccessibleControlListener listener ) { } public void removeAccessibleTextListener ( AccessibleTextListener listener ) { } public void selectionChanged ( ) { } public void setFocus ( int childID ) { } public void textCaretMoved ( int index ) { } public void textChanged ( int type , int startIndex , int length ) { } public void textSelectionChanged ( ) { } int getChildIDFromEvent ( int theEvent ) { } int childIDToOs ( int childID ) { } int osToChildID ( int osChildID ) { } int stateToOs ( int state ) { } int osToState ( int osState ) { } String roleToOs ( int role ) { } int osToRole ( String osRole ) { } int stringToStringRef ( String string ) { } String stringRefToString ( int stringRef ) { } void checkWidget ( ) { } boolean isValidThread ( ) { } }

Fix:
listener . getDescription ( event ) ;