wikimedia/mediawiki-core

View on GitHub

Showing 2,063 of 11,773 total issues

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

    public function buildGroupConcatField(
        $delim, $table, $field, $conds = '', $join_conds = []
    ) {
        $fld = "group_concat($field," . $this->quoter->addQuotes( $delim ) . ')';

Severity: Minor
Found in includes/libs/rdbms/platform/SqlitePlatform.php and 1 other location - About 35 mins to fix
includes/libs/rdbms/platform/PostgresPlatform.php on lines 160..166

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

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

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

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

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

Refactorings

Further Reading

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

    public function __construct() {
        parent::__construct();
        $this->addDescription(
            'Take page text out of an XML dump file and render basic HTML out to files' );
        $this->addOption( 'output-dir', 'The directory to output the HTML files to', true, true );
Severity: Minor
Found in maintenance/renderDump.php and 1 other location - About 35 mins to fix
maintenance/dumpIterator.php on lines 50..56

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

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

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

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

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

Refactorings

Further Reading

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

        $invert = Html::rawElement( 'label', [
            'class' => 'mw-input-with-label', 'title' => $this->msg( 'tooltip-invert' )->text(),
        ], Html::element( 'input', [
            'type' => 'checkbox', 'name' => 'invert', 'value' => '1', 'checked' => $opts['invert'],
        ] ) . ' ' . $this->msg( 'invert' )->escaped() );
Severity: Minor
Found in includes/specials/SpecialRecentChanges.php and 1 other location - About 35 mins to fix
includes/specials/SpecialRecentChanges.php on lines 871..875

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

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

        t2s_1to1 = dict([(f, t[0]) for (f, t) in t2s_1tomany.iteritems()])
Severity: Major
Found in maintenance/language/zhtable/Makefile.py and 3 other locations - About 35 mins to fix
maintenance/language/zhtable/Makefile.py on lines 335..335
maintenance/language/zhtable/Makefile.py on lines 337..337
maintenance/language/zhtable/Makefile.py on lines 338..338

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

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

        s2t_1to1 = dict([(f, t[0]) for (f, t) in s2t_1tomany.iteritems()])
Severity: Major
Found in maintenance/language/zhtable/Makefile.py and 3 other locations - About 35 mins to fix
maintenance/language/zhtable/Makefile.py on lines 334..334
maintenance/language/zhtable/Makefile.py on lines 337..337
maintenance/language/zhtable/Makefile.py on lines 338..338

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

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

        t2s_1to1 = dict([(f, t[0]) for (f, t) in t2s_1tomany.items()])
Severity: Major
Found in maintenance/language/zhtable/Makefile.py and 3 other locations - About 35 mins to fix
maintenance/language/zhtable/Makefile.py on lines 334..334
maintenance/language/zhtable/Makefile.py on lines 335..335
maintenance/language/zhtable/Makefile.py on lines 338..338

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

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

        s2t_1to1 = dict([(f, t[0]) for (f, t) in s2t_1tomany.items()])
Severity: Major
Found in maintenance/language/zhtable/Makefile.py and 3 other locations - About 35 mins to fix
maintenance/language/zhtable/Makefile.py on lines 334..334
maintenance/language/zhtable/Makefile.py on lines 335..335
maintenance/language/zhtable/Makefile.py on lines 337..337

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

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language