<commit_before><?php
/**
 * @package Form
 */
class Kwf_Form_Field_ShowSelect extends Kwf_Form_Field_ShowField
{
    public function load($row, $postData = array())
    {
        $ret = parent::load($row, $postData);
        $data = $this->getValues();
        if ($data) {
            if ($data instanceof Kwf_Db_Table_Rowset_Abstract
                || $data instanceof Kwf_Model_Rowset_Interface
            ) {
                foreach ($data as $row) {
                    if ($row->id == $ret[$this->getFieldName()]) {
                        $ret[$this->getFieldName()] = $row->__toString();
                    }
                }
            } else if (is_array($data)) {
                if (is_array($data[0])) {
                        $oldData = $data;
                        $data = array();
                    foreach ($oldData as $d) {
                        $data[$d[0]] = $d[1];
                    }
                }
                if ($ret[$this->getFieldName()] === false || $ret[$this->getFieldName()] === null) {
                    $ret[$this->getFieldName()] = null;
                } else if (!$ret[$this->getFieldName()]) {
                    $ret[$this->getFieldName()] = null;
                } else {
                    $ret[$this->getFieldName()] = $data[$ret[$this->getFieldName()]];
                }
            }
        } else {
            $reference = $this->getReference();
            if ($reference) {<commit_msg>fix for show select format<commit_after><?php
/**
 * @package Form
 */
class Kwf_Form_Field_ShowSelect extends Kwf_Form_Field_ShowField
{
    public function load($row, $postData = array())
    {
        $ret = parent::load($row, $postData);
        $data = $this->getValues();
        if ($data) {
            if ($data instanceof Kwf_Db_Table_Rowset_Abstract
                || $data instanceof Kwf_Model_Rowset_Interface
            ) {
                foreach ($data as $row) {
                    if ($row->id == $ret[$this->getFieldName()]) {
                        $ret[$this->getFieldName()] = $row->__toString();
                    }
                }
            } else if (is_array($data)) {
                if (isset($data[0]) && is_array($data[0])) {
                        $oldData = $data;
                        $data = array();
                    foreach ($oldData as $d) {
                        $data[$d[0]] = $d[1];
                    }
                }
                if ($ret[$this->getFieldName()] === false || $ret[$this->getFieldName()] === null) {
                    $ret[$this->getFieldName()] = null;
                } else if (!$ret[$this->getFieldName()]) {
                    $ret[$this->getFieldName()] = null;
                } else {
                    $ret[$this->getFieldName()] = $data[$ret[$this->getFieldName()]];
                }
            }
        } else {
            $reference = $this->getReference();
            if ($reference) {
{'fraction_non_alphanumeric': 0.15830508474576271, 'fraction_numerical': 0.0023728813559322033, 'mean_word_length': 1.3589128697042365, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, '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': '789957', 'n_tokens_mistral': 828, 'n_tokens_neox': 795, 'n_words': 145}