original_string: public function setFieldValue($fieldName, $value)
      {
          if (isset($this->originalValues[$fieldName])
              && $this->originalValues[$fieldName] === $value
          ) {
              # the given value is the same as the original value;
              # ignore any given value
              unset($this->givenValues[$fieldName]);
          } elseif (isset($this->originalValues[$fieldName])
              && $this->originalValues[$fieldName] !== $value
              && isset($this->defaults[$fieldName])
              && $this->defaults[$fieldName] === $value
          ) {
              # the given value is the same as a default value, but different from
              # the original value; change it
              $this->givenValues[$fieldName] = $value;
          } elseif (isset($this->defaults[$fieldName])
              && $this->defaults[$fieldName] === $value
          ) {
              # the given value is the same as the default value;
              # ignore any given value
              unset($this->givenValues[$fieldName]);
          } else {
              $this->givenValues[$fieldName] = $value;
          }
          return $this;
      }
code: public function setFieldValue($fieldName, $value)
      {
          if (isset($this->originalValues[$fieldName])
              && $this->originalValues[$fieldName] === $value
          ) {
              # the given value is the same as the original value;
              # ignore any given value
              unset($this->givenValues[$fieldName]);
          } elseif (isset($this->originalValues[$fieldName])
              && $this->originalValues[$fieldName] !== $value
              && isset($this->defaults[$fieldName])
              && $this->defaults[$fieldName] === $value
          ) {
              # the given value is the same as a default value, but different from
              # the original value; change it
              $this->givenValues[$fieldName] = $value;
          } elseif (isset($this->defaults[$fieldName])
              && $this->defaults[$fieldName] === $value
          ) {
              # the given value is the same as the default value;
              # ignore any given value
              unset($this->givenValues[$fieldName]);
          } else {
              $this->givenValues[$fieldName] = $value;
          }
          return $this;
      }
code_tokens: public function setFieldValue ( $ fieldName , $ value ) { if ( isset ( $ this -> originalValues [ $ fieldName ] ) && $ this -> originalValues [ $ fieldName ] === $ value ) { # the given value is the same as the original value; # ignore any given value unset ( $ this -> givenValues [ $ fieldName ] ) ; } elseif ( isset ( $ this -> originalValues [ $ fieldName ] ) && $ this -> originalValues [ $ fieldName ] !== $ value && isset ( $ this -> defaults [ $ fieldName ] ) && $ this -> defaults [ $ fieldName ] === $ value ) { # the given value is the same as a default value, but different from # the original value; change it $ this -> givenValues [ $ fieldName ] = $ value ; } elseif ( isset ( $ this -> defaults [ $ fieldName ] ) && $ this -> defaults [ $ fieldName ] === $ value ) { # the given value is the same as the default value; # ignore any given value unset ( $ this -> givenValues [ $ fieldName ] ) ; } else { $ this -> givenValues [ $ fieldName ] = $ value ; } return $ this ; }
docstring: Set the value of a named field.
  
  This implementation allows for fields which have an implied value when
  not given an explicit value. Thus,
  @see \Droid\Lib\Plugin\Model\File\AbstractLine::setFieldValue()
docstring_tokens: Set the value of a named field .