static void translate ( char str [ ] ) {
  int len = str . length ;
  if ( len < 2 ) return ;
  int i = 0 ;
  int j = 0 ;
  while ( j < len - 1 ) {
    if ( str [ j ] == 'A' && str [ j + 1 ] == 'B' ) {
      j = j + 2 ;
      str [ i ++ ] = 'C' ;
      continue ;
    }
    str [ i ++ ] = str [ j ++ ] ;
  }
  if ( j == len - 1 ) str [ i ++ ] = str [ j ] ;
  str [ i ] = ' ' ;
  str [ len - 1 ] = ' ' ;
}

static void translate ( char str [ ] ) { int len = str . length ; if ( len < 2 ) return ; int i = 0 ; int j = 0 ; while ( j < len - 1 ) { if ( str [ j ] == ' A ' && str [ j + 1 ] == ' B ' ) { j = j + 2 ; str [ i ++ ] = ' C ' ; continue ; } str [ i ++ ] = str [ j ++ ] ; } if ( j == len - 1 ) str [ i ++ ] = str [ j ] ; str [ i ] = ' ▁ ' ; str [ len - 1 ] = ' ▁ ' ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier) dimensions: (dimensions))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (field_access object: (identifier) field: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (return_statement)) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (character_literal)) right: (binary_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (character_literal)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (update_expression (identifier))) right: (character_literal))) (continue_statement))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (update_expression (identifier))) right: (array_access array: (identifier) index: (update_expression (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (update_expression (identifier))) right: (array_access array: (identifier) index: (identifier))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (character_literal))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (character_literal)))))