<commit_before>module Tomcat {
    export function TomcatController($scope, $location:ng.ILocationService, jolokia) {

        $scope.webAppObjectNames = jolokia.search("Tomcat:j2eeType=WebModule,*");

        $scope.webAppName = function webAppName(name) {
            console.log("get attr displayName on mbean " + name);
            return jolokia.getAttribute(name, "displayName")
        }

        $scope.webAppContextPath = function webAppContextPath(name) {
            console.log("get attr path on mbean " + name);
            return jolokia.getAttribute(name, "path")
        }

        $scope.webAppOperation = function webAppOperation(name,operation) {
            console.log("Executing " + operation + " on mbean " + name);
            return jolokia.execute(name,operation);
        };

        $scope.wepAppState = function webAppState(name) {
            console.log("get attr stateName on mbean " + name);
            return jolokia.getAttribute(name, "stateName");
        }

        $scope.isEmpty = function isEmpty(map) {
            return Object.keys(map).length === 0;
        }
    }
}<commit_msg>Fixed tomcat plugin to work with catalina or tomcat mbeans<commit_after>module Tomcat {
    export function TomcatController($scope, $location:ng.ILocationService, jolokia) {

        $scope.webAppObjectNames = jolokia.search("*:j2eeType=WebModule,*")

        $scope.webAppName = function webAppName(name) {
            return jolokia.getAttribute(name, "displayName")
        }

        $scope.webAppContextPath = function webAppContextPath(name) {
            return jolokia.getAttribute(name, "path")
        }

        $scope.webAppOperation = function webAppOperation(name,operation) {
            return jolokia.execute(name,operation);
        };

        $scope.wepAppState = function webAppState(name) {
            return jolokia.getAttribute(name, "stateName")
        }

        $scope.isEmpty = function isEmpty(map) {
            return Object.keys(map).length === 0
        }
    }
}
{'fraction_non_alphanumeric': 0.11072664359861592, 'fraction_numerical': 0.001977261492832427, 'mean_word_length': 2.5823008849557523, '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': '523770', 'n_tokens_mistral': 589, 'n_tokens_neox': 567, 'n_words': 108}