sibprogrammer/owp

View on GitHub

Showing 803 of 803 total issues

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

if(Ext.MessageBox){
    Ext.MessageBox.buttonText = {
        ok : "確定",
        cancel : "取消",
        yes : "是",
Severity: Major
Found in public/ext/locale/ext-lang-zh_TW.js and 42 other locations - About 35 mins to fix
public/ext/locale/ext-lang-bg.js on lines 80..87
public/ext/locale/ext-lang-ca.js on lines 83..90
public/ext/locale/ext-lang-cs.js on lines 87..94
public/ext/locale/ext-lang-da.js on lines 90..97
public/ext/locale/ext-lang-de.js on lines 93..100
public/ext/locale/ext-lang-el_GR.js on lines 105..112
public/ext/locale/ext-lang-en.js on lines 87..94
public/ext/locale/ext-lang-en_GB.js on lines 83..90
public/ext/locale/ext-lang-es.js on lines 86..93
public/ext/locale/ext-lang-fa.js on lines 75..82
public/ext/locale/ext-lang-fi.js on lines 88..95
public/ext/locale/ext-lang-fr.js on lines 104..111
public/ext/locale/ext-lang-fr_CA.js on lines 102..109
public/ext/locale/ext-lang-gr.js on lines 59..66
public/ext/locale/ext-lang-he.js on lines 86..93
public/ext/locale/ext-lang-hr.js on lines 90..97
public/ext/locale/ext-lang-hu.js on lines 90..97
public/ext/locale/ext-lang-id.js on lines 95..102
public/ext/locale/ext-lang-it.js on lines 88..95
public/ext/locale/ext-lang-ko.js on lines 60..67
public/ext/locale/ext-lang-lt.js on lines 101..108
public/ext/locale/ext-lang-lv.js on lines 59..66
public/ext/locale/ext-lang-mk.js on lines 60..67
public/ext/locale/ext-lang-nl.js on lines 91..98
public/ext/locale/ext-lang-no_NB.js on lines 88..95
public/ext/locale/ext-lang-no_NN.js on lines 88..95
public/ext/locale/ext-lang-pl.js on lines 97..104
public/ext/locale/ext-lang-pt.js on lines 63..70
public/ext/locale/ext-lang-pt_BR.js on lines 88..95
public/ext/locale/ext-lang-pt_PT.js on lines 83..90
public/ext/locale/ext-lang-ro.js on lines 88..95
public/ext/locale/ext-lang-ru.js on lines 102..109
public/ext/locale/ext-lang-sk.js on lines 63..70
public/ext/locale/ext-lang-sl.js on lines 59..66
public/ext/locale/ext-lang-sr.js on lines 61..68
public/ext/locale/ext-lang-sr_RS.js on lines 61..68
public/ext/locale/ext-lang-sv_SE.js on lines 61..68
public/ext/locale/ext-lang-th.js on lines 88..95
public/ext/locale/ext-lang-tr.js on lines 102..109
public/ext/locale/ext-lang-ukr.js on lines 64..71
public/ext/locale/ext-lang-vn.js on lines 65..72
public/ext/locale/ext-lang-zh_CN.js on lines 66..73

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

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

if(Ext.MessageBox){
  Ext.MessageBox.buttonText = {
    ok     : "OK",
    cancel : "Avbryt",
    yes    : "Ja",
Severity: Major
Found in public/ext/locale/ext-lang-no_NN.js and 42 other locations - About 35 mins to fix
public/ext/locale/ext-lang-bg.js on lines 80..87
public/ext/locale/ext-lang-ca.js on lines 83..90
public/ext/locale/ext-lang-cs.js on lines 87..94
public/ext/locale/ext-lang-da.js on lines 90..97
public/ext/locale/ext-lang-de.js on lines 93..100
public/ext/locale/ext-lang-el_GR.js on lines 105..112
public/ext/locale/ext-lang-en.js on lines 87..94
public/ext/locale/ext-lang-en_GB.js on lines 83..90
public/ext/locale/ext-lang-es.js on lines 86..93
public/ext/locale/ext-lang-fa.js on lines 75..82
public/ext/locale/ext-lang-fi.js on lines 88..95
public/ext/locale/ext-lang-fr.js on lines 104..111
public/ext/locale/ext-lang-fr_CA.js on lines 102..109
public/ext/locale/ext-lang-gr.js on lines 59..66
public/ext/locale/ext-lang-he.js on lines 86..93
public/ext/locale/ext-lang-hr.js on lines 90..97
public/ext/locale/ext-lang-hu.js on lines 90..97
public/ext/locale/ext-lang-id.js on lines 95..102
public/ext/locale/ext-lang-it.js on lines 88..95
public/ext/locale/ext-lang-ko.js on lines 60..67
public/ext/locale/ext-lang-lt.js on lines 101..108
public/ext/locale/ext-lang-lv.js on lines 59..66
public/ext/locale/ext-lang-mk.js on lines 60..67
public/ext/locale/ext-lang-nl.js on lines 91..98
public/ext/locale/ext-lang-no_NB.js on lines 88..95
public/ext/locale/ext-lang-pl.js on lines 97..104
public/ext/locale/ext-lang-pt.js on lines 63..70
public/ext/locale/ext-lang-pt_BR.js on lines 88..95
public/ext/locale/ext-lang-pt_PT.js on lines 83..90
public/ext/locale/ext-lang-ro.js on lines 88..95
public/ext/locale/ext-lang-ru.js on lines 102..109
public/ext/locale/ext-lang-sk.js on lines 63..70
public/ext/locale/ext-lang-sl.js on lines 59..66
public/ext/locale/ext-lang-sr.js on lines 61..68
public/ext/locale/ext-lang-sr_RS.js on lines 61..68
public/ext/locale/ext-lang-sv_SE.js on lines 61..68
public/ext/locale/ext-lang-th.js on lines 88..95
public/ext/locale/ext-lang-tr.js on lines 102..109
public/ext/locale/ext-lang-ukr.js on lines 64..71
public/ext/locale/ext-lang-vn.js on lines 65..72
public/ext/locale/ext-lang-zh_CN.js on lines 66..73
public/ext/locale/ext-lang-zh_TW.js on lines 60..67

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

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

if(Ext.MessageBox){
   Ext.MessageBox.buttonText = {
      ok     : "OK",
      cancel : "Annulla",
      yes    : "S\u00EC",
Severity: Major
Found in public/ext/locale/ext-lang-it.js and 42 other locations - About 35 mins to fix
public/ext/locale/ext-lang-bg.js on lines 80..87
public/ext/locale/ext-lang-ca.js on lines 83..90
public/ext/locale/ext-lang-cs.js on lines 87..94
public/ext/locale/ext-lang-da.js on lines 90..97
public/ext/locale/ext-lang-de.js on lines 93..100
public/ext/locale/ext-lang-el_GR.js on lines 105..112
public/ext/locale/ext-lang-en.js on lines 87..94
public/ext/locale/ext-lang-en_GB.js on lines 83..90
public/ext/locale/ext-lang-es.js on lines 86..93
public/ext/locale/ext-lang-fa.js on lines 75..82
public/ext/locale/ext-lang-fi.js on lines 88..95
public/ext/locale/ext-lang-fr.js on lines 104..111
public/ext/locale/ext-lang-fr_CA.js on lines 102..109
public/ext/locale/ext-lang-gr.js on lines 59..66
public/ext/locale/ext-lang-he.js on lines 86..93
public/ext/locale/ext-lang-hr.js on lines 90..97
public/ext/locale/ext-lang-hu.js on lines 90..97
public/ext/locale/ext-lang-id.js on lines 95..102
public/ext/locale/ext-lang-ko.js on lines 60..67
public/ext/locale/ext-lang-lt.js on lines 101..108
public/ext/locale/ext-lang-lv.js on lines 59..66
public/ext/locale/ext-lang-mk.js on lines 60..67
public/ext/locale/ext-lang-nl.js on lines 91..98
public/ext/locale/ext-lang-no_NB.js on lines 88..95
public/ext/locale/ext-lang-no_NN.js on lines 88..95
public/ext/locale/ext-lang-pl.js on lines 97..104
public/ext/locale/ext-lang-pt.js on lines 63..70
public/ext/locale/ext-lang-pt_BR.js on lines 88..95
public/ext/locale/ext-lang-pt_PT.js on lines 83..90
public/ext/locale/ext-lang-ro.js on lines 88..95
public/ext/locale/ext-lang-ru.js on lines 102..109
public/ext/locale/ext-lang-sk.js on lines 63..70
public/ext/locale/ext-lang-sl.js on lines 59..66
public/ext/locale/ext-lang-sr.js on lines 61..68
public/ext/locale/ext-lang-sr_RS.js on lines 61..68
public/ext/locale/ext-lang-sv_SE.js on lines 61..68
public/ext/locale/ext-lang-th.js on lines 88..95
public/ext/locale/ext-lang-tr.js on lines 102..109
public/ext/locale/ext-lang-ukr.js on lines 64..71
public/ext/locale/ext-lang-vn.js on lines 65..72
public/ext/locale/ext-lang-zh_CN.js on lines 66..73
public/ext/locale/ext-lang-zh_TW.js on lines 60..67

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

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

if(Ext.MessageBox){
   Ext.MessageBox.buttonText = {
      ok     : "OK",
      cancel : "Avbryt",
      yes    : "Ja",
Severity: Major
Found in public/ext/locale/ext-lang-sv_SE.js and 42 other locations - About 35 mins to fix
public/ext/locale/ext-lang-bg.js on lines 80..87
public/ext/locale/ext-lang-ca.js on lines 83..90
public/ext/locale/ext-lang-cs.js on lines 87..94
public/ext/locale/ext-lang-da.js on lines 90..97
public/ext/locale/ext-lang-de.js on lines 93..100
public/ext/locale/ext-lang-el_GR.js on lines 105..112
public/ext/locale/ext-lang-en.js on lines 87..94
public/ext/locale/ext-lang-en_GB.js on lines 83..90
public/ext/locale/ext-lang-es.js on lines 86..93
public/ext/locale/ext-lang-fa.js on lines 75..82
public/ext/locale/ext-lang-fi.js on lines 88..95
public/ext/locale/ext-lang-fr.js on lines 104..111
public/ext/locale/ext-lang-fr_CA.js on lines 102..109
public/ext/locale/ext-lang-gr.js on lines 59..66
public/ext/locale/ext-lang-he.js on lines 86..93
public/ext/locale/ext-lang-hr.js on lines 90..97
public/ext/locale/ext-lang-hu.js on lines 90..97
public/ext/locale/ext-lang-id.js on lines 95..102
public/ext/locale/ext-lang-it.js on lines 88..95
public/ext/locale/ext-lang-ko.js on lines 60..67
public/ext/locale/ext-lang-lt.js on lines 101..108
public/ext/locale/ext-lang-lv.js on lines 59..66
public/ext/locale/ext-lang-mk.js on lines 60..67
public/ext/locale/ext-lang-nl.js on lines 91..98
public/ext/locale/ext-lang-no_NB.js on lines 88..95
public/ext/locale/ext-lang-no_NN.js on lines 88..95
public/ext/locale/ext-lang-pl.js on lines 97..104
public/ext/locale/ext-lang-pt.js on lines 63..70
public/ext/locale/ext-lang-pt_BR.js on lines 88..95
public/ext/locale/ext-lang-pt_PT.js on lines 83..90
public/ext/locale/ext-lang-ro.js on lines 88..95
public/ext/locale/ext-lang-ru.js on lines 102..109
public/ext/locale/ext-lang-sk.js on lines 63..70
public/ext/locale/ext-lang-sl.js on lines 59..66
public/ext/locale/ext-lang-sr.js on lines 61..68
public/ext/locale/ext-lang-sr_RS.js on lines 61..68
public/ext/locale/ext-lang-th.js on lines 88..95
public/ext/locale/ext-lang-tr.js on lines 102..109
public/ext/locale/ext-lang-ukr.js on lines 64..71
public/ext/locale/ext-lang-vn.js on lines 65..72
public/ext/locale/ext-lang-zh_CN.js on lines 66..73
public/ext/locale/ext-lang-zh_TW.js on lines 60..67

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

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

if(Ext.MessageBox){
   Ext.MessageBox.buttonText = {
      ok     : "OK",
      cancel : "Renunţă",
      yes    : "Da",
Severity: Major
Found in public/ext/locale/ext-lang-ro.js and 42 other locations - About 35 mins to fix
public/ext/locale/ext-lang-bg.js on lines 80..87
public/ext/locale/ext-lang-ca.js on lines 83..90
public/ext/locale/ext-lang-cs.js on lines 87..94
public/ext/locale/ext-lang-da.js on lines 90..97
public/ext/locale/ext-lang-de.js on lines 93..100
public/ext/locale/ext-lang-el_GR.js on lines 105..112
public/ext/locale/ext-lang-en.js on lines 87..94
public/ext/locale/ext-lang-en_GB.js on lines 83..90
public/ext/locale/ext-lang-es.js on lines 86..93
public/ext/locale/ext-lang-fa.js on lines 75..82
public/ext/locale/ext-lang-fi.js on lines 88..95
public/ext/locale/ext-lang-fr.js on lines 104..111
public/ext/locale/ext-lang-fr_CA.js on lines 102..109
public/ext/locale/ext-lang-gr.js on lines 59..66
public/ext/locale/ext-lang-he.js on lines 86..93
public/ext/locale/ext-lang-hr.js on lines 90..97
public/ext/locale/ext-lang-hu.js on lines 90..97
public/ext/locale/ext-lang-id.js on lines 95..102
public/ext/locale/ext-lang-it.js on lines 88..95
public/ext/locale/ext-lang-ko.js on lines 60..67
public/ext/locale/ext-lang-lt.js on lines 101..108
public/ext/locale/ext-lang-lv.js on lines 59..66
public/ext/locale/ext-lang-mk.js on lines 60..67
public/ext/locale/ext-lang-nl.js on lines 91..98
public/ext/locale/ext-lang-no_NB.js on lines 88..95
public/ext/locale/ext-lang-no_NN.js on lines 88..95
public/ext/locale/ext-lang-pl.js on lines 97..104
public/ext/locale/ext-lang-pt.js on lines 63..70
public/ext/locale/ext-lang-pt_BR.js on lines 88..95
public/ext/locale/ext-lang-pt_PT.js on lines 83..90
public/ext/locale/ext-lang-ru.js on lines 102..109
public/ext/locale/ext-lang-sk.js on lines 63..70
public/ext/locale/ext-lang-sl.js on lines 59..66
public/ext/locale/ext-lang-sr.js on lines 61..68
public/ext/locale/ext-lang-sr_RS.js on lines 61..68
public/ext/locale/ext-lang-sv_SE.js on lines 61..68
public/ext/locale/ext-lang-th.js on lines 88..95
public/ext/locale/ext-lang-tr.js on lines 102..109
public/ext/locale/ext-lang-ukr.js on lines 64..71
public/ext/locale/ext-lang-vn.js on lines 65..72
public/ext/locale/ext-lang-zh_CN.js on lines 66..73
public/ext/locale/ext-lang-zh_TW.js on lines 60..67

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

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

if(Ext.MessageBox){
   Ext.MessageBox.buttonText = {
      ok     : "У реду",
      cancel : "Одустани",
      yes    : "Да",
Severity: Major
Found in public/ext/locale/ext-lang-sr_RS.js and 42 other locations - About 35 mins to fix
public/ext/locale/ext-lang-bg.js on lines 80..87
public/ext/locale/ext-lang-ca.js on lines 83..90
public/ext/locale/ext-lang-cs.js on lines 87..94
public/ext/locale/ext-lang-da.js on lines 90..97
public/ext/locale/ext-lang-de.js on lines 93..100
public/ext/locale/ext-lang-el_GR.js on lines 105..112
public/ext/locale/ext-lang-en.js on lines 87..94
public/ext/locale/ext-lang-en_GB.js on lines 83..90
public/ext/locale/ext-lang-es.js on lines 86..93
public/ext/locale/ext-lang-fa.js on lines 75..82
public/ext/locale/ext-lang-fi.js on lines 88..95
public/ext/locale/ext-lang-fr.js on lines 104..111
public/ext/locale/ext-lang-fr_CA.js on lines 102..109
public/ext/locale/ext-lang-gr.js on lines 59..66
public/ext/locale/ext-lang-he.js on lines 86..93
public/ext/locale/ext-lang-hr.js on lines 90..97
public/ext/locale/ext-lang-hu.js on lines 90..97
public/ext/locale/ext-lang-id.js on lines 95..102
public/ext/locale/ext-lang-it.js on lines 88..95
public/ext/locale/ext-lang-ko.js on lines 60..67
public/ext/locale/ext-lang-lt.js on lines 101..108
public/ext/locale/ext-lang-lv.js on lines 59..66
public/ext/locale/ext-lang-mk.js on lines 60..67
public/ext/locale/ext-lang-nl.js on lines 91..98
public/ext/locale/ext-lang-no_NB.js on lines 88..95
public/ext/locale/ext-lang-no_NN.js on lines 88..95
public/ext/locale/ext-lang-pl.js on lines 97..104
public/ext/locale/ext-lang-pt.js on lines 63..70
public/ext/locale/ext-lang-pt_BR.js on lines 88..95
public/ext/locale/ext-lang-pt_PT.js on lines 83..90
public/ext/locale/ext-lang-ro.js on lines 88..95
public/ext/locale/ext-lang-ru.js on lines 102..109
public/ext/locale/ext-lang-sk.js on lines 63..70
public/ext/locale/ext-lang-sl.js on lines 59..66
public/ext/locale/ext-lang-sr.js on lines 61..68
public/ext/locale/ext-lang-sv_SE.js on lines 61..68
public/ext/locale/ext-lang-th.js on lines 88..95
public/ext/locale/ext-lang-tr.js on lines 102..109
public/ext/locale/ext-lang-ukr.js on lines 64..71
public/ext/locale/ext-lang-vn.js on lines 65..72
public/ext/locale/ext-lang-zh_CN.js on lines 66..73
public/ext/locale/ext-lang-zh_TW.js on lines 60..67

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

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

if(Ext.MessageBox){
   Ext.MessageBox.buttonText = {
      ok     : "OK",
      cancel : "Fortryd",
      yes    : "Ja",
Severity: Major
Found in public/ext/locale/ext-lang-da.js and 42 other locations - About 35 mins to fix
public/ext/locale/ext-lang-bg.js on lines 80..87
public/ext/locale/ext-lang-ca.js on lines 83..90
public/ext/locale/ext-lang-cs.js on lines 87..94
public/ext/locale/ext-lang-de.js on lines 93..100
public/ext/locale/ext-lang-el_GR.js on lines 105..112
public/ext/locale/ext-lang-en.js on lines 87..94
public/ext/locale/ext-lang-en_GB.js on lines 83..90
public/ext/locale/ext-lang-es.js on lines 86..93
public/ext/locale/ext-lang-fa.js on lines 75..82
public/ext/locale/ext-lang-fi.js on lines 88..95
public/ext/locale/ext-lang-fr.js on lines 104..111
public/ext/locale/ext-lang-fr_CA.js on lines 102..109
public/ext/locale/ext-lang-gr.js on lines 59..66
public/ext/locale/ext-lang-he.js on lines 86..93
public/ext/locale/ext-lang-hr.js on lines 90..97
public/ext/locale/ext-lang-hu.js on lines 90..97
public/ext/locale/ext-lang-id.js on lines 95..102
public/ext/locale/ext-lang-it.js on lines 88..95
public/ext/locale/ext-lang-ko.js on lines 60..67
public/ext/locale/ext-lang-lt.js on lines 101..108
public/ext/locale/ext-lang-lv.js on lines 59..66
public/ext/locale/ext-lang-mk.js on lines 60..67
public/ext/locale/ext-lang-nl.js on lines 91..98
public/ext/locale/ext-lang-no_NB.js on lines 88..95
public/ext/locale/ext-lang-no_NN.js on lines 88..95
public/ext/locale/ext-lang-pl.js on lines 97..104
public/ext/locale/ext-lang-pt.js on lines 63..70
public/ext/locale/ext-lang-pt_BR.js on lines 88..95
public/ext/locale/ext-lang-pt_PT.js on lines 83..90
public/ext/locale/ext-lang-ro.js on lines 88..95
public/ext/locale/ext-lang-ru.js on lines 102..109
public/ext/locale/ext-lang-sk.js on lines 63..70
public/ext/locale/ext-lang-sl.js on lines 59..66
public/ext/locale/ext-lang-sr.js on lines 61..68
public/ext/locale/ext-lang-sr_RS.js on lines 61..68
public/ext/locale/ext-lang-sv_SE.js on lines 61..68
public/ext/locale/ext-lang-th.js on lines 88..95
public/ext/locale/ext-lang-tr.js on lines 102..109
public/ext/locale/ext-lang-ukr.js on lines 64..71
public/ext/locale/ext-lang-vn.js on lines 65..72
public/ext/locale/ext-lang-zh_CN.js on lines 66..73
public/ext/locale/ext-lang-zh_TW.js on lines 60..67

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

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

if(Ext.MessageBox){
  Ext.MessageBox.buttonText = {
    ok     : "OK",
    cancel : "Avbryt",
    yes    : "Ja",
Severity: Major
Found in public/ext/locale/ext-lang-no_NB.js and 42 other locations - About 35 mins to fix
public/ext/locale/ext-lang-bg.js on lines 80..87
public/ext/locale/ext-lang-ca.js on lines 83..90
public/ext/locale/ext-lang-cs.js on lines 87..94
public/ext/locale/ext-lang-da.js on lines 90..97
public/ext/locale/ext-lang-de.js on lines 93..100
public/ext/locale/ext-lang-el_GR.js on lines 105..112
public/ext/locale/ext-lang-en.js on lines 87..94
public/ext/locale/ext-lang-en_GB.js on lines 83..90
public/ext/locale/ext-lang-es.js on lines 86..93
public/ext/locale/ext-lang-fa.js on lines 75..82
public/ext/locale/ext-lang-fi.js on lines 88..95
public/ext/locale/ext-lang-fr.js on lines 104..111
public/ext/locale/ext-lang-fr_CA.js on lines 102..109
public/ext/locale/ext-lang-gr.js on lines 59..66
public/ext/locale/ext-lang-he.js on lines 86..93
public/ext/locale/ext-lang-hr.js on lines 90..97
public/ext/locale/ext-lang-hu.js on lines 90..97
public/ext/locale/ext-lang-id.js on lines 95..102
public/ext/locale/ext-lang-it.js on lines 88..95
public/ext/locale/ext-lang-ko.js on lines 60..67
public/ext/locale/ext-lang-lt.js on lines 101..108
public/ext/locale/ext-lang-lv.js on lines 59..66
public/ext/locale/ext-lang-mk.js on lines 60..67
public/ext/locale/ext-lang-nl.js on lines 91..98
public/ext/locale/ext-lang-no_NN.js on lines 88..95
public/ext/locale/ext-lang-pl.js on lines 97..104
public/ext/locale/ext-lang-pt.js on lines 63..70
public/ext/locale/ext-lang-pt_BR.js on lines 88..95
public/ext/locale/ext-lang-pt_PT.js on lines 83..90
public/ext/locale/ext-lang-ro.js on lines 88..95
public/ext/locale/ext-lang-ru.js on lines 102..109
public/ext/locale/ext-lang-sk.js on lines 63..70
public/ext/locale/ext-lang-sl.js on lines 59..66
public/ext/locale/ext-lang-sr.js on lines 61..68
public/ext/locale/ext-lang-sr_RS.js on lines 61..68
public/ext/locale/ext-lang-sv_SE.js on lines 61..68
public/ext/locale/ext-lang-th.js on lines 88..95
public/ext/locale/ext-lang-tr.js on lines 102..109
public/ext/locale/ext-lang-ukr.js on lines 64..71
public/ext/locale/ext-lang-vn.js on lines 65..72
public/ext/locale/ext-lang-zh_CN.js on lines 66..73
public/ext/locale/ext-lang-zh_TW.js on lines 60..67

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

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

if(Ext.MessageBox){
   Ext.MessageBox.buttonText = {
      ok     : "Labi",
      cancel : "Atcelt",
      yes    : "Jā",
Severity: Major
Found in public/ext/locale/ext-lang-lv.js and 42 other locations - About 35 mins to fix
public/ext/locale/ext-lang-bg.js on lines 80..87
public/ext/locale/ext-lang-ca.js on lines 83..90
public/ext/locale/ext-lang-cs.js on lines 87..94
public/ext/locale/ext-lang-da.js on lines 90..97
public/ext/locale/ext-lang-de.js on lines 93..100
public/ext/locale/ext-lang-el_GR.js on lines 105..112
public/ext/locale/ext-lang-en.js on lines 87..94
public/ext/locale/ext-lang-en_GB.js on lines 83..90
public/ext/locale/ext-lang-es.js on lines 86..93
public/ext/locale/ext-lang-fa.js on lines 75..82
public/ext/locale/ext-lang-fi.js on lines 88..95
public/ext/locale/ext-lang-fr.js on lines 104..111
public/ext/locale/ext-lang-fr_CA.js on lines 102..109
public/ext/locale/ext-lang-gr.js on lines 59..66
public/ext/locale/ext-lang-he.js on lines 86..93
public/ext/locale/ext-lang-hr.js on lines 90..97
public/ext/locale/ext-lang-hu.js on lines 90..97
public/ext/locale/ext-lang-id.js on lines 95..102
public/ext/locale/ext-lang-it.js on lines 88..95
public/ext/locale/ext-lang-ko.js on lines 60..67
public/ext/locale/ext-lang-lt.js on lines 101..108
public/ext/locale/ext-lang-mk.js on lines 60..67
public/ext/locale/ext-lang-nl.js on lines 91..98
public/ext/locale/ext-lang-no_NB.js on lines 88..95
public/ext/locale/ext-lang-no_NN.js on lines 88..95
public/ext/locale/ext-lang-pl.js on lines 97..104
public/ext/locale/ext-lang-pt.js on lines 63..70
public/ext/locale/ext-lang-pt_BR.js on lines 88..95
public/ext/locale/ext-lang-pt_PT.js on lines 83..90
public/ext/locale/ext-lang-ro.js on lines 88..95
public/ext/locale/ext-lang-ru.js on lines 102..109
public/ext/locale/ext-lang-sk.js on lines 63..70
public/ext/locale/ext-lang-sl.js on lines 59..66
public/ext/locale/ext-lang-sr.js on lines 61..68
public/ext/locale/ext-lang-sr_RS.js on lines 61..68
public/ext/locale/ext-lang-sv_SE.js on lines 61..68
public/ext/locale/ext-lang-th.js on lines 88..95
public/ext/locale/ext-lang-tr.js on lines 102..109
public/ext/locale/ext-lang-ukr.js on lines 64..71
public/ext/locale/ext-lang-vn.js on lines 65..72
public/ext/locale/ext-lang-zh_CN.js on lines 66..73
public/ext/locale/ext-lang-zh_TW.js on lines 60..67

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

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

if(Ext.MessageBox){
   Ext.MessageBox.buttonText = {
      ok     : "OK",
      cancel : "Відміна",
      yes    : "Так",
Severity: Major
Found in public/ext/locale/ext-lang-ukr.js and 42 other locations - About 35 mins to fix
public/ext/locale/ext-lang-bg.js on lines 80..87
public/ext/locale/ext-lang-ca.js on lines 83..90
public/ext/locale/ext-lang-cs.js on lines 87..94
public/ext/locale/ext-lang-da.js on lines 90..97
public/ext/locale/ext-lang-de.js on lines 93..100
public/ext/locale/ext-lang-el_GR.js on lines 105..112
public/ext/locale/ext-lang-en.js on lines 87..94
public/ext/locale/ext-lang-en_GB.js on lines 83..90
public/ext/locale/ext-lang-es.js on lines 86..93
public/ext/locale/ext-lang-fa.js on lines 75..82
public/ext/locale/ext-lang-fi.js on lines 88..95
public/ext/locale/ext-lang-fr.js on lines 104..111
public/ext/locale/ext-lang-fr_CA.js on lines 102..109
public/ext/locale/ext-lang-gr.js on lines 59..66
public/ext/locale/ext-lang-he.js on lines 86..93
public/ext/locale/ext-lang-hr.js on lines 90..97
public/ext/locale/ext-lang-hu.js on lines 90..97
public/ext/locale/ext-lang-id.js on lines 95..102
public/ext/locale/ext-lang-it.js on lines 88..95
public/ext/locale/ext-lang-ko.js on lines 60..67
public/ext/locale/ext-lang-lt.js on lines 101..108
public/ext/locale/ext-lang-lv.js on lines 59..66
public/ext/locale/ext-lang-mk.js on lines 60..67
public/ext/locale/ext-lang-nl.js on lines 91..98
public/ext/locale/ext-lang-no_NB.js on lines 88..95
public/ext/locale/ext-lang-no_NN.js on lines 88..95
public/ext/locale/ext-lang-pl.js on lines 97..104
public/ext/locale/ext-lang-pt.js on lines 63..70
public/ext/locale/ext-lang-pt_BR.js on lines 88..95
public/ext/locale/ext-lang-pt_PT.js on lines 83..90
public/ext/locale/ext-lang-ro.js on lines 88..95
public/ext/locale/ext-lang-ru.js on lines 102..109
public/ext/locale/ext-lang-sk.js on lines 63..70
public/ext/locale/ext-lang-sl.js on lines 59..66
public/ext/locale/ext-lang-sr.js on lines 61..68
public/ext/locale/ext-lang-sr_RS.js on lines 61..68
public/ext/locale/ext-lang-sv_SE.js on lines 61..68
public/ext/locale/ext-lang-th.js on lines 88..95
public/ext/locale/ext-lang-tr.js on lines 102..109
public/ext/locale/ext-lang-vn.js on lines 65..72
public/ext/locale/ext-lang-zh_CN.js on lines 66..73
public/ext/locale/ext-lang-zh_TW.js on lines 60..67

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

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 onRender has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    onRender: function(ct, position){
      Ext.form.Checkbox.superclass.onRender.call(this, ct, position);
      if (this.inputValue !== undefined) {
        this.el.dom.value = this.inputValue;
      }
Severity: Minor
Found in public/javascripts/application.js - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method save_profile has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  def save_profile
    if !params[:password].blank?
      if !User.authenticate(@current_user.login, params[:current_password])
        @current_user.errors.add(:current_password, t('admin.my_profile.bad_current_password'))
      end
Severity: Minor
Found in app/controllers/admin/users_controller.rb - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method get_usage_stats has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def get_usage_stats(virtual_server)
      is_running = 'running' == virtual_server.real_state

      stats = []

Severity: Minor
Found in app/controllers/admin/virtual_servers_controller.rb - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method get_usage_stats has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  def get_usage_stats(virtual_server)
    is_running = 'running' == virtual_server.real_state

    stats = []

Severity: Minor
Found in app/controllers/api/virtual_servers_controller.rb - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method toggle has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  def toggle
    @request = Request.find_by_id(params[:request_id])
    redirect_to :controller => 'dashboard' and return if !@request or (!@current_user.can_handle_requests? and (@request.user.id != @current_user.id))

    @request.opened = @current_user.can_handle_requests? ? !@request.opened : true
Severity: Minor
Found in app/controllers/admin/requests_controller.rb - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method get_diskspace_mb has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  def get_diskspace_mb(limit)
    return 0 if limit.blank?
    limit = limit.include?(':') ? limit.split(":").last : limit
    return 0 if ('unlimited' == limit)

Severity: Minor
Found in app/helpers/application_helper.rb - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Avoid too many return statements within this method.
Open

      return false
Severity: Major
Found in app/models/hardware_server.rb - About 30 mins to fix

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

    if(Ext.form.RadioGroup){
      Ext.apply(Ext.form.RadioGroup.prototype, {
        blankText : 'Selecteer een element in deze groep'
      });
    }
    Severity: Major
    Found in public/ext/locale/ext-lang-nl.js and 19 other locations - About 30 mins to fix
    public/ext/locale/ext-lang-ca.js on lines 305..309
    public/ext/locale/ext-lang-ca.js on lines 311..315
    public/ext/locale/ext-lang-de.js on lines 307..311
    public/ext/locale/ext-lang-de.js on lines 313..317
    public/ext/locale/ext-lang-en.js on lines 306..310
    public/ext/locale/ext-lang-en.js on lines 312..316
    public/ext/locale/ext-lang-en.js on lines 335..339
    public/ext/locale/ext-lang-en.js on lines 341..345
    public/ext/locale/ext-lang-en_GB.js on lines 311..315
    public/ext/locale/ext-lang-en_GB.js on lines 317..321
    public/ext/locale/ext-lang-es.js on lines 308..312
    public/ext/locale/ext-lang-es.js on lines 314..318
    public/ext/locale/ext-lang-fr.js on lines 332..336
    public/ext/locale/ext-lang-fr.js on lines 338..342
    public/ext/locale/ext-lang-ja.js on lines 308..312
    public/ext/locale/ext-lang-ja.js on lines 314..318
    public/ext/locale/ext-lang-lt.js on lines 323..327
    public/ext/locale/ext-lang-lt.js on lines 329..333
    public/ext/locale/ext-lang-nl.js on lines 313..317

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

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

    if(Ext.form.CheckboxGroup){
      Ext.apply(Ext.form.CheckboxGroup.prototype, {
        blankText : "Vous devez sélectionner au moins un élément dans ce groupe"
      });
    }
    Severity: Major
    Found in public/ext/locale/ext-lang-fr.js and 19 other locations - About 30 mins to fix
    public/ext/locale/ext-lang-ca.js on lines 305..309
    public/ext/locale/ext-lang-ca.js on lines 311..315
    public/ext/locale/ext-lang-de.js on lines 307..311
    public/ext/locale/ext-lang-de.js on lines 313..317
    public/ext/locale/ext-lang-en.js on lines 306..310
    public/ext/locale/ext-lang-en.js on lines 312..316
    public/ext/locale/ext-lang-en.js on lines 335..339
    public/ext/locale/ext-lang-en.js on lines 341..345
    public/ext/locale/ext-lang-en_GB.js on lines 311..315
    public/ext/locale/ext-lang-en_GB.js on lines 317..321
    public/ext/locale/ext-lang-es.js on lines 308..312
    public/ext/locale/ext-lang-es.js on lines 314..318
    public/ext/locale/ext-lang-fr.js on lines 338..342
    public/ext/locale/ext-lang-ja.js on lines 308..312
    public/ext/locale/ext-lang-ja.js on lines 314..318
    public/ext/locale/ext-lang-lt.js on lines 323..327
    public/ext/locale/ext-lang-lt.js on lines 329..333
    public/ext/locale/ext-lang-nl.js on lines 313..317
    public/ext/locale/ext-lang-nl.js on lines 319..323

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

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

    if(Ext.form.CheckboxGroup){
      Ext.apply(Ext.form.CheckboxGroup.prototype, {
        blankText : "You must select at least one item in this group"
      });
    }
    Severity: Major
    Found in public/ext/locale/ext-lang-en.js and 19 other locations - About 30 mins to fix
    public/ext/locale/ext-lang-ca.js on lines 305..309
    public/ext/locale/ext-lang-ca.js on lines 311..315
    public/ext/locale/ext-lang-de.js on lines 307..311
    public/ext/locale/ext-lang-de.js on lines 313..317
    public/ext/locale/ext-lang-en.js on lines 306..310
    public/ext/locale/ext-lang-en.js on lines 312..316
    public/ext/locale/ext-lang-en.js on lines 341..345
    public/ext/locale/ext-lang-en_GB.js on lines 311..315
    public/ext/locale/ext-lang-en_GB.js on lines 317..321
    public/ext/locale/ext-lang-es.js on lines 308..312
    public/ext/locale/ext-lang-es.js on lines 314..318
    public/ext/locale/ext-lang-fr.js on lines 332..336
    public/ext/locale/ext-lang-fr.js on lines 338..342
    public/ext/locale/ext-lang-ja.js on lines 308..312
    public/ext/locale/ext-lang-ja.js on lines 314..318
    public/ext/locale/ext-lang-lt.js on lines 323..327
    public/ext/locale/ext-lang-lt.js on lines 329..333
    public/ext/locale/ext-lang-nl.js on lines 313..317
    public/ext/locale/ext-lang-nl.js on lines 319..323

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

    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