original_string: protected function samePrefix($url)
      {
          $partsA = explode('/', $url);
          $partsB = explode('/', $this->currentFileName);
  
          $n = count($partsA);
          if ($n != count($partsB)) {
              return false;
          }
  
          unset($partsA[$n-1]);
          unset($partsB[$n-1]);
  
          return $partsA == $partsB;
      }
code: protected function samePrefix($url)
      {
          $partsA = explode('/', $url);
          $partsB = explode('/', $this->currentFileName);
  
          $n = count($partsA);
          if ($n != count($partsB)) {
              return false;
          }
  
          unset($partsA[$n-1]);
          unset($partsB[$n-1]);
  
          return $partsA == $partsB;
      }
code_tokens: protected function samePrefix ( $ url ) { $ partsA = explode ( '/' , $ url ) ; $ partsB = explode ( '/' , $ this -> currentFileName ) ; $ n = count ( $ partsA ) ; if ( $ n != count ( $ partsB ) ) { return false ; } unset ( $ partsA [ $ n - 1 ] ) ; unset ( $ partsB [ $ n - 1 ] ) ; return $ partsA == $ partsB ; }
docstring: Returns true if the given url have the same prefix as the
  current document
docstring_tokens: Returns true if the given url have the same prefix as the current document