CaffGeek/MBACNationals

View on GitHub
Web.Admin/z-scripts/ai.0.15.0-build46802.js

Summary

Maintainability
F
1 mo
Test Coverage

File ai.0.15.0-build46802.js has 2530 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var Microsoft;
(function (Microsoft) {
    var ApplicationInsights;
    (function (ApplicationInsights) {
        (function (LoggingSeverity) {
Severity: Major
Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 wk to fix

    Function AppInsights has 231 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            var AppInsights = (function () {
                function AppInsights(config) {
                    var _this = this;
                    this.config = config || {};
                    var defaults = AppInsights.defaultConfig;
    Severity: Major
    Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 day to fix

      Function Util has 219 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              var Util = (function () {
                  function Util() {
                  }
                  Util._getStorageObject = function () {
                      try {
      Severity: Major
      Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 day to fix

        Function TelemetryContext has 209 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                var TelemetryContext = (function () {
                    function TelemetryContext(config) {
                        var _this = this;
                        this._config = config;
                        this._sender = new ApplicationInsights.Sender(config);
        Severity: Major
        Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 day to fix

          Function Serializer has 127 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  var Serializer = (function () {
                      function Serializer() {
                      }
                      Serializer.serialize = function (input) {
                          var output = Serializer._serializeObject(input, "root");
          Severity: Major
          Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 5 hrs to fix

            Function Sender has 112 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    var Sender = (function () {
                        function Sender(config) {
                            this._buffer = [];
                            this._lastSend = 0;
                            this._config = config;
            Severity: Major
            Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 4 hrs to fix

              Function _SessionManager has 103 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          var _SessionManager = (function () {
                              function _SessionManager(config, sessionHandler) {
                                  if (!config) {
                                      config = {};
                                  }
              Severity: Major
              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 4 hrs to fix

                Function Initialization has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        var Initialization = (function () {
                            function Initialization(snippet) {
                                snippet.queue = snippet.queue || [];
                                var config = snippet.config || {};
                                if (config && !config.instrumentationKey) {
                Severity: Major
                Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 4 hrs to fix

                  Function DataSanitizer has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                  var DataSanitizer = (function () {
                                      function DataSanitizer() {
                                      }
                                      DataSanitizer.sanitizeKeyAndAddUniqueness = function (key, map) {
                                          var origLength = key.length;
                  Severity: Major
                  Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 3 hrs to fix

                    Function PageViewPerformance has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                var PageViewPerformance = (function (_super) {
                                    __extends(PageViewPerformance, _super);
                                    function PageViewPerformance(name, url, durationMs, properties, measurements) {
                                        _super.call(this);
                                        this.aiDataContract = {
                    Severity: Major
                    Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 2 hrs to fix

                      Function PageVisitTimeManager has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  var PageVisitTimeManager = (function () {
                                      function PageVisitTimeManager(pageVisitTimeTrackingHandler) {
                                          this.prevPageVisitDataKeyName = "prevPageVisitData";
                                          this.pageVisitTimeTrackingHandler = pageVisitTimeTrackingHandler;
                                      }
                      Severity: Major
                      Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 2 hrs to fix

                        Function _InternalLogging has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                var _InternalLogging = (function () {
                                    function _InternalLogging() {
                                    }
                                    _InternalLogging.throwInternalNonUserActionable = function (severity, message) {
                                        if (this.enableDebugExceptions()) {
                        Severity: Major
                        Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 2 hrs to fix

                          Function _ExceptionDetails has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      var _ExceptionDetails = (function (_super) {
                                          __extends(_ExceptionDetails, _super);
                                          function _ExceptionDetails(exception) {
                                              _super.call(this);
                                              this.aiDataContract = {
                          Severity: Major
                          Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 2 hrs to fix

                            Function User has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                        var User = (function () {
                                            function User(accountId) {
                                                var cookie = ApplicationInsights.Util.getCookie(User.userCookieName);
                                                if (cookie) {
                                                    var params = cookie.split(User.cookieSeparator);
                            Severity: Major
                            Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 2 hrs to fix

                              Function _serializeObject has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                          Serializer._serializeObject = function (source, name) {
                                              var circularReferenceCheck = "__aiCircularRefCheck";
                                              var output = {};
                                              if (!source) {
                                                  ApplicationInsights._InternalLogging.throwInternalUserActionable(0 /* CRITICAL */, "cannot serialize " + name + " because it is null or undefined");
                              Severity: Major
                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 2 hrs to fix

                                Function ContextTagKeys has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    var ContextTagKeys = (function () {
                                        function ContextTagKeys() {
                                            this.applicationVersion = "ai.application.ver";
                                            this.applicationBuild = "ai.application.build";
                                            this.applicationTypeId = "ai.application.typeId";
                                Severity: Major
                                Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 2 hrs to fix

                                  Function ContextTagKeys has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          function ContextTagKeys() {
                                              this.applicationVersion = "ai.application.ver";
                                              this.applicationBuild = "ai.application.build";
                                              this.applicationTypeId = "ai.application.typeId";
                                              this.deviceId = "ai.device.id";
                                  Severity: Major
                                  Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 2 hrs to fix

                                    Function PageViewPerformance has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                                    function PageViewPerformance(name, url, durationMs, properties, measurements) {
                                                        _super.call(this);
                                                        this.aiDataContract = {
                                                            ver: true,
                                                            name: false,
                                    Severity: Minor
                                    Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 hr to fix

                                      Function Exception has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                                  var Exception = (function (_super) {
                                                      __extends(Exception, _super);
                                                      function Exception(exception, handledAt, properties, measurements) {
                                                          _super.call(this);
                                                          this.aiDataContract = {
                                      Severity: Minor
                                      Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 hr to fix

                                        Function _serializeStringMap has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                    Serializer._serializeStringMap = function (map, expectedType, name) {
                                                        var output = undefined;
                                                        if (map) {
                                                            output = {};
                                                            for (var field in map) {
                                        Severity: Minor
                                        Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 hr to fix

                                          Function parseStack has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                                          _ExceptionDetails.prototype.parseStack = function (stack) {
                                                              var parsedStack = undefined;
                                                              if (typeof stack === "string") {
                                                                  var frames = stack.split('\n');
                                                                  parsedStack = [];
                                          Severity: Minor
                                          Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 hr to fix

                                            Function AppInsights has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                        function AppInsights(config) {
                                                            var _this = this;
                                                            this.config = config || {};
                                                            var defaults = AppInsights.defaultConfig;
                                                            if (defaults !== undefined) {
                                            Severity: Minor
                                            Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 hr to fix

                                              Function _applyDeviceContext has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                          TelemetryContext.prototype._applyDeviceContext = function (envelope, deviceContext) {
                                                              var tagKeys = new AI.ContextTagKeys();
                                                              if (deviceContext) {
                                                                  if (typeof deviceContext.id === "string") {
                                                                      envelope.tags[tagKeys.deviceId] = deviceContext.id;
                                              Severity: Minor
                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 hr to fix

                                                Function _track has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                            TelemetryContext.prototype._track = function (envelope) {
                                                                if (this.session) {
                                                                    if (typeof this.session.id === "string") {
                                                                        this._applySessionContext(envelope, this.session);
                                                                    }
                                                Severity: Minor
                                                Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 hr to fix

                                                  Function _StackFrame has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                              var _StackFrame = (function (_super) {
                                                                  __extends(_StackFrame, _super);
                                                                  function _StackFrame(frame, level) {
                                                                      _super.call(this);
                                                                      this.sizeInBytes = 0;
                                                  Severity: Minor
                                                  Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 hr to fix

                                                    Function User has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                                    function User(accountId) {
                                                                        var cookie = ApplicationInsights.Util.getCookie(User.userCookieName);
                                                                        if (cookie) {
                                                                            var params = cookie.split(User.cookieSeparator);
                                                                            if (params.length > 0) {
                                                    Severity: Minor
                                                    Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 hr to fix

                                                      Function initializeAppInsights has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                      function initializeAppInsights() {
                                                          try {
                                                              if (typeof window !== "undefined" && typeof JSON !== "undefined") {
                                                                  var aiName = "appInsights";
                                                                  if (window[aiName] === undefined) {
                                                      Severity: Minor
                                                      Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 hr to fix

                                                      Cognitive Complexity

                                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                      A method's cognitive complexity is based on a few simple rules:

                                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                      • Code is considered more complex for each "break in the linear flow of the code"
                                                      • Code is considered more complex when "flow breaking structures are nested"

                                                      Further reading

                                                      Function trackPageViewInternal has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                                  AppInsights.prototype.trackPageViewInternal = function (name, url, properties, measurements) {
                                                                      var _this = this;
                                                                      var durationMs = 0;
                                                                      if (ApplicationInsights.Telemetry.PageViewPerformance.isPerformanceTimingSupported()) {
                                                                          var startTime = window.performance.timing.navigationStart;
                                                      Severity: Minor
                                                      Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 hr to fix

                                                        Function CreateSimpleException has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                        Open

                                                                        Exception.CreateSimpleException = function (message, typeName, assembly, fileName, details, line, handledAt) {
                                                        Severity: Major
                                                        Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 50 mins to fix

                                                          Function trackMetric has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                          Open

                                                                      AppInsights.prototype.trackMetric = function (name, average, sampleCount, min, max, properties) {
                                                          Severity: Minor
                                                          Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 45 mins to fix

                                                            Function Metric has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                            Open

                                                                            function Metric(name, value, count, min, max, properties) {
                                                            Severity: Minor
                                                            Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                                          if (value === undefined) {
                                                                                              output[field] = "undefined";
                                                                                          }
                                                                                          else if (value === null) {
                                                                                              output[field] = "null";
                                                              Severity: Major
                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 45 mins to fix

                                                                Function isCrossOriginError has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                Open

                                                                            Util.isCrossOriginError = function (message, url, lineNumber, columnNumber, error) {
                                                                Severity: Minor
                                                                Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 35 mins to fix

                                                                  Function PageView has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                  Open

                                                                                  function PageView(name, url, durationMs, properties, measurements) {
                                                                  Severity: Minor
                                                                  Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 35 mins to fix

                                                                    Function action has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                    Open

                                                                                    this._pageTracking.action = function (name, url, duration, properties, measurements) {
                                                                    Severity: Minor
                                                                    Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 35 mins to fix

                                                                      Function sendPageViewInternal has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                      Open

                                                                                  AppInsights.prototype.sendPageViewInternal = function (name, url, duration, properties, measurements) {
                                                                      Severity: Minor
                                                                      Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 35 mins to fix

                                                                        Function action has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                        Open

                                                                                        this._eventTracking.action = function (name, url, duration, properties, measurements) {
                                                                        Severity: Minor
                                                                        Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 35 mins to fix

                                                                          Function PageViewPerformance has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                          Open

                                                                                          function PageViewPerformance(name, url, durationMs, properties, measurements) {
                                                                          Severity: Minor
                                                                          Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 35 mins to fix

                                                                            Function _onerror has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                            Open

                                                                                        AppInsights.prototype._onerror = function (message, url, lineNumber, columnNumber, error) {
                                                                            Severity: Minor
                                                                            Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 35 mins to fix

                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                              Open

                                                                              (function (Microsoft) {
                                                                                  var ApplicationInsights;
                                                                                  (function (ApplicationInsights) {
                                                                                      var Context;
                                                                                      (function (Context) {
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 2 other locations - About 5 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 609..623
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 696..710

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 136.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                              Open

                                                                              (function (Microsoft) {
                                                                                  var ApplicationInsights;
                                                                                  (function (ApplicationInsights) {
                                                                                      var Context;
                                                                                      (function (Context) {
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 2 other locations - About 5 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 663..677
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 696..710

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 136.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                              Open

                                                                              (function (Microsoft) {
                                                                                  var ApplicationInsights;
                                                                                  (function (ApplicationInsights) {
                                                                                      var Context;
                                                                                      (function (Context) {
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 2 other locations - About 5 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 609..623
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 663..677

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 136.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                              Open

                                                                                          TelemetryContext.prototype._applyApplicationContext = function (envelope, appContext) {
                                                                                              if (appContext) {
                                                                                                  var tagKeys = new AI.ContextTagKeys();
                                                                                                  if (typeof appContext.ver === "string") {
                                                                                                      envelope.tags[tagKeys.applicationVersion] = appContext.ver;
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 2 other locations - About 4 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1885..1895
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1932..1942

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 123.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                              Open

                                                                                          TelemetryContext.prototype._applySessionContext = function (envelope, sessionContext) {
                                                                                              if (sessionContext) {
                                                                                                  var tagKeys = new AI.ContextTagKeys();
                                                                                                  if (typeof sessionContext.id === "string") {
                                                                                                      envelope.tags[tagKeys.sessionId] = sessionContext.id;
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 2 other locations - About 4 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1836..1846
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1885..1895

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 123.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                              Open

                                                                                          TelemetryContext.prototype._applyInternalContext = function (envelope, internalContext) {
                                                                                              if (internalContext) {
                                                                                                  var tagKeys = new AI.ContextTagKeys();
                                                                                                  if (typeof internalContext.agentVersion === "string") {
                                                                                                      envelope.tags[tagKeys.internalAgentVersion] = internalContext.agentVersion;
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 2 other locations - About 4 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1836..1846
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1932..1942

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 123.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                              (function (AI) {
                                                                                  "use strict";
                                                                                  var EventData = (function (_super) {
                                                                                      __extends(EventData, _super);
                                                                                      function EventData() {
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 4 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 2435..2448

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 122.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                              (function (AI) {
                                                                                  "use strict";
                                                                                  var RequestData = (function (_super) {
                                                                                      __extends(RequestData, _super);
                                                                                      function RequestData() {
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 4 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1234..1247

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 122.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                              (function (AI) {
                                                                                  "use strict";
                                                                                  (function (DependencyKind) {
                                                                                      DependencyKind[DependencyKind["SQL"] = 0] = "SQL";
                                                                                      DependencyKind[DependencyKind["Http"] = 1] = "Http";
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 4 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 2407..2415

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 119.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                              (function (AI) {
                                                                                  "use strict";
                                                                                  (function (DependencySourceType) {
                                                                                      DependencySourceType[DependencySourceType["Undefined"] = 0] = "Undefined";
                                                                                      DependencySourceType[DependencySourceType["Aic"] = 1] = "Aic";
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 4 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 2397..2405

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 119.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                              Open

                                                                              (function (AI) {
                                                                                  "use strict";
                                                                                  var PageViewData = (function (_super) {
                                                                                      __extends(PageViewData, _super);
                                                                                      function PageViewData() {
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 2 other locations - About 4 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1613..1626
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 2382..2395

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 118.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                              Open

                                                                              (function (AI) {
                                                                                  "use strict";
                                                                                  var AjaxCallData = (function (_super) {
                                                                                      __extends(AjaxCallData, _super);
                                                                                      function AjaxCallData() {
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 2 other locations - About 4 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1563..1576
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1613..1626

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 118.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                              Open

                                                                              (function (AI) {
                                                                                  "use strict";
                                                                                  var PageViewPerfData = (function (_super) {
                                                                                      __extends(PageViewPerfData, _super);
                                                                                      function PageViewPerfData() {
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 2 other locations - About 4 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1563..1576
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 2382..2395

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 118.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                          Util.setStorage = function (name, data) {
                                                                                              var storage = Util._getStorageObject();
                                                                                              if (storage !== null) {
                                                                                                  try {
                                                                                                      storage.setItem(name, data);
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 3 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 170..182

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 107.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                          Util.setSessionStorage = function (name, data) {
                                                                                              var storage = Util._getSessionStorageObject();
                                                                                              if (storage !== null) {
                                                                                                  try {
                                                                                                      storage.setItem(name, data);
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 3 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 115..127

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 107.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                          Util.removeSessionStorage = function (name) {
                                                                                              var storage = Util._getSessionStorageObject();
                                                                                              if (storage !== null) {
                                                                                                  try {
                                                                                                      storage.removeItem(name);
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 3 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 128..140

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 105.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                          Util.removeStorage = function (name) {
                                                                                              var storage = Util._getStorageObject();
                                                                                              if (storage !== null) {
                                                                                                  try {
                                                                                                      storage.removeItem(name);
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 3 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 183..195

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 105.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                              Open

                                                                                                  DataSanitizer.sanitizeUrl = function (url) {
                                                                                                      if (url) {
                                                                                                          if (url.length > DataSanitizer.MAX_URL_LENGTH) {
                                                                                                              url = url.substring(0, DataSanitizer.MAX_URL_LENGTH);
                                                                                                              ApplicationInsights._InternalLogging.throwInternalUserActionable(1 /* WARNING */, "url is too long, it has been trucated to " + DataSanitizer.MAX_URL_LENGTH + " characters. url: " + url);
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 2 other locations - About 3 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1145..1153
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1154..1162

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 102.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                              Open

                                                                                                  DataSanitizer.sanitizeException = function (exception) {
                                                                                                      if (exception) {
                                                                                                          if (exception.length > DataSanitizer.MAX_EXCEPTION_LENGTH) {
                                                                                                              exception = exception.substring(0, DataSanitizer.MAX_EXCEPTION_LENGTH);
                                                                                                              ApplicationInsights._InternalLogging.throwInternalUserActionable(1 /* WARNING */, "exception is too long, iit has been trucated to " + DataSanitizer.MAX_EXCEPTION_LENGTH + " characters.  exception: " + exception);
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 2 other locations - About 3 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1136..1144
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1145..1153

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 102.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                          Util.getStorage = function (name) {
                                                                                              var storage = Util._getStorageObject();
                                                                                              if (storage !== null) {
                                                                                                  try {
                                                                                                      return storage.getItem(name);
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 3 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 158..169

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 102.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                              Open

                                                                                                  DataSanitizer.sanitizeMessage = function (message) {
                                                                                                      if (message) {
                                                                                                          if (message.length > DataSanitizer.MAX_MESSAGE_LENGTH) {
                                                                                                              message = message.substring(0, DataSanitizer.MAX_MESSAGE_LENGTH);
                                                                                                              ApplicationInsights._InternalLogging.throwInternalUserActionable(1 /* WARNING */, "message is too long, it has been trucated to " + DataSanitizer.MAX_MESSAGE_LENGTH + " characters.  message: " + message);
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 2 other locations - About 3 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1136..1144
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1154..1162

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 102.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                          Util.getSessionStorage = function (name) {
                                                                                              var storage = Util._getSessionStorageObject();
                                                                                              if (storage !== null) {
                                                                                                  try {
                                                                                                      return storage.getItem(name);
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 3 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 103..114

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 102.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                              (function (AI) {
                                                                                  "use strict";
                                                                                  (function (DataPointType) {
                                                                                      DataPointType[DataPointType["Measurement"] = 0] = "Measurement";
                                                                                      DataPointType[DataPointType["Aggregation"] = 1] = "Aggregation";
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 3 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 712..719

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 100.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                              (function (AI) {
                                                                                  "use strict";
                                                                                  (function (SessionState) {
                                                                                      SessionState[SessionState["Start"] = 0] = "Start";
                                                                                      SessionState[SessionState["End"] = 1] = "End";
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 3 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1480..1487

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 100.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                              (function (Microsoft) {
                                                                                  var Telemetry;
                                                                                  (function (Telemetry) {
                                                                                      "use strict";
                                                                                      var Domain = (function () {
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 3 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 458..469

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 97.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                              (function (Microsoft) {
                                                                                  var Telemetry;
                                                                                  (function (Telemetry) {
                                                                                      "use strict";
                                                                                      var Base = (function () {
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 3 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1048..1059

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 97.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                                      if (params.length > 2) {
                                                                                                          var renewal = +params[2];
                                                                                                          this.automaticSession.renewalDate = +new Date(renewal);
                                                                                                          this.automaticSession.renewalDate = this.automaticSession.renewalDate > 0 ? this.automaticSession.renewalDate : 0;
                                                                                                      }
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 2 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 792..796

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 90.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                                      if (params.length > 1) {
                                                                                                          var acq = +params[1];
                                                                                                          this.automaticSession.acquisitionDate = +new Date(acq);
                                                                                                          this.automaticSession.acquisitionDate = this.automaticSession.acquisitionDate > 0 ? this.automaticSession.acquisitionDate : 0;
                                                                                                      }
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 2 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 797..801

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 90.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                          AppInsights.prototype.flush = function () {
                                                                                              try {
                                                                                                  this.context._sender.triggerSend();
                                                                                              }
                                                                                              catch (e) {
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 2 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 2314..2321

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 88.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                          AppInsights.prototype.clearAuthenticatedUserContext = function () {
                                                                                              try {
                                                                                                  this.context.user.clearAuthenticatedUserContext();
                                                                                              }
                                                                                              catch (e) {
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 2 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 2298..2305

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 88.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                          TelemetryContext.prototype._applySampleContext = function (envelope, sampleContext) {
                                                                                              if (sampleContext) {
                                                                                                  var tagKeys = new AI.ContextTagKeys();
                                                                                                  if (typeof sampleContext.sampleRate === "string") {
                                                                                                      envelope.tags[tagKeys.sampleRate] = sampleContext.sampleRate;
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 2 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1896..1903

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 83.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                          TelemetryContext.prototype._applyLocationContext = function (envelope, locationContext) {
                                                                                              if (locationContext) {
                                                                                                  var tagKeys = new AI.ContextTagKeys();
                                                                                                  if (typeof locationContext.ip === "string") {
                                                                                                      envelope.tags[tagKeys.locationIp] = locationContext.ip;
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 2 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1924..1931

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 83.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                          Util._getSessionStorageObject = function () {
                                                                                              try {
                                                                                                  if (window.sessionStorage) {
                                                                                                      return window.sessionStorage;
                                                                                                  }
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 2 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 86..99

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 77.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                          Util._getStorageObject = function () {
                                                                                              try {
                                                                                                  if (window.localStorage) {
                                                                                                      return window.localStorage;
                                                                                                  }
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 2 hrs to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 141..154

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 77.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                          _InternalLogging.throwInternalNonUserActionable = function (severity, message) {
                                                                                              if (this.enableDebugExceptions()) {
                                                                                                  throw message;
                                                                                              }
                                                                                              else {
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 1 hr to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 22..30

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 70.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                          _InternalLogging.throwInternalUserActionable = function (severity, message) {
                                                                                              if (this.enableDebugExceptions()) {
                                                                                                  throw message;
                                                                                              }
                                                                                              else {
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 1 hr to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 13..21

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 70.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                              if (isNaN(start)) {
                                                                                                  ApplicationInsights._InternalLogging.throwInternalUserActionable(1 /* WARNING */, "stop" + this._name + " was called without a corresponding start" + this._name + " . Event name is '" + name + "'");
                                                                                              }
                                                                                              else {
                                                                                                  var end = +new Date;
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 1 hr to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 2359..2361

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 56.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                              if (typeof this._events[name] !== "undefined") {
                                                                                                  ApplicationInsights._InternalLogging.throwInternalUserActionable(1 /* WARNING */, "start" + this._name + " was called more than once for this event without calling stop" + this._name + ". key is '" + name + "'");
                                                                                              }
                                                                              Severity: Major
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 1 hr to fix
                                                                              Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 2366..2373

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 56.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                              Open

                                                                                              if (objectTypeDump === "[object Error]") {
                                                                                                  propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
                                                                                              }
                                                                              Severity: Minor
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 2 other locations - About 35 mins to fix
                                                                              Web.Admin/2014/wordpress/wp-includes/js/tinymce/plugins/media/plugin.js on lines 241..274
                                                                              Web.Admin/2014/wordpress/wp-includes/js/tinymce/plugins/media/plugin.js on lines 246..248

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 47.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                              Open

                                                                                                      else if (total < Math.floor(network) + Math.floor(request) + Math.floor(response) + Math.floor(dom)) {
                                                                              Severity: Minor
                                                                              Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 35 mins to fix
                                                                              Web.Admin/z-scripts/FileAPI.js on lines 1473..1473

                                                                              Duplicated Code

                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                              Tuning

                                                                              This issue has a mass of 46.

                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                              Refactorings

                                                                              Further Reading

                                                                              There are no issues that match your filters.

                                                                              Category
                                                                              Status