<commit_before>TcpClient = function(settings) {
    this.notificationId = 0;
    this.queryId=0;
    this.settings = settings;
    var that = this;
    document.addEventListener("notify",function(ev) {
        that.notify(ev.detail.type, ev.detail.value, ev.detail.args);
    });
}

TcpClient.prototype = {
    connect: function() {
        var that = this;
        this.socket = new WebSocket(this.settings.getUri());
        this.socket.onopen = function() {
            that._onOpenCallback();
        };
        this.socket.onmessage = function(msg) {
            that._onMessageCallback(msg);
        };
        this.socket.onclose = function() {
            that._onCloseCallback();
        };
        this.socket.onerror = function(event) {
            that._onErrorCallback(event);
        };
    },
    notify: function(type, value, args) {
        var argsString = "";
        if(args != undefined) {
            for(var key in args) {
                argsString+=" "+key+"='"+args[key]+"'";
            }
        }
        var socketString ="<action type='"+type+"'";
        if(argsString.length) {
            socketString+=argsString;
        }
        socketString+=">";
        if(value != undefined) {
            socketString+=value;
        }
        socketString+="</action>";
        this.socket.send(socketString);
    },
    incrementQueryId: function() {
        this.queryId++;
    },
    _onOpenCallback : function() {
        //Hide the socket connect window
        clearTimeout(this.timeout);
        $(".splashscreen").hide();
        this.notify("getStatus");
        this.notify("getCatalogList")
    },
    _onMessageCallback : function(msg) {
        str = msg.data.replace(/&/g," ");
        xml = $($.parseXML(str));
        eventName = xml.children().get(0).nodeName;
        RemoteEvent.create(eventName, xml)
    },
    _onCloseCallback : function() {
        //Show the socket connect window
        $(".splashscreen").show();
        var that = this;
        this.timeout = setTimeout(function(){
            tcpClient = that.connect();
        },3000);
    },
    _onErrorCallback : function(event) {
    }
    
}<commit_msg>suppression du code pour les &<commit_after>TcpClient = function(settings) {
    this.notificationId = 0;
    this.queryId=0;
    this.settings = settings;
    var that = this;
    document.addEventListener("notify",function(ev) {
        that.notify(ev.detail.type, ev.detail.value, ev.detail.args);
    });
}

TcpClient.prototype = {
    connect: function() {
        var that = this;
        this.socket = new WebSocket(this.settings.getUri());
        this.socket.onopen = function() {
            that._onOpenCallback();
        };
        this.socket.onmessage = function(msg) {
            that._onMessageCallback(msg);
        };
        this.socket.onclose = function() {
            that._onCloseCallback();
        };
        this.socket.onerror = function(event) {
            that._onErrorCallback(event);
        };
    },
    notify: function(type, value, args) {
        var argsString = "";
        if(args != undefined) {
            for(var key in args) {
                argsString+=" "+key+"='"+args[key]+"'";
            }
        }
        var socketString ="<action type='"+type+"'";
        if(argsString.length) {
            socketString+=argsString;
        }
        socketString+=">";
        if(value != undefined) {
            socketString+=value;
        }
        socketString+="</action>";
        this.socket.send(socketString);
    },
    incrementQueryId: function() {
        this.queryId++;
    },
    _onOpenCallback : function() {
        //Hide the socket connect window
        clearTimeout(this.timeout);
        $(".splashscreen").hide();
        this.notify("getStatus");
        this.notify("getCatalogList")
    },
    _onMessageCallback : function(msg) {
        xml = $($.parseXML(msg.data));
        eventName = xml.children().get(0).nodeName;
        RemoteEvent.create(eventName, xml)
    },
    _onCloseCallback : function() {
        //Show the socket connect window
        $(".splashscreen").show();
        var that = this;
        this.timeout = setTimeout(function(){
            tcpClient = that.connect();
        },3000);
    },
    _onErrorCallback : function(event) {
    }
    
}
{'fraction_non_alphanumeric': 0.14696337505795085, 'fraction_numerical': 0.003245248029670839, 'mean_word_length': 1.9986101459346768, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '2593801', 'n_tokens_mistral': 1230, 'n_tokens_neox': 1220, 'n_words': 209}