original_string: public function build_tree()
      {
          $html = $this->_dom->getElementsByTagName("html")->item(0);
          if (is_null($html)) {
              $html = $this->_dom->firstChild;
          }
  
          if (is_null($html)) {
              throw new Exception("Requested HTML document contains no data.");
          }
  
          $this->fix_tables();
  
          $this->_root = $this->_build_tree_r($html);
      }
code: public function build_tree()
      {
          $html = $this->_dom->getElementsByTagName("html")->item(0);
          if (is_null($html)) {
              $html = $this->_dom->firstChild;
          }
  
          if (is_null($html)) {
              throw new Exception("Requested HTML document contains no data.");
          }
  
          $this->fix_tables();
  
          $this->_root = $this->_build_tree_r($html);
      }
code_tokens: public function build_tree ( ) { $ html = $ this -> _dom -> getElementsByTagName ( "html" ) -> item ( 0 ) ; if ( is_null ( $ html ) ) { $ html = $ this -> _dom -> firstChild ; } if ( is_null ( $ html ) ) { throw new Exception ( "Requested HTML document contains no data." ) ; } $ this -> fix_tables ( ) ; $ this -> _root = $ this -> _build_tree_r ( $ html ) ; }
docstring: Builds the tree
docstring_tokens: Builds the tree