original_string: public static function rootPath($directory) {
          $num = count(explode("/", $directory));
          $path = "";
          for ($i = 0; $i < $num; $i++)
              $path = self::join("..", $path);
          return $path;
      }
code: public static function rootPath($directory) {
          $num = count(explode("/", $directory));
          $path = "";
          for ($i = 0; $i < $num; $i++)
              $path = self::join("..", $path);
          return $path;
      }
code_tokens: public static function rootPath ( $ directory ) { $ num = count ( explode ( "/" , $ directory ) ) ; $ path = "" ; for ( $ i = 0 ; $ i < $ num ; $ i ++ ) $ path = self :: join ( ".." , $ path ) ; return $ path ; }
docstring: Builds a path referring to the root directory from a relative path.
  @param string $directory
  return string
docstring_tokens: Builds a path referring to the root directory from a relative path .