sentilo/sentilo

View on GitHub
sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js

Summary

Maintainability
F
1 wk
Test Coverage

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

/* =========================================================
 * bootstrap-datepicker.js
 * http://www.eyecon.ro/bootstrap-datepicker
 * =========================================================
 * Copyright 2012 Stefan Petre
Severity: Major
Found in sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js - About 2 days to fix

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

        var Datepicker = function(element, options) {
            var that = this;
    
            this.element = $(element);
            this.language = options.language||this.element.data('date-language')||"en";
    Severity: Major
    Found in sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js - About 4 hrs to fix

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

              fill: function() {
                  var d = new Date(this.viewDate),
                      year = d.getUTCFullYear(),
                      month = d.getUTCMonth(),
                      startYear = this.startDate !== -Infinity ? this.startDate.getUTCFullYear() : -Infinity,
      Severity: Major
      Found in sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js - About 3 hrs to fix

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

                click: function(e) {
                    e.preventDefault();
                    var target = $(e.target).closest('span, td, th');
                    if (target.length == 1) {
                        switch(target[0].nodeName.toLowerCase()) {
        Severity: Major
        Found in sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js - About 3 hrs to fix

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

                  parseDate: function(date, format, language) {
                      if (date instanceof Date) return date;
                      if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)) {
                          var part_re = /([\-+]\d+)([dmwy])/,
                              parts = date.match(/([\-+]\d+)([dmwy])/g),
          Severity: Major
          Found in sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js - About 3 hrs to fix

            Function keydown has 86 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 sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js - About 3 hrs to fix

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

                      _attachEvents: function(){
                          this._detachEvents();
                          if (this.isInput) { // single input
                              this._events = [
                                  [this.element, {

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

                        updateNavArrows: function() {
                            if (!this._allow_update) return;
                
                            var d = new Date(this.viewDate),
                                year = d.getUTCFullYear(),

                  Function moveMonth has 27 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(),

                    Avoid deeply nested control flow statements.
                    Open

                                                    if (month === 0) {
                                                        month = 11;
                                                        year -= 1;
                                                    } else {
                                                        month -= 1;
                    Severity: Major
                    Found in sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                      if ( this.minViewMode == 1 ) {
                                                          this._setDate(UTCDate(year, month, day,0,0,0,0));
                                                      }
                      Severity: Major
                      Found in sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                        if ( this.minViewMode == 2 ) {
                                                            this._setDate(UTCDate(year, month, day,0,0,0,0));
                                                        }
                        Severity: Major
                        Found in sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.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 sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js - About 45 mins to fix

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

                                                        case 'M':
                                                            filtered = $(dates[language].monthsShort).filter(function(){
                                                                var m = this.slice(0, parts[i].length),
                                                                    p = parts[i].slice(0, m.length);
                                                                return m == p;
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 940..947

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 122.

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

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

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

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

                            Refactorings

                            Further Reading

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

                                                        case 'MM':
                                                            filtered = $(dates[language].months).filter(function(){
                                                                var m = this.slice(0, parts[i].length),
                                                                    p = parts[i].slice(0, m.length);
                                                                return m == p;
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 948..955

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 122.

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

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

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

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

                            Refactorings

                            Further Reading

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

                                        for (var i=0, el, ev; i<this._events.length; i++){
                                            el = this._events[i][0];
                                            ev = this._events[i][1];
                                            el.on(ev);
                                        }
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 208..212

                            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.off(ev);
                                        }
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 201..205

                            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

                            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();
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 759..766

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 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();
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 734..741

                            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 4 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');
                                    }
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 52..56
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 90..94
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 129..133

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

                                    if ('calendarWeeks' in options) {
                                        this.calendarWeeks = options.calendarWeeks;
                                    } else if ('dateCalendarWeeks' in this.element.data()) {
                                        this.calendarWeeks = this.element.data('date-calendar-weeks');
                                    }
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 52..56
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 83..87
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 90..94

                            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 4 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');
                                    }
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 83..87
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 90..94
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 129..133

                            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 4 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');
                                    }
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 52..56
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 83..87
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 129..133

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 72.

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

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

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

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

                            Refactorings

                            Further Reading

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

                                                [this.element, {
                                                    focus: $.proxy(this.show, this),
                                                    keyup: $.proxy(this.update, this),
                                                    keydown: $.proxy(this.keydown, this)
                                                }]
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 181..185
                            sentilo-catalog-web/src/main/webapp/static/js/daterangepicker.js on lines 54..58

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 56.

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

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

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

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

                            Refactorings

                            Further Reading

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

                                                [this.element.find('input'), {
                                                    focus: $.proxy(this.show, this),
                                                    keyup: $.proxy(this.update, this),
                                                    keydown: $.proxy(this.keydown, this)
                                                }],
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 171..175
                            sentilo-catalog-web/src/main/webapp/static/js/daterangepicker.js on lines 54..58

                            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

                                            if (this.isInput) {
                                                element = this.element;
                                            } else if (this.component){
                                                element = this.element.find('input');
                                            }
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 643..647

                            Duplicated Code

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

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

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

                            Tuning

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

                                        if (this.isInput) {
                                            element = this.element;
                                        } else if (this.component){
                                            element = this.element.find('input');
                                        }
                            sentilo-catalog-web/src/main/webapp/static/js/bootstrap-datepicker.js on lines 782..786

                            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

                            There are no issues that match your filters.

                            Category
                            Status