<commit_before>/*global Worker: true */
/*jslint es5: true */

/*
 * #%L
 * %%
 * Copyright (C) 2011 - 2016 BMW Car IT GmbH
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

define(
        "integration/IntegrationUtils",
        [
            "global/Promise",
            "joynr/provisioning/provisioning_root",
            "integration/provisioning_end2end_common",
            "joynr/start/settings/defaultInterTabSettings",
            "global/WaitsFor"
        ],
        function(
            Promise,
            provisioning_root,
            provisioning_end2end,
            defaultInterTabSettings,
            waitsFor) {
            var IntegrationUtils = {};
            var currentlyRunningWebWorkerCC;
            var workerReady = {}, workerStarted = {}, workerFinished = {}, worker = {}, workerId =
                    0, queuedLogs = {};
            var joynr;

            IntegrationUtils.log = function log(msg, id) {
                if (joynr !== undefined) {
                    var logger = joynr.logging.getLogger(id);
                    logger.log(joynr.logging.getLogLevel(msg.level), msg.message);
                } else {
                    if (queuedLogs[id] === undefined) {
                        queuedLogs[id] = [];
                    }
                    queuedLogs[id].push(msg);
                }
            };

            IntegrationUtils.initialize = function initialize(asynclib) {
                joynr = asynclib;
                IntegrationUtils.messagingQos = new joynr.messaging.MessagingQos({
                    ttl : provisioning_root.ttl
                });

                var queuedMsgs, id, msg;
                for (id in queuedLogs) {
                    if (queuedLogs.hasOwnProperty(id)) {<commit_msg>[JS] Fix ugly log output for web worker messages<commit_after>/*global Worker: true */
/*jslint es5: true */

/*
 * #%L
 * %%
 * Copyright (C) 2011 - 2016 BMW Car IT GmbH
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

define(
        "integration/IntegrationUtils",
        [
            "global/Promise",
            "joynr/provisioning/provisioning_root",
            "integration/provisioning_end2end_common",
            "joynr/start/settings/defaultInterTabSettings",
            "global/WaitsFor"
        ],
        function(
            Promise,
            provisioning_root,
            provisioning_end2end,
            defaultInterTabSettings,
            waitsFor) {
            var IntegrationUtils = {};
            var currentlyRunningWebWorkerCC;
            var workerReady = {}, workerStarted = {}, workerFinished = {}, worker = {}, workerId =
                    0, queuedLogs = {};
            var joynr;

            IntegrationUtils.log = function log(msg, id) {
                if (joynr !== undefined) {
                    var logger = joynr.logging.getLogger(id);
                    logger.log(joynr.logging.getLogLevel(msg.level), [msg.message]);
                } else {
                    if (queuedLogs[id] === undefined) {
                        queuedLogs[id] = [];
                    }
                    queuedLogs[id].push(msg);
                }
            };

            IntegrationUtils.initialize = function initialize(asynclib) {
                joynr = asynclib;
                IntegrationUtils.messagingQos = new joynr.messaging.MessagingQos({
                    ttl : provisioning_root.ttl
                });

                var queuedMsgs, id, msg;
                for (id in queuedLogs) {
                    if (queuedLogs.hasOwnProperty(id)) {
{'fraction_non_alphanumeric': 0.09517629245078953, 'fraction_numerical': 0.006921912178239239, 'mean_word_length': 1.7409602845287493, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7059594', 'n_tokens_mistral': 1262, 'n_tokens_neox': 1182, 'n_words': 326}