<commit_before>(function() {
    angular
        .module("HdmiSwitch", ["ngResource", "ngMaterial"])
        .factory("Mode", function($http){
            var mode = {};
            mode.address = "192.168.1.181:23";
            mode.switch = function(newMode){
                return $http.post("/switch-mode", {
                    mode: newMode,
                    address: mode.address
                });
            };
            return mode;
        })
        .factory("Connection", function($timeout){
            var w = null;
            var connect;
            connect = function(){
                var w;
                if (w === null) {
                    w = new WebSocket("ws://" + location.host + "/socket");
                }
                return w;
            };
            return {
                connect: function(callback){
                    var w = connect();
                    w.onmessage = function(){
                        var args = [].slice.call(arguments);
                        return $timeout(function(){
                            return callback.apply(null, args);
                        });
                    };
                }
            };
        })
        .controller("HdmiSwitchCtrl", function(Mode, Connection){
            var vm = this;
            vm.mode = Mode;
            vm.messages = "";
            Connection.connect(function(message){
                var d = new Date();
                vm.messages = d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds() + " " + message.data + "\n" + vm.messages;
            });
            return vm;
        });
})();
<commit_msg>Use more descriptive variable name.<commit_after>(function() {
    angular
        .module("HdmiSwitch", ["ngResource", "ngMaterial"])
        .factory("Mode", function($http){
            var mode = {};
            mode.address = "192.168.1.181:23";
            mode.switch = function(newMode){
                return $http.post("/switch-mode", {
                    mode: newMode,
                    address: mode.address
                });
            };
            return mode;
        })
        .factory("Connection", function($timeout){
            var socket = null;
            var connect;
            connect = function(){
                var socket;
                if (socket === null) {
                    socket = new WebSocket("ws://" + location.host + "/socket");
                }
                return socket;
            };
            return {
                connect: function(callback){
                    var socket = connect();
                    socket.onmessage = function(){
                        var args = [].slice.call(arguments);
                        return $timeout(function(){
                            return callback.apply(null, args);
                        });
                    };
                }
            };
        })
        .controller("HdmiSwitchCtrl", function(Mode, Connection){
            var vm = this;
            vm.mode = Mode;
            vm.messages = "";
            Connection.connect(function(message){
                var d = new Date();
                vm.messages = d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds() + " " + message.data + "\n" + vm.messages;
            });
            return vm;
        });
})();

{'fraction_non_alphanumeric': 0.13434614238903783, 'fraction_numerical': 0.0071492403932082215, 'mean_word_length': 1.080545229244114, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '7404423', 'n_tokens_mistral': 831, 'n_tokens_neox': 776, 'n_words': 166}