original_string: public function add_category(category $cat) {
          $name = $cat->name;
          if (isset($this->categories[$name])) {
              throw new \coding_exception("Category name $name already used");
          }
          $this->categories[$cat->name] = $cat;
      }
code: public function add_category(category $cat) {
          $name = $cat->name;
          if (isset($this->categories[$name])) {
              throw new \coding_exception("Category name $name already used");
          }
          $this->categories[$cat->name] = $cat;
      }
code_tokens: public function add_category ( category $ cat ) { $ name = $ cat -> name ; if ( isset ( $ this -> categories [ $ name ] ) ) { throw new \ coding_exception ( "Category name $name already used" ) ; } $ this -> categories [ $ cat -> name ] = $ cat ; }
docstring: Add a category to the tree.
  
  @param category $cat category object.
  
  @throws \coding_exception
docstring_tokens: Add a category to the tree .