talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

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

if(Ext.form.DateField){
   Ext.apply(Ext.form.DateField.prototype, {
      disabledDaysText  : "Desabilitado",
      disabledDatesText : "Desabilitado",
      minText           : "A data deste campo deve ser posterior a {0}",
Severity: Major
Found in app/assets/javascripts/ext/src/locale/ext-lang-pt_BR.js and 17 other locations - About 1 hr to fix
app/assets/javascripts/ext/src/locale/ext-lang-el_GR.js on lines 171..180
app/assets/javascripts/ext/src/locale/ext-lang-fa.js on lines 144..153
app/assets/javascripts/ext/src/locale/ext-lang-fr_CA.js on lines 168..177
app/assets/javascripts/ext/src/locale/ext-lang-gr.js on lines 125..134
app/assets/javascripts/ext/src/locale/ext-lang-hr.js on lines 159..168
app/assets/javascripts/ext/src/locale/ext-lang-ko.js on lines 129..138
app/assets/javascripts/ext/src/locale/ext-lang-lv.js on lines 126..135
app/assets/javascripts/ext/src/locale/ext-lang-mk.js on lines 126..135
app/assets/javascripts/ext/src/locale/ext-lang-pt.js on lines 132..141
app/assets/javascripts/ext/src/locale/ext-lang-sk.js on lines 132..141
app/assets/javascripts/ext/src/locale/ext-lang-sl.js on lines 126..135
app/assets/javascripts/ext/src/locale/ext-lang-sr_RS.js on lines 128..137
app/assets/javascripts/ext/src/locale/ext-lang-sv_SE.js on lines 128..137
app/assets/javascripts/ext/src/locale/ext-lang-ukr.js on lines 133..142
app/assets/javascripts/ext/src/locale/ext-lang-vn.js on lines 131..140
app/assets/javascripts/ext/src/locale/ext-lang-zh_CN.js on lines 134..143
app/assets/javascripts/ext/src/locale/ext-lang-zh_TW.js on lines 128..137

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

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

if(Ext.form.DateField){
   Ext.apply(Ext.form.DateField.prototype, {
      disabledDaysText  : "ÁðåíåñãïðïéçìÝíï",
      disabledDatesText : "ÁðåíåñãïðïéçìÝíï",
      minText           : "Ç çìåñïìçíßá ó' áõôü ôï ðåäßï ðñÝðåé íá åßíáé ìåôÜ áðü {0}",
Severity: Major
Found in app/assets/javascripts/ext/src/locale/ext-lang-gr.js and 17 other locations - About 1 hr to fix
app/assets/javascripts/ext/src/locale/ext-lang-el_GR.js on lines 171..180
app/assets/javascripts/ext/src/locale/ext-lang-fa.js on lines 144..153
app/assets/javascripts/ext/src/locale/ext-lang-fr_CA.js on lines 168..177
app/assets/javascripts/ext/src/locale/ext-lang-hr.js on lines 159..168
app/assets/javascripts/ext/src/locale/ext-lang-ko.js on lines 129..138
app/assets/javascripts/ext/src/locale/ext-lang-lv.js on lines 126..135
app/assets/javascripts/ext/src/locale/ext-lang-mk.js on lines 126..135
app/assets/javascripts/ext/src/locale/ext-lang-pt.js on lines 132..141
app/assets/javascripts/ext/src/locale/ext-lang-pt_BR.js on lines 174..183
app/assets/javascripts/ext/src/locale/ext-lang-sk.js on lines 132..141
app/assets/javascripts/ext/src/locale/ext-lang-sl.js on lines 126..135
app/assets/javascripts/ext/src/locale/ext-lang-sr_RS.js on lines 128..137
app/assets/javascripts/ext/src/locale/ext-lang-sv_SE.js on lines 128..137
app/assets/javascripts/ext/src/locale/ext-lang-ukr.js on lines 133..142
app/assets/javascripts/ext/src/locale/ext-lang-vn.js on lines 131..140
app/assets/javascripts/ext/src/locale/ext-lang-zh_CN.js on lines 134..143
app/assets/javascripts/ext/src/locale/ext-lang-zh_TW.js on lines 128..137

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

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

if(Ext.form.DateField){
   Ext.apply(Ext.form.DateField.prototype, {
      disabledDaysText  : "Desabilitado",
      disabledDatesText : "Desabilitado",
      minText           : "A data deste campo deve ser posterior a {0}",
Severity: Major
Found in app/assets/javascripts/ext/src/locale/ext-lang-pt.js and 17 other locations - About 1 hr to fix
app/assets/javascripts/ext/src/locale/ext-lang-el_GR.js on lines 171..180
app/assets/javascripts/ext/src/locale/ext-lang-fa.js on lines 144..153
app/assets/javascripts/ext/src/locale/ext-lang-fr_CA.js on lines 168..177
app/assets/javascripts/ext/src/locale/ext-lang-gr.js on lines 125..134
app/assets/javascripts/ext/src/locale/ext-lang-hr.js on lines 159..168
app/assets/javascripts/ext/src/locale/ext-lang-ko.js on lines 129..138
app/assets/javascripts/ext/src/locale/ext-lang-lv.js on lines 126..135
app/assets/javascripts/ext/src/locale/ext-lang-mk.js on lines 126..135
app/assets/javascripts/ext/src/locale/ext-lang-pt_BR.js on lines 174..183
app/assets/javascripts/ext/src/locale/ext-lang-sk.js on lines 132..141
app/assets/javascripts/ext/src/locale/ext-lang-sl.js on lines 126..135
app/assets/javascripts/ext/src/locale/ext-lang-sr_RS.js on lines 128..137
app/assets/javascripts/ext/src/locale/ext-lang-sv_SE.js on lines 128..137
app/assets/javascripts/ext/src/locale/ext-lang-ukr.js on lines 133..142
app/assets/javascripts/ext/src/locale/ext-lang-vn.js on lines 131..140
app/assets/javascripts/ext/src/locale/ext-lang-zh_CN.js on lines 134..143
app/assets/javascripts/ext/src/locale/ext-lang-zh_TW.js on lines 128..137

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

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

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

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

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

Refactorings

Further Reading

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

      if(this.group_detail_panel.mask && this.group_detail_panel.mask.show){
        this.group_detail_panel.mask.show();
      }
      else {
        this.group_detail_panel.mask = true;
Severity: Major
Found in app/assets/javascripts/groups/view/detail.js and 1 other location - About 1 hr to fix
app/assets/javascripts/groups/view/create_edit.js on lines 126..131

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

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

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

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

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

Refactorings

Further Reading

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

    if(this.create_group_form_panel.mask && this.create_group_form_panel.mask.show){
      this.create_group_form_panel.mask.show();
    }
    else {
      this.create_group_form_panel.mask = true;
Severity: Major
Found in app/assets/javascripts/groups/view/create_edit.js and 1 other location - About 1 hr to fix
app/assets/javascripts/groups/view/detail.js on lines 73..78

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

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( "option", this ).each(function(){
                    this.selected = (jQuery.inArray( this.value, values ) >= 0 ||
                        jQuery.inArray( this.text, values ) >= 0);
                });
Severity: Major
Found in app/assets/javascripts/jquery.js and 1 other location - About 1 hr to fix
app/assets/javascripts/jquery-tooltip/lib/jquery.js on lines 441..444

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

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

qq.detach = function(element, type, fn){
    if (element.removeEventListener){
        element.removeEventListener(type, fn, false);
    } else if (element.attachEvent){
        element.detachEvent('on' + type, fn);
Severity: Major
Found in app/assets/javascripts/lib/fileuploader.js and 1 other location - About 1 hr to fix
app/assets/javascripts/lib/fileuploader.js on lines 53..59

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

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( "option", this ).each(function(){
                    this.selected = (jQuery.inArray( this.value, values ) >= 0 ||
                        jQuery.inArray( this.text, values ) >= 0);
                });
Severity: Major
Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js and 1 other location - About 1 hr to fix
app/assets/javascripts/jquery.js on lines 470..473

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

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

            for(; i < startingPos; i++) {
                textEls[i].innerHTML = (++prevStart);
                d.setDate(d.getDate()+1);
                cells[i].className = 'x-date-prevday';
                setCellClass(this, cells[i]);
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/DatePicker.js and 1 other location - About 1 hr to fix
app/assets/javascripts/ext/src/widgets/DatePicker.js on lines 745..750

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

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

    this.decode = function() {
        var dc;
        return function(json) {
            if (!dc) {
                // setup decoding function on first access
Severity: Major
Found in app/assets/javascripts/ext/src/ext-core/src/util/JSON.js and 1 other location - About 1 hr to fix
app/assets/javascripts/ext/src/ext-core/src/util/JSON.js on lines 145..154

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

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

            case e.RIGHT:
                e.stopEvent();
                val = e.ctrlKey ? this.maxValue : this.getValue(0) + this.keyIncrement;
                this.setValue(0, val, undefined, true);
            break;
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/Slider.js and 1 other location - About 1 hr to fix
app/assets/javascripts/ext/src/widgets/Slider.js on lines 539..543

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

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

            for(; i < 42; i++) {
                 textEls[i].innerHTML = (++extraDays);
                 d.setDate(d.getDate()+1);
                 cells[i].className = 'x-date-nextday';
                 setCellClass(this, cells[i]);
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/DatePicker.js and 1 other location - About 1 hr to fix
app/assets/javascripts/ext/src/widgets/DatePicker.js on lines 731..736

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

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

    this.tools = [{ id:'refresh', qtip: 'Refresh', handler: function(){this.alert_store.load({params:{'num_alerts': this.numAlerts}});}, scope: this}]
Severity: Major
Found in app/assets/javascripts/dashboard/cms/portlets/alerts.js and 1 other location - About 1 hr to fix
app/assets/javascripts/dashboard/cms/portlets/documents.js on lines 36..36

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

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

    this.tools = [{ id:'refresh', qtip: 'Refresh', handler: function(){this.doc_store.load({params:{'num_documents': this.numDocuments}});}, scope: this}]
Severity: Major
Found in app/assets/javascripts/dashboard/cms/portlets/documents.js and 1 other location - About 1 hr to fix
app/assets/javascripts/dashboard/cms/portlets/alerts.js on lines 37..37

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

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

    this.encode = function() {
        var ec;
        return function(o) {
            if (!ec) {
                // setup encoding function on first access
Severity: Major
Found in app/assets/javascripts/ext/src/ext-core/src/util/JSON.js and 1 other location - About 1 hr to fix
app/assets/javascripts/ext/src/ext-core/src/util/JSON.js on lines 162..171

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

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

qq.attach = function(element, type, fn){
    if (element.addEventListener){
        element.addEventListener(type, fn, false);
    } else if (element.attachEvent){
        element.attachEvent('on' + type, fn);
Severity: Major
Found in app/assets/javascripts/lib/fileuploader.js and 1 other location - About 1 hr to fix
app/assets/javascripts/lib/fileuploader.js on lines 60..66

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

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

            case e.LEFT:
                e.stopEvent();
                val = e.ctrlKey ? this.minValue : this.getValue(0) - this.keyIncrement;
                this.setValue(0, val, undefined, true);
            break;
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/Slider.js and 1 other location - About 1 hr to fix
app/assets/javascripts/ext/src/widgets/Slider.js on lines 533..537

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

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 trigger has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    trigger: function( event, data, elem, bubbling ) {
        // Event object or event type
        var type = event.type || event;

        if( !bubbling ){
Severity: Minor
Found in app/assets/javascripts/jquery.js - About 1 hr to fix

    Function update has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            update : function(url, params, callback, discardUrl){
                var me = this,
                    cfg,
                    callerScope;
    
    
    Severity: Minor
    Found in app/assets/javascripts/ext/src/util/UpdateManager.js - About 1 hr to fix

      Function refresh has 43 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          refresh : function(){
              if(this.fireEvent('beforerefresh', this) !== false){
                  var styleChanged = false;
                  // convert the store data into something YUI charts can understand
                  var data = [], rs = this.store.data.items;
      Severity: Minor
      Found in app/assets/javascripts/ext/src/widgets/chart/Chart.js - About 1 hr to fix
        Severity
        Category
        Status
        Source
        Language