original_string: public function mod($dividend, $divisor)
      {
          if ($divisor === 0) {
              return 0;
          }
  
          $modulus = $dividend % $divisor;
          if ($modulus < 0) {
              $modulus += $divisor;
          }
  
          return $modulus;
      }
code: public function mod($dividend, $divisor)
      {
          if ($divisor === 0) {
              return 0;
          }
  
          $modulus = $dividend % $divisor;
          if ($modulus < 0) {
              $modulus += $divisor;
          }
  
          return $modulus;
      }
code_tokens: public function mod ( $ dividend , $ divisor ) { if ( $ divisor === 0 ) { return 0 ; } $ modulus = $ dividend % $ divisor ; if ( $ modulus < 0 ) { $ modulus += $ divisor ; } return $ modulus ; }
docstring: The PHP modulus function returns a negative modulus for a negative dividend.
  This algorithm requires a "traditional" modulus function where the modulus is
  always positive.
  
  @param int $dividend
  @param int $divisor
  
  @return int
docstring_tokens: The PHP modulus function returns a negative modulus for a negative dividend . This algorithm requires a traditional modulus function where the modulus is always positive .