public static int search2 ( int x , int y ) {
  int low = x ;
  int high = y ;
  while ( low + 1 < high ) {
    int i = ( low + high ) / 2 ;
    if ( query ( i + 1 , i ) ) low = i ;
    else high = i ;
  }
  return high ;
}

public static int search2 ( int x , int y ) { int low = x ; int high = y ; while ( low + 1 < high ) { int i = ( low + high ) / 2 ; if ( query ( i + 1 , i ) ) low = i ; else high = i ; } return high ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (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: (identifier))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)) (identifier)))) consequence: (expression_statement (assignment_expression left: (identifier) right: (identifier))) alternative: (expression_statement (assignment_expression left: (identifier) right: (identifier)))))) (return_statement (identifier))))