<commit_before><?php defined('SYSPATH') or die('No direct script access.');

class Controller_Api_V1 extends Controller
{

    protected $_file = '';

    protected $_xml = null;

    protected $_sttg = null;

    public function before()
    {
        parent::before();

        $this->_sttg = new Model_Settings();
        $remote_addr = $this->_sttg->get('sync_remote_addr');

        if (!$this->_sttg->get('sync') && !$remote_addr && !$this->request->method() === Request::POST)
        {
            throw new HTTP_Exception_404();
        }
        else
        {
            if ($remote_addr)
            {
                if ($_SERVER['REMOTE_ADDR'] !== $remote_addr)
                {
                    throw new HTTP_Exception_404();
                }
            }
        }

        $this->_file = APPPATH.'download/xml/missed_requests.xml';
        $this->_xml = new SimpleXMLElement("<xml version=\"1.0\" encoding=\"utf-8\"/>");
    }

<commit_msg>api fix<commit_after><?php defined('SYSPATH') or die('No direct script access.');

class Controller_Api_V1 extends Controller
{

    protected $_file = '';

    protected $_xml = null;

    protected $_sttg = null;

    public function before()
    {
        parent::before();

        $this->_sttg = new Model_Settings();
        $remote_addr = $this->_sttg->get('sync_remote_addr');

        if (!($this->request->method() === Request::POST))
        {
            throw new HTTP_Exception_404();
        }
        elseif(!$this->_sttg->get('sync'))
        {
            throw new HTTP_Exception_404();
        }
        elseif(!$remote_addr)
        {
            throw new HTTP_Exception_404();
        }

        if ($remote_addr)
        {
            if ($_SERVER['REMOTE_ADDR'] !== $remote_addr)
            {
                throw new HTTP_Exception_404();
            }
        }

        $this->_file = APPPATH.'download/xml/missed_requests.xml';
        $this->_xml = new SimpleXMLElement("<xml version=\"1.0\" encoding=\"utf-8\"/>");
    }


{'fraction_non_alphanumeric': 0.15247524752475247, 'fraction_numerical': 0.01287128712871287, 'mean_word_length': 1.9121037463976944, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 2, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1552866', 'n_tokens_mistral': 607, 'n_tokens_neox': 576, 'n_words': 110}