Undev/redmine-stuff-to-do-plugin

View on GitHub
assets/javascripts/ui/ui.datepicker.js

Summary

Maintainability
F
2 wks
Test Coverage

File ui.datepicker.js has 1470 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * jQuery UI Datepicker @VERSION
 *
 * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
Severity: Major
Found in assets/javascripts/ui/ui.datepicker.js - About 3 days to fix

    Function _generateHTML has 189 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _generateHTML: function(inst) {
            var today = new Date();
            today = this._daylightSavingAdjust(
                new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
            var showStatus = this._get(inst, 'showStatus');
    Severity: Major
    Found in assets/javascripts/ui/ui.datepicker.js - About 7 hrs to fix

      Function parseDate has 119 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          parseDate: function (format, value, settings) {
              if (format == null || value == null)
                  throw 'Invalid arguments';
              value = (typeof value == 'object' ? value.toString() : value + '');
              if (value == '')
      Severity: Major
      Found in assets/javascripts/ui/ui.datepicker.js - About 4 hrs to fix

        Function Datepicker has 97 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function Datepicker() {
            this.debug = false; // Change this to true to start debugging
            this._curInst = null; // The current instance in use
            this._keyEvent = false; // If the last event was a key event
            this._disabledInputs = []; // List of date picker inputs that have been disabled
        Severity: Major
        Found in assets/javascripts/ui/ui.datepicker.js - About 3 hrs to fix

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

              formatDate: function (format, date, settings) {
                  if (!date)
                      return '';
                  var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
                  var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
          Severity: Major
          Found in assets/javascripts/ui/ui.datepicker.js - About 2 hrs to fix

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

                _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
                        selectedDate, secondary, showStatus, initStatus, monthNames) {
                    minDate = (inst.rangeStart && minDate && selectedDate < minDate ? selectedDate : minDate);
                    var changeMonth = this._get(inst, 'changeMonth');
                    var changeYear = this._get(inst, 'changeYear');
            Severity: Major
            Found in assets/javascripts/ui/ui.datepicker.js - About 2 hrs to fix

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

                  _doKeyDown: function(event) {
                      var inst = $.datepicker._getInst(event.target);
                      var handled = true;
                      inst._keyEvent = true;
                      if ($.datepicker._datepickerShowing)
              Severity: Major
              Found in assets/javascripts/ui/ui.datepicker.js - About 2 hrs to fix

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

                    _showDatepicker: function(input) {
                        input = input.target || input;
                        if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
                            input = $('input', input.parentNode)[0];
                        if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
                Severity: Major
                Found in assets/javascripts/ui/ui.datepicker.js - About 2 hrs to fix

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

                      _determineDate: function(date, defaultDate) {
                          var offsetNumeric = function(offset) {
                              var date = new Date();
                              date.setDate(date.getDate() + offset);
                              return date;
                  Severity: Minor
                  Found in assets/javascripts/ui/ui.datepicker.js - About 1 hr to fix

                    Function _hideDatepicker has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _hideDatepicker: function(input, duration) {
                            var inst = this._curInst;
                            if (!inst || (input && inst != $.data(input, PROP_NAME)))
                                return;
                            var rangeSelect = this._get(inst, 'rangeSelect');
                    Severity: Minor
                    Found in assets/javascripts/ui/ui.datepicker.js - About 1 hr to fix

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

                          _selectDay: function(id, month, year, td) {
                              if ($(td).hasClass(this._unselectableClass))
                                  return;
                              var target = $(id);
                              var inst = this._getInst(target[0]);
                      Severity: Minor
                      Found in assets/javascripts/ui/ui.datepicker.js - About 1 hr to fix

                        Function _connectDatepicker has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            _connectDatepicker: function(target, inst) {
                                var input = $(target);
                                if (input.hasClass(this.markerClassName))
                                    return;
                                var appendText = this._get(inst, 'appendText');
                        Severity: Minor
                        Found in assets/javascripts/ui/ui.datepicker.js - About 1 hr to fix

                          Function _generateMonthYearHeader has 10 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
                                      selectedDate, secondary, showStatus, initStatus, monthNames) {
                          Severity: Major
                          Found in assets/javascripts/ui/ui.datepicker.js - About 1 hr to fix

                            Function _dialogDatepicker has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                _dialogDatepicker: function(input, dateText, onSelect, settings, pos) {
                                    var inst = this._dialogInst; // internal instance
                                    if (!inst) {
                                        var id = 'dp' + (++this.uuid);
                                        this._dialogInput = $('<input type="text" id="' + id +
                            Severity: Minor
                            Found in assets/javascripts/ui/ui.datepicker.js - About 1 hr to fix

                              Function _disableDatepicker has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  _disableDatepicker: function(target) {
                                      var $target = $(target);
                                      if (!$target.hasClass(this.markerClassName)) {
                                          return;
                                      }
                              Severity: Minor
                              Found in assets/javascripts/ui/ui.datepicker.js - About 1 hr to fix

                                Function _setDateFromField has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    _setDateFromField: function(inst) {
                                        var dateFormat = this._get(inst, 'dateFormat');
                                        var dates = inst.input ? inst.input.val().split(this._get(inst, 'rangeSeparator')) : null;
                                        inst.endDay = inst.endMonth = inst.endYear = null;
                                        var date = defaultDate = this._getDefaultDate(inst);
                                Severity: Minor
                                Found in assets/javascripts/ui/ui.datepicker.js - About 1 hr to fix

                                  Function _setDate has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      _setDate: function(inst, date, endDate) {
                                          var clear = !(date);
                                          var origMonth = inst.selectedMonth;
                                          var origYear = inst.selectedYear;
                                          date = this._determineDate(date, new Date());
                                  Severity: Minor
                                  Found in assets/javascripts/ui/ui.datepicker.js - About 1 hr to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                            if (!this._pos) {
                                                var browserWidth = window.innerWidth || document.documentElement.clientWidth ||    document.body.clientWidth;
                                                var browserHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
                                                var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
                                                var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
                                    Severity: Major
                                    Found in assets/javascripts/ui/ui.datepicker.js - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                              if ($.datepicker._datepickerShowing)
                                                  switch (event.keyCode) {
                                                      case 9:  $.datepicker._hideDatepicker(null, '');
                                                              break; // hide on tab out
                                                      case 13: var sel = $('td.' + $.datepicker._dayOverClass +
                                      Severity: Major
                                      Found in assets/javascripts/ui/ui.datepicker.js - About 1 hr to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                    for (var m = date.getMonth() - 1; m >= 0; m--)
                                                                        doy += this._getDaysInMonth(date.getFullYear(), m);
                                        Severity: Major
                                        Found in assets/javascripts/ui/ui.datepicker.js - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                                      if (lookAhead("'"))
                                                                          output += "'";
                                                                      else
                                                                          literal = true;
                                          Severity: Major
                                          Found in assets/javascripts/ui/ui.datepicker.js - About 45 mins to fix

                                            Consider simplifying this complex logical expression.
                                            Open

                                                    if (($target.parents('#' + $.datepicker._mainDivId).length == 0) &&
                                                            !$target.hasClass($.datepicker.markerClassName) &&
                                                            !$target.hasClass($.datepicker._triggerClass) &&
                                                            $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI))
                                                        $.datepicker._hideDatepicker(null, '');
                                            Severity: Major
                                            Found in assets/javascripts/ui/ui.datepicker.js - About 40 mins to fix

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

                                                  _dialogDatepicker: function(input, dateText, onSelect, settings, pos) {
                                              Severity: Minor
                                              Found in assets/javascripts/ui/ui.datepicker.js - About 35 mins to fix

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

                                                                case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -1, 'D');
                                                                        handled = event.ctrlKey || event.metaKey;
                                                                        // -1 day on ctrl or command +left
                                                                        if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
                                                                                    -$.datepicker._get(inst, 'stepBigMonths') :
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 5 hrs to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 513..520

                                                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 146.

                                                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

                                                                case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +1, 'D');
                                                                        handled = event.ctrlKey || event.metaKey;
                                                                        // +1 day on ctrl or command +right
                                                                        if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
                                                                                    +$.datepicker._get(inst, 'stepBigMonths') :
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 5 hrs to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 502..509

                                                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 146.

                                                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 (nodeName == 'input') {
                                                        target.disabled = false;
                                                            $target.siblings('button.' + this._triggerClass).
                                                            each(function() { this.disabled = false; }).end().
                                                                siblings('img.' + this._triggerClass).
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 3 hrs to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 348..370

                                                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

                                                        if (nodeName == 'input') {
                                                        target.disabled = true;
                                                            $target.siblings('button.' + this._triggerClass).
                                                            each(function() { this.disabled = true; }).end().
                                                                siblings('img.' + this._triggerClass).
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 3 hrs to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 326..335

                                                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

                                                            html += '<select class="ui-datepicker-new-year" ' +
                                                                'onchange="jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
                                                                'onclick="jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
                                                                this._addStatus(showStatus, inst.id, this._get(inst, 'yearStatus'), initStatus) + '>';
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 1 hr to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 1553..1556

                                                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 71.

                                                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

                                                            monthHtml += '<select class="ui-datepicker-new-month" ' +
                                                                'onchange="jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
                                                                'onclick="jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
                                                                this._addStatus(showStatus, inst.id, this._get(inst, 'monthStatus'), initStatus) + '>';
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 1 hr to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 1589..1592

                                                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 71.

                                                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

                                                                case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
                                                                            -$.datepicker._get(inst, 'stepBigMonths') :
                                                                            -$.datepicker._get(inst, 'stepMonths')), 'M');
                                                                        break; // previous month/year on page up/+ ctrl
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 1 hr to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 492..495

                                                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

                                                                case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
                                                                            +$.datepicker._get(inst, 'stepBigMonths') :
                                                                            +$.datepicker._get(inst, 'stepMonths')), 'M');
                                                                        break; // next month/year on page down/+ ctrl
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 1 hr to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 488..491

                                                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

                                                        var lookAhead = function(match) {
                                                            var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
                                                            if (matches)
                                                                iFormat++;
                                                            return matches;
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 1 hr to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 943..948

                                                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 68.

                                                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

                                                        var lookAhead = function(match) {
                                                            var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
                                                            if (matches)
                                                                iFormat++;
                                                            return matches;
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 1 hr to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 1099..1104

                                                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 68.

                                                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

                                                            (showBigPrevNext ? '<a onclick="jQuery.datepicker._adjustDate(\'#' + inst.id + '\', -' + stepBigMonths + ', \'M\');"' +
                                                            this._addStatus(showStatus, inst.id, this._get(inst, 'prevBigStatus'), initStatus) + '>' + prevBigText + '</a>' : '') +
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 1 hr to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 1418..1419

                                                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 67.

                                                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

                                                            (showBigPrevNext ? '<a onclick="jQuery.datepicker._adjustDate(\'#' + inst.id + '\', +' + stepBigMonths + ', \'M\');"' +
                                                            this._addStatus(showStatus, inst.id, this._get(inst, 'nextBigStatus'), initStatus) + '>' + nextBigText + '</a>' : '') :
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 1 hr to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 1401..1402

                                                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 67.

                                                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

                                                                case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');
                                                                        handled = event.ctrlKey || event.metaKey;
                                                                        break; // -1 week on ctrl or command +up
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 1 hr to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 521..523

                                                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 65.

                                                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

                                                                case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');
                                                                        handled = event.ctrlKey || event.metaKey;
                                                                        break; // +1 week on ctrl or command +down
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 1 hr to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 510..512

                                                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 65.

                                                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

                                                                case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);
                                                                        handled = event.ctrlKey || event.metaKey;
                                                                        break; // clear on ctrl or command +end
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 1 hr to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 499..501

                                                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 63.

                                                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

                                                                case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);
                                                                        handled = event.ctrlKey || event.metaKey;
                                                                        break; // current on ctrl or command +home
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 1 hr to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 496..498

                                                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 63.

                                                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 4 locations. Consider refactoring.
                                                Open

                                                        nextBigText = (!navigationAsDateFormat ? nextBigText : this.formatDate(nextBigText,
                                                            this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepBigMonths, 1)),
                                                            this._getFormatConfig(inst)));
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 3 other locations - About 50 mins to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 1393..1395
                                                assets/javascripts/ui/ui.datepicker.js on lines 1397..1399
                                                assets/javascripts/ui/ui.datepicker.js on lines 1408..1410

                                                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 51.

                                                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 4 locations. Consider refactoring.
                                                Open

                                                        nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
                                                            this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
                                                            this._getFormatConfig(inst)));
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 3 other locations - About 50 mins to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 1393..1395
                                                assets/javascripts/ui/ui.datepicker.js on lines 1397..1399
                                                assets/javascripts/ui/ui.datepicker.js on lines 1412..1414

                                                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 51.

                                                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 4 locations. Consider refactoring.
                                                Open

                                                        prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
                                                            this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
                                                            this._getFormatConfig(inst)));
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 3 other locations - About 50 mins to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 1397..1399
                                                assets/javascripts/ui/ui.datepicker.js on lines 1408..1410
                                                assets/javascripts/ui/ui.datepicker.js on lines 1412..1414

                                                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 51.

                                                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 4 locations. Consider refactoring.
                                                Open

                                                        prevBigText = (!navigationAsDateFormat ? prevBigText : this.formatDate(prevBigText,
                                                            this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepBigMonths, 1)),
                                                            this._getFormatConfig(inst)));
                                                Severity: Major
                                                Found in assets/javascripts/ui/ui.datepicker.js and 3 other locations - About 50 mins to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 1393..1395
                                                assets/javascripts/ui/ui.datepicker.js on lines 1408..1410
                                                assets/javascripts/ui/ui.datepicker.js on lines 1412..1414

                                                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 51.

                                                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 (literal)
                                                                if (format.charAt(iFormat) == "'" && !lookAhead("'"))
                                                                    literal = false;
                                                                else
                                                                    chars += format.charAt(iFormat);
                                                Severity: Minor
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 45 mins to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 1121..1161

                                                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 50.

                                                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 (literal)
                                                                    if (format.charAt(iFormat) == "'" && !lookAhead("'"))
                                                                        literal = false;
                                                                    else
                                                                        output += format.charAt(iFormat);
                                                Severity: Minor
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 45 mins to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 1171..1191

                                                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 50.

                                                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 (rangeSelect) {
                                                            inst.endDay = inst.currentDay;
                                                            inst.endMonth = inst.currentMonth;
                                                            inst.endYear = inst.currentYear;
                                                        }
                                                Severity: Minor
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 40 mins to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 1697..1701

                                                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 49.

                                                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 (!day) {
                                                            inst.currentDay = inst.selectedDay;
                                                            inst.currentMonth = inst.selectedMonth;
                                                            inst.currentYear = inst.selectedYear;
                                                        }
                                                Severity: Minor
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 40 mins to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 802..806

                                                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 49.

                                                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

                                                        this._disabledInputs = $.map(this._disabledInputs,
                                                            function(value) { return (value == target ? null : value); }); // delete entry
                                                Severity: Minor
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 30 mins to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 371..372

                                                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 45.

                                                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

                                                        this._disabledInputs = $.map(this._disabledInputs,
                                                            function(value) { return (value == target ? null : value); }); // delete entry
                                                Severity: Minor
                                                Found in assets/javascripts/ui/ui.datepicker.js and 1 other location - About 30 mins to fix
                                                assets/javascripts/ui/ui.datepicker.js on lines 336..337

                                                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 45.

                                                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