static void generateString ( int A , int B ) {
  String rt = "" ;
  while ( 0 < A || 0 < B ) {
    if ( A < B ) {
      if ( 0 < B -- ) {
        rt += ( 'b' ) ;
      }
      if ( 0 < B -- ) {
        rt += ( 'b' ) ;
      }
      if ( 0 < A -- ) {
        rt += ( 'a' ) ;
      }
    }
    else if ( B < A ) {
      if ( 0 < A -- ) {
        rt += ( 'a' ) ;
      }
      if ( 0 < A -- ) {
        rt += ( 'a' ) ;
      }
      if ( 0 < B -- ) {
        rt += ( 'b' ) ;
      }
    }
    else {
      if ( 0 < A -- ) {
        rt += ( 'a' ) ;
      }
      if ( 0 < B -- ) {
        rt += ( 'b' ) ;
      }
    }
  }
  System . out . println ( rt ) ;
}

static void generateString ( int A , int B ) { String rt = " " ; while ( 0 < A || 0 < B ) { if ( A < B ) { if ( 0 < B -- ) { rt += ( ' b ' ) ; } if ( 0 < B -- ) { rt += ( ' b ' ) ; } if ( 0 < A -- ) { rt += ( ' a ' ) ; } } else if ( B < A ) { if ( 0 < A -- ) { rt += ( ' a ' ) ; } if ( 0 < A -- ) { rt += ( ' a ' ) ; } if ( 0 < B -- ) { rt += ( ' b ' ) ; } } else { if ( 0 < A -- ) { rt += ( ' a ' ) ; } if ( 0 < B -- ) { rt += ( ' b ' ) ; } } } System . out . println ( rt ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (binary_expression left: (decimal_integer_literal) right: (identifier)))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (if_statement condition: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (update_expression (identifier)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (character_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (update_expression (identifier)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (character_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (update_expression (identifier)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (character_literal))))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (if_statement condition: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (update_expression (identifier)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (character_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (update_expression (identifier)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (character_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (update_expression (identifier)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (character_literal))))))) alternative: (block (if_statement condition: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (update_expression (identifier)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (character_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (update_expression (identifier)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (character_literal))))))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))