talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

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

Date.getMonthNumber = function(name) {
  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
};
Severity: Major
Found in app/assets/javascripts/ext/src/locale/ext-lang-ru.js and 20 other locations - About 1 hr to fix
app/assets/javascripts/ext/src/locale/ext-lang-ca.js on lines 63..65
app/assets/javascripts/ext/src/locale/ext-lang-da.js on lines 72..74
app/assets/javascripts/ext/src/locale/ext-lang-de.js on lines 75..77
app/assets/javascripts/ext/src/locale/ext-lang-el_GR.js on lines 90..92
app/assets/javascripts/ext/src/locale/ext-lang-en.js on lines 67..69
app/assets/javascripts/ext/src/locale/ext-lang-en_GB.js on lines 63..65
app/assets/javascripts/ext/src/locale/ext-lang-es.js on lines 64..66
app/assets/javascripts/ext/src/locale/ext-lang-he.js on lines 68..70
app/assets/javascripts/ext/src/locale/ext-lang-hr.js on lines 72..74
app/assets/javascripts/ext/src/locale/ext-lang-hu.js on lines 72..74
app/assets/javascripts/ext/src/locale/ext-lang-id.js on lines 77..79
app/assets/javascripts/ext/src/locale/ext-lang-it.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-no_NB.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-no_NN.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-pl.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-pt_BR.js on lines 74..76
app/assets/javascripts/ext/src/locale/ext-lang-pt_PT.js on lines 65..67
app/assets/javascripts/ext/src/locale/ext-lang-ro.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-th.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-tr.js on lines 74..76

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

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

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

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

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

Refactorings

Further Reading

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

Date.getMonthNumber = function(name) {
  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
};
Severity: Major
Found in app/assets/javascripts/ext/src/locale/ext-lang-de.js and 20 other locations - About 1 hr to fix
app/assets/javascripts/ext/src/locale/ext-lang-ca.js on lines 63..65
app/assets/javascripts/ext/src/locale/ext-lang-da.js on lines 72..74
app/assets/javascripts/ext/src/locale/ext-lang-el_GR.js on lines 90..92
app/assets/javascripts/ext/src/locale/ext-lang-en.js on lines 67..69
app/assets/javascripts/ext/src/locale/ext-lang-en_GB.js on lines 63..65
app/assets/javascripts/ext/src/locale/ext-lang-es.js on lines 64..66
app/assets/javascripts/ext/src/locale/ext-lang-he.js on lines 68..70
app/assets/javascripts/ext/src/locale/ext-lang-hr.js on lines 72..74
app/assets/javascripts/ext/src/locale/ext-lang-hu.js on lines 72..74
app/assets/javascripts/ext/src/locale/ext-lang-id.js on lines 77..79
app/assets/javascripts/ext/src/locale/ext-lang-it.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-no_NB.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-no_NN.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-pl.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-pt_BR.js on lines 74..76
app/assets/javascripts/ext/src/locale/ext-lang-pt_PT.js on lines 65..67
app/assets/javascripts/ext/src/locale/ext-lang-ro.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-ru.js on lines 84..86
app/assets/javascripts/ext/src/locale/ext-lang-th.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-tr.js on lines 74..76

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

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

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

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

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

Refactorings

Further Reading

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

Date.getMonthNumber = function(name) {
  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
};
Severity: Major
Found in app/assets/javascripts/ext/src/locale/ext-lang-no_NB.js and 20 other locations - About 1 hr to fix
app/assets/javascripts/ext/src/locale/ext-lang-ca.js on lines 63..65
app/assets/javascripts/ext/src/locale/ext-lang-da.js on lines 72..74
app/assets/javascripts/ext/src/locale/ext-lang-de.js on lines 75..77
app/assets/javascripts/ext/src/locale/ext-lang-el_GR.js on lines 90..92
app/assets/javascripts/ext/src/locale/ext-lang-en.js on lines 67..69
app/assets/javascripts/ext/src/locale/ext-lang-en_GB.js on lines 63..65
app/assets/javascripts/ext/src/locale/ext-lang-es.js on lines 64..66
app/assets/javascripts/ext/src/locale/ext-lang-he.js on lines 68..70
app/assets/javascripts/ext/src/locale/ext-lang-hr.js on lines 72..74
app/assets/javascripts/ext/src/locale/ext-lang-hu.js on lines 72..74
app/assets/javascripts/ext/src/locale/ext-lang-id.js on lines 77..79
app/assets/javascripts/ext/src/locale/ext-lang-it.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-no_NN.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-pl.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-pt_BR.js on lines 74..76
app/assets/javascripts/ext/src/locale/ext-lang-pt_PT.js on lines 65..67
app/assets/javascripts/ext/src/locale/ext-lang-ro.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-ru.js on lines 84..86
app/assets/javascripts/ext/src/locale/ext-lang-th.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-tr.js on lines 74..76

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

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

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

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

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

Refactorings

Further Reading

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

Date.getMonthNumber = function(name) {
  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
};
Severity: Major
Found in app/assets/javascripts/ext/src/locale/ext-lang-it.js and 20 other locations - About 1 hr to fix
app/assets/javascripts/ext/src/locale/ext-lang-ca.js on lines 63..65
app/assets/javascripts/ext/src/locale/ext-lang-da.js on lines 72..74
app/assets/javascripts/ext/src/locale/ext-lang-de.js on lines 75..77
app/assets/javascripts/ext/src/locale/ext-lang-el_GR.js on lines 90..92
app/assets/javascripts/ext/src/locale/ext-lang-en.js on lines 67..69
app/assets/javascripts/ext/src/locale/ext-lang-en_GB.js on lines 63..65
app/assets/javascripts/ext/src/locale/ext-lang-es.js on lines 64..66
app/assets/javascripts/ext/src/locale/ext-lang-he.js on lines 68..70
app/assets/javascripts/ext/src/locale/ext-lang-hr.js on lines 72..74
app/assets/javascripts/ext/src/locale/ext-lang-hu.js on lines 72..74
app/assets/javascripts/ext/src/locale/ext-lang-id.js on lines 77..79
app/assets/javascripts/ext/src/locale/ext-lang-no_NB.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-no_NN.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-pl.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-pt_BR.js on lines 74..76
app/assets/javascripts/ext/src/locale/ext-lang-pt_PT.js on lines 65..67
app/assets/javascripts/ext/src/locale/ext-lang-ro.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-ru.js on lines 84..86
app/assets/javascripts/ext/src/locale/ext-lang-th.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-tr.js on lines 74..76

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

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

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

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

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

Refactorings

Further Reading

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

Date.getMonthNumber = function(name) {
  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
};
Severity: Major
Found in app/assets/javascripts/ext/src/locale/ext-lang-he.js and 20 other locations - About 1 hr to fix
app/assets/javascripts/ext/src/locale/ext-lang-ca.js on lines 63..65
app/assets/javascripts/ext/src/locale/ext-lang-da.js on lines 72..74
app/assets/javascripts/ext/src/locale/ext-lang-de.js on lines 75..77
app/assets/javascripts/ext/src/locale/ext-lang-el_GR.js on lines 90..92
app/assets/javascripts/ext/src/locale/ext-lang-en.js on lines 67..69
app/assets/javascripts/ext/src/locale/ext-lang-en_GB.js on lines 63..65
app/assets/javascripts/ext/src/locale/ext-lang-es.js on lines 64..66
app/assets/javascripts/ext/src/locale/ext-lang-hr.js on lines 72..74
app/assets/javascripts/ext/src/locale/ext-lang-hu.js on lines 72..74
app/assets/javascripts/ext/src/locale/ext-lang-id.js on lines 77..79
app/assets/javascripts/ext/src/locale/ext-lang-it.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-no_NB.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-no_NN.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-pl.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-pt_BR.js on lines 74..76
app/assets/javascripts/ext/src/locale/ext-lang-pt_PT.js on lines 65..67
app/assets/javascripts/ext/src/locale/ext-lang-ro.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-ru.js on lines 84..86
app/assets/javascripts/ext/src/locale/ext-lang-th.js on lines 70..72
app/assets/javascripts/ext/src/locale/ext-lang-tr.js on lines 74..76

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

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

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

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

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

Refactorings

Further Reading

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

    init : function(tree){
        this.tree = tree;
        tree.mon(tree.getTreeEl(), 'keydown', this.onKeyDown, this);
        tree.on('click', this.onNodeClick, this);
    },
app/assets/javascripts/ext/src/widgets/tree/TreeSelectionModel.js on lines 232..236

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

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

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

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

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

Refactorings

Further Reading

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

            if ( !ret ) {
                var handle = jQuery.data( elem, "handle" );
                if ( handle ) handle.elem = null;
                jQuery.removeData( elem, "events" );
                jQuery.removeData( elem, "handle" );
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 2581..2586

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

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

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

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

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

Refactorings

Further Reading

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

    init : function(tree){
        this.tree = tree;
        tree.mon(tree.getTreeEl(), 'keydown', this.onKeyDown, this);
        tree.on('click', this.onNodeClick, this);
    },
app/assets/javascripts/ext/src/widgets/tree/TreeSelectionModel.js on lines 40..44

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

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

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

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

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

Refactorings

Further Reading

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

            if ( !ret ) {
                var handle = jQuery.data( elem, "handle" );
                if ( handle ) handle.elem = null;
                jQuery.removeData( elem, "events" );
                jQuery.removeData( elem, "handle" );
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 1953..1958

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

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

        htmlEncode : function(value) {
            return !value ? value : String(value).replace(/&/g, "&amp;").replace(/>/g, "&gt;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
        },
Severity: Major
Found in app/assets/javascripts/ext/src/util/Format.js and 1 other location - About 1 hr to fix
app/assets/javascripts/ext/src/util/Format.js on lines 76..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 64.

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

        return this.map(function(){
            return this.elements ? jQuery.makeArray(this.elements) : this;
        })
        .filter(function(){
            return this.name && !this.disabled &&
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 2436..2444

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

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

  constructor: function(){
    Talho.Reports.view.NewReportSchedule.superclass.constructor.apply(this, arguments);
    this.addEvents('createreportschedule');
    this.enableBubble('createreportschedule');
  },
Severity: Major
Found in app/assets/javascripts/reports/view/NewReportSchedule.js and 2 other locations - About 1 hr to fix
app/assets/javascripts/reports/view/EditReportSchedule.js on lines 7..11
app/assets/javascripts/reports/view/New.js on lines 6..10

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

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 (v.x + v.cx < h.offsetLeft + h.offsetWidth) {
            left -= h.offsetWidth + 20 + settings(current).left;
            helper.parent.css({left: left + 'px'}).addClass("viewport-right");
        }
Severity: Major
Found in app/assets/javascripts/jquery-tooltip/jquery.tooltip.js and 1 other location - About 1 hr to fix
app/assets/javascripts/jquery-tooltip/jquery.tooltip.js on lines 253..256

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

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

  constructor: function(){
    Talho.Reports.view.New.superclass.constructor.apply(this, arguments);
    this.addEvents('runreport');
    this.enableBubble('runreport');
  },
Severity: Major
Found in app/assets/javascripts/reports/view/New.js and 2 other locations - About 1 hr to fix
app/assets/javascripts/reports/view/EditReportSchedule.js on lines 7..11
app/assets/javascripts/reports/view/NewReportSchedule.js on lines 7..11

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

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

        return this.map(function(){
            return jQuery.nodeName(this, "form") ?
                jQuery.makeArray(this.elements) : this;
        })
        .filter(function(){
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 3291..3298

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

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 (v.y + v.cy < h.offsetTop + h.offsetHeight) {
            top -= h.offsetHeight + 20 + settings(current).top;
            helper.parent.css({top: top + 'px'}).addClass("viewport-bottom");
        }
Severity: Major
Found in app/assets/javascripts/jquery-tooltip/jquery.tooltip.js and 1 other location - About 1 hr to fix
app/assets/javascripts/jquery-tooltip/jquery.tooltip.js on lines 248..251

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

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

        htmlDecode : function(value) {
            return !value ? value : String(value).replace(/&gt;/g, ">").replace(/&lt;/g, "<").replace(/&quot;/g, '"').replace(/&amp;/g, "&");
        },
Severity: Major
Found in app/assets/javascripts/ext/src/util/Format.js and 1 other location - About 1 hr to fix
app/assets/javascripts/ext/src/util/Format.js on lines 67..69

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

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

  constructor: function(){
    Talho.Reports.view.EditReportSchedule.superclass.constructor.apply(this, arguments);
    this.addEvents('updatereportschedule');
    this.enableBubble('updatereportschedule');
  },
Severity: Major
Found in app/assets/javascripts/reports/view/EditReportSchedule.js and 2 other locations - About 1 hr to fix
app/assets/javascripts/reports/view/New.js on lines 6..10
app/assets/javascripts/reports/view/NewReportSchedule.js on lines 7..11

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

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

  initComponent : function() {
    this.setTitle('Manage Moderators');
    
    this.items = [];
    
Severity: Minor
Found in app/assets/javascripts/forums/view/forums/Edit.js - About 1 hr to fix

    Function translateMimeType has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        Talho.ux.Documents.translateMimeType = function(mime){
            if(mime.match(/image\//))
                return 'image';
            if(mime.match(/video\//))
                return 'video';
    Severity: Minor
    Found in app/assets/javascripts/documents/DocumentViews.js - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language