wikimedia/mediawiki-core

View on GitHub
resources/lib/jquery.ui/jquery.ui.datepicker.js

Summary

Maintainability
F
2 wks
Test Coverage

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

/*!
 * jQuery UI Datepicker 1.9.2
 * http://jqueryui.com
 *
 * Copyright 2012 jQuery Foundation and other contributors
Severity: Major
Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 4 days to fix

    Function _generateHTML has 163 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 isRTL = this._get(inst, 'isRTL');
    Severity: Major
    Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 6 hrs to fix

      Function parseDate has 134 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 resources/lib/jquery.ui/jquery.ui.datepicker.js - About 5 hrs to fix

        Function Datepicker has 75 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 resources/lib/jquery.ui/jquery.ui.datepicker.js - About 3 hrs to fix

          Function formatDate has 70 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 resources/lib/jquery.ui/jquery.ui.datepicker.js - About 2 hrs to fix

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

                _doKeyDown: function(event) {
                    var inst = $.datepicker._getInst(event.target);
                    var handled = true;
                    var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
                    inst._keyEvent = true;
            Severity: Major
            Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 2 hrs to fix

              Function _showDatepicker has 64 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 resources/lib/jquery.ui/jquery.ui.datepicker.js - About 2 hrs to fix

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

                    _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
                            secondary, monthNames, monthNamesShort) {
                        var changeMonth = this._get(inst, 'changeMonth');
                        var changeYear = this._get(inst, 'changeYear');
                        var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
                Severity: Major
                Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 2 hrs to fix

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

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

                    Consider simplifying this complex logical expression.
                    Open

                            if ( ( ( $target[0].id != $.datepicker._mainDivId &&
                                    $target.parents('#' + $.datepicker._mainDivId).length == 0 &&
                                    !$target.hasClass($.datepicker.markerClassName) &&
                                    !$target.closest("." + $.datepicker._triggerClass).length &&
                                    $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
                    Severity: Critical
                    Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 1 hr to fix

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

                          _attachments: function(input, inst) {
                              var appendText = this._get(inst, 'appendText');
                              var isRTL = this._get(inst, 'isRTL');
                              if (inst.append)
                                  inst.append.remove();
                      Severity: Minor
                      Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 1 hr to fix

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

                            _dialogDatepicker: function(input, date, onSelect, settings, pos) {
                                var inst = this._dialogInst; // internal instance
                                if (!inst) {
                                    this.uuid += 1;
                                    var id = 'dp' + this.uuid;
                        Severity: Minor
                        Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 1 hr to fix

                          Function _updateDatepicker has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              _updateDatepicker: function(inst) {
                                  this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
                                  var borders = $.datepicker._getBorders(inst.dpDiv);
                                  instActive = inst; // for delegate hover events
                                  inst.dpDiv.empty().append(this._generateHTML(inst));
                          Severity: Minor
                          Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 1 hr to fix

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

                                _possibleChars: function (format) {
                                    var chars = '';
                                    var literal = false;
                                    // Check whether a format character is doubled
                                    var lookAhead = function(match) {
                            Severity: Minor
                            Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 1 hr to fix

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

                                  _hideDatepicker: function(input) {
                                      var inst = this._curInst;
                                      if (!inst || (input && inst != $.data(input, PROP_NAME)))
                                          return;
                                      if (this._datepickerShowing) {
                              Severity: Minor
                              Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 1 hr to fix

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

                                        var offsetString = function(offset) {
                                            try {
                                                return $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
                                                    offset, $.datepicker._getFormatConfig(inst));
                                            }
                                Severity: Minor
                                Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 1 hr to fix

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

                                      _attachHandlers: function(inst) {
                                          var stepMonths = this._get(inst, 'stepMonths');
                                          var id = '#' + inst.id.replace( /\\\\/g, "\\" );
                                          inst.dpDiv.find('[data-handler]').map(function () {
                                              var handler = {
                                  Severity: Minor
                                  Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 1 hr to fix

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

                                        _optionDatepicker: function(target, name, value) {
                                            var inst = this._getInst(target);
                                            if (arguments.length == 2 && typeof name == 'string') {
                                                return (name == 'defaults' ? $.extend({}, $.datepicker._defaults) :
                                                    (inst ? (name == 'all' ? $.extend({}, inst.settings) :
                                    Severity: Minor
                                    Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 1 hr to fix

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

                                          _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
                                                  secondary, monthNames, monthNamesShort) {
                                      Severity: Major
                                      Found in resources/lib/jquery.ui/jquery.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();
                                                                handled = false;
                                                                break; // hide on tab out
                                        Severity: Major
                                        Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 1 hr to fix

                                          Avoid deeply nested control flow statements.
                                          Open

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

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                    switch (col) {
                                                                        case 0: calender += ' ui-datepicker-group-first';
                                                                            cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left'); break;
                                                                        case numMonths[1]-1: calender += ' ui-datepicker-group-last';
                                                                            cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right'); break;
                                            Severity: Major
                                            Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 45 mins to fix

                                              Consider simplifying this complex logical expression.
                                              Open

                                                      if (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input &&
                                                              // #6694 - don't focus the input if it's already focused
                                                              // this breaks the change event in IE
                                                              inst.input.is(':visible') && !inst.input.is(':disabled') && inst.input[0] != document.activeElement)
                                                          inst.input.focus();
                                              Severity: Major
                                              Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 40 mins to fix

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

                                                    _dialogDatepicker: function(input, date, onSelect, settings, pos) {
                                                Severity: Minor
                                                Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 35 mins to fix

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

                                                          if (nodeName == 'input') {
                                                              target.disabled = true;
                                                              inst.trigger.filter('button').
                                                                  each(function() { this.disabled = true; }).end().
                                                                  filter('img').css({opacity: '0.5', cursor: 'default'});
                                                  Severity: Major
                                                  Found in resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 7 hrs to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 376..387

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

                                                  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;
                                                              inst.trigger.filter('button').
                                                                  each(function() { this.disabled = false; }).end().
                                                                  filter('img').css({opacity: '1.0', cursor: ''});
                                                  Severity: Major
                                                  Found in resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 7 hrs to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 401..412

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

                                                  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, (isRTL ? -1 : +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 resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 5 hrs to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 565..572

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

                                                  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 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -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 resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 5 hrs to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 576..583

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

                                                  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 prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
                                                              '<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click"' +
                                                              ' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
                                                              (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
                                                  Severity: Major
                                                  Found in resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 3 hrs to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 1495..1498

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

                                                  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 next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
                                                              '<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click"' +
                                                              ' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
                                                              (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
                                                  Severity: Major
                                                  Found in resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 3 hrs to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 1487..1490

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

                                                  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 resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 1 hr to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 551..554

                                                  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 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 resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 1 hr to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 555..558

                                                  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 resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 1 hr to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 1004..1009

                                                  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 resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 1 hr to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 1178..1183

                                                  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

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

                                                              cover.css({left: -borders[0], top: -borders[1], width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
                                                  Severity: Major
                                                  Found in resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 1 hr to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 689..690

                                                  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

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

                                                                      cover.css({left: -borders[0], top: -borders[1],
                                                                          width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()});
                                                  Severity: Major
                                                  Found in resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 1 hr to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 718..718

                                                  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 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 resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 1 hr to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 584..586

                                                  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 resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 1 hr to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 573..575

                                                  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 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 resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 1 hr to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 559..561

                                                  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 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 resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 1 hr to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 562..564

                                                  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

                                                          prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
                                                              this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
                                                              this._getFormatConfig(inst)));
                                                  Severity: Minor
                                                  Found in resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 50 mins to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 1492..1494

                                                  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

                                                          nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
                                                              this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
                                                              this._getFormatConfig(inst)));
                                                  Severity: Minor
                                                  Found in resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 50 mins to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 1484..1486

                                                  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
                                                                          output += format.charAt(iFormat);
                                                  Severity: Minor
                                                  Found in resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 45 mins to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 1258..1278

                                                  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

                                                                      case 'y': case 'Y' :
                                                                          year += parseInt(matches[1],10);
                                                                          day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
                                                                          break;
                                                  Severity: Minor
                                                  Found in resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 45 mins to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 1347..1350

                                                  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

                                                                      case 'm' : case 'M' :
                                                                          month += parseInt(matches[1],10);
                                                                          day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
                                                                          break;
                                                  Severity: Minor
                                                  Found in resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 45 mins to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 1351..1354

                                                  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
                                                                      chars += format.charAt(iFormat);
                                                  Severity: Minor
                                                  Found in resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 45 mins to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 1200..1241

                                                  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

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

                                                      if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'widget'))
                                                          return $.datepicker['_' + options + 'Datepicker'].
                                                              apply($.datepicker, [this[0]].concat(otherArgs));
                                                  Severity: Minor
                                                  Found in resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 35 mins to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 1826..1828

                                                  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

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

                                                      if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
                                                          return $.datepicker['_' + options + 'Datepicker'].
                                                              apply($.datepicker, [this[0]].concat(otherArgs));
                                                  Severity: Minor
                                                  Found in resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 35 mins to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 1823..1825

                                                  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

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

                                                  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 resources/lib/jquery.ui/jquery.ui.datepicker.js and 1 other location - About 30 mins to fix
                                                  resources/lib/jquery.ui/jquery.ui.datepicker.js on lines 413..414

                                                  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