wikimedia/mediawiki-core

View on GitHub
resources/lib/jquery.chosen/chosen.jquery.js

Summary

Maintainability
F
1 wk
Test Coverage

File chosen.jquery.js has 1238 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
Chosen, a Select Box Enhancer for jQuery and Prototype
by Patrick Filler for Harvest, http://getharvest.com

Version 1.8.2
Severity: Major
Found in resources/lib/jquery.chosen/chosen.jquery.js - About 3 days to fix

    Function register_observers has 126 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        Chosen.prototype.register_observers = function() {
          this.container.on('touchstart.chosen', (function(_this) {
            return function(evt) {
              _this.container_mousedown(evt);
            };
    Severity: Major
    Found in resources/lib/jquery.chosen/chosen.jquery.js - About 5 hrs to fix

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

          AbstractChosen.prototype.winnow_results = function() {
            var escapedQuery, fix, i, len, option, prefix, query, ref, regex, results, results_group, search_match, startpos, suffix, text;
            this.no_results_clear();
            results = 0;
            query = this.get_search_text();
      Severity: Major
      Found in resources/lib/jquery.chosen/chosen.jquery.js - About 2 hrs to fix

        Function result_select has 41 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            Chosen.prototype.result_select = function(evt) {
              var high, item;
              if (this.result_highlight) {
                high = this.result_highlight;
                this.result_clear_highlight();
        Severity: Minor
        Found in resources/lib/jquery.chosen/chosen.jquery.js - About 1 hr to fix

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

              AbstractChosen.prototype.keydown_checker = function(evt) {
                var ref, stroke;
                stroke = (ref = evt.which) != null ? ref : evt.keyCode;
                this.search_field_scale();
                if (stroke !== 8 && this.pending_backstroke) {
          Severity: Minor
          Found in resources/lib/jquery.chosen/chosen.jquery.js - About 1 hr to fix

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

                Chosen.prototype.set_up_html = function() {
                  var container_classes, container_props;
                  container_classes = ["chosen-container"];
                  container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
                  if (this.inherit_select_classes && this.form_field.className) {
            Severity: Minor
            Found in resources/lib/jquery.chosen/chosen.jquery.js - About 1 hr to fix

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

                  AbstractChosen.prototype.keyup_checker = function(evt) {
                    var ref, stroke;
                    stroke = (ref = evt.which) != null ? ref : evt.keyCode;
                    this.search_field_scale();
                    switch (stroke) {
              Severity: Minor
              Found in resources/lib/jquery.chosen/chosen.jquery.js - About 1 hr to fix

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

                    AbstractChosen.prototype.result_add_option = function(option) {
                      var classes, option_el;
                      if (!option.search_match) {
                        return '';
                      }
                Severity: Minor
                Found in resources/lib/jquery.chosen/chosen.jquery.js - About 1 hr to fix

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

                      AbstractChosen.prototype.set_default_values = function() {
                        this.click_test_action = (function(_this) {
                          return function(evt) {
                            return _this.test_active_click(evt);
                          };
                  Severity: Minor
                  Found in resources/lib/jquery.chosen/chosen.jquery.js - About 1 hr to fix

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

                        AbstractChosen.prototype.results_option_build = function(options) {
                          var content, data, data_content, i, len, ref, shown_results;
                          content = '';
                          shown_results = 0;
                          ref = this.results_data;
                    Severity: Minor
                    Found in resources/lib/jquery.chosen/chosen.jquery.js - About 1 hr to fix

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

                          SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
                            if (option.nodeName.toUpperCase() === "OPTION") {
                              if (option.text !== "") {
                                if (group_position != null) {
                                  this.parsed[group_position].children += 1;
                      Severity: Minor
                      Found in resources/lib/jquery.chosen/chosen.jquery.js - About 1 hr to fix

                        Avoid deeply nested control flow statements.
                        Open

                                      if (query.length) {
                                        startpos = search_match.index;
                                        prefix = text.slice(0, startpos);
                                        fix = text.slice(startpos, startpos + query.length);
                                        suffix = text.slice(startpos + query.length);
                        Severity: Major
                        Found in resources/lib/jquery.chosen/chosen.jquery.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                      } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
                                        option.search_match = true;
                                      }
                          Severity: Major
                          Found in resources/lib/jquery.chosen/chosen.jquery.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                          if (results_group != null) {
                                            results_group.group_match = true;
                                          }
                            Severity: Major
                            Found in resources/lib/jquery.chosen/chosen.jquery.js - About 45 mins to fix

                              Consider simplifying this complex logical expression.
                              Open

                                    if (/iP(od|hone)/i.test(window.navigator.userAgent) || /IEMobile/i.test(window.navigator.userAgent) || /Windows Phone/i.test(window.navigator.userAgent) || /BlackBerry/i.test(window.navigator.userAgent) || /BB10/i.test(window.navigator.userAgent) || /Android.*Mobile/i.test(window.navigator.userAgent)) {
                                      return false;
                                    }
                              Severity: Major
                              Found in resources/lib/jquery.chosen/chosen.jquery.js - About 40 mins to fix

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

                                      } else {
                                        this.search_container = this.container.find('div.chosen-search').first();
                                        this.selected_item = this.container.find('.chosen-single').first();
                                      }
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 1 other location - About 1 hr to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 684..687

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 63.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      if (this.is_multiple) {
                                        this.search_choices = this.container.find('ul.chosen-choices').first();
                                        this.search_container = this.container.find('li.search-field').first();
                                      } else {
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 1 other location - About 1 hr to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 687..690

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 63.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 1 other location - About 1 hr to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 1052..1052

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

                                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

                                      target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 1 other location - About 1 hr to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 1062..1062

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

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

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

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

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

                                Refactorings

                                Further Reading

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

                                    Chosen.prototype.result_clear_highlight = function() {
                                      if (this.result_highlight) {
                                        this.result_highlight.removeClass("highlighted");
                                      }
                                      return this.result_highlight = null;
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 1 other location - About 1 hr to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 1305..1310

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

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

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

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

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

                                Refactorings

                                Further Reading

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

                                    Chosen.prototype.clear_backstroke = function() {
                                      if (this.pending_backstroke) {
                                        this.pending_backstroke.removeClass("search-choice-focus");
                                      }
                                      return this.pending_backstroke = null;
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 1 other location - About 1 hr to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 982..987

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

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
                                        this.form_field_jq.trigger("chosen:maxselected", {
                                          chosen: this
                                        });
                                        return false;
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 1 other location - About 1 hr to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 1141..1146

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 55.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                        if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
                                          this.form_field_jq.trigger("chosen:maxselected", {
                                            chosen: this
                                          });
                                          return false;
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 1 other location - About 1 hr to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 990..995

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 55.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.container.on('touchend.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.container_mouseup(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.search_results.on('mouseup.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.search_results_mouseup(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.container.on('mouseup.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.container_mouseup(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.search_results.on('mouseover.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.search_results_mouseover(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.search_results.on('touchstart.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.search_results_touchstart(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.form_field_jq.on("chosen:updated.chosen", (function(_this) {
                                        return function(evt) {
                                          _this.results_update_field(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.form_field_jq.on("chosen:open.chosen", (function(_this) {
                                        return function(evt) {
                                          _this.container_mousedown(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.container.on('touchstart.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.container_mousedown(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.form_field_jq.on("chosen:activate.chosen", (function(_this) {
                                        return function(evt) {
                                          _this.activate_field(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.search_field.on('blur.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.input_blur(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.search_results.on('mouseout.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.search_results_mouseout(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.search_results.on('mousewheel.chosen DOMMouseScroll.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.search_results_mousewheel(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.search_results.on('touchend.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.search_results_touchend(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.search_field.on('paste.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.clipboard_event_checker(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.search_field.on('cut.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.clipboard_event_checker(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.container.on('mousedown.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.container_mousedown(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.form_field_jq.on("chosen:close.chosen", (function(_this) {
                                        return function(evt) {
                                          _this.close_field(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.search_results.on('touchmove.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.search_results_touchmove(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.search_field.on('keyup.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.keyup_checker(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.search_field.on('focus.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.input_focus(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.container.on('mouseenter.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.mouse_enter(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.search_field.on('keydown.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.keydown_checker(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 728..732
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                      this.container.on('mouseleave.chosen', (function(_this) {
                                        return function(evt) {
                                          _this.mouse_leave(evt);
                                        };
                                      })(this));
                                Severity: Major
                                Found in resources/lib/jquery.chosen/chosen.jquery.js and 22 other locations - About 35 mins to fix
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 703..707
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 708..712
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 713..717
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 718..722
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 723..727
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 733..737
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 738..742
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 743..747
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 748..752
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 753..757
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 758..762
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 763..767
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 768..772
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 773..777
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 778..782
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 783..787
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 788..792
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 793..797
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 798..802
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 803..807
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 808..812
                                resources/lib/jquery.chosen/chosen.jquery.js on lines 813..817

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 46.

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

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

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

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

                                Refactorings

                                Further Reading

                                There are no issues that match your filters.

                                Category
                                Status