original_string: public function calculateHash($recursive = false) {
          if (!$this->loaded) {
              $this->hash = null;
          } else {
              $key = $this->name . $this->comment;
              if ($this->fields) {
                  foreach ($this->fields as $fie) {
                      $field = $this->getField($fie->getName());
                      if ($recursive) {
                          $field->calculateHash($recursive);
                      }
                      $key .= $field->getHash();
                  }
              }
              if ($this->keys) {
                  foreach ($this->keys as $ke) {
                      $k = $this->getKey($ke->getName());
                      if ($recursive) {
                          $k->calculateHash($recursive);
                      }
                      $key .= $k->getHash();
                  }
              }
              if ($this->indexes) {
                  foreach ($this->indexes as $in) {
                      $index = $this->getIndex($in->getName());
                      if ($recursive) {
                          $index->calculateHash($recursive);
                      }
                      $key .= $index->getHash();
                  }
              }
              $this->hash = md5($key);
          }
      }
code: public function calculateHash($recursive = false) {
          if (!$this->loaded) {
              $this->hash = null;
          } else {
              $key = $this->name . $this->comment;
              if ($this->fields) {
                  foreach ($this->fields as $fie) {
                      $field = $this->getField($fie->getName());
                      if ($recursive) {
                          $field->calculateHash($recursive);
                      }
                      $key .= $field->getHash();
                  }
              }
              if ($this->keys) {
                  foreach ($this->keys as $ke) {
                      $k = $this->getKey($ke->getName());
                      if ($recursive) {
                          $k->calculateHash($recursive);
                      }
                      $key .= $k->getHash();
                  }
              }
              if ($this->indexes) {
                  foreach ($this->indexes as $in) {
                      $index = $this->getIndex($in->getName());
                      if ($recursive) {
                          $index->calculateHash($recursive);
                      }
                      $key .= $index->getHash();
                  }
              }
              $this->hash = md5($key);
          }
      }
code_tokens: public function calculateHash ( $ recursive = false ) { if ( ! $ this -> loaded ) { $ this -> hash = null ; } else { $ key = $ this -> name . $ this -> comment ; if ( $ this -> fields ) { foreach ( $ this -> fields as $ fie ) { $ field = $ this -> getField ( $ fie -> getName ( ) ) ; if ( $ recursive ) { $ field -> calculateHash ( $ recursive ) ; } $ key .= $ field -> getHash ( ) ; } } if ( $ this -> keys ) { foreach ( $ this -> keys as $ ke ) { $ k = $ this -> getKey ( $ ke -> getName ( ) ) ; if ( $ recursive ) { $ k -> calculateHash ( $ recursive ) ; } $ key .= $ k -> getHash ( ) ; } } if ( $ this -> indexes ) { foreach ( $ this -> indexes as $ in ) { $ index = $ this -> getIndex ( $ in -> getName ( ) ) ; if ( $ recursive ) { $ index -> calculateHash ( $ recursive ) ; } $ key .= $ index -> getHash ( ) ; } } $ this -> hash = md5 ( $ key ) ; } }
docstring: This function calculate and set the hash of one xmldb_table
  @param bool $recursive
docstring_tokens: This function calculate and set the hash of one xmldb_table