woothemes/woocommerce

View on GitHub
assets/js/select2/select2.js

Summary

Maintainability
F
9 mos
Test Coverage

Function S2 has 4315 lines of code (exceeds 25 allowed). Consider refactoring.
Open

(function () {
  // Restore the Select2 AMD loader so it can be used
  // Needed mostly in the language files, where the loader is not inserted
  if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
    var S2 = jQuery.fn.select2.amd;
Severity: Major
Found in assets/js/select2/select2.js - About 3 wks to fix

    File select2.js has 4331 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * Select2 4.0.3
     * https://select2.github.io
     *
     * Released under the MIT license
    Severity: Major
    Found in assets/js/select2/select2.js - About 1 wk to fix

      Function apply has 191 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        Defaults.prototype.apply = function (options) {
          options = $.extend(true, {}, this.defaults, options);
      
          if (options.dataAdapter == null) {
            if (options.ajax != null) {
      Severity: Major
      Found in assets/js/select2/select2.js - About 7 hrs to fix

        Function bind has 164 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          Results.prototype.bind = function (container, $container) {
            var self = this;
        
            var id = container.id + '-results';
        
        
        Severity: Major
        Found in assets/js/select2/select2.js - About 6 hrs to fix

          Function bind has 75 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            Search.prototype.bind = function (decorated, container, $container) {
              var self = this;
          
              decorated.call(this, container, $container);
          
          
          Severity: Major
          Found in assets/js/select2/select2.js - About 3 hrs to fix

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

                function normalize(name, baseName) {
                    var nameParts, nameSegment, mapValue, foundMap, lastIndex,
                        foundI, foundStarMap, starI, i, j, part,
                        baseParts = baseName && baseName.split("/"),
                        map = config.map,
            Severity: Major
            Found in assets/js/select2/select2.js - About 2 hrs to fix

              Function fromElement has 66 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                Options.prototype.fromElement = function ($e) {
                  var excludedData = ['select2'];
              
                  if (this.options.multiple == null) {
                    this.options.multiple = $e.prop('multiple');
              Severity: Major
              Found in assets/js/select2/select2.js - About 2 hrs to fix

                Function _registerEvents has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  Select2.prototype._registerEvents = function () {
                    var self = this;
                
                    this.on('open', function () {
                      self.$container.addClass('select2-container--open');
                Severity: Major
                Found in assets/js/select2/select2.js - About 2 hrs to fix

                  Function reset has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    Defaults.prototype.reset = function () {
                      function stripDiacritics (text) {
                        // Used 'uni range + named function' from http://jsperf.com/diacritics/18
                        function match(a) {
                          return DIACRITICS[a] || a;
                  Severity: Major
                  Found in assets/js/select2/select2.js - About 2 hrs to fix

                    Function _positionDropdown has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      AttachBody.prototype._positionDropdown = function () {
                        var $window = $(window);
                    
                        var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');
                        var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');
                    Severity: Major
                    Found in assets/js/select2/select2.js - About 2 hrs to fix

                      Function option has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        Results.prototype.option = function (data) {
                          var option = document.createElement('li');
                          option.className = 'select2-results__option';
                      
                          var attrs = {
                      Severity: Major
                      Found in assets/js/select2/select2.js - About 2 hrs to fix

                        Consider simplifying this complex logical expression.
                        Open

                        var S2;(function () { if (!S2 || !S2.requirejs) {
                        if (!S2) { S2 = {}; } else { require = S2; }
                        /**
                         * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
                         * Available via the MIT or new BSD license.
                        Severity: Critical
                        Found in assets/js/select2/select2.js - About 2 hrs to fix

                          Function query has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            AjaxAdapter.prototype.query = function (params, callback) {
                              var matches = [];
                              var self = this;
                          
                              if (this._request != null) {
                          Severity: Minor
                          Found in assets/js/select2/select2.js - About 1 hr to fix

                            Function _registerDomEvents has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              Select2.prototype._registerDomEvents = function () {
                                var self = this;
                            
                                this.$element.on('change.select2', function () {
                                  self.dataAdapter.current(function (data) {
                            Severity: Minor
                            Found in assets/js/select2/select2.js - About 1 hr to fix

                              Function Select2 has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                var Select2 = function ($element, options) {
                                  if ($element.data('select2') != null) {
                                    $element.data('select2').destroy();
                                  }
                              
                              
                              Severity: Minor
                              Found in assets/js/select2/select2.js - About 1 hr to fix

                                Function bind has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  BaseSelection.prototype.bind = function (container, $container) {
                                    var self = this;
                                
                                    var id = container.id + '-container';
                                    var resultsId = container.id + '-results';
                                Severity: Minor
                                Found in assets/js/select2/select2.js - About 1 hr to fix

                                  Function query has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    Tags.prototype.query = function (decorated, params, callback) {
                                      var self = this;
                                  
                                      this._removeOldTags();
                                  
                                  
                                  Severity: Minor
                                  Found in assets/js/select2/select2.js - About 1 hr to fix

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

                                      Utils.Decorate = function (SuperClass, DecoratorClass) {
                                        var decoratedMethods = getMethods(DecoratorClass);
                                        var superMethods = getMethods(SuperClass);
                                    
                                        function DecoratedClass () {
                                    Severity: Minor
                                    Found in assets/js/select2/select2.js - About 1 hr to fix

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

                                        Search.prototype.bind = function (decorated, container, $container) {
                                          var self = this;
                                      
                                          decorated.call(this, container, $container);
                                      
                                      
                                      Severity: Minor
                                      Found in assets/js/select2/select2.js - About 1 hr to fix

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

                                          SelectAdapter.prototype.item = function ($option) {
                                            var data = {};
                                        
                                            data = $.data($option[0], 'data');
                                        
                                        
                                        Severity: Minor
                                        Found in assets/js/select2/select2.js - About 1 hr to fix

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

                                            Select2.prototype._resolveWidth = function ($element, method) {
                                              var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
                                          
                                              if (method == 'resolve') {
                                                var styleWidth = this._resolveWidth($element, 'style');
                                          Severity: Minor
                                          Found in assets/js/select2/select2.js - About 1 hr to fix

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

                                                function wrapper (obj, child) {
                                                  var data = obj.results;
                                            
                                                  for (var i = 0; i < data.length; i++) {
                                                    var option = data[i];
                                            Severity: Minor
                                            Found in assets/js/select2/select2.js - About 1 hr to fix

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

                                                Tokenizer.prototype.tokenizer = function (_, params, options, callback) {
                                                  var separators = options.get('tokenSeparators') || [];
                                                  var term = params.term;
                                                  var i = 0;
                                              
                                              
                                              Severity: Minor
                                              Found in assets/js/select2/select2.js - About 1 hr to fix

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

                                                  Select2.prototype.destroy = function () {
                                                    this.$container.remove();
                                                
                                                    if (this.$element[0].detachEvent) {
                                                      this.$element[0].detachEvent('onpropertychange', this._syncA);
                                                Severity: Minor
                                                Found in assets/js/select2/select2.js - About 1 hr to fix

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

                                                    Tokenizer.prototype.query = function (decorated, params, callback) {
                                                      var self = this;
                                                  
                                                      function createAndSelect (data) {
                                                        // Normalize the data object so we can use it for checks
                                                  Severity: Minor
                                                  Found in assets/js/select2/select2.js - About 1 hr to fix

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

                                                      ArrayAdapter.prototype.convertToOptions = function (data) {
                                                        var self = this;
                                                    
                                                        var $existing = this.$element.find('option');
                                                        var existingIds = $existing.map(function () {
                                                    Severity: Minor
                                                    Found in assets/js/select2/select2.js - About 1 hr to fix

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

                                                        SelectAdapter.prototype.option = function (data) {
                                                          var option;
                                                      
                                                          if (data.children) {
                                                            option = document.createElement('optgroup');
                                                      Severity: Minor
                                                      Found in assets/js/select2/select2.js - About 1 hr to fix

                                                        Function _syncSubtree has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                          Select2.prototype._syncSubtree = function (evt, mutations) {
                                                            var changed = false;
                                                            var self = this;
                                                        
                                                            // Ignore any mutation events raised for elements that aren't options or
                                                        Severity: Minor
                                                        Found in assets/js/select2/select2.js - About 1 hr to fix

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

                                                              $.fn.select2 = function (options) {
                                                                options = options || {};
                                                          
                                                                if (typeof options === 'object') {
                                                                  this.each(function () {
                                                          Severity: Minor
                                                          Found in assets/js/select2/select2.js - About 1 hr to fix

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

                                                              InfiniteScroll.prototype.bind = function (decorated, container, $container) {
                                                                var self = this;
                                                            
                                                                decorated.call(this, container, $container);
                                                            
                                                            
                                                            Severity: Minor
                                                            Found in assets/js/select2/select2.js - About 1 hr to fix

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

                                                                SelectAdapter.prototype.select = function (data) {
                                                                  var self = this;
                                                              
                                                                  data.selected = true;
                                                              
                                                              
                                                              Severity: Minor
                                                              Found in assets/js/select2/select2.js - About 1 hr to fix

                                                                Avoid deeply nested control flow statements.
                                                                Open

                                                                                    if (part === ".") {
                                                                                        name.splice(i, 1);
                                                                                        i -= 1;
                                                                                    } else if (part === "..") {
                                                                                        if (i === 1 && (name[2] === '..' || name[0] === '..')) {
                                                                Severity: Major
                                                                Found in assets/js/select2/select2.js - About 45 mins to fix

                                                                  Avoid deeply nested control flow statements.
                                                                  Open

                                                                                      for (j = baseParts.length; j > 0; j -= 1) {
                                                                                          mapValue = map[baseParts.slice(0, j).join('/')];
                                                                  
                                                                                          //baseName segment has  config, find if it has one for
                                                                                          //this name.
                                                                  Severity: Major
                                                                  Found in assets/js/select2/select2.js - About 45 mins to fix

                                                                    Avoid too many return statements within this function.
                                                                    Open

                                                                          return null;
                                                                    Severity: Major
                                                                    Found in assets/js/select2/select2.js - About 30 mins to fix

                                                                      Avoid too many return statements within this function.
                                                                      Open

                                                                                return matches[1];
                                                                      Severity: Major
                                                                      Found in assets/js/select2/select2.js - About 30 mins to fix

                                                                        Avoid too many return statements within this function.
                                                                        Open

                                                                                return null;
                                                                        Severity: Major
                                                                        Found in assets/js/select2/select2.js - About 30 mins to fix

                                                                          Avoid too many return statements within this function.
                                                                          Open

                                                                              return method;
                                                                          Severity: Major
                                                                          Found in assets/js/select2/select2.js - About 30 mins to fix

                                                                            Avoid too many return statements within this function.
                                                                            Open

                                                                                  return null;
                                                                            Severity: Major
                                                                            Found in assets/js/select2/select2.js - About 30 mins to fix

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

                                                                              S2.define('select2/core',[
                                                                                'jquery',
                                                                                './options',
                                                                                './utils',
                                                                                './keys'
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 1 other location - About 1 mo to fix
                                                                              assets/js/select2/select2.full.js on lines 5029..5640

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

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

                                                                              S2.define('select2/diacritics',[
                                                                              
                                                                              ], function () {
                                                                                var diacritics = {
                                                                                  '\u24B6': 'A',
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 3 wks to fix
                                                                              assets/js/select2/select2.full.js on lines 2133..2979
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 2234..3080
                                                                              assets/js/selectWoo/selectWoo.js on lines 2234..3080

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

                                                                              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

                                                                              S2.define('select2/results',[
                                                                                'jquery',
                                                                                './utils'
                                                                              ], function ($, Utils) {
                                                                                function Results ($element, options, dataAdapter) {
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 1 other location - About 3 wks to fix
                                                                              assets/js/select2/select2.full.js on lines 760..1282

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

                                                                              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 S2;(function () { if (!S2 || !S2.requirejs) {
                                                                              if (!S2) { S2 = {}; } else { require = S2; }
                                                                              /**
                                                                               * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
                                                                               * Available via the MIT or new BSD license.
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 1 other location - About 2 wks to fix
                                                                              assets/js/select2/select2.full.js on lines 30..465

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

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

                                                                              S2.define('select2/defaults',[
                                                                                'jquery',
                                                                                'require',
                                                                              
                                                                                './results',
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 1 wk to fix
                                                                              assets/js/select2/select2.full.js on lines 4509..4904
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 4627..5022
                                                                              assets/js/selectWoo/selectWoo.js on lines 4627..5022

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

                                                                              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

                                                                              S2.define('select2/data/select',[
                                                                                './base',
                                                                                '../utils',
                                                                                'jquery'
                                                                              ], function (BaseAdapter, Utils, $) {
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 1 other location - About 1 wk to fix
                                                                              assets/js/select2/select2.full.js on lines 3022..3306

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

                                                                              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

                                                                              S2.define('select2/utils',[
                                                                                'jquery'
                                                                              ], function ($) {
                                                                                var Utils = {};
                                                                              
                                                                              
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 1 other location - About 1 wk to fix
                                                                              assets/js/select2/select2.full.js on lines 483..758

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

                                                                              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

                                                                              S2.define('select2/dropdown/attachBody',[
                                                                                'jquery',
                                                                                '../utils'
                                                                              ], function ($, Utils) {
                                                                                function AttachBody (decorated, $element, options) {
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 1 wk to fix
                                                                              assets/js/select2/select2.full.js on lines 4114..4335
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 4232..4453
                                                                              assets/js/selectWoo/selectWoo.js on lines 4232..4453

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

                                                                              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

                                                                              S2.define('select2/selection/search',[
                                                                                'jquery',
                                                                                '../utils',
                                                                                '../keys'
                                                                              ], function ($, Utils, KEYS) {
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 1 other location - About 1 wk to fix
                                                                              assets/js/select2/select2.full.js on lines 1827..2048

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

                                                                              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

                                                                              S2.define('select2/selection/base',[
                                                                                'jquery',
                                                                                '../utils',
                                                                                '../keys'
                                                                              ], function ($, Utils, KEYS) {
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 1 other location - About 1 wk to fix
                                                                              assets/js/select2/select2.full.js on lines 1310..1467

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

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

                                                                              S2.define('select2/options',[
                                                                                'require',
                                                                                'jquery',
                                                                                './defaults',
                                                                                './utils'
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 6 days to fix
                                                                              assets/js/select2/select2.full.js on lines 4906..5027
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 5024..5145
                                                                              assets/js/selectWoo/selectWoo.js on lines 5024..5145

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

                                                                              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

                                                                              S2.define('select2/data/ajax',[
                                                                                './array',
                                                                                '../utils',
                                                                                'jquery'
                                                                              ], function (ArrayAdapter, Utils, $) {
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 1 other location - About 4 days to fix
                                                                              assets/js/select2/select2.full.js on lines 3388..3496

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

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

                                                                              S2.define('select2/data/tokenizer',[
                                                                                'jquery'
                                                                              ], function ($) {
                                                                                function Tokenizer (decorated, $element, options) {
                                                                                  var tokenizer = options.get('tokenizer');
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 4 days to fix
                                                                              assets/js/select2/select2.full.js on lines 3624..3739
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 3736..3851
                                                                              assets/js/selectWoo/selectWoo.js on lines 3736..3851

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

                                                                              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

                                                                              S2.define('select2/data/tags',[
                                                                                'jquery'
                                                                              ], function ($) {
                                                                                function Tags (decorated, $element, options) {
                                                                                  var tags = options.get('tags');
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 1 other location - About 4 days to fix
                                                                              assets/js/select2/select2.full.js on lines 3498..3622

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

                                                                              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

                                                                              S2.define('select2/selection/single',[
                                                                                'jquery',
                                                                                './base',
                                                                                '../utils',
                                                                                '../keys'
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 1 other location - About 4 days to fix
                                                                              assets/js/select2/select2.full.js on lines 1469..1567

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

                                                                              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

                                                                              S2.define('select2/selection/multiple',[
                                                                                'jquery',
                                                                                './base',
                                                                                '../utils'
                                                                              ], function ($, BaseSelection, Utils) {
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 1 other location - About 4 days to fix
                                                                              assets/js/select2/select2.full.js on lines 1569..1677

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

                                                                              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

                                                                              S2.define('select2/dropdown/search',[
                                                                                'jquery',
                                                                                '../utils'
                                                                              ], function ($, Utils) {
                                                                                function Search () { }
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 1 other location - About 4 days to fix
                                                                              assets/js/select2/select2.full.js on lines 3879..3979

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

                                                                              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

                                                                              S2.define('select2/dropdown/infiniteScroll',[
                                                                                'jquery'
                                                                              ], function ($) {
                                                                                function InfiniteScroll (decorated, $element, options, dataAdapter) {
                                                                                  this.lastParams = {};
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 4 days to fix
                                                                              assets/js/select2/select2.full.js on lines 4024..4112
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 4142..4230
                                                                              assets/js/selectWoo/selectWoo.js on lines 4142..4230

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

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

                                                                              S2.define('select2/selection/allowClear',[
                                                                                'jquery',
                                                                                '../keys'
                                                                              ], function ($, KEYS) {
                                                                                function AllowClear () { }
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 3 days to fix
                                                                              assets/js/select2/select2.full.js on lines 1729..1825
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 1824..1920
                                                                              assets/js/selectWoo/selectWoo.js on lines 1824..1920

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

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

                                                                              S2.define('select2/data/array',[
                                                                                './select',
                                                                                '../utils',
                                                                                'jquery'
                                                                              ], function (SelectAdapter, Utils, $) {
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 3 days to fix
                                                                              assets/js/select2/select2.full.js on lines 3308..3386
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 3416..3494
                                                                              assets/js/selectWoo/selectWoo.js on lines 3416..3494

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

                                                                              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

                                                                              S2.define('jquery.select2',[
                                                                                'jquery',
                                                                                'jquery-mousewheel',
                                                                              
                                                                                './select2/core',
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 1 other location - About 2 days to fix
                                                                              assets/js/select2/select2.full.js on lines 6360..6416

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

                                                                              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

                                                                              S2.define('select2/selection/placeholder',[
                                                                                '../utils'
                                                                              ], function (Utils) {
                                                                                function Placeholder (decorated, $element, options) {
                                                                                  this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 1 other location - About 2 days to fix
                                                                              assets/js/select2/select2.full.js on lines 1679..1727

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

                                                                              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

                                                                              S2.define('select2/dropdown/selectOnClose',[
                                                                              
                                                                              ], function () {
                                                                                function SelectOnClose () { }
                                                                              
                                                                              
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 1 day to fix
                                                                              assets/js/select2/select2.full.js on lines 4377..4426
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 4495..4544
                                                                              assets/js/selectWoo/selectWoo.js on lines 4495..4544

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

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

                                                                              S2.define('select2/dropdown/hidePlaceholder',[
                                                                              
                                                                              ], function () {
                                                                                function HidePlaceholder (decorated, $element, options, dataAdapter) {
                                                                                  this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 1 day to fix
                                                                              assets/js/select2/select2.full.js on lines 3981..4022
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 4099..4140
                                                                              assets/js/selectWoo/selectWoo.js on lines 4099..4140

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

                                                                              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

                                                                              S2.define('select2/data/base',[
                                                                                '../utils'
                                                                              ], function (Utils) {
                                                                                function BaseAdapter ($element, options) {
                                                                                  BaseAdapter.__super__.constructor.call(this);
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 1 other location - About 1 day to fix
                                                                              assets/js/select2/select2.full.js on lines 2981..3020

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

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

                                                                              S2.define('select2/i18n/en',[],function () {
                                                                                // English
                                                                                return {
                                                                                  errorLoading: function () {
                                                                                    return 'The results could not be loaded.';
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 1 day to fix
                                                                              assets/js/select2/select2.full.js on lines 4464..4507
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 4582..4625
                                                                              assets/js/selectWoo/selectWoo.js on lines 4582..4625

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

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

                                                                              S2.define('select2/selection/eventRelay',[
                                                                                'jquery'
                                                                              ], function ($) {
                                                                                function EventRelay () { }
                                                                              
                                                                              
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 1 day to fix
                                                                              assets/js/select2/select2.full.js on lines 2050..2094
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 2151..2195
                                                                              assets/js/selectWoo/selectWoo.js on lines 2151..2195

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

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

                                                                              S2.define('select2/dropdown',[
                                                                                'jquery',
                                                                                './utils'
                                                                              ], function ($, Utils) {
                                                                                function Dropdown ($element, options) {
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 1 day to fix
                                                                              assets/js/select2/select2.full.js on lines 3836..3877
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 3948..3989
                                                                              assets/js/selectWoo/selectWoo.js on lines 3948..3989

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

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

                                                                              S2.define('select2/dropdown/minimumResultsForSearch',[
                                                                              
                                                                              ], function () {
                                                                                function countResults (data) {
                                                                                  var count = 0;
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 1 day to fix
                                                                              assets/js/select2/select2.full.js on lines 4337..4375
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 4455..4493
                                                                              assets/js/selectWoo/selectWoo.js on lines 4455..4493

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

                                                                              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

                                                                              S2.define('select2/translation',[
                                                                                'jquery',
                                                                                'require'
                                                                              ], function ($, require) {
                                                                                function Translation (dict) {
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 1 day to fix
                                                                              assets/js/select2/select2.full.js on lines 2096..2131
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 2197..2232
                                                                              assets/js/selectWoo/selectWoo.js on lines 2197..2232

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

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

                                                                              S2.define('select2/dropdown/closeOnSelect',[
                                                                              
                                                                              ], function () {
                                                                                function CloseOnSelect () { }
                                                                              
                                                                              
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 1 day to fix
                                                                              assets/js/select2/select2.full.js on lines 4428..4462
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 4546..4580
                                                                              assets/js/selectWoo/selectWoo.js on lines 4546..4580

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

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

                                                                              S2.define('select2/data/maximumSelectionLength',[
                                                                              
                                                                              ], function (){
                                                                                function MaximumSelectionLength (decorated, $e, options) {
                                                                                  this.maximumSelectionLength = options.get('maximumSelectionLength');
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 1 day to fix
                                                                              assets/js/select2/select2.full.js on lines 3804..3834
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 3916..3946
                                                                              assets/js/selectWoo/selectWoo.js on lines 3916..3946

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

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

                                                                              S2.define('select2/data/maximumInputLength',[
                                                                              
                                                                              ], function () {
                                                                                function MaximumInputLength (decorated, $e, options) {
                                                                                  this.maximumInputLength = options.get('maximumInputLength');
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 1 day to fix
                                                                              assets/js/select2/select2.full.js on lines 3772..3802
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 3884..3914
                                                                              assets/js/selectWoo/selectWoo.js on lines 3884..3914

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

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

                                                                              S2.define('select2/data/minimumInputLength',[
                                                                              
                                                                              ], function () {
                                                                                function MinimumInputLength (decorated, $e, options) {
                                                                                  this.minimumInputLength = options.get('minimumInputLength');
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 7 hrs to fix
                                                                              assets/js/select2/select2.full.js on lines 3741..3770
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 3853..3882
                                                                              assets/js/selectWoo/selectWoo.js on lines 3853..3882

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

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

                                                                              S2.define('select2/keys',[
                                                                              
                                                                              ], function () {
                                                                                var KEYS = {
                                                                                  BACKSPACE: 8,
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 4 hrs to fix
                                                                              assets/js/select2/select2.full.js on lines 1284..1308
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 1320..1344
                                                                              assets/js/selectWoo/selectWoo.js on lines 1320..1344

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

                                                                              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

                                                                              (function (factory) {
                                                                                if (typeof define === 'function' && define.amd) {
                                                                                  // AMD. Register as an anonymous module.
                                                                                  define(['jquery'], factory);
                                                                                } else if (typeof exports === 'object') {
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 2 other locations - About 2 hrs to fix
                                                                              assets/js/jquery-cookie/jquery.cookie.js on lines 8..117
                                                                              assets/js/select2/select2.full.js on lines 8..6436

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

                                                                              S2.define('jquery',[],function () {
                                                                                var _$ = jQuery || $;
                                                                              
                                                                                if (_$ == null && console && console.error) {
                                                                                  console.error(
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 2 hrs to fix
                                                                              assets/js/select2/select2.full.js on lines 469..481
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 487..499
                                                                              assets/js/selectWoo/selectWoo.js on lines 487..499

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

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

                                                                                if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
                                                                                  var S2 = jQuery.fn.select2.amd;
                                                                                }
                                                                              Severity: Major
                                                                              Found in assets/js/select2/select2.js and 3 other locations - About 1 hr to fix
                                                                              assets/js/select2/select2.full.js on lines 27..29
                                                                              assets/js/selectWoo/selectWoo.full.js on lines 41..43
                                                                              assets/js/selectWoo/selectWoo.js on lines 41..43

                                                                              Duplicated Code

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

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

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

                                                                              Tuning

                                                                              This issue has a mass of 65.

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

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

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

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

                                                                              Refactorings

                                                                              Further Reading

                                                                              There are no issues that match your filters.

                                                                              Category
                                                                              Status