original_string: public function findByName($name)
      {
          foreach ($this->exercises as $exercise) {
              if ($name === $exercise->getName()) {
                  return $exercise;
              }
          }
  
          throw new InvalidArgumentException(sprintf('Exercise with name: "%s" does not exist', $name));
      }
code: public function findByName($name)
      {
          foreach ($this->exercises as $exercise) {
              if ($name === $exercise->getName()) {
                  return $exercise;
              }
          }
  
          throw new InvalidArgumentException(sprintf('Exercise with name: "%s" does not exist', $name));
      }
code_tokens: public function findByName ( $ name ) { foreach ( $ this -> exercises as $ exercise ) { if ( $ name === $ exercise -> getName ( ) ) { return $ exercise ; } } throw new InvalidArgumentException ( sprintf ( 'Exercise with name: "%s" does not exist' , $ name ) ) ; }
docstring: Find an exercise by it's name. If it does not exist
  an `InvalidArgumentException` exception is thrown.
  
  @param string $name
  @return ExerciseInterface
  @throws InvalidArgumentException
docstring_tokens: Find an exercise by it s name . If it does not exist an InvalidArgumentException exception is thrown .