static int size ( Node head_ref ) {
  Node curr = head_ref ;
  int sz = 0 ;
  while ( curr != null ) {
    curr = curr . next ;
    sz ++ ;
  }
  return sz ;
}

static int size ( Node head_ref ) { Node curr = head_ref ; int sz = 0 ; while ( curr != null ) { curr = curr . next ; sz ++ ; } return sz ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (identifier))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (null_literal))) body: (block (expression_statement (assignment_expression left: (identifier) right: (field_access object: (identifier) field: (identifier)))) (expression_statement (update_expression (identifier))))) (return_statement (identifier))))