<commit_before><?php

class Learning_BrandPackage_Block_Brand extends Mage_Core_Block_Template
{
    public function methodFromTheBlock()
    {
        return 'this is a method from the block !';
    }

    public function magentoMethod()
    {
        return 'Magento is so amazing !';
    }

    public function getBrands()
    {
    	$brands = Mage::getModel('learning_brandpackage/brand')
            		->getCollection();

    	return $brands;
    }

    public function getProducts($brand)
    {
        return $brand->getSelectedProductsCollection()->addAttributeToSelect(['name', 'SKU', 'description', 'price', 'image']);
    }
}<commit_msg>Filtering active and visible products<commit_after><?php

class Learning_BrandPackage_Block_Brand extends Mage_Core_Block_Template
{
    public function methodFromTheBlock()
    {
        return 'this is a method from the block !';
    }

    public function magentoMethod()
    {
        return 'Magento is so amazing !';
    }

    public function getBrands()
    {
    	$brands = Mage::getModel('learning_brandpackage/brand')
            		->getCollection();

    	return $brands;
    }

    public function getProducts($brand)
    {
        return $brand->getSelectedProductsCollection()
                    ->addFieldToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED)
                    ->setVisibility(array(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH, Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG))
                    //->load(true)
                    ->addAttributeToSelect(['name', 'SKU', 'description', 'price', 'image']);
    }
}
{'fraction_non_alphanumeric': 0.1062919975565058, 'fraction_numerical': 0.0, 'mean_word_length': 2.9757281553398056, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '1365715', 'n_tokens_mistral': 475, 'n_tokens_neox': 452, 'n_words': 92}