<commit_before>/**
 * @packet test;
 * @template template.temp;
 * @style style.qq;
 * @require service.test;
 * @require action;
 */
Module({
    name: "test",
    extend: "view",
    className: "mt-test",
    template: "@temp.test",
    style: "@qq",
    autodom: true,
    services: {"test": "@test.testservice"},
    init: function () {
        this.excuteService("test.set", {name: "aa"});
    },
    bind_add: function (dom) {
        this.excuteService("test.name", this.excuteService("test.get").name + 1);
        this.excuteService("test.add", this.excuteService("test.get").name + 1)
    },
    bind_data: function (dom) {
        this.excuteService("test.name", dom.val());
    }
});
Module({
    name: "test2",
    extend: "view",
    className: "mt-test",
    template: "@temp.test2",
    style: "@qq",
    autodom: true,
    services: {"test": "@test.testservice"},
    init: function () {
        this.data=[
            {name:"aa1",id:"aa1"},
            {name:"aa2",id:"aa2"},
            {name:"aa3",id:"aa3"},
            {name:"aa4",id:"aa4"},
            {name:"aa5",id:"aa5"}
        ];
        this.render(this.data);
    },
    bind_item: function (dom) {
        var index=this.data.indexOf(dom.cache());
        if(index!==-1){
            this.data[index] = this.data.splice(index+1, 1, this.data[index])[0];
        }
        // this.data.reverse();
        this.update(this.data);
    }
});
Module({
    name:"aa",
    extend:"view",
    autodom:true,
    template:"<div>{{data.desc}}</div>",
    option:{
        desc:"aaaa"
    },
    init:function(){
        this.render(this.option);
    }
});
Module({
    name:"bb",
    extend:"viewgroup",
    autodom:true,
    layout:"<div data-bind='click:change'>"+
                "{{if data.check}}"+
                "<div>666666</div>"+
                "{{/if}}"+
                "<@module type='{{data.type}}'/>"+
            "</div>",
    option:{
        type:"@.aa",
        check:true
    },
    bind_change:function () {
        this.option.check=this.option.check?false:true;
        this.update(this.option);
    },
    oninitchildend:function (module) {
        console.log("------->"+module.type());
    }
});<commit_msg>bugfix<commit_after>/**
 * @packet test;
 * @template template.temp;
 * @style style.qq;
 * @require service.test;
 * @require action;
 */
Module({
    name: "test",
    extend: "view",
    className: "mt-test",
    template: "@temp.test",
    style: "@qq",
    autodom: true,
    services: {"test": "@test.testservice"},
    init: function () {
        this.excuteService("test.set", {name: "aa"});
    },
    bind_add: function (dom) {
        this.excuteService("test.name", this.excuteService("test.get").name + 1);
        this.excuteService("test.add", this.excuteService("test.get").name + 1)
    },
    bind_data: function (dom) {
        this.excuteService("test.name", dom.val());
    }
});
Module({
    name: "test2",
    extend: "view",
    className: "mt-test",
    template: "@temp.test2",
    style: "@qq",
    autodom: true,
    services: {"test": "@test.testservice"},
    init: function () {
        this.data=[
            {name:"aa1",id:"aa1"},
            {name:"aa2",id:"aa2"},
            {name:"aa3",id:"aa3"},
            {name:"aa4",id:"aa4"},
            {name:"aa5",id:"aa5"}
        ];
        this.render(this.data);
    },
    bind_item: function (dom) {
        var index=this.data.indexOf(dom.cache());
        if(index!==-1){
            this.data[index] = this.data.splice(index+1, 1, this.data[index])[0];
        }
        // this.data.reverse();
        this.update(this.data);
    }
});
Module({
    name:"aa",
    extend:"view",
    autodom:true,
    template:"<div>{{data.desc}}</div>",
    option:{
        desc:"aaaa"
    },
    init:function(){
        this.render(this.option);
    }
});
Module({
    name:"bb",
    extend:"viewgroup",
    autodom:true,
    layout:"<div data-bind='click:change'>"+
            "{{if data.list.length>0}}"+
                "{{list data.list as item}}"+
                    "<div unique='{{item.id}}'>"+
                    "<@module type='{{data.type}}' id='{{item.id}}'/>"+
                    "</div>"+
                "{{/list}}"+
            "{{else}}"+
                "<div class='desc'><div>sdsdsdsd</div><div>wewewewe</div></div>"+
            "{{/if}}"+
            "</div>",
    option:{
        type:"@.aa",
        check:true,
        list:[]
    },
    bind_change:function () {
        this.option.check=this.option.check?false:true;
        if(this.option.list.length===0) {
            this.option.list = [
                {id: $.util.randomid()}
            ];
        }else{
            this.option.list=[];
        }
        this.update(this.option);
    },
    oninitchildend:function (module) {
        console.log("------->"+module.type());
    }
});
{'fraction_non_alphanumeric': 0.2135062795964587, 'fraction_numerical': 0.009059089973234506, 'mean_word_length': 2.053425518541798, 'pattern_counts': {'":': 4, '<': 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': '2305152', 'n_tokens_mistral': 1645, 'n_tokens_neox': 1609, 'n_words': 246}