private static String work ( int n1 , int n2 , char c1 , char c2 ) {
  StringBuilder sb = new StringBuilder ( ) ;
  while ( n2 > 0 ) {
    sb . append ( c1 ) ;
    sb . append ( c2 ) ;
    n1 -- ;
    n2 -- ;
  }
  while ( n1 > 0 ) {
    sb . append ( c1 ) ;
    n1 -- ;
  }
  return sb . toString ( ) ;
}

private static String work ( int n1 , int n2 , char c1 , char c2 ) { StringBuilder sb = new StringBuilder ( ) ; while ( n2 > 0 ) { sb . append ( c1 ) ; sb . append ( c2 ) ; n1 -- ; n2 -- ; } while ( n1 > 0 ) { sb . append ( c1 ) ; n1 -- ; } return sb . toString ( ) ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (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: (object_creation_expression type: (type_identifier) arguments: (argument_list)))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) body: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (update_expression (identifier))) (expression_statement (update_expression (identifier))))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) body: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (update_expression (identifier))))) (return_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))