static boolean isFullBinaryTree ( Node root ) {
  if ( root == null ) return true ;
  Queue < Node > q = new LinkedList < Node > ( ) ;
  q . add ( root ) ;
  while ( ! q . isEmpty ( ) ) {
    Node node = q . peek ( ) ;
    q . remove ( ) ;
    if ( node . left == null && node . right == null ) continue ;
    if ( node . left == null || node . right == null ) return false ;
    q . add ( node . left ) ;
    q . add ( node . right ) ;
  }
  return true ;
}

static boolean isFullBinaryTree ( Node root ) { if ( root == null ) return true ; Queue < Node > q = new LinkedList < Node > ( ) ; q . add ( root ) ; while ( ! q . isEmpty ( ) ) { Node node = q . peek ( ) ; q . remove ( ) ; if ( node . left == null && node . right == null ) continue ; if ( node . left == null || node . right == null ) return false ; q . add ( node . left ) ; q . add ( node . right ) ; } return true ; }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (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))) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments (type_identifier))) arguments: (argument_list)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (while_statement condition: (parenthesized_expression (unary_expression operand: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (null_literal)) right: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (null_literal)))) consequence: (continue_statement)) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (null_literal)) right: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (null_literal)))) consequence: (return_statement (false))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier))))))) (return_statement (true))))