static void Transform ( int n , int d , int steps ) {
  if ( n < min_val ) {
    min_val = n ;
    min_steps = steps ;
  }
  else if ( n == min_val ) {
    min_steps = Math . min ( min_steps , steps ) ;
  }
  if ( steps < 15 ) {
    Transform ( sumOfDigits ( n ) , d , steps + 1 ) ;
    Transform ( n + d , d , steps + 1 ) ;
  }
}

static void Transform ( int n , int d , int steps ) { if ( n < min_val ) { min_val = n ; min_steps = steps ; } else if ( n == min_val ) { min_steps = Math . min ( min_steps , steps ) ; } if ( steps < 15 ) { Transform ( sumOfDigits ( n ) , d , steps + 1 ) ; Transform ( n + d , d , steps + 1 ) ; } }
(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)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation name: (identifier) arguments: (argument_list (method_invocation name: (identifier) arguments: (argument_list (identifier))) (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal))))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)))))))))