private static void union ( int [ ] parentIds , int x , int y ) {
  int rootX = root ( parentIds , x ) ;
  int rootY = root ( parentIds , y ) ;
  if ( rootX == rootY ) {
    return ;
  }
  count ++ ;
  parentIds [ rootX ] = rootY ;
}

private static void union ( int [ ] parentIds , int x , int y ) { int rootX = root ( parentIds , x ) ; int rootY = root ( parentIds , y ) ; if ( rootX == rootY ) { return ; } count ++ ; parentIds [ rootX ] = rootY ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (return_statement))) (expression_statement (update_expression (identifier))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier)))))