<commit_before>module SpringBatch {
    export function ConnectSpringBatchController($scope, $routeParams, $location, workspace:Workspace, $rootScope, $resource, $http) {

        $scope.host= 'localhost';
        $scope.port= 8080;

        $scope.connectSpringBatch = function(){
            if($scope.selectedSpringBatchServer){
                $rootScope.springBatchServer=$scope.selectedSpringBatchServer;
                $rootScope.alert.content='Connected successfully.';
                $rootScope.alert.type = 'alert-success';
                $rootScope.alert.show();
            }
        };

        $scope.addSpringBatchServerToGlobalList = function(){
            var server = getServerUrl($scope.host, $scope.port, $scope.path);

            $http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded";
            $http.post('/hawtio/springBatch','server='+server).success(function(data){
                $rootScope.springBatchServerList.add(server);
                $rootScope.springBatchServer=$scope.selectedSpringBatchServer;
                $rootScope.alert.content='Server added.';<commit_msg>refactored. Ref# HAWT-28<commit_after>module SpringBatch {
    export function ConnectSpringBatchController($scope, $routeParams, $location, workspace:Workspace, $rootScope, $resource, $http) {

        $scope.host= 'localhost';
        $scope.port= 8080;

        $scope.connectSpringBatch = function(){
            if($scope.selectedSpringBatchServer){
                $rootScope.springBatchServer=$scope.selectedSpringBatchServer;
                $rootScope.alert.content='Connected successfully.';
                $rootScope.alert.type = 'alert-success';
                $rootScope.alert.show();
            }
        };

        $scope.addSpringBatchServerToGlobalList = function(){
            var server = getServerUrl($scope.host, $scope.port, $scope.path);
            if($rootScope.springBatchServerList.indexOf($scope.selectedSpringBatchServer) > 0){
                $rootScope.alert.content='Server already in the list.';
                $rootScope.alert.type = 'alert-error';
                $rootScope.alert.show();
                return;
            }
            $http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded";
            $http.post('/hawtio/springBatch','server='+server).success(function(data){
                $rootScope.springBatchServerList.add(server);
                $rootScope.springBatchServer=$scope.selectedSpringBatchServer;
                $rootScope.alert.content='Server added.';
{'fraction_non_alphanumeric': 0.12693498452012383, 'fraction_numerical': 0.0042569659442724455, 'mean_word_length': 2.575380359612725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3020544', 'n_tokens_mistral': 690, 'n_tokens_neox': 657, 'n_words': 88}