<commit_before><?php
class Vps_Model_Row_Data_Abstract extends Vps_Model_Row_Abstract
{
    protected $_data = array();
    protected $_cleanData = array();

    public function __construct(array $config)
    {
        $this->_data = (array)$config['data'];
        $this->_cleanData = $this->_data;
        parent::__construct($config);
    }

    //internal
    public function setData($data)
    {
        $this->_data = $data;
        $this->_cleanData = $data;
    }

    public function serialize()
    {
        return serialize(array(
            'parent' => parent::serialize(),
            'data' => $this->_data
        ));
    }
    public function unserialize($str)
    {
        $data = unserialize($str);
        $this->_data = $data['data'];
        $this->_cleanData = $this->_data;
        parent::unserialize($data['parent']);
    }

    public function __unset($name)
    {
        if ($this->_model->getOwnColumns() && !in_array($name, $this->_model->getOwnColumns())) {
            parent::__unset($name);
        } else if (isset($this->_data[$name])) {
            $name = $this->_transformColumnName($name);
            unset($this->_data[$name]);
        }
    }<commit_msg>in der row geaenderte daten nicht ueberschreiben per setData<commit_after><?php
class Vps_Model_Row_Data_Abstract extends Vps_Model_Row_Abstract
{
    protected $_data = array();
    protected $_cleanData = array();

    public function __construct(array $config)
    {
        $this->_data = (array)$config['data'];
        $this->_cleanData = $this->_data;
        parent::__construct($config);
    }

    //internal
    public function setData($data)
    {
        foreach (array_keys($this->_cleanData) as $k) {
            if ($this->_cleanData[$k] === $this->_data[$k]) {
                //nicht gendert
                if (isset($data[$k])) {
                    $this->_data[$k] = $data[$k];
                } else {
                    unset($this->_data[$k]);
                }
            }
        }
        $this->_cleanData = $data;
    }

    public function serialize()
    {
        return serialize(array(
            'parent' => parent::serialize(),
            'data' => $this->_data
        ));
    }
    public function unserialize($str)
    {
        $data = unserialize($str);
        $this->_data = $data['data'];
        $this->_cleanData = $this->_data;
        parent::unserialize($data['parent']);
    }

    public function __unset($name)
    {
        if ($this->_model->getOwnColumns() && !in_array($name, $this->_model->getOwnColumns())) {
            parent::__unset($name);
        } else if (isset($this->_data[$name])) {
            $name = $this->_transformColumnName($name);
            unset($this->_data[$name]);
        }
    }
{'fraction_non_alphanumeric': 0.16251354279523295, 'fraction_numerical': 0.0, 'mean_word_length': 2.1370328425821064, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 43, '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': '3806243', 'n_tokens_mistral': 809, 'n_tokens_neox': 798, 'n_words': 143}