vegantech/sims

View on GitHub

Showing 210 of 433 total issues

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

function enableUndo() {
    if( this.undoButton ) {
        if( this.undoButton.disabled == true ) {
            this.undoButton.disabled = false;
        }
Severity: Major
Found in app/assets/javascripts/spellerpages/controlWindow.js and 3 other locations - About 55 mins to fix
app/assets/javascripts/spellerpages/controlWindow.js on lines 80..86
public/speller/controlWindow.js on lines 72..78
public/speller/controlWindow.js on lines 80..86

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

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

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

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

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

Refactorings

Further Reading

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

function disableUndo() {
    if( this.undoButton ) {
        if( this.undoButton.disabled == false ) {
            this.undoButton.disabled = true;
        }
Severity: Major
Found in app/assets/javascripts/spellerpages/controlWindow.js and 3 other locations - About 55 mins to fix
app/assets/javascripts/spellerpages/controlWindow.js on lines 72..78
public/speller/controlWindow.js on lines 72..78
public/speller/controlWindow.js on lines 80..86

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

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

var fdLocale = {
        months:[
                "Tammikuu",
                "Helmikuu",
                "Maaliskuu",
Severity: Major
Found in app/assets/javascripts/lang/fi.js and 10 other locations - About 50 mins to fix
app/assets/javascripts/lang/af.js on lines 1..40
app/assets/javascripts/lang/de.js on lines 1..40
app/assets/javascripts/lang/du.js on lines 1..40
app/assets/javascripts/lang/gr.js on lines 1..40
app/assets/javascripts/lang/nl.js on lines 1..40
app/assets/javascripts/lang/no.js on lines 1..40
app/assets/javascripts/lang/ro.js on lines 1..40
app/assets/javascripts/lang/ru.js on lines 1..40
app/assets/javascripts/lang/sp.js on lines 1..40
app/assets/javascripts/lang/ua.js on lines 1..40

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

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

var fdLocale = {
        months:[
                "Січень",
                "Лютий",
                "Березень",
Severity: Major
Found in app/assets/javascripts/lang/ua.js and 10 other locations - About 50 mins to fix
app/assets/javascripts/lang/af.js on lines 1..40
app/assets/javascripts/lang/de.js on lines 1..40
app/assets/javascripts/lang/du.js on lines 1..40
app/assets/javascripts/lang/fi.js on lines 1..40
app/assets/javascripts/lang/gr.js on lines 1..40
app/assets/javascripts/lang/nl.js on lines 1..40
app/assets/javascripts/lang/no.js on lines 1..40
app/assets/javascripts/lang/ro.js on lines 1..40
app/assets/javascripts/lang/ru.js on lines 1..40
app/assets/javascripts/lang/sp.js on lines 1..40

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

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

var fdLocale = {
        months:[
                "Январь",
                "Февраль",
                "Март",
Severity: Major
Found in app/assets/javascripts/lang/ru.js and 10 other locations - About 50 mins to fix
app/assets/javascripts/lang/af.js on lines 1..40
app/assets/javascripts/lang/de.js on lines 1..40
app/assets/javascripts/lang/du.js on lines 1..40
app/assets/javascripts/lang/fi.js on lines 1..40
app/assets/javascripts/lang/gr.js on lines 1..40
app/assets/javascripts/lang/nl.js on lines 1..40
app/assets/javascripts/lang/no.js on lines 1..40
app/assets/javascripts/lang/ro.js on lines 1..40
app/assets/javascripts/lang/sp.js on lines 1..40
app/assets/javascripts/lang/ua.js on lines 1..40

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

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

var fdLocale = {
        months:[
                "Januar",
                "Februar",
                "Mars",
Severity: Major
Found in app/assets/javascripts/lang/no.js and 10 other locations - About 50 mins to fix
app/assets/javascripts/lang/af.js on lines 1..40
app/assets/javascripts/lang/de.js on lines 1..40
app/assets/javascripts/lang/du.js on lines 1..40
app/assets/javascripts/lang/fi.js on lines 1..40
app/assets/javascripts/lang/gr.js on lines 1..40
app/assets/javascripts/lang/nl.js on lines 1..40
app/assets/javascripts/lang/ro.js on lines 1..40
app/assets/javascripts/lang/ru.js on lines 1..40
app/assets/javascripts/lang/sp.js on lines 1..40
app/assets/javascripts/lang/ua.js on lines 1..40

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

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

var fdLocale = {
        months:[
                "Januar",
                "Februar",
                "M\u00e4rz",
Severity: Major
Found in app/assets/javascripts/lang/de.js and 10 other locations - About 50 mins to fix
app/assets/javascripts/lang/af.js on lines 1..40
app/assets/javascripts/lang/du.js on lines 1..40
app/assets/javascripts/lang/fi.js on lines 1..40
app/assets/javascripts/lang/gr.js on lines 1..40
app/assets/javascripts/lang/nl.js on lines 1..40
app/assets/javascripts/lang/no.js on lines 1..40
app/assets/javascripts/lang/ro.js on lines 1..40
app/assets/javascripts/lang/ru.js on lines 1..40
app/assets/javascripts/lang/sp.js on lines 1..40
app/assets/javascripts/lang/ua.js on lines 1..40

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

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

var fdLocale = {
        months:[
                "Januari",
                "Februari",
                "Maart",
Severity: Major
Found in app/assets/javascripts/lang/nl.js and 10 other locations - About 50 mins to fix
app/assets/javascripts/lang/af.js on lines 1..40
app/assets/javascripts/lang/de.js on lines 1..40
app/assets/javascripts/lang/du.js on lines 1..40
app/assets/javascripts/lang/fi.js on lines 1..40
app/assets/javascripts/lang/gr.js on lines 1..40
app/assets/javascripts/lang/no.js on lines 1..40
app/assets/javascripts/lang/ro.js on lines 1..40
app/assets/javascripts/lang/ru.js on lines 1..40
app/assets/javascripts/lang/sp.js on lines 1..40
app/assets/javascripts/lang/ua.js on lines 1..40

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

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

var fdLocale = {
        months:[
                "Ιανουάριος",
                "Φεβρουάριος",
                "Μάρτιος",
Severity: Major
Found in app/assets/javascripts/lang/gr.js and 10 other locations - About 50 mins to fix
app/assets/javascripts/lang/af.js on lines 1..40
app/assets/javascripts/lang/de.js on lines 1..40
app/assets/javascripts/lang/du.js on lines 1..40
app/assets/javascripts/lang/fi.js on lines 1..40
app/assets/javascripts/lang/nl.js on lines 1..40
app/assets/javascripts/lang/no.js on lines 1..40
app/assets/javascripts/lang/ro.js on lines 1..40
app/assets/javascripts/lang/ru.js on lines 1..40
app/assets/javascripts/lang/sp.js on lines 1..40
app/assets/javascripts/lang/ua.js on lines 1..40

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

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

var fdLocale = {
        months:[
                "Ianuarie",
                "Februarie",
                "Martie",
Severity: Major
Found in app/assets/javascripts/lang/ro.js and 10 other locations - About 50 mins to fix
app/assets/javascripts/lang/af.js on lines 1..40
app/assets/javascripts/lang/de.js on lines 1..40
app/assets/javascripts/lang/du.js on lines 1..40
app/assets/javascripts/lang/fi.js on lines 1..40
app/assets/javascripts/lang/gr.js on lines 1..40
app/assets/javascripts/lang/nl.js on lines 1..40
app/assets/javascripts/lang/no.js on lines 1..40
app/assets/javascripts/lang/ru.js on lines 1..40
app/assets/javascripts/lang/sp.js on lines 1..40
app/assets/javascripts/lang/ua.js on lines 1..40

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

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

var fdLocale = {
        months:[
                "Januari",
                "Februari",
                "Maart",
Severity: Major
Found in app/assets/javascripts/lang/du.js and 10 other locations - About 50 mins to fix
app/assets/javascripts/lang/af.js on lines 1..40
app/assets/javascripts/lang/de.js on lines 1..40
app/assets/javascripts/lang/fi.js on lines 1..40
app/assets/javascripts/lang/gr.js on lines 1..40
app/assets/javascripts/lang/nl.js on lines 1..40
app/assets/javascripts/lang/no.js on lines 1..40
app/assets/javascripts/lang/ro.js on lines 1..40
app/assets/javascripts/lang/ru.js on lines 1..40
app/assets/javascripts/lang/sp.js on lines 1..40
app/assets/javascripts/lang/ua.js on lines 1..40

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

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

var fdLocale = {
        months:[
                "Enero",
                "Febrero",
                "Marzo",
Severity: Major
Found in app/assets/javascripts/lang/sp.js and 10 other locations - About 50 mins to fix
app/assets/javascripts/lang/af.js on lines 1..40
app/assets/javascripts/lang/de.js on lines 1..40
app/assets/javascripts/lang/du.js on lines 1..40
app/assets/javascripts/lang/fi.js on lines 1..40
app/assets/javascripts/lang/gr.js on lines 1..40
app/assets/javascripts/lang/nl.js on lines 1..40
app/assets/javascripts/lang/no.js on lines 1..40
app/assets/javascripts/lang/ro.js on lines 1..40
app/assets/javascripts/lang/ru.js on lines 1..40
app/assets/javascripts/lang/ua.js on lines 1..40

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

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

var fdLocale = {
        months:[
                "Januarie",
                "Februarie",
                "Maart",
Severity: Major
Found in app/assets/javascripts/lang/af.js and 10 other locations - About 50 mins to fix
app/assets/javascripts/lang/de.js on lines 1..40
app/assets/javascripts/lang/du.js on lines 1..40
app/assets/javascripts/lang/fi.js on lines 1..40
app/assets/javascripts/lang/gr.js on lines 1..40
app/assets/javascripts/lang/nl.js on lines 1..40
app/assets/javascripts/lang/no.js on lines 1..40
app/assets/javascripts/lang/ro.js on lines 1..40
app/assets/javascripts/lang/ru.js on lines 1..40
app/assets/javascripts/lang/sp.js on lines 1..40
app/assets/javascripts/lang/ua.js on lines 1..40

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

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

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

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

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

Refactorings

Further Reading

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

                for(dp in datePickers) {
                        if(!datePickers[dp].created) continue;
                        datePickers[dp].destroy();
                        datePickers[dp] = null;
                        delete datePickers[dp];
Severity: Minor
Found in app/assets/javascripts/datepicker.js and 1 other location - About 50 mins to fix
app/assets/javascripts/datepicker.js on lines 1237..1242

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

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

  def concern_note_withdrawn(note, sent_at = Time.now)
    subject=    "Team Consultation Form Withdrawn -- #{note.school_team_name}"
    recipients= note.recipients.collect(&:email).join(",")
    @district = note.student.district
    @recipient_name= note.recipients.join(", ")
Severity: Minor
Found in app/mailers/team_referrals.rb and 1 other location - About 50 mins to fix
app/mailers/team_referrals.rb on lines 5..13

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

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(!document.getElementById(datePickers[dp].id)) {
                                if(!datePickers[dp].created) continue;
                                datePickers[dp].destroy();
                                datePickers[dp] = null;
                                delete datePickers[dp];
Severity: Minor
Found in app/assets/javascripts/datepicker.js and 1 other location - About 50 mins to fix
app/assets/javascripts/datepicker.js on lines 1246..1251

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

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

  def concern_note_created(note, sent_at = Time.now)
    subject =    "Team Consultation Form Created -- #{note.school_team_name}"
    recipients= note.recipients.collect(&:email).join(",")
    @district = note.student.district
    @recipient_name= note.recipients.join(", ")
Severity: Minor
Found in app/mailers/team_referrals.rb and 1 other location - About 50 mins to fix
app/mailers/team_referrals.rb on lines 39..48

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

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

  def goal_in_range
    if goal.present? and self.probe_definition.present?
      if probe_definition.minimum_score.present? and goal < probe_definition.minimum_score
        errors.add(:goal, "below minimum") and return false
      end
Severity: Minor
Found in app/models/intervention_probe_assignment.rb and 1 other location - About 50 mins to fix
app/models/probe.rb on lines 41..51

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

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

  def score_in_range
    if score.present? and self.probe_definition.present?
      if probe_definition.minimum_score.present? and score < probe_definition.minimum_score
        errors.add(:score, "below minimum") and return false
      end
Severity: Minor
Found in app/models/probe.rb and 1 other location - About 50 mins to fix
app/models/intervention_probe_assignment.rb on lines 100..110

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

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(ddE.tagName.toLowerCase() == "input") { ddE.value = d; }
                                else { o.setSelectIndex(ddE, d); /*ddE.selectedIndex = d - 1;*/ };
Severity: Minor
Found in app/assets/javascripts/datepicker.js and 1 other location - About 50 mins to fix
app/assets/javascripts/datepicker.js on lines 863..864

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

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language