<commit_before><?php

class Packages extends CI_Controller
{
    public function spec($package_name, $version, $format)
    {
        $this->load->model('spark');
        $this->load->model('contributor');

        $spark = Spark::get($package_name, $version);
        $contributor = $spark->getContributor();

        $spark->contributor = $contributor;

        $this->output->set_output(json_encode($spark));
    }
}<commit_msg>Added 404 on bad spark pull<commit_after><?php

class Packages extends CI_Controller
{
    public function spec($package_name, $version, $format)
    {
        $this->load->model('spark');
        $this->load->model('contributor');

        $spark = Spark::get($package_name, $version);

        if(!$spark) show_404 ();

        $contributor = $spark->getContributor();

        $spark->contributor = $contributor;

        $this->output->set_output(json_encode($spark));
    }
}
{'fraction_non_alphanumeric': 0.16355653128430298, 'fraction_numerical': 0.006586169045005488, 'mean_word_length': 3.2418604651162792, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '2215214', 'n_tokens_mistral': 305, 'n_tokens_neox': 267, 'n_words': 47}