original_string: public function get_clean_feature_key_and_path($featurepath) {
          global $CFG;
  
          // Fix directory path.
          $featurepath = testing_cli_fix_directory_separator($featurepath);
          $dirroot = testing_cli_fix_directory_separator($CFG->dirroot . DIRECTORY_SEPARATOR);
  
          $key = basename($featurepath, '.feature');
  
          // Get relative path.
          $featuredirname = str_replace($dirroot , '', $featurepath);
          // Get 5 levels of feature path to ensure we have a unique key.
          for ($i = 0; $i < 5; $i++) {
              if (($featuredirname = dirname($featuredirname)) && $featuredirname !== '.') {
                  if ($basename = basename($featuredirname)) {
                      $key .= '_' . $basename;
                  }
              }
          }
  
          return array($key, $featurepath);
      }
code: public function get_clean_feature_key_and_path($featurepath) {
          global $CFG;
  
          // Fix directory path.
          $featurepath = testing_cli_fix_directory_separator($featurepath);
          $dirroot = testing_cli_fix_directory_separator($CFG->dirroot . DIRECTORY_SEPARATOR);
  
          $key = basename($featurepath, '.feature');
  
          // Get relative path.
          $featuredirname = str_replace($dirroot , '', $featurepath);
          // Get 5 levels of feature path to ensure we have a unique key.
          for ($i = 0; $i < 5; $i++) {
              if (($featuredirname = dirname($featuredirname)) && $featuredirname !== '.') {
                  if ($basename = basename($featuredirname)) {
                      $key .= '_' . $basename;
                  }
              }
          }
  
          return array($key, $featurepath);
      }
code_tokens: public function get_clean_feature_key_and_path ( $ featurepath ) { global $ CFG ; // Fix directory path. $ featurepath = testing_cli_fix_directory_separator ( $ featurepath ) ; $ dirroot = testing_cli_fix_directory_separator ( $ CFG -> dirroot . DIRECTORY_SEPARATOR ) ; $ key = basename ( $ featurepath , '.feature' ) ; // Get relative path. $ featuredirname = str_replace ( $ dirroot , '' , $ featurepath ) ; // Get 5 levels of feature path to ensure we have a unique key. for ( $ i = 0 ; $ i < 5 ; $ i ++ ) { if ( ( $ featuredirname = dirname ( $ featuredirname ) ) && $ featuredirname !== '.' ) { if ( $ basename = basename ( $ featuredirname ) ) { $ key .= '_' . $ basename ; } } } return array ( $ key , $ featurepath ) ; }
docstring: Return feature key for featurepath
  
  @param string $featurepath
  @return array key and featurepath.
docstring_tokens: Return feature key for featurepath