static int equivalentBase4 ( String bin ) {
  if ( bin . compareTo ( "00" ) == 0 ) return 0 ;
  if ( bin . compareTo ( "01" ) == 0 ) return 1 ;
  if ( bin . compareTo ( "10" ) == 0 ) return 2 ;
  return 3 ;
}

static int equivalentBase4 ( String bin ) { if ( bin . compareTo ( "00" ) == 0 ) return 0 ; if ( bin . compareTo ( "01" ) == 0 ) return 1 ; if ( bin . compareTo ( "10" ) == 0 ) return 2 ; return 3 ; }
(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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))) right: (decimal_integer_literal))) consequence: (return_statement (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))) right: (decimal_integer_literal))) consequence: (return_statement (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))) right: (decimal_integer_literal))) consequence: (return_statement (decimal_integer_literal))) (return_statement (decimal_integer_literal))))