adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

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

jQuery(function($){
    $.datepicker.regional['ru'] = {
        closeText: 'Закрыть',
        prevText: '<Пред',
        nextText: 'След>',
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-af.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ar-DZ.js on lines 4..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-az.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-bs.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ca.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-cs.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-cy-GB.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-da.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-de.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-el.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-en-AU.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-en-GB.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-en-NZ.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-eo.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-es.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-et.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-eu.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-fi.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-fo.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-fr-CH.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-fr.js on lines 5..25
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-gl.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-he.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-hi.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-hr.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-hu.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-hy.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-id.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-is.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-it.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ja.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ka.js on lines 3..21
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-kk.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-km.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ko.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-lb.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-lt.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-lv.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-mk.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ml.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ms.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-nl-BE.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-no.js on lines 4..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-pl.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-pt-BR.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-rm.js on lines 3..21
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-sk.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-sq.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-sr-SR.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-sr.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-sv.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ta.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-th.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-tj.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-tr.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-vi.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-zh-CN.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-zh-HK.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-zh-TW.js on lines 3..23

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

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

jQuery(function($){
    $.datepicker.regional['af'] = {
        closeText: 'Selekteer',
        prevText: 'Vorige',
        nextText: 'Volgende',
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ar-DZ.js on lines 4..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-az.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-bs.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ca.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-cs.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-cy-GB.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-da.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-de.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-el.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-en-AU.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-en-GB.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-en-NZ.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-eo.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-es.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-et.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-eu.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-fi.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-fo.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-fr-CH.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-fr.js on lines 5..25
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-gl.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-he.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-hi.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-hr.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-hu.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-hy.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-id.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-is.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-it.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ja.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ka.js on lines 3..21
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-kk.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-km.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ko.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-lb.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-lt.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-lv.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-mk.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ml.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ms.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-nl-BE.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-no.js on lines 4..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-pl.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-pt-BR.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-rm.js on lines 3..21
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ru.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-sk.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-sq.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-sr-SR.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-sr.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-sv.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ta.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-th.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-tj.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-tr.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-vi.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-zh-CN.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-zh-HK.js on lines 3..23
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-zh-TW.js on lines 3..23

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

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

File StringMatch.js has 484 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright (c) 2013 - present Adobe Systems Incorporated. All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
Severity: Minor
Found in src/utils/StringMatch.js - About 7 hrs to fix

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

                if ( event.pageX == null && original.clientX != null ) {
                    eventDoc = event.target.ownerDocument || document;
                    doc = eventDoc.documentElement;
                    body = eventDoc.body;
    
    
    src/thirdparty/jquery-2.1.3.js on lines 4521..4528

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

    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

    jQuery(function($){
        $.datepicker.regional['ro'] = {
            closeText: 'Închide',
            prevText: '« Luna precedentă',
            nextText: 'Luna următoare »',
    src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-pt.js on lines 2..22

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

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

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

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

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

    Refactorings

    Further Reading

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

                if ( event.pageX == null && original.clientX != null ) {
                    eventDoc = event.target.ownerDocument || document;
                    doc = eventDoc.documentElement;
                    body = eventDoc.body;
    
    
    Severity: Major
    Found in src/thirdparty/jquery-2.1.3.js and 1 other location - About 7 hrs to fix
    src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/jquery-1.7.2.js on lines 3380..3387

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

    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

    jQuery(function($){
        $.datepicker.regional['pt'] = {
            closeText: 'Fechar',
            prevText: '<Anterior',
            nextText: 'Seguinte',
    src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/i18n/jquery.ui.datepicker-ro.js on lines 6..26

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

    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

    Function parse has 188 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function parse (pattern, isSub) {
      var options = this.options
    
      // shortcuts
      if (!options.noglobstar && pattern === "**") return GLOBSTAR
    Severity: Major
    Found in src/thirdparty/globmatch.js - About 7 hrs to fix

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

                  it("should display correct scopes for line inside a arrow function", function () {
                      testEditor.setSelection({line: 58, ch: 4}, {line: 58, ch: 17});
      
                      var result = ExtractToFunction.handleExtractToFunction();
                      var scopeMenu;
      Severity: Major
      Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 2 other locations - About 7 hrs to fix
      src/extensions/default/JavaScriptRefactoring/unittests.js on lines 388..403
      src/extensions/default/JavaScriptRefactoring/unittests.js on lines 405..420

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

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

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

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

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

      Refactorings

      Further Reading

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

                  it("should display correct scopes for line inside a function declaration", function () {
                      testEditor.setSelection({line: 7, ch: 4}, {line: 7, ch: 28});
      
                      var result = ExtractToFunction.handleExtractToFunction();
                      var scopeMenu;
      Severity: Major
      Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 2 other locations - About 7 hrs to fix
      src/extensions/default/JavaScriptRefactoring/unittests.js on lines 405..420
      src/extensions/default/JavaScriptRefactoring/unittests.js on lines 422..437

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

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

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

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

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

      Refactorings

      Further Reading

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

                  it("should display correct scopes for line inside a function expression", function () {
                      testEditor.setSelection({line: 27, ch: 4}, {line: 27, ch: 31});
      
                      var result = ExtractToFunction.handleExtractToFunction();
                      var scopeMenu;
      Severity: Major
      Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 2 other locations - About 7 hrs to fix
      src/extensions/default/JavaScriptRefactoring/unittests.js on lines 388..403
      src/extensions/default/JavaScriptRefactoring/unittests.js on lines 422..437

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

      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

      $.ui.plugin.add("draggable", "zIndex", {
          start: function(event, ui) {
              var t = $(ui.helper), o = $(this).data("draggable").options;
              if(t.css("zIndex")) o._zIndex = t.css("zIndex");
              t.css('zIndex', o.zIndex);
      src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.draggable.js on lines 658..668

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

      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

          CSSPreprocessorDocument.prototype.updateHighlight = function () {
              if (Inspector.config.highlight && this.editor) {
                  var editor = this.editor,
                      selectors = [];
                  _.each(this.editor.getSelections(), function (sel) {
      Severity: Major
      Found in src/LiveDevelopment/Documents/CSSPreprocessorDocument.js and 1 other location - About 7 hrs to fix
      src/LiveDevelopment/Documents/CSSDocument.js on lines 166..182

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

      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

      $.ui.plugin.add("draggable", "opacity", {
          start: function(event, ui) {
              var t = $(ui.helper), o = $(this).data('draggable').options;
              if(t.css("opacity")) o._opacity = t.css("opacity");
              t.css('opacity', o.opacity);
      src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.draggable.js on lines 808..818

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

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

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

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

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

      Refactorings

      Further Reading

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

                  if(!o.axis || o.axis != 'y') {
                      if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
                          i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
                      else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity)
                          i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
      src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.draggable.js on lines 681..686

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

      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

          CSSDocument.prototype.updateHighlight = function () {
              if (Inspector.config.highlight && this.editor) {
                  var editor = this.editor,
                      selectors = [];
                  _.each(this.editor.getSelections(), function (sel) {
      Severity: Major
      Found in src/LiveDevelopment/Documents/CSSDocument.js and 1 other location - About 7 hrs to fix
      src/LiveDevelopment/Documents/CSSPreprocessorDocument.js on lines 97..113

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

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

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

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

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

      Refactorings

      Further Reading

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

                  if(!o.axis || o.axis != 'x') {
                      if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
                          i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
                      else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity)
                          i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
      src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.draggable.js on lines 688..693

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

      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

      Function jsDump has 185 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      QUnit.jsDump = (function() {
          function quote( str ) {
              return '"' + str.toString().replace( /"/g, '\\"' ) + '"';
          }
          function literal( o ) {

        File LanguageClientWrapper.js has 475 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         * Copyright (c) 2019 - present Adobe. All rights reserved.
         *
         * Permission is hereby granted, free of charge, to any person obtaining a
         * copy of this software and associated documentation files (the "Software"),
        Severity: Minor
        Found in src/languageTools/LanguageClientWrapper.js - About 7 hrs to fix

          File strings.js has 473 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*
           * Copyright (c) 2014 - present Adobe Systems Incorporated. All rights reserved.
           *
           * Permission is hereby granted, free of charge, to any person obtaining a
           * copy of this software and associated documentation files (the "Software"),
          Severity: Minor
          Found in src/nls/gl/strings.js - About 7 hrs to fix
            Severity
            Category
            Status
            Source
            Language