wikimedia/mediawiki-core

View on GitHub

Showing 2,068 of 11,779 total issues

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.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.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.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.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_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.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.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('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('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_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('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('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('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 6 locations. Consider refactoring.
Open

    } else if ( e.keyCode === OO.ui.Keys.RIGHT || e.keyCode === OO.ui.Keys.DOWN ) {
        nextItem = element.getRelativeFocusableItem( this, 1 );
    }
Severity: Major
Found in resources/lib/ooui/oojs-ui-core.js and 5 other locations - About 35 mins to fix
resources/lib/jquery.ui/jquery.ui.button.js on lines 191..193
resources/lib/ooui/oojs-ui-core.js on lines 7435..7435
resources/lib/ooui/oojs-ui-core.js on lines 9585..9589
resources/lib/ooui/oojs-ui-widgets.js on lines 4172..4196
resources/lib/ooui/oojs-ui-widgets.js on lines 4538..4560

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

    } else if (
        e.keyCode === OO.ui.Keys.LEFT ||
        e.keyCode === OO.ui.Keys.RIGHT
    ) {
        let movement;
Severity: Major
Found in resources/lib/ooui/oojs-ui-widgets.js and 5 other locations - About 35 mins to fix
resources/lib/jquery.ui/jquery.ui.button.js on lines 191..193
resources/lib/ooui/oojs-ui-core.js on lines 7435..7435
resources/lib/ooui/oojs-ui-core.js on lines 9585..9589
resources/lib/ooui/oojs-ui-core.js on lines 9587..9589
resources/lib/ooui/oojs-ui-widgets.js on lines 4538..4560

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

                    e.keyCode === OO.ui.Keys.UP || e.keyCode === OO.ui.Keys.LEFT ? -1 : 1,
Severity: Major
Found in resources/lib/ooui/oojs-ui-core.js and 5 other locations - About 35 mins to fix
resources/lib/jquery.ui/jquery.ui.button.js on lines 191..193
resources/lib/ooui/oojs-ui-core.js on lines 9585..9589
resources/lib/ooui/oojs-ui-core.js on lines 9587..9589
resources/lib/ooui/oojs-ui-widgets.js on lines 4172..4196
resources/lib/ooui/oojs-ui-widgets.js on lines 4538..4560

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

        meridiem: function (hours, minutes, isLower) {
            if (hours < 12) {
                return isLower ? 'vm' : 'VM';
            } else {
                return isLower ? 'nm' : 'NM';
Severity: Major
Found in resources/lib/moment/locale/af.js and 5 other locations - About 35 mins to fix
resources/lib/moment/locale/el.js on lines 47..53
resources/lib/moment/locale/eo.js on lines 38..44
resources/lib/moment/locale/si.js on lines 68..74
resources/lib/moment/locale/tzl.js on lines 37..43
resources/lib/moment/locale/vi.js on lines 33..39

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

                this._longMonthsParse[i] = new RegExp(
                    '^' + this.months(mom, '').replace('.', '') + '$',
                    'i'
                );
Severity: Major
Found in resources/lib/moment/moment.js and 4 other locations - About 35 mins to fix
resources/lib/moment/moment.js on lines 1059..1062
resources/lib/moment/moment.js on lines 1661..1664
resources/lib/moment/moment.js on lines 1665..1668
resources/lib/moment/moment.js on lines 1669..1672

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

Severity
Category
Status
Source
Language