static Node push ( Node head_ref , int data ) {
  Node ptr1 = new Node ( ) ;
  Node temp = head_ref ;
  ptr1 . data = data ;
  ptr1 . next = head_ref ;
  if ( head_ref != null ) {
    while ( temp . next != head_ref ) temp = temp . next ;
    temp . next = ptr1 ;
  }
  else ptr1 . next = ptr1 ;
  head_ref = ptr1 ;
  return head_ref ;
}

static Node push ( Node head_ref , int data ) { Node ptr1 = new Node ( ) ; Node temp = head_ref ; ptr1 . data = data ; ptr1 . next = head_ref ; if ( head_ref != null ) { while ( temp . next != head_ref ) temp = temp . next ; temp . next = ptr1 ; } else ptr1 . next = ptr1 ; head_ref = ptr1 ; return head_ref ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (identifier))) (expression_statement (assignment_expression left: (field_access object: (identifier) field: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (field_access object: (identifier) field: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (null_literal))) consequence: (block (while_statement condition: (parenthesized_expression (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (identifier))) body: (expression_statement (assignment_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))))) (expression_statement (assignment_expression left: (field_access object: (identifier) field: (identifier)) right: (identifier)))) alternative: (expression_statement (assignment_expression left: (field_access object: (identifier) field: (identifier)) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (return_statement (identifier))))