railstaichung/rails-taichung

View on GitHub
app/assets/javascripts/bootstrap-datetimepicker.js

Summary

Maintainability
F
3 wks
Test Coverage

File bootstrap-datetimepicker.js has 1707 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* =========================================================
 * bootstrap-datetimepicker.js
 * =========================================================
 * Copyright 2012 Stefan Petre
 *
Severity: Major
Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 4 days to fix

    Function click has 185 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        click: function (e) {
          e.stopPropagation();
          e.preventDefault();
          var target = $(e.target).closest('span, td, th, legend');
          if (target.is('.' + this.icontype)) {
    Severity: Major
    Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 7 hrs to fix

      Function Datetimepicker has 168 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        var Datetimepicker = function (element, options) {
          var that = this;
      
          this.element = $(element);
      
      
      Severity: Major
      Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 6 hrs to fix

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

            fill: function () {
              if (this.date == null || this.viewDate == null) {
                return;
              }
              var d = new Date(this.viewDate),
        Severity: Major
        Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 6 hrs to fix

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

              parseDate: function (date, format, language, type, timezone) {
                if (date instanceof Date) {
                  var dateUTC = new Date(date.valueOf() - date.getTimezoneOffset() * 60000);
                  dateUTC.setMilliseconds(0);
                  return dateUTC;
          Severity: Major
          Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 5 hrs to fix

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

                keydown: function (e) {
                  if (this.picker.is(':not(:visible)')) {
                    if (e.keyCode == 27) // allow escape to hide and re-show picker
                      this.show();
                    return;
            Severity: Major
            Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 4 hrs to fix

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

                  formatDate:       function (date, format, language, type, timezone) {
                    if (date == null) {
                      return '';
                    }
                    var val;
              Severity: Major
              Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 3 hrs to fix

                Function updateNavArrows has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    updateNavArrows: function () {
                      var d = new Date(this.viewDate),
                        year = d.getUTCFullYear(),
                        month = d.getUTCMonth(),
                        day = d.getUTCDate(),
                Severity: Major
                Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 2 hrs to fix

                  Function place has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      place: function () {
                        if (this.isInline) return;
                  
                        if (!this.zIndex) {
                          var index_highest = 0;
                  Severity: Minor
                  Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 1 hr to fix

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

                        _attachEvents: function () {
                          this._detachEvents();
                          if (this.isInput) { // single input
                            this._events = [
                              [this.element, {
                    Severity: Minor
                    Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 1 hr to fix

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

                          moveMonth: function (date, dir) {
                            if (!dir) return date;
                            var new_date = new Date(date.valueOf()),
                              day = new_date.getUTCDate(),
                              month = new_date.getUTCMonth(),
                      Severity: Minor
                      Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 1 hr to fix

                        Avoid deeply nested control flow statements.
                        Open

                                        if (this.viewSelect >= 3) {
                                          this._setDate(UTCDate(year, month, day, hours, minutes, seconds, 0));
                                        }
                        Severity: Major
                        Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                          if (this.autoclose) {
                                            this.hide();
                                          }
                          Severity: Major
                          Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                          } else if (target.is('.year')) {
                                            this.viewDate.setUTCDate(1);
                                            year = parseInt(target.text(), 10) || 0;
                                            this.viewDate.setUTCFullYear(year);
                                            this.element.trigger({
                            Severity: Major
                            Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                              if (month === 0) {
                                                month = 11;
                                                year -= 1;
                                              } else {
                                                month -= 1;
                              Severity: Major
                              Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                if (oldViewMode == this.viewMode && this.autoclose) {
                                                  this.hide();
                                                }
                                Severity: Major
                                Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                } else if (target.is('.new')) {
                                                  if (month == 11) {
                                                    month = 0;
                                                    year += 1;
                                                  } else {
                                  Severity: Major
                                  Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 45 mins to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                          if (arguments && arguments.length && (typeof arguments[0] === 'string' || arguments[0] instanceof Date)) {
                                            date = arguments[0];
                                            fromArgs = true;
                                          } else {
                                            date = (this.isInput ? this.element.val() : this.element.find('input').val()) || this.element.data('date') || this.initialDate;
                                    Severity: Major
                                    Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 40 mins to fix

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

                                          parseDate: function (date, format, language, type, timezone) {
                                      Severity: Minor
                                      Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 35 mins to fix

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

                                            formatDate:       function (date, format, language, type, timezone) {
                                        Severity: Minor
                                        Found in app/assets/javascripts/bootstrap-datetimepicker.js - About 35 mins to fix

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

                                            DPGlobal.templateV3 = '<div class="datetimepicker">' +
                                              '<div class="datetimepicker-minutes">' +
                                              '<table class=" table-condensed">' +
                                              DPGlobal.headTemplateV3 +
                                              DPGlobal.contTemplate +
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 day to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1787..1823

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

                                          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

                                            DPGlobal.template = '<div class="datetimepicker">' +
                                              '<div class="datetimepicker-minutes">' +
                                              '<table class=" table-condensed">' +
                                              DPGlobal.headTemplate +
                                              DPGlobal.contTemplate +
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 day to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1824..1860

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

                                          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

                                              setMinutesDisabled: function (minutesDisabled) {
                                                this.minutesDisabled = minutesDisabled || [];
                                                if (!$.isArray(this.minutesDisabled)) {
                                                  this.minutesDisabled = this.minutesDisabled.split(/,\s*/);
                                                }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 2 other locations - About 4 hrs to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 495..505
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 519..529

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

                                          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

                                              setDaysOfWeekDisabled: function (daysOfWeekDisabled) {
                                                this.daysOfWeekDisabled = daysOfWeekDisabled || [];
                                                if (!$.isArray(this.daysOfWeekDisabled)) {
                                                  this.daysOfWeekDisabled = this.daysOfWeekDisabled.split(/,\s*/);
                                                }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 2 other locations - About 4 hrs to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 507..517
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 519..529

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

                                          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

                                              setHoursDisabled: function (hoursDisabled) {
                                                this.hoursDisabled = hoursDisabled || [];
                                                if (!$.isArray(this.hoursDisabled)) {
                                                  this.hoursDisabled = this.hoursDisabled.split(/,\s*/);
                                                }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 2 other locations - About 4 hrs to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 495..505
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 507..517

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

                                          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 {
                                                  offset = this.element.offset();
                                                  left = offset.left;
                                                  if (this.pickerPosition == 'bottom-left' || this.pickerPosition == 'top-left') {
                                                    left += this.element.outerWidth() - this.picker.outerWidth();
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 2 hrs to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 552..558

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 92.

                                          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.component) {
                                                  offset = this.component.offset();
                                                  left = offset.left;
                                                  if (this.pickerPosition == 'bottom-left' || this.pickerPosition == 'top-left') {
                                                    left += this.component.outerWidth() - this.picker.outerWidth();
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 2 hrs to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 558..564

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 92.

                                          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

                                                for (var i = 0, el, ev; i < this._events.length; i++) {
                                                  el = this._events[i][0];
                                                  ev = this._events[i][1];
                                                  el.off(ev);
                                                }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 2 hrs to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 320..324

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

                                          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

                                                for (var i = 0, el, ev; i < this._events.length; i++) {
                                                  el = this._events[i][0];
                                                  ev = this._events[i][1];
                                                  el.on(ev);
                                                }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 2 hrs to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 328..332

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                              this.componentReset = this.element.is('.date') ? ( this.bootcssVer == 3 ? this.element.find('.input-group-addon .glyphicon-remove, .input-group-addon .fa-times').parent():this.element.find('.add-on .icon-remove, .add-on .fa-times').parent()) : false;
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 2 hrs to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 98..98

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                              this.component = this.element.is('.date') ? ( this.bootcssVer == 3 ? this.element.find('.input-group-addon .glyphicon-th, .input-group-addon .glyphicon-time, .input-group-addon .glyphicon-remove, .input-group-addon .glyphicon-calendar, .input-group-addon .fa-calendar, .input-group-addon .fa-clock-o').parent() : this.element.find('.add-on .icon-th, .add-on .icon-time, .add-on .icon-calendar, .add-on .fa-calendar, .add-on .fa-clock-o').parent()) : false;
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 2 hrs to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 99..99

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 81.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                    if (this.dateWithinRange(newDate)) {
                                                      this.date = newDate;
                                                      this.viewDate = newViewDate;
                                                      this.setValue();
                                                      this.update();
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1256..1263

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                    if (this.dateWithinRange(newDate)) {
                                                      this.date = newDate;
                                                      this.viewDate = newViewDate;
                                                      this.setValue();
                                                      this.update();
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1296..1303

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

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

                                              if ('maxView' in options) {
                                                this.maxView = options.maxView;
                                              } else if ('maxView' in this.element.data()) {
                                                this.maxView = this.element.data('max-view');
                                              }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 10 other locations - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 131..135
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 138..142
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 154..158
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 162..166
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 169..173
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 176..180
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 185..189
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 193..197
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 237..241
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 244..248

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 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 11 locations. Consider refactoring.
                                          Open

                                              if ('autoclose' in options) {
                                                this.autoclose = options.autoclose;
                                              } else if ('dateAutoclose' in this.element.data()) {
                                                this.autoclose = this.element.data('date-autoclose');
                                              }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 10 other locations - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 131..135
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 138..142
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 146..150
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 154..158
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 162..166
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 169..173
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 176..180
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 185..189
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 193..197
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 244..248

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 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 11 locations. Consider refactoring.
                                          Open

                                              if ('forceParse' in options) {
                                                this.forceParse = options.forceParse;
                                              } else if ('dateForceParse' in this.element.data()) {
                                                this.forceParse = this.element.data('date-force-parse');
                                              }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 10 other locations - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 131..135
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 138..142
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 146..150
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 154..158
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 162..166
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 169..173
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 176..180
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 185..189
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 237..241
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 244..248

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 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 11 locations. Consider refactoring.
                                          Open

                                              if ('wheelViewModeNavigationInverseDirection' in options) {
                                                this.wheelViewModeNavigationInverseDirection = options.wheelViewModeNavigationInverseDirection;
                                              } else if ('wheelViewModeNavigationInverseDirection' in this.element.data()) {
                                                this.wheelViewModeNavigationInverseDirection = this.element.data('view-mode-wheel-navigation-inverse-dir');
                                              }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 10 other locations - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 131..135
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 138..142
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 146..150
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 154..158
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 169..173
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 176..180
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 185..189
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 193..197
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 237..241
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 244..248

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 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 11 locations. Consider refactoring.
                                          Open

                                              if ('viewSelect' in options) {
                                                this.viewSelect = options.viewSelect;
                                              } else if ('viewSelect' in this.element.data()) {
                                                this.viewSelect = this.element.data('view-select');
                                              }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 10 other locations - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 131..135
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 138..142
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 146..150
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 154..158
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 162..166
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 169..173
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 176..180
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 193..197
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 237..241
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 244..248

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 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 11 locations. Consider refactoring.
                                          Open

                                              if ('formatViewType' in options) {
                                                this.formatViewType = options.formatViewType;
                                              } else if ('formatViewType' in this.element.data()) {
                                                this.formatViewType = this.element.data('formatViewType');
                                              }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 10 other locations - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 138..142
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 146..150
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 154..158
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 162..166
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 169..173
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 176..180
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 185..189
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 193..197
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 237..241
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 244..248

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 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 11 locations. Consider refactoring.
                                          Open

                                              if ('wheelViewModeNavigation' in options) {
                                                this.wheelViewModeNavigation = options.wheelViewModeNavigation;
                                              } else if ('wheelViewModeNavigation' in this.element.data()) {
                                                this.wheelViewModeNavigation = this.element.data('view-mode-wheel-navigation');
                                              }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 10 other locations - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 131..135
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 138..142
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 146..150
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 162..166
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 169..173
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 176..180
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 185..189
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 193..197
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 237..241
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 244..248

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 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 11 locations. Consider refactoring.
                                          Open

                                              if ('minView' in options) {
                                                this.minView = options.minView;
                                              } else if ('minView' in this.element.data()) {
                                                this.minView = this.element.data('min-view');
                                              }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 10 other locations - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 131..135
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 146..150
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 154..158
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 162..166
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 169..173
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 176..180
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 185..189
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 193..197
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 237..241
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 244..248

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 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 11 locations. Consider refactoring.
                                          Open

                                              if ('wheelViewModeNavigationDelay' in options) {
                                                this.wheelViewModeNavigationDelay = options.wheelViewModeNavigationDelay;
                                              } else if ('wheelViewModeNavigationDelay' in this.element.data()) {
                                                this.wheelViewModeNavigationDelay = this.element.data('view-mode-wheel-navigation-delay');
                                              }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 10 other locations - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 131..135
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 138..142
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 146..150
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 154..158
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 162..166
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 176..180
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 185..189
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 193..197
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 237..241
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 244..248

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 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 11 locations. Consider refactoring.
                                          Open

                                              if ('startView' in options) {
                                                this.startViewMode = options.startView;
                                              } else if ('startView' in this.element.data()) {
                                                this.startViewMode = this.element.data('start-view');
                                              }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 10 other locations - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 131..135
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 138..142
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 146..150
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 154..158
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 162..166
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 169..173
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 185..189
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 193..197
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 237..241
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 244..248

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 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 11 locations. Consider refactoring.
                                          Open

                                              if ('keyboardNavigation' in options) {
                                                this.keyboardNavigation = options.keyboardNavigation;
                                              } else if ('dateKeyboardNavigation' in this.element.data()) {
                                                this.keyboardNavigation = this.element.data('date-keyboard-navigation');
                                              }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 10 other locations - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 131..135
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 138..142
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 146..150
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 154..158
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 162..166
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 169..173
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 176..180
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 185..189
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 193..197
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 237..241

                                          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

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

                                                    if (this.viewMode != 0) {
                                                      var oldViewMode = this.viewMode;
                                                      this.showMode(-1);
                                                      this.fill();
                                                      if (oldViewMode == this.viewMode && this.autoclose) {
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1052..1064

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 71.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                        if (this.viewMode != 0) {
                                                          var oldViewMode = this.viewMode;
                                                          this.showMode(-1);
                                                          this.fill();
                                                          if (oldViewMode == this.viewMode && this.autoclose) {
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1306..1318

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 71.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                              moveHour: function (date, dir) {
                                                if (!dir) return date;
                                                var new_date = new Date(date.valueOf());
                                                //dir = dir > 0 ? 1 : -1;
                                                new_date.setUTCHours(new_date.getUTCHours() + dir);
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1154..1160

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 68.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                    if (this.startDate !== -Infinity && year <= this.startDate.getUTCFullYear()
                                                      && month <= this.startDate.getUTCMonth()
                                                      && day <= this.startDate.getUTCDate()) {
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 825..827

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 68.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                    if (this.startDate !== -Infinity && year <= this.startDate.getUTCFullYear()
                                                      && month <= this.startDate.getUTCMonth()
                                                      && day <= this.startDate.getUTCDate()
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 843..845

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 68.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                              moveDate: function (date, dir) {
                                                if (!dir) return date;
                                                var new_date = new Date(date.valueOf());
                                                //dir = dir > 0 ? 1 : -1;
                                                new_date.setUTCDate(new_date.getUTCDate() + dir);
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1146..1152

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 68.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                    if (this.endDate !== Infinity && year >= this.endDate.getUTCFullYear()
                                                      && month >= this.endDate.getUTCMonth()
                                                      && day >= this.endDate.getUTCDate()
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 850..852

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                    if (this.endDate !== Infinity && year >= this.endDate.getUTCFullYear()
                                                      && month >= this.endDate.getUTCMonth()
                                                      && day >= this.endDate.getUTCDate()) {
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 833..835

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                this.picker.find('tfoot th.clear')
                                                  .text(dates[this.language].clear || dates['en'].clear)
                                                  .toggle(this.clearBtn !== false);
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 662..664

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 63.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                this.picker.find('tfoot th.today')
                                                  .text(dates[this.language].today || dates['en'].today)
                                                  .toggle(this.todayBtn !== false);
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 665..667

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 63.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                    if (meridian != meridianOld) {
                                                      if (meridianOld != '') {
                                                        html.push('</fieldset>');
                                                      }
                                                      html.push('<fieldset class="hour"><legend>' + meridian.toUpperCase() + '</legend>');
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 762..767

                                          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 (meridian != meridianOld) {
                                                      if (meridianOld != '') {
                                                        html.push('</fieldset>');
                                                      }
                                                      html.push('<fieldset class="minute"><legend>' + meridian.toUpperCase() + '</legend>');
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 729..734

                                          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

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

                                                    [this.element.find('input'), {
                                                      focus:   $.proxy(this.show, this),
                                                      keyup:   $.proxy(this.update, this),
                                                      keydown: $.proxy(this.keydown, this)
                                                    }],
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 284..288

                                          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

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

                                                    [this.element, {
                                                      focus:   $.proxy(this.show, this),
                                                      keyup:   $.proxy(this.update, this),
                                                      keydown: $.proxy(this.keydown, this)
                                                    }]
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 294..298

                                          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

                                                  return UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), 0);
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 72..72

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

                                          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

                                              return UTCDate(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate(), today.getUTCHours(), today.getUTCMinutes(), today.getUTCSeconds(), 0);
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 1 hr to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1539..1539

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                if (this.isInput) {
                                                  element = this.element;
                                                } else if (this.component) {
                                                  element = this.element.find('input');
                                                }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 2 other locations - About 55 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 429..433
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1327..1331

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                if (this.isInput) {
                                                  element = this.element;
                                                } else if (this.component) {
                                                  element = this.element.find('input');
                                                }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 2 other locations - About 55 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1119..1123
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1327..1331

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                  if (this.isInput) {
                                                    element = this.element;
                                                  } else if (this.component) {
                                                    element = this.element.find('input');
                                                  }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 2 other locations - About 55 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 429..433
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1119..1123

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

                                          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

                                                    a: (dates[language].meridiem.length == 2 ? dates[language].meridiem[date.getUTCHours() < 12 ? 0 : 1] : ''),
                                          Severity: Minor
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 55 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1666..1666

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

                                          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

                                                    p:    (dates[language].meridiem.length == 2 ? dates[language].meridiem[date.getUTCHours() < 12 ? 0 : 1] : ''),
                                          Severity: Minor
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 55 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.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 53.

                                          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

                                                    } else if (viewMode == 2) {
                                                      newDate = this.moveDate(this.date, dir * 7);
                                                      newViewDate = this.moveDate(this.viewDate, dir * 7);
                                                    } else if (viewMode == 1) {
                                                      if (this.showMeridian) {
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 2 other locations - About 50 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1285..1291
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1292..1295

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

                                          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 (this.showMeridian) {
                                                        newDate = this.moveHour(this.date, dir * 6);
                                                        newViewDate = this.moveHour(this.viewDate, dir * 6);
                                                      } else {
                                                        newDate = this.moveHour(this.date, dir * 4);
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 2 other locations - About 50 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1281..1295
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1292..1295

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

                                          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

                                                    } else if (viewMode == 0) {
                                                      newDate = this.moveMinute(this.date, dir * 4);
                                                      newViewDate = this.moveMinute(this.viewDate, dir * 4);
                                                    }
                                          Severity: Major
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 2 other locations - About 50 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1281..1295
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1285..1291

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                    html.push('<span class="minute' + clsName + '">' + txt + ':' + (i < 10 ? '0' + i : i) + '</span>');
                                          Severity: Minor
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 50 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 778..778

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 51.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                    html.push('<span class="minute' + clsName + '">' + hours + ':' + (i < 10 ? '0' + i : i) + '</span>');
                                          Severity: Minor
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 50 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 771..771

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 51.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                    meridian = (hours < 12 ? dates[this.language].meridiem[0] : dates[this.language].meridiem[1]);
                                          Severity: Minor
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 40 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 728..728

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 49.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                    meridian = (i < 12 ? dates[this.language].meridiem[0] : dates[this.language].meridiem[1]);
                                          Severity: Minor
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 40 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 761..761

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 49.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                if (this.startDate !== -Infinity) {
                                                  this.startDate = DPGlobal.parseDate(this.startDate, this.format, this.language, this.formatType, this.timezone);
                                                }
                                          Severity: Minor
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 35 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 470..472

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 47.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                if (this.endDate !== Infinity) {
                                                  this.endDate = DPGlobal.parseDate(this.endDate, this.format, this.language, this.formatType, this.timezone);
                                                }
                                          Severity: Minor
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 35 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 461..463

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 47.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                            var m = this.slice(0, parts[i].length),
                                                              p = parts[i].slice(0, m.length);
                                          Severity: Minor
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 35 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1620..1621

                                          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

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

                                                            var m = this.slice(0, parts[i].length),
                                                              p = parts[i].slice(0, m.length);
                                          Severity: Minor
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 35 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 1612..1613

                                          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

                                              while (template.indexOf('{leftArrow}') !== -1) {
                                                template = template.replace('{leftArrow}', this.icons.leftArrow);
                                              }
                                          Severity: Minor
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 30 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 205..207

                                          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

                                              while (template.indexOf('{rightArrow}') !== -1) {
                                                template = template.replace('{rightArrow}', this.icons.rightArrow);
                                              }
                                          Severity: Minor
                                          Found in app/assets/javascripts/bootstrap-datetimepicker.js and 1 other location - About 30 mins to fix
                                          app/assets/javascripts/bootstrap-datetimepicker.js on lines 202..204

                                          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