static boolean isBST ( Node root , Node l , Node r ) {
  if ( root == null ) return true ;
  if ( l != null && root . data <= l . data ) return false ;
  if ( r != null && root . data >= r . data ) return false ;
  return isBST ( root . left , l , root ) && isBST ( root . right , root , r ) ;
}

static boolean isBST ( Node root , Node l , Node r ) { if ( root == null ) return true ; if ( l != null && root . data <= l . data ) return false ; if ( r != null && root . data >= r . data ) return false ; return isBST ( root . left , l , root ) && isBST ( root . right , root , r ) ; }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (type_identifier) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (null_literal))) consequence: (return_statement (true))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (null_literal)) right: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (field_access object: (identifier) field: (identifier))))) consequence: (return_statement (false))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (null_literal)) right: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (field_access object: (identifier) field: (identifier))))) consequence: (return_statement (false))) (return_statement (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)) (identifier) (identifier))) right: (method_invocation name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)) (identifier) (identifier)))))))