<commit_before><?php
class Vpc_Root_TrlRoot_Chained_Admin extends Vpc_Abstract_Admin
{
    //TODO sollte nicht mehr static sein wenn todo in Vps_Util_Component::duplicate erledigt wurde
    public static function duplicated(Vps_Component_Data $source, Vps_Component_Data $new)
    {
        $chained = Vps_Component_Data_Root::getInstance()
            ->getComponentsByClass('Vpc_Root_TrlRoot_Chained_Component', array('ignoreVisible'=>true)); //bySameClass wenn fkt nicht mehr static (todo oben erledigt)

        $sourceChained = array();
        foreach ($chained as $c) {
            $subRootAboveTrl = $c; //eg. domain
            while($subRootAboveTrl = $subRootAboveTrl->parent) {
                if (Vpc_Abstract::getFlag($subRootAboveTrl->componentClass, 'subroot')) {
                    break;
                }
            }
            if (!$subRootAboveTrl) {
                $subRootAboveTrl = Kwf_Component_Data_Root::getInstance();
            }
            $d = $source;
            while($d = $d->parent) {
                if ($d->componentId == $subRootAboveTrl->componentId) {
                    $sourceChained[$c->getLanguage()] = $c;
                }
            }
        }

        $targetChained = array();
        foreach ($chained as $c) {
            $subRootAboveTrl = $c; //eg. domain
            while($subRootAboveTrl = $subRootAboveTrl->parent) {
                if (Vpc_Abstract::getFlag($subRootAboveTrl->componentClass, 'subroot')) {
                    break;
                }
            }
            if (!$subRootAboveTrl) {
                $subRootAboveTrl = Kwf_Component_Data_Root::getInstance();
            }
            $d = $new;
            while($d = $d->parent) {
                if ($d->componentId == $subRootAboveTrl->componentId) {
                    if (isset($sourceChained[$c->getLanguage()])) { //only if there is a source language
                        $targetChained[] = array(
                            'targetChained' => $c,
                            'sourceChained' => $sourceChained[$c->getLanguage()],<commit_msg>don't use kwf in vps<commit_after><?php
class Vpc_Root_TrlRoot_Chained_Admin extends Vpc_Abstract_Admin
{
    //TODO sollte nicht mehr static sein wenn todo in Vps_Util_Component::duplicate erledigt wurde
    public static function duplicated(Vps_Component_Data $source, Vps_Component_Data $new)
    {
        $chained = Vps_Component_Data_Root::getInstance()
            ->getComponentsByClass('Vpc_Root_TrlRoot_Chained_Component', array('ignoreVisible'=>true)); //bySameClass wenn fkt nicht mehr static (todo oben erledigt)

        $sourceChained = array();
        foreach ($chained as $c) {
            $subRootAboveTrl = $c; //eg. domain
            while($subRootAboveTrl = $subRootAboveTrl->parent) {
                if (Vpc_Abstract::getFlag($subRootAboveTrl->componentClass, 'subroot')) {
                    break;
                }
            }
            if (!$subRootAboveTrl) {
                $subRootAboveTrl = Vps_Component_Data_Root::getInstance();
            }
            $d = $source;
            while($d = $d->parent) {
                if ($d->componentId == $subRootAboveTrl->componentId) {
                    $sourceChained[$c->getLanguage()] = $c;
                }
            }
        }

        $targetChained = array();
        foreach ($chained as $c) {
            $subRootAboveTrl = $c; //eg. domain
            while($subRootAboveTrl = $subRootAboveTrl->parent) {
                if (Vpc_Abstract::getFlag($subRootAboveTrl->componentClass, 'subroot')) {
                    break;
                }
            }
            if (!$subRootAboveTrl) {
                $subRootAboveTrl = Vps_Component_Data_Root::getInstance();
            }
            $d = $new;
            while($d = $d->parent) {
                if ($d->componentId == $subRootAboveTrl->componentId) {
                    if (isset($sourceChained[$c->getLanguage()])) { //only if there is a source language
                        $targetChained[] = array(
                            'targetChained' => $c,
                            'sourceChained' => $sourceChained[$c->getLanguage()],
{'fraction_non_alphanumeric': 0.1181666268799236, 'fraction_numerical': 0.0, 'mean_word_length': 1.8445349626612355, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, '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': '6699328', 'n_tokens_mistral': 1227, 'n_tokens_neox': 1169, 'n_words': 219}