<commit_before>"use strict";

treeherder.controller('BugFilerCtrl', [
    '$scope', '$rootScope', '$uibModalInstance', '$http', 'summary', 'thBugzillaProductObject',
    'fullLog', 'parsedLog', 'reftest', 'selectedJob', 'allFailures',
    'successCallback', 'thNotify',
    function BugFilerCtrl(
        $scope, $rootScope, $uibModalInstance, $http, summary, thBugzillaProductObject,
        fullLog, parsedLog, reftest, selectedJob, allFailures,
        successCallback, thNotify) {

        var bzBaseUrl = "https://bugzilla.mozilla.org/";

        $scope.omittedLeads = ["TEST-UNEXPECTED-FAIL", "PROCESS-CRASH", "TEST-UNEXPECTED-ERROR"];

        /**
         *  'enter' from the product search input should initiate the search
         */
        $scope.productSearchEnter = function(ev) {
            if (ev.keyCode === 13) {
                $scope.findProduct();
            }
        };

        /*
         **
         */
        $scope.isReftest = function() {
            return reftest !== "";
        };

        $scope.parsedLog = parsedLog;
        $scope.fullLog = fullLog;
        if ($scope.isReftest()) {
            $scope.reftest = reftest;
        }

        /**
         *  Pre-fill the form with information/metadata from the failure
         */
        $scope.initiate = function() {
            var thisFailure = "";
            for (var i = 0; i < allFailures.length; i++) {
                for (var j=0; j < $scope.omittedLeads.length; j++) {
                    if (allFailures[i][0].search($scope.omittedLeads[j]) >= 0 && allFailures[i].length > 1) {
                        allFailures[i].shift();<commit_msg>Bug 1348210 - Auto-block stylo-bustage metabug (#2263) r=camd<commit_after>"use strict";

treeherder.controller('BugFilerCtrl', [
    '$scope', '$rootScope', '$uibModalInstance', '$http', 'summary', 'thBugzillaProductObject',
    'fullLog', 'parsedLog', 'reftest', 'selectedJob', 'allFailures',
    'successCallback', 'thNotify',
    function BugFilerCtrl(
        $scope, $rootScope, $uibModalInstance, $http, summary, thBugzillaProductObject,
        fullLog, parsedLog, reftest, selectedJob, allFailures,
        successCallback, thNotify) {

        var bzBaseUrl = "https://bugzilla.mozilla.org/";

        $scope.omittedLeads = ["TEST-UNEXPECTED-FAIL", "PROCESS-CRASH", "TEST-UNEXPECTED-ERROR"];

        /**
         *  'enter' from the product search input should initiate the search
         */
        $scope.productSearchEnter = function(ev) {
            if (ev.keyCode === 13) {
                $scope.findProduct();
            }
        };

        /*
         **
         */
        $scope.isReftest = function() {
            return reftest !== "";
        };

        $scope.parsedLog = parsedLog;
        $scope.fullLog = fullLog;
        if ($scope.isReftest()) {
            $scope.reftest = reftest;
        }

        /**
         *  Pre-fill the form with information/metadata from the failure
         */
        $scope.initiate = function() {
            var thisFailure = "";

            // Auto-block the stylo-bustage metabug if this is a stylo failure
            if (selectedJob.build_platform.includes("stylo")) {
                $scope.modalBlocks = "stylo-bustage,";
            }

            for (var i = 0; i < allFailures.length; i++) {
                for (var j=0; j < $scope.omittedLeads.length; j++) {
                    if (allFailures[i][0].search($scope.omittedLeads[j]) >= 0 && allFailures[i].length > 1) {
                        allFailures[i].shift();
{'fraction_non_alphanumeric': 0.14370412196499152, 'fraction_numerical': 0.007058159232072276, 'mean_word_length': 2.0412017167381973, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '7461497', 'n_tokens_mistral': 1101, 'n_tokens_neox': 1052, 'n_words': 213}