<commit_before>__$__.Update = {
    CodeWithCheckPoint: ''
};


// this function is called when ace editor is edited.
__$__.Update.PositionUpdate = function(e) {
    window.localStorage["Kanon-Code"] = __$__.editor.getValue();

    if (e)
        __$__.Update.UpdateIdPositions(e);

    let transformed_code = __$__.CodeConversion.TransformCode(__$__.editor.getValue());
    var __objs;

    try {
        eval(transformed_code);
        document.getElementById('console').textContent = '';

        var graph = __$__.ToVisjs.Translator(__$__.Traverse.traverse(__objs));
        

        if (!__$__.Update.isChange(graph, false)) {
            __$__.Update.ContextUpdate();
            return;
        }


        __$__.options.nodes.physics = true;
        __$__.StorePositions.setPositions(graph, true);
        __$__.network = new vis.Network(__$__.container, {nodes: new vis.DataSet(graph.nodes), edges: new vis.DataSet(graph.edges)}, __$__.options);
        __$__.StorePositions.oldNetworkNodesData = __$__.network.body.data.nodes._data;
        __$__.StorePositions.oldNetworkEdgesData = __$__.network.body.data.edges._data;

        __$__.network.on("dragEnd", function(params) {
            __$__.StorePositions.registerPositions();
        });

        __$__.network.once("stabilized", function(params) {
            __$__.options.nodes.physics = false;
            __$__.network.setOptions(__$__.options);

            __$__.StorePositions.registerPositions();
            __$__.StorePositions.setPositions(graph);
            __$__.network.setData({nodes: new vis.DataSet(graph.nodes), edges: new vis.DataSet(graph.edges)});


            __$__.Update.ContextUpdate();
        });
        __$__.network.on('click', __$__.JumpToConstruction.ClickEventFunction);
    } catch (e) {
        if (e == 'Infinite Loop') {
            document.getElementById('console').textContent = 'infinite loop?';
        }
    }<commit_msg>change how to write codes(no changes of specification)<commit_after>__$__.Update = {
    CodeWithCheckPoint: ''
};


// this function is called when ace editor is edited.
__$__.Update.PositionUpdate = function(e) {
    window.localStorage["Kanon-Code"] = __$__.editor.getValue();

    if (e)
        __$__.Update.UpdateIdPositions(e);

    let transformed_code = __$__.CodeConversion.TransformCode(__$__.editor.getValue());
    var __objs;

    try {
        eval(transformed_code);
        document.getElementById('console').textContent = '';

        var graph = __$__.ToVisjs.Translator(__$__.Traverse.traverse(__objs));
        

        if (!__$__.Update.isChange(graph, false)) {
            __$__.Update.ContextUpdate();
            return;
        }


        __$__.options.nodes.physics = true;
        __$__.StorePositions.setPositions(graph, true);
        __$__.network = new vis.Network(__$__.container, {nodes: new vis.DataSet(graph.nodes), edges: new vis.DataSet(graph.edges)}, __$__.options);
        __$__.StorePositions.oldNetworkNodesData = __$__.network.body.data.nodes._data;
        __$__.StorePositions.oldNetworkEdgesData = __$__.network.body.data.edges._data;

        __$__.network.on("dragEnd", __$__.StorePositions.registerPositions);
        __$__.network.on('click', __$__.JumpToConstruction.ClickEventFunction);
        __$__.network.once("stabilized", function(params) {
            __$__.options.nodes.physics = false;
            __$__.network.setOptions(__$__.options);

            __$__.StorePositions.registerPositions();
            __$__.StorePositions.setPositions(graph);
            __$__.network.setData({nodes: new vis.DataSet(graph.nodes), edges: new vis.DataSet(graph.edges)});


            __$__.Update.ContextUpdate();
        });
    } catch (e) {
        if (e == 'Infinite Loop') {
            document.getElementById('console').textContent = 'infinite loop?';
        }
    }
{'fraction_non_alphanumeric': 0.1437079233557742, 'fraction_numerical': 0.0, 'mean_word_length': 2.8323412698412698, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4692373', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1120, 'n_words': 166}