<commit_before><?php
App::uses('AppHelper', 'View/Helper');

// Helper to retrieve org images with the given parameters
    class OrgImgHelper extends AppHelper {
        const IMG_PATH = APP . WEBROOT_DIR . DS . 'img' . DS . 'orgs' . DS;

        public function getOrgImg($options, $returnData = false, $raw = false) {
            $imgOptions = array();
            $possibleFields = array('id', 'name');
            $size = !empty($options['size']) ? $options['size'] : 48;
            foreach ($possibleFields as $field) {
                if (isset($options[$field]) && file_exists(self::IMG_PATH . $options[$field] . '.png')) {
                    $imgOptions[$field] = $options[$field] . '.png';
                    break;
                }
            }
            if (!empty($imgOptions)) {
                foreach ($imgOptions as $field => $imgOption) {
                    $result = sprintf(
                        '<img src="%s/img/orgs/%s" title="%s" width="%s" height="%s">',
                        $baseurl,
                        $imgOption,
                        isset($options['name']) ? h($options['name']) : h($options['id']),
                        (int)$size,
                        (int)$size
                    );

                    if (!$raw) {
                        $result = sprintf(
                            '<a href="%s/organisations/view/%s">%s</a>',
                            $baseurl,
                            (empty($options['id']) ? h($options['name']) : h($options['id'])),
                            $result
                        );
                    }
                    break;
                }
            } else {
                if ($raw) {
                    $result = sprintf(
                        '<span class="welcome">%s</span>',
                        h($options['name'])
                    );
                } else {
                    $result = sprintf(
                        '<a href="%s/organisations/view/%s"><span class="welcome">%s</span></a>',
                        $baseurl,
                        (empty($options['id']) ? h($options['name']) : h($options['id'])),
                        h($options['name'])<commit_msg>use this here<commit_after><?php
App::uses('AppHelper', 'View/Helper');

// Helper to retrieve org images with the given parameters
    class OrgImgHelper extends AppHelper {
        const IMG_PATH = APP . WEBROOT_DIR . DS . 'img' . DS . 'orgs' . DS;

        public function getOrgImg($options, $returnData = false, $raw = false) {
            $imgOptions = array();
            $possibleFields = array('id', 'name');
            $size = !empty($options['size']) ? $options['size'] : 48;
            foreach ($possibleFields as $field) {
                if (isset($options[$field]) && file_exists(self::IMG_PATH . $options[$field] . '.png')) {
                    $imgOptions[$field] = $options[$field] . '.png';
                    break;
                }
            }
            if (!empty($imgOptions)) {
                foreach ($imgOptions as $field => $imgOption) {
                    $result = sprintf(
                        '<img src="%s/img/orgs/%s" title="%s" width="%s" height="%s">',
                        $this->baseurl,
                        $imgOption,
                        isset($options['name']) ? h($options['name']) : h($options['id']),
                        (int)$size,
                        (int)$size
                    );

                    if (!$raw) {
                        $result = sprintf(
                            '<a href="%s/organisations/view/%s">%s</a>',
                            $this->baseurl,
                            (empty($options['id']) ? h($options['name']) : h($options['id'])),
                            $result
                        );
                    }
                    break;
                }
            } else {
                if ($raw) {
                    $result = sprintf(
                        '<span class="welcome">%s</span>',
                        h($options['name'])
                    );
                } else {
                    $result = sprintf(
                        '<a href="%s/organisations/view/%s"><span class="welcome">%s</span></a>',
                        $this->baseurl,
                        (empty($options['id']) ? h($options['name']) : h($options['id'])),
                        h($options['name'])
{'fraction_non_alphanumeric': 0.16052158273381295, 'fraction_numerical': 0.0008992805755395684, 'mean_word_length': 1.1472007722007722, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 26, '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': '4205729', 'n_tokens_mistral': 1157, 'n_tokens_neox': 1108, 'n_words': 213}