original_string: public function hasTagged(int $tag): bool
      {
          // lazily build lookup map
          if (!isset($this->_taggedMap)) {
              $this->_taggedMap = [];
              foreach ($this->_elements as $element) {
                  if ($element->isTagged()) {
                      $this->_taggedMap[$element->tag()] = $element;
                  }
              }
          }
          return isset($this->_taggedMap[$tag]);
      }
code: public function hasTagged(int $tag): bool
      {
          // lazily build lookup map
          if (!isset($this->_taggedMap)) {
              $this->_taggedMap = [];
              foreach ($this->_elements as $element) {
                  if ($element->isTagged()) {
                      $this->_taggedMap[$element->tag()] = $element;
                  }
              }
          }
          return isset($this->_taggedMap[$tag]);
      }
code_tokens: public function hasTagged ( int $ tag ) : bool { // lazily build lookup map if ( ! isset ( $ this -> _taggedMap ) ) { $ this -> _taggedMap = [ ] ; foreach ( $ this -> _elements as $ element ) { if ( $ element -> isTagged ( ) ) { $ this -> _taggedMap [ $ element -> tag ( ) ] = $ element ; } } } return isset ( $ this -> _taggedMap [ $ tag ] ) ; }
docstring: Check whether the structure contains a context specific element with a
  given tag.
  
  @param int $tag Tag number
  @return bool
docstring_tokens: Check whether the structure contains a context specific element with a given tag .