static int id ( String s ) {
  if ( s . matches ( "[a-z]+" ) ) return - 1 ;
  if ( hm . containsKey ( s ) ) return hm . get ( s ) ;
  else hm . put ( s , X ) ;
  return X ++ ;
}

static int id ( String s ) { if ( s . matches ( " [ a - z ] + " ) ) return - 1 ; if ( hm . containsKey ( s ) ) return hm . get ( s ) ; else hm . put ( s , X ) ; return X ++ ; }
(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 (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) consequence: (return_statement (unary_expression operand: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) consequence: (return_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) alternative: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier))))) (return_statement (update_expression (identifier)))))