original_string: public function get($idSegment)
      {
          Piwik::checkUserHasSomeViewAccess();
  
          if (!is_numeric($idSegment)) {
              throw new Exception("idSegment should be numeric.");
          }
  
          $segment = $this->getModel()->getSegment($idSegment);
  
          if (empty($segment)) {
              return false;
          }
          try {
  
              if (!$segment['enable_all_users']) {
                  Piwik::checkUserHasSuperUserAccessOrIsTheUser($segment['login']);
              }
  
          } catch (Exception $e) {
              throw new Exception($this->getMessageCannotEditSegmentCreatedBySuperUser());
          }
  
          if ($segment['deleted']) {
              throw new Exception("This segment is marked as deleted. ");
          }
  
          return $segment;
      }
code: public function get($idSegment)
      {
          Piwik::checkUserHasSomeViewAccess();
  
          if (!is_numeric($idSegment)) {
              throw new Exception("idSegment should be numeric.");
          }
  
          $segment = $this->getModel()->getSegment($idSegment);
  
          if (empty($segment)) {
              return false;
          }
          try {
  
              if (!$segment['enable_all_users']) {
                  Piwik::checkUserHasSuperUserAccessOrIsTheUser($segment['login']);
              }
  
          } catch (Exception $e) {
              throw new Exception($this->getMessageCannotEditSegmentCreatedBySuperUser());
          }
  
          if ($segment['deleted']) {
              throw new Exception("This segment is marked as deleted. ");
          }
  
          return $segment;
      }
code_tokens: public function get ( $ idSegment ) { Piwik :: checkUserHasSomeViewAccess ( ) ; if ( ! is_numeric ( $ idSegment ) ) { throw new Exception ( "idSegment should be numeric." ) ; } $ segment = $ this -> getModel ( ) -> getSegment ( $ idSegment ) ; if ( empty ( $ segment ) ) { return false ; } try { if ( ! $ segment [ 'enable_all_users' ] ) { Piwik :: checkUserHasSuperUserAccessOrIsTheUser ( $ segment [ 'login' ] ) ; } } catch ( Exception $ e ) { throw new Exception ( $ this -> getMessageCannotEditSegmentCreatedBySuperUser ( ) ) ; } if ( $ segment [ 'deleted' ] ) { throw new Exception ( "This segment is marked as deleted. " ) ; } return $ segment ; }
docstring: Returns a stored segment by ID
  
  @param $idSegment
  @throws Exception
  @return bool
docstring_tokens: Returns a stored segment by ID