wikimedia/mediawiki-core

View on GitHub

Showing 2,063 of 11,773 total issues

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

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

    mw.widgets.datetime.DateTimeInputWidget.prototype.onHandleClick = function () {
        this.focus();
    };
resources/lib/ooui/oojs-ui-core.js on lines 2143..2145
resources/lib/ooui/oojs-ui-core.js on lines 2231..2233
resources/lib/ooui/oojs-ui-widgets.js on lines 925..927
resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js on lines 713..715

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

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

                this._shortMonthsParse[i] = new RegExp(
                    '^' + this.monthsShort(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 1055..1058
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

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

mw.widgets.RowWidget.prototype.clear = function () {
    this.model.clear();
};
Severity: Major
Found in resources/src/mediawiki.widgets/Table/mw.widgets.RowWidget.js and 5 other locations - About 35 mins to fix
resources/lib/ooui/oojs-ui-core.js on lines 9571..9573
resources/lib/ooui/oojs-ui-core.js on lines 12958..12960
resources/lib/ooui/oojs-ui-widgets.js on lines 3983..3985
resources/src/mediawiki.widgets/Table/mw.widgets.TableWidget.js on lines 243..245
resources/src/mediawiki.widgets/Table/mw.widgets.TableWidget.js on lines 250..252

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

    mw.widgets.datetime.DateTimeInputWidget.prototype.onFieldChange = function () {
        this.updateValueFromFields();
    };
resources/lib/ooui/oojs-ui-core.js on lines 2143..2145
resources/lib/ooui/oojs-ui-core.js on lines 2231..2233
resources/lib/ooui/oojs-ui-widgets.js on lines 925..927
resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js on lines 589..591

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

            if (!target) return {
              target: '',
              _targetLowerCodes: [0 /*this 0 doesn't make sense. here because an empty array causes the algorithm to deoptimize and run 50% slower!*/],
              _nextBeginningIndexes: null,
              score: null,
Severity: Minor
Found in resources/lib/qunitjs/qunit.js and 1 other location - About 35 mins to fix
resources/lib/qunitjs/qunit.js on lines 4718..4725

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

              for (var i = matchesBestLen - 1; i >= 0; --i) {
                prepared.indexes[i] = matchesBest[i];
              }
Severity: Minor
Found in resources/lib/qunitjs/qunit.js and 1 other location - About 35 mins to fix
resources/lib/qunitjs/qunit.js on lines 4980..4982

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

              for (var i = matchesBestLen - 1; i >= 0; --i) {
                prepared.indexes[i] = matchesBest[i];
              }
Severity: Minor
Found in resources/lib/qunitjs/qunit.js and 1 other location - About 35 mins to fix
resources/lib/qunitjs/qunit.js on lines 4897..4899

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

OO.ui.Window.prototype.getReadyProcess = function () {
    return new OO.ui.Process();
};
Severity: Major
Found in resources/lib/ooui/oojs-ui-windows.js and 3 other locations - About 35 mins to fix
resources/lib/ooui/oojs-ui-windows.js on lines 2246..2248
resources/lib/ooui/oojs-ui-windows.js on lines 2284..2286
resources/lib/ooui/oojs-ui-windows.js on lines 2303..2305

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

mw.widgets.TableWidget.prototype.clearWithProperties = function () {
    this.model.clearWithProperties();
};
resources/lib/ooui/oojs-ui-core.js on lines 9571..9573
resources/lib/ooui/oojs-ui-core.js on lines 12958..12960
resources/lib/ooui/oojs-ui-widgets.js on lines 3983..3985
resources/src/mediawiki.widgets/Table/mw.widgets.RowWidget.js on lines 232..234
resources/src/mediawiki.widgets/Table/mw.widgets.TableWidget.js on lines 243..245

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