original_string: public function get_dataset_definitions_category($form) {
          global $CFG, $DB;
          $datasetdefs = array();
          $lnamemax = 30;
          if (!empty($form->category)) {
              $sql = "SELECT i.*, d.*
                        FROM {question_datasets} d, {question_dataset_definitions} i
                       WHERE i.id = d.datasetdefinition AND i.category = ?";
              if ($records = $DB->get_records_sql($sql, array($form->category))) {
                  foreach ($records as $r) {
                      if (!isset ($datasetdefs["{$r->name}"])) {
                          $datasetdefs["{$r->name}"] = $r->itemcount;
                      }
                  }
              }
          }
          return $datasetdefs;
      }
code: public function get_dataset_definitions_category($form) {
          global $CFG, $DB;
          $datasetdefs = array();
          $lnamemax = 30;
          if (!empty($form->category)) {
              $sql = "SELECT i.*, d.*
                        FROM {question_datasets} d, {question_dataset_definitions} i
                       WHERE i.id = d.datasetdefinition AND i.category = ?";
              if ($records = $DB->get_records_sql($sql, array($form->category))) {
                  foreach ($records as $r) {
                      if (!isset ($datasetdefs["{$r->name}"])) {
                          $datasetdefs["{$r->name}"] = $r->itemcount;
                      }
                  }
              }
          }
          return $datasetdefs;
      }
code_tokens: public function get_dataset_definitions_category ( $ form ) { global $ CFG , $ DB ; $ datasetdefs = array ( ) ; $ lnamemax = 30 ; if ( ! empty ( $ form -> category ) ) { $ sql = "SELECT i.*, d.*
                        FROM {question_datasets} d, {question_dataset_definitions} i
                       WHERE i.id = d.datasetdefinition AND i.category = ?" ; if ( $ records = $ DB -> get_records_sql ( $ sql , array ( $ form -> category ) ) ) { foreach ( $ records as $ r ) { if ( ! isset ( $ datasetdefs [ "{$r->name}" ] ) ) { $ datasetdefs [ "{$r->name}" ] = $ r -> itemcount ; } } } } return $ datasetdefs ; }
docstring: This function retrieve the item count of the available category shareable
  wild cards that is added as a comment displayed when a wild card with
  the same name is displayed in datasetdefinitions_form.php
docstring_tokens: This function retrieve the item count of the available category shareable wild cards that is added as a comment displayed when a wild card with the same name is displayed in datasetdefinitions_form . php