original_string: public function getStability()
      {
          if (is_null($this->stability) === false) {
              return $this->stability;
          }
  
          if (preg_match('{^[^,\s]*?@('.implode('|', array_keys(BasePackage::$stabilities)).')$}i', $this->getVersion(), $match)) {
              $stability = $match[1];
          } else {
              $stability = VersionParser::parseStability($this->getVersion());
          }
  
          $this->stability = VersionParser::normalizeStability($stability);
  
          return $this->stability;
      }
code: public function getStability()
      {
          if (is_null($this->stability) === false) {
              return $this->stability;
          }
  
          if (preg_match('{^[^,\s]*?@('.implode('|', array_keys(BasePackage::$stabilities)).')$}i', $this->getVersion(), $match)) {
              $stability = $match[1];
          } else {
              $stability = VersionParser::parseStability($this->getVersion());
          }
  
          $this->stability = VersionParser::normalizeStability($stability);
  
          return $this->stability;
      }
code_tokens: public function getStability ( ) { if ( is_null ( $ this -> stability ) === false ) { return $ this -> stability ; } if ( preg_match ( '{^[^,\s]*?@(' . implode ( '|' , array_keys ( BasePackage :: $ stabilities ) ) . ')$}i' , $ this -> getVersion ( ) , $ match ) ) { $ stability = $ match [ 1 ] ; } else { $ stability = VersionParser :: parseStability ( $ this -> getVersion ( ) ) ; } $ this -> stability = VersionParser :: normalizeStability ( $ stability ) ; return $ this -> stability ; }
docstring: Returns the package's version stability.
  
  @return string
docstring_tokens: Returns the package s version stability .