Buggy code:
static AtkTableIface getTableIface ( int atkObject ) { } static int atkTable_ref_at ( int atkObject , int row , int column ) { } static int atkTable_get_index_at ( int atkObject , int row , int column ) { } static int atkTable_get_column_at_index ( int atkObject , int index ) { } static int atkTable_get_row_at_index ( int atkObject , int index ) { } static int atkTable_get_n_columns ( int atkObject ) { } static int atkTable_get_n_rows ( int atkObject ) { } static int atkTable_get_column_extent_at ( int atkObject , int row , int column ) { } static int atkTable_get_row_extent_at ( int atkObject , int row , int column ) { } static int atkTable_get_caption ( int atkObject ) { } static int atkTable_get_summary ( int atkObject ) { } static int atkTable_get_column_description ( int atkObject , int column ) { } static int atkTable_get_column_header ( int atkObject , int column ) { } static int atkTable_get_row_description ( int atkObject , int row ) { } static int atkTable_get_row_header ( int atkObject , int row ) { } static int atkTable_get_selected_columns ( int atkObject , int selected ) { } static int atkTable_get_selected_rows ( int atkObject , int selected ) { } static int atkTable_is_column_selected ( int atkObject , int column ) { } static int atkTable_is_row_selected ( int atkObject , int row ) { } static int atkTable_is_selected ( int atkObject , int row , int column ) { } static int atkTable_add_row_selection ( int atkObject , int row ) { } static int atkTable_remove_row_selection ( int atkObject , int row ) { } static int atkTable_add_column_selection ( int atkObject , int column ) { } static int atkTable_remove_column_selection ( int atkObject , int column ) { } static AtkTextIface getTextIface ( int atkObject ) { } static int atkText_get_character_extents ( int atkObject , int offset , int x , int y , int width , int height , int coords ) { } static String getString ( int strPtr ) { } static int getStringPtr ( String str ) { } static int atkText_get_range_extents ( int atkObject , int start_offset , int end_offset , int coord_type , int rect ) { } static int atkText_get_run_attributes ( int atkObject , int offset , int start_offset , int end_offset ) { } static int atkText_get_offset_at_point ( int atkObject , int x , int y , int coords ) { } static int atkText_add_selection ( int atkObject , int start_offset , int end_offset ) { } static int atkText_remove_selection ( int atkObject , int selection_num ) { } static int atkText_set_caret_offset ( int atkObject , int offset ) { } static int atkText_set_selection ( int atkObject , int selection_num , int start_offset , int end_offset ) { } static int atkText_get_caret_offset ( int atkObject ) { } static int atkText_get_bounded_ranges ( int atkObject , int rect , int coord_type , int x_clip_type , int y_clip_type ) { } static int atkText_get_character_at_offset ( int atkObject , int offset ) { if ( AccessibleObject . DEBUG ) AccessibleObject . print ( "-->atkText_get_character_at_offset" ) ; AccessibleObject object = AccessibleObject . getAccessibleObject ( atkObject ) ; if ( object != null ) { Accessible accessible = object . accessible ; Vector listeners = accessible . accessibleTextExtendedListeners ; int length = listeners . size ( ) ; if ( length > 0 ) { AccessibleTextExtendedEvent event = new AccessibleTextExtendedEvent ( accessible ) ; event . start = ( ( int ) ( offset ) ) ; event . end = ( ( int ) ( offset + 1 ) ) ; event . type = ACC . TEXT_BOUNDARY_CHAR ; for ( int i = 0 ; i < length ; i ++ ) { AccessibleTextExtendedListener listener = ( ( AccessibleTextExtendedListener ) ( listeners . elementAt ( i ) ) ) ; listener . getText ( event ) ; } String text = event . result ; if ( ( text != null ) && ( ( text . length ( ) ) > 0 ) ) return text . charAt ( 0 ) ; } String text = object . getText ( ) ; <START_BUG> if ( text != null ) <END_BUG> return text . charAt ( ( ( int ) ( offset ) ) ) ; } AtkTextIface iface = AccessibleObject . getTextIface ( atkObject ) ; if ( ( iface != null ) && ( ( iface . get_character_at_offset ) != 0 ) ) { return ATK . call ( iface . get_character_at_offset , atkObject , offset ) ; } return 0 ; } static int atkText_get_character_count ( int atkObject ) { } static int atkText_get_n_selections ( int atkObject ) { } static int atkText_get_selection ( int atkObject , int selection_num , int start_offset , int end_offset ) { } static int atkText_get_text ( int atkObject , int start_offset , int end_offset ) { } static int atkText_get_text_after_offset ( int atkObject , int offset_value , int boundary_type , int start_offset , int end_offset ) { } static int atkText_get_text_at_offset ( int atkObject , int offset_value , int boundary_type , int start_offset , int end_offset ) { } static int atkText_get_text_before_offset ( int atkObject , int offset_value , int boundary_type , int start_offset , int end_offset ) { } static void setGValue ( int value , Number number ) { } static Number getGValue ( int value ) { } static AtkValueIface getValueIface ( int atkObject ) { } static int atkValue_get_current_value ( int atkObject , int value ) { } static int atkValue_get_maximum_value ( int atkObject , int value ) { } static int atkValue_get_minimum_value ( int atkObject , int value ) { } static int atkValue_set_current_value ( int atkObject , int value ) { } static AccessibleObject getAccessibleObject ( int atkObject ) { } AccessibleObject getChildByID ( int childId ) { } AccessibleObject getChildByIndex ( int childIndex ) { } String getText ( ) { } static int gObjectClass_finalize ( int atkObject ) { } static int toATKRelation ( int relation ) { }

Fix:
if ( ( text != null ) && ( ( text . length ( ) ) > offset ) )