XoopsModules25x/xoopspoll

View on GitHub
assets/js/jquery-ui-timepicker-addon.js

Summary

Maintainability
F
1 mo
Test Coverage

File jquery-ui-timepicker-addon.js has 1782 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*! jQuery Timepicker Addon - v1.6.3 - 2016-04-20
* http://trentrichardson.com/examples/timepicker
* Copyright (c) 2016 Trent Richardson; Licensed MIT */
(function (factory) {
    if (typeof define === 'function' && define.amd) {
Severity: Major
Found in assets/js/jquery-ui-timepicker-addon.js - About 4 days to fix

    Function _limitMinMaxDateTime has 174 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _limitMinMaxDateTime: function (dp_inst, adjustSliders) {
                var o = this._defaults,
                    dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay);
    
                if (!this._defaults.showTimepicker) {
    Severity: Major
    Found in assets/js/jquery-ui-timepicker-addon.js - About 6 hrs to fix

      Function _injectTimePicker has 165 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              _injectTimePicker: function () {
                  var $dp = this.inst.dpDiv,
                      o = this.inst.settings,
                      tp_inst = this,
                      litem = '',
      Severity: Major
      Found in assets/js/jquery-ui-timepicker-addon.js - About 6 hrs to fix

        Function parseTime has 149 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            $.datepicker.parseTime = function (timeFormat, timeString, options) {
                var o = extendRemove(extendRemove({}, $.timepicker._defaults), options || {}),
                    iso8601 = (timeFormat.replace(/\'.*?\'/g, '').indexOf('Z') !== -1);
        
                // Strict parse requires the timeString to match the timeFormat exactly
        Severity: Major
        Found in assets/js/jquery-ui-timepicker-addon.js - About 5 hrs to fix

          Function _newInst has 123 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  _newInst: function ($input, opts) {
                      var tp_inst = new Timepicker(),
                          inlineSettings = {},
                          fns = {},
                          overrides, i;
          Severity: Major
          Found in assets/js/jquery-ui-timepicker-addon.js - About 4 hrs to fix

            Function strictParse has 107 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    var strictParse = function (f, s, o) {
            
                        // pattern for standard and localized AM/PM markers
                        var getPatternAmpm = function (amNames, pmNames) {
                            var markers = [];
            Severity: Major
            Found in assets/js/jquery-ui-timepicker-addon.js - About 4 hrs to fix

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

                      _onTimeChange: function () {
                          if (!this._defaults.showTimepicker) {
                                              return;
                          }
                          var hour = (this.hour_slider) ? this.control.value(this, this.hour_slider, 'hour') : false,
              Severity: Major
              Found in assets/js/jquery-ui-timepicker-addon.js - About 4 hrs to fix

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

                    $.datepicker._optionDatepicker = function (target, name, value) {
                        var inst = this._getInst(target),
                            name_clone;
                        if (!inst) {
                            return null;
                Severity: Major
                Found in assets/js/jquery-ui-timepicker-addon.js - About 3 hrs to fix

                  Function Timepicker has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      var Timepicker = function () {
                          this.regional = []; // Available regional settings, indexed by language code
                          this.regional[''] = { // Default regional settings
                              currentText: 'Now',
                              closeText: 'Done',
                  Severity: Major
                  Found in assets/js/jquery-ui-timepicker-addon.js - About 3 hrs to fix

                    Function handleRange has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        $.timepicker.handleRange = function (method, startTime, endTime, options) {
                            options = $.extend({}, {
                                minInterval: 0, // min allowed interval in milliseconds
                                maxInterval: 0, // max allowed interval in milliseconds
                                start: {},      // options for start picker
                    Severity: Major
                    Found in assets/js/jquery-ui-timepicker-addon.js - About 2 hrs to fix

                      Function formatTime has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          $.datepicker.formatTime = function (format, time, options) {
                              options = options || {};
                              options = $.extend({}, $.timepicker._defaults, options);
                              time = $.extend({
                                  hour: 0,
                      Severity: Major
                      Found in assets/js/jquery-ui-timepicker-addon.js - About 2 hrs to fix

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

                                _updateDateTime: function (dp_inst) {
                                    dp_inst = this.inst || dp_inst;
                                    var dtTmp = (dp_inst.currentYear > 0?
                                                    new Date(dp_inst.currentYear, dp_inst.currentMonth, dp_inst.currentDay) :
                                                    new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),
                        Severity: Major
                        Found in assets/js/jquery-ui-timepicker-addon.js - About 2 hrs to fix

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

                              $.datepicker._getDateDatepicker = function (target, noDefault) {
                                  var inst = this._getInst(target);
                                  if (!inst) {
                                      return;
                                  }
                          Severity: Minor
                          Found in assets/js/jquery-ui-timepicker-addon.js - About 1 hr to fix

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

                                $.datepicker._setDateDatepicker = function (target, _date) {
                                    var inst = this._getInst(target);
                                    var date = _date;
                                    if (!inst) {
                                        return;
                            Severity: Minor
                            Found in assets/js/jquery-ui-timepicker-addon.js - About 1 hr to fix

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

                                      var looseParse = function (f, s, o) {
                                          try {
                                              var d = new Date('2012-01-01 ' + s);
                                              if (isNaN(d.getTime())) {
                                                  d = new Date('2012-01-01T' + s);
                              Severity: Minor
                              Found in assets/js/jquery-ui-timepicker-addon.js - About 1 hr to fix

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

                                        _parseTime: function (timeString, withDate) {
                                            if (!this.inst) {
                                                this.inst = $.datepicker._getInst(this.$input[0]);
                                            }
                                
                                
                                Severity: Minor
                                Found in assets/js/jquery-ui-timepicker-addon.js - About 1 hr to fix

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

                                      $.datepicker._updateAlternate = function (inst) {
                                          var tp_inst = this._get(inst, 'timepicker');
                                          if (tp_inst) {
                                              var altField = tp_inst._defaults.altField;
                                              if (altField) { // update alternate field too
                                  Severity: Minor
                                  Found in assets/js/jquery-ui-timepicker-addon.js - About 1 hr to fix

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

                                                    create: function (tp_inst, obj, unit, val, min, max, step) {
                                    Severity: Major
                                    Found in assets/js/jquery-ui-timepicker-addon.js - About 50 mins to fix

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

                                                      create: function (tp_inst, obj, unit, val, min, max, step) {
                                      Severity: Major
                                      Found in assets/js/jquery-ui-timepicker-addon.js - About 50 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                            if (overrides.hasOwnProperty(prop) && name[prop]) {
                                                                fns[prop] = name[prop];
                                                            }
                                        Severity: Major
                                        Found in assets/js/jquery-ui-timepicker-addon.js - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                                      for (var h = o[litem + 'Min']; h <= max[litem]; h += parseInt(o[litem + 'Grid'], 10)) {
                                                                          gridSize[litem]++;
                                                                          var tmph = $.datepicker.formatTime(this.support.ampm ? 'hht' : 'HH', {hour: h}, o);
                                                                          html += '<td data-for="' + litem + '">' + tmph + '</td>';
                                                                      }
                                          Severity: Major
                                          Found in assets/js/jquery-ui-timepicker-addon.js - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                        if (this.second <= this._defaults.secondMin) {
                                                                            this.second = this._defaults.secondMin;
                                                                            this._defaults.millisecMin = minDateTime.getMilliseconds();
                                                                            if (this.millisec <= this._defaults.millisecMin) {
                                                                                this.millisec = this._defaults.millisecMin;
                                            Severity: Major
                                            Found in assets/js/jquery-ui-timepicker-addon.js - About 45 mins to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                                  if (ap.indexOf('p') !== -1 && n < 12) {
                                                                                      n += 12;
                                                                                  }
                                                                                  else {
                                                                                      if (ap.indexOf('a') !== -1 && n === 12) {
                                              Severity: Major
                                              Found in assets/js/jquery-ui-timepicker-addon.js - About 45 mins to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                            if (this.second >= this._defaults.secondMax) {
                                                                                this.second = this._defaults.secondMax;
                                                                                this._defaults.millisecMax = maxDateTime.getMilliseconds();
                                                                                if (this.millisec >= this._defaults.millisecMax) {
                                                                                    this.millisec = this._defaults.millisecMax;
                                                Severity: Major
                                                Found in assets/js/jquery-ui-timepicker-addon.js - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                              for (var m = o[litem + 'Min']; m <= max[litem]; m += parseInt(o[litem + 'Grid'], 10)) {
                                                                                  gridSize[litem]++;
                                                                                  html += '<td data-for="' + litem + '">' + ((m < 10) ? '0' : '') + m + '</td>';
                                                                              }
                                                  Severity: Major
                                                  Found in assets/js/jquery-ui-timepicker-addon.js - About 45 mins to fix

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

                                                                    options: function (tp_inst, obj, unit, opts, val) {
                                                    Severity: Minor
                                                    Found in assets/js/jquery-ui-timepicker-addon.js - About 35 mins to fix

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

                                                                      options: function (tp_inst, obj, unit, opts, val) {
                                                      Severity: Minor
                                                      Found in assets/js/jquery-ui-timepicker-addon.js - About 35 mins to fix

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

                                                            $.datepicker.parseDateTime = function (dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {
                                                        Severity: Minor
                                                        Found in assets/js/jquery-ui-timepicker-addon.js - About 35 mins to fix

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

                                                              var parseDateTimeInternal = function (dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {
                                                          Severity: Minor
                                                          Found in assets/js/jquery-ui-timepicker-addon.js - About 35 mins to fix

                                                            Avoid too many return statements within this function.
                                                            Open

                                                                            return true;
                                                            Severity: Major
                                                            Found in assets/js/jquery-ui-timepicker-addon.js - About 30 mins to fix

                                                              Avoid too many return statements within this function.
                                                              Open

                                                                                  return obj.slider(opts);
                                                              Severity: Major
                                                              Found in assets/js/jquery-ui-timepicker-addon.js - About 30 mins to fix

                                                                Avoid too many return statements within this function.
                                                                Open

                                                                        return this._base_optionDatepicker.call($.datepicker, target, name_clone || name, value);
                                                                Severity: Major
                                                                Found in assets/js/jquery-ui-timepicker-addon.js - About 30 mins to fix

                                                                  Avoid too many return statements within this function.
                                                                  Open

                                                                                          return obj.slider(opts, val);
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-ui-timepicker-addon.js - About 30 mins to fix

                                                                    Avoid too many return statements within this function.
                                                                    Open

                                                                                return this._base_optionDatepicker.call($.datepicker, target, name);
                                                                    Severity: Major
                                                                    Found in assets/js/jquery-ui-timepicker-addon.js - About 30 mins to fix

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

                                                                                      if (dp_inst.settings.timeOnly || minDateTimeDate.getTime() === dp_date.getTime()) {
                                                                                          this._defaults.hourMin = minDateTime.getHours();
                                                                                          if (this.hour <= this._defaults.hourMin) {
                                                                                              this.hour = this._defaults.hourMin;
                                                                                              this._defaults.minuteMin = minDateTime.getMinutes();
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 3 days to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 662..703

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

                                                                      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 (dp_inst.settings.timeOnly || maxDateTimeDate.getTime() === dp_date.getTime()) {
                                                                                          this._defaults.hourMax = maxDateTime.getHours();
                                                                                          if (this.hour >= this._defaults.hourMax) {
                                                                                              this.hour = this._defaults.hourMax;
                                                                                              this._defaults.minuteMax = maxDateTime.getMinutes();
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 3 days to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 606..647

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

                                                                      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 (dp_inst.settings.minTime!==null) {
                                                                                      var tempMinTime=new Date("01/01/1970 " + dp_inst.settings.minTime);
                                                                                      if (this.hour<tempMinTime.getHours()) {
                                                                                          this.hour=this._defaults.hourMin=tempMinTime.getHours();
                                                                                          this.minute=this._defaults.minuteMin=tempMinTime.getMinutes();
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 2 days to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 725..742

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

                                                                      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 (dp_inst.settings.maxTime!==null) {
                                                                                      var tempMaxTime=new Date("01/01/1970 " + dp_inst.settings.maxTime);
                                                                                      if (this.hour>tempMaxTime.getHours()) {
                                                                                          this.hour=this._defaults.hourMax=tempMaxTime.getHours();
                                                                                          this.minute=this._defaults.minuteMax=tempMaxTime.getMinutes();
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 2 days to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 706..723

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

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

                                                                                      if (this.millisec_slider) {
                                                                                          this.control.options(this, this.millisec_slider, 'millisec', { min: this._defaults.millisecMin, max: millisecMax, step: this._defaults.stepMillisec });
                                                                                          this.control.value(this, this.millisec_slider, 'millisec', this.millisec - (this.millisec % this._defaults.stepMillisec));
                                                                                      }
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 4 other locations - About 3 hrs to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 751..754
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 755..758
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 759..762
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 767..770

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

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

                                                                                      if (this.minute_slider) {
                                                                                          this.control.options(this, this.minute_slider, 'minute', { min: this._defaults.minuteMin, max: minMax, step: this._defaults.stepMinute });
                                                                                          this.control.value(this, this.minute_slider, 'minute', this.minute - (this.minute % this._defaults.stepMinute));
                                                                                      }
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 4 other locations - About 3 hrs to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 751..754
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 759..762
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 763..766
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 767..770

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

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

                                                                                      if (this.microsec_slider) {
                                                                                          this.control.options(this, this.microsec_slider, 'microsec', { min: this._defaults.microsecMin, max: microsecMax, step: this._defaults.stepMicrosec });
                                                                                          this.control.value(this, this.microsec_slider, 'microsec', this.microsec - (this.microsec % this._defaults.stepMicrosec));
                                                                                      }
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 4 other locations - About 3 hrs to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 751..754
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 755..758
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 759..762
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 763..766

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

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

                                                                                      if (this.second_slider) {
                                                                                          this.control.options(this, this.second_slider, 'second', { min: this._defaults.secondMin, max: secMax, step: this._defaults.stepSecond });
                                                                                          this.control.value(this, this.second_slider, 'second', this.second - (this.second % this._defaults.stepSecond));
                                                                                      }
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 4 other locations - About 3 hrs to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 751..754
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 755..758
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 763..766
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 767..770

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

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

                                                                                      if (this.hour_slider) {
                                                                                          this.control.options(this, this.hour_slider, 'hour', { min: this._defaults.hourMin, max: hourMax, step: this._defaults.stepHour });
                                                                                          this.control.value(this, this.hour_slider, 'hour', this.hour - (this.hour % this._defaults.stepHour));
                                                                                      }
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 4 other locations - About 3 hrs to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 755..758
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 759..762
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 763..766
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 767..770

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

                                                                      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 (tp_inst) {
                                                                                          if (tp_inst._defaults.timeOnly && (inst.input.val() !== inst.lastVal)) {
                                                                                              try {
                                                                                                  $.datepicker._updateDatepicker(inst);
                                                                                              } catch (err) {
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 2 hrs to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 1550..1558

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

                                                                      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 (tp_inst) {
                                                                                  if (tp_inst._defaults.timeOnly && (inst.input.val() !== inst.lastVal)) {
                                                                                      try {
                                                                                          $.datepicker._updateDatepicker(inst);
                                                                                      } catch (err) {
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 2 hrs to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 995..1003

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

                                                                      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

                                                                              $.fn[method].call(endTime, $.extend({
                                                                                  timeOnly: timeOnly,
                                                                                  onClose: function (dateText, inst) {
                                                                                      checkDates($(this), startTime);
                                                                                  },
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 2 hrs to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 2220..2228

                                                                      Duplicated Code

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

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

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

                                                                      Tuning

                                                                      This issue has a mass of 88.

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

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

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

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

                                                                      Refactorings

                                                                      Further Reading

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

                                                                              $.fn[method].call(startTime, $.extend({
                                                                                  timeOnly: timeOnly,
                                                                                  onClose: function (dateText, inst) {
                                                                                      checkDates($(this), endTime);
                                                                                  },
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 2 hrs to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 2229..2237

                                                                      Duplicated Code

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

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

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

                                                                      Tuning

                                                                      This issue has a mass of 88.

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

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

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

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

                                                                      Refactorings

                                                                      Further Reading

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

                                                                                  tp_inst.millisec = tp_inst._defaults.millisec < tp_inst._defaults.millisecMin ? tp_inst._defaults.millisecMin :
                                                                                                  tp_inst._defaults.millisec > tp_inst._defaults.millisecMax ? tp_inst._defaults.millisecMax : tp_inst._defaults.millisec;
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 4 other locations - About 2 hrs to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 263..264
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 265..266
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 267..268
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 271..272

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

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

                                                                                  tp_inst.minute = tp_inst._defaults.minute < tp_inst._defaults.minuteMin ? tp_inst._defaults.minuteMin :
                                                                                                  tp_inst._defaults.minute > tp_inst._defaults.minuteMax ? tp_inst._defaults.minuteMax : tp_inst._defaults.minute;
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 4 other locations - About 2 hrs to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 263..264
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 267..268
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 269..270
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 271..272

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

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

                                                                                  tp_inst.second = tp_inst._defaults.second < tp_inst._defaults.secondMin ? tp_inst._defaults.secondMin :
                                                                                                  tp_inst._defaults.second > tp_inst._defaults.secondMax ? tp_inst._defaults.secondMax : tp_inst._defaults.second;
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 4 other locations - About 2 hrs to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 263..264
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 265..266
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 269..270
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 271..272

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

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

                                                                                  tp_inst.microsec = tp_inst._defaults.microsec < tp_inst._defaults.microsecMin ? tp_inst._defaults.microsecMin :
                                                                                                  tp_inst._defaults.microsec > tp_inst._defaults.microsecMax ? tp_inst._defaults.microsecMax : tp_inst._defaults.microsec;
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 4 other locations - About 2 hrs to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 263..264
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 265..266
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 267..268
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 269..270

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

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

                                                                                  tp_inst.hour = tp_inst._defaults.hour < tp_inst._defaults.hourMin ? tp_inst._defaults.hourMin :
                                                                                                  tp_inst._defaults.hour > tp_inst._defaults.hourMax ? tp_inst._defaults.hourMax : tp_inst._defaults.hour;
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 4 other locations - About 2 hrs to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 265..266
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 267..268
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 269..270
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 271..272

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

                                                                      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 (this.hourMinOriginal === null || this.minuteMinOriginal === null || this.secondMinOriginal === null || this.millisecMinOriginal === null || this.microsecMinOriginal === null) {
                                                                                          this.hourMinOriginal = o.hourMin;
                                                                                          this.minuteMinOriginal = o.minuteMin;
                                                                                          this.secondMinOriginal = o.secondMin;
                                                                                          this.millisecMinOriginal = o.millisecMin;
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 2 hrs to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 654..660

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

                                                                      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 (this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null || this.millisecMaxOriginal === null) {
                                                                                          this.hourMaxOriginal = o.hourMax;
                                                                                          this.minuteMaxOriginal = o.minuteMax;
                                                                                          this.secondMaxOriginal = o.secondMax;
                                                                                          this.millisecMaxOriginal = o.millisecMax;
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 2 hrs to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 598..604

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

                                                                      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 (min) { //if min was set
                                                                                      if (min === 0) {
                                                                                          min = new Date();
                                                                                      } else {
                                                                                          min = new Date(min);
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 1 hr to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 1882..1892

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

                                                                      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 (max) { //if max was set
                                                                                      if (max === 0) {
                                                                                          max = new Date();
                                                                                      } else {
                                                                                          max = new Date(max);
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 1 hr to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 1874..1892

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

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

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

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

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

                                                                      Refactorings

                                                                      Further Reading

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

                                                                                  if (tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) {
                                                                                      tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime());
                                                                                  }
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 2 other locations - About 1 hr to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 298..300
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 301..303

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

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

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

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

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

                                                                      Refactorings

                                                                      Further Reading

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

                                                                                  if (tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date) {
                                                                                      tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime());
                                                                                  }
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 2 other locations - About 1 hr to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 298..300
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 304..306

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

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

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

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

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

                                                                      Refactorings

                                                                      Further Reading

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

                                                                                  if (tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date) {
                                                                                      tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime());
                                                                                  }
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 2 other locations - About 1 hr to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 301..303
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 304..306

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

                                                                      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 (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) {
                                                                                              tp_inst.timezone = date.getTimezoneOffset() * -1;
                                                                                          }
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 1 hr to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 1707..1709

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

                                                                      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 (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) {
                                                                                      tp_inst.timezone = tp_date.getTimezoneOffset() * -1;
                                                                                  }
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 1 hr to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 1767..1769

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

                                                                      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 maxDateTime = $.datepicker._get(dp_inst, 'maxDateTime'),
                                                                                          maxDateTimeDate = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), 0, 0, 0, 0);
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 1 hr to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 595..596

                                                                      Duplicated Code

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

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

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

                                                                      Tuning

                                                                      This issue has a mass of 56.

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

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

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

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

                                                                      Refactorings

                                                                      Further Reading

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

                                                                                      var minDateTime = $.datepicker._get(dp_inst, 'minDateTime'),
                                                                                          minDateTimeDate = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), 0, 0, 0, 0);
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 1 hr to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 651..652

                                                                      Duplicated Code

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

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

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

                                                                      Tuning

                                                                      This issue has a mass of 56.

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

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

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

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

                                                                      Refactorings

                                                                      Further Reading

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

                                                                                          minMax = parseInt((this._defaults.minuteMax - ((this._defaults.minuteMax - this._defaults.minuteMin) % this._defaults.stepMinute)), 10),
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 4 other locations - About 55 mins to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 745..745
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 747..747
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 748..748
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 749..749

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

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

                                                                                          secMax = parseInt((this._defaults.secondMax - ((this._defaults.secondMax - this._defaults.secondMin) % this._defaults.stepSecond)), 10),
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 4 other locations - About 55 mins to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 745..745
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 746..746
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 748..748
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 749..749

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

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

                                                                                          microsecMax = parseInt((this._defaults.microsecMax - ((this._defaults.microsecMax - this._defaults.microsecMin) % this._defaults.stepMicrosec)), 10);
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 4 other locations - About 55 mins to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 745..745
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 746..746
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 747..747
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 748..748

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

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

                                                                                      var hourMax = parseInt((this._defaults.hourMax - ((this._defaults.hourMax - this._defaults.hourMin) % this._defaults.stepHour)), 10),
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 4 other locations - About 55 mins to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 746..746
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 747..747
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 748..748
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 749..749

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

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

                                                                                          millisecMax = parseInt((this._defaults.millisecMax - ((this._defaults.millisecMax - this._defaults.millisecMin) % this._defaults.stepMillisec)), 10),
                                                                      Severity: Major
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 4 other locations - About 55 mins to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 745..745
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 746..746
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 747..747
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 749..749

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

                                                                      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

                                                                                  tp_date = $.timepicker.timezoneAdjust(tp_date, $.timepicker.timezoneOffsetString(-tp_date.getTimezoneOffset()), tp_inst.timezone);
                                                                      Severity: Minor
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 35 mins to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 1710..1710

                                                                      Duplicated Code

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

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

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

                                                                      Tuning

                                                                      This issue has a mass of 46.

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

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

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

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

                                                                      Refactorings

                                                                      Further Reading

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

                                                                                  date = $.timepicker.timezoneAdjust(date, $.timepicker.timezoneOffsetString(-date.getTimezoneOffset()), tp_inst.timezone);
                                                                      Severity: Minor
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 35 mins to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 1711..1711

                                                                      Duplicated Code

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

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

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

                                                                      Tuning

                                                                      This issue has a mass of 46.

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

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

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

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

                                                                      Refactorings

                                                                      Further Reading

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

                                                                          $.timepicker.dateRange = function (startTime, endTime, options) {
                                                                              $.timepicker.handleRange('datepicker', startTime, endTime, options);
                                                                          };
                                                                      Severity: Minor
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 30 mins to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 2135..2137

                                                                      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

                                                                          $.timepicker.datetimeRange = function (startTime, endTime, options) {
                                                                              $.timepicker.handleRange('datetimepicker', startTime, endTime, options);
                                                                          };
                                                                      Severity: Minor
                                                                      Found in assets/js/jquery-ui-timepicker-addon.js and 1 other location - About 30 mins to fix
                                                                      assets/js/jquery-ui-timepicker-addon.js on lines 2148..2150

                                                                      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