static int solveEven ( String s ) {
  if ( s . length ( ) % 2 == 1 ) {
    return 2 ;
  }
  String ls = s . substring ( 0 , s . length ( ) / 2 ) ;
  String rs = s . substring ( s . length ( ) / 2 , s . length ( ) ) ;
  if ( ls != rs ) {
    return 1 ;
  }
  return solveEven ( ls ) ;
}

static int solveEven ( String s ) { if ( s . length ( ) % 2 == 1 ) { return 2 ; } String ls = s . substring ( 0 , s . length ( ) / 2 ) ; String rs = s . substring ( s . length ( ) / 2 , s . length ( ) ) ; if ( ls != rs ) { return 1 ; } return solveEven ( ls ) ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (block (return_statement (decimal_integer_literal)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)) (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (return_statement (decimal_integer_literal)))) (return_statement (method_invocation name: (identifier) arguments: (argument_list (identifier))))))