<commit_before><?php

  namespace ICA\JointSources;

  require_once(__DIR__ . "/../lib/integration_algolia.php");

  define("JOINTSOURCE_CONVERSATION", 1);
  define("JOINTSOURCE_RESPONSE", 2);
  define("JOINTSOURCE_DISCUSSION", 3);

  class JointSource {

    public $refereeJointSourceIds = [];

    public $referrerJointSourceIds = [];

  }

  function getJointSourceIdsByAlgoliaQueryString($queryString, $limit, &$page) {

    global $ALGOLIA_INDEX;<commit_msg>Check $ALGOLIA_INDEX before calling methods<commit_after><?php

  namespace ICA\JointSources;

  require_once(__DIR__ . "/../lib/integration_algolia.php");

  define("JOINTSOURCE_CONVERSATION", 1);
  define("JOINTSOURCE_RESPONSE", 2);
  define("JOINTSOURCE_DISCUSSION", 3);

  class JointSource {

    public $refereeJointSourceIds = [];

    public $referrerJointSourceIds = [];

  }

  function getJointSourceIdsByAlgoliaQueryString($queryString, $limit, &$page) {

    global $ALGOLIA_INDEX;

    if (!isset($ALGOLIA_INDEX)) return [];
{'fraction_non_alphanumeric': 0.12974051896207583, 'fraction_numerical': 0.005988023952095809, 'mean_word_length': 5.115853658536586, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1273358', 'n_tokens_mistral': 361, 'n_tokens_neox': 326, 'n_words': 52}