<commit_before><?php

require_once dirname(__FILE__) . '/../../../../../Mage.php';
require_once dirname(__FILE__) . '/Abstract.php';

class Liip_Shared_Test_Magento extends Liip_Shared_Test_Abstract
{
    public function setUp()
    {
        parent::setUp();
        Mage::$headersSentThrowsException = false;
    }

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

        // reset $_POST
        Mage::app()->getRequest()->setPost(array());

        // close connections
        Mage::getSingleton('core/resource')->getConnection(Mage_Core_Model_Resource_Setup::DEFAULT_SETUP_CONNECTION)->closeConnection();

        // reset session
        if (session_id()) {
            session_destroy();
        }

        // reset Magento
        Mage::reset();
    }
<commit_msg>adjust Mage.php path for composer build<commit_after><?php

require_once dirname(__FILE__) . '/../../../../../../../../../app/Mage.php';
require_once dirname(__FILE__) . '/Abstract.php';

class Liip_Shared_Test_Magento extends Liip_Shared_Test_Abstract
{
    public function setUp()
    {
        parent::setUp();
        Mage::$headersSentThrowsException = false;
    }

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

        // reset $_POST
        Mage::app()->getRequest()->setPost(array());

        // close connections
        Mage::getSingleton('core/resource')->getConnection(Mage_Core_Model_Resource_Setup::DEFAULT_SETUP_CONNECTION)->closeConnection();

        // reset session
        if (session_id()) {
            session_destroy();
        }

        // reset Magento
        Mage::reset();
    }

{'fraction_non_alphanumeric': 0.15166461159062886, 'fraction_numerical': 0.0, 'mean_word_length': 2.497844827586207, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '6949477', 'n_tokens_mistral': 467, 'n_tokens_neox': 461, 'n_words': 75}