plainblack/Lacuna-Web-Client

View on GitHub

Showing 811 of 1,320 total issues

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

                this.AllianceTable.subscribe("cellUnhighlightEvent", function(oArgs) {
                    if (oArgs.key == "alliance_name") {
                        Dom.setStyle(oArgs.el, "cursor", "auto");
                    }
                });
Severity: Major
Found in app/js-yui/stats.js and 7 other locations - About 55 mins to fix
app/js-yui/stats.js on lines 770..774
app/js-yui/stats.js on lines 994..998
app/js-yui/stats.js on lines 1000..1004
app/js-yui/stats.js on lines 1121..1125
app/js-yui/stats.js on lines 1127..1131
app/js-yui/stats.js on lines 1242..1246
app/js-yui/stats.js on lines 1248..1252

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

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

                this.ColonyTable.subscribe("cellHighlightEvent", function(oArgs) {
                    if (oArgs.key == "empire_name") {
                        Dom.setStyle(oArgs.el, "cursor", "help");
                    }
                });
Severity: Major
Found in app/js-yui/stats.js and 7 other locations - About 55 mins to fix
app/js-yui/stats.js on lines 770..774
app/js-yui/stats.js on lines 776..780
app/js-yui/stats.js on lines 1000..1004
app/js-yui/stats.js on lines 1121..1125
app/js-yui/stats.js on lines 1127..1131
app/js-yui/stats.js on lines 1242..1246
app/js-yui/stats.js on lines 1248..1252

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

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

                Event.on(this.skipExcavatorResources, 'change', function() {
                    if(!this.checked) {
                        Dom.get("profileSkipAllExcavator").checked = false;
                    }
                });
Severity: Major
Found in app/js-yui/profile.js and 6 other locations - About 55 mins to fix
app/js-yui/profile.js on lines 72..76
app/js-yui/profile.js on lines 82..86
app/js-yui/profile.js on lines 87..91
app/js-yui/profile.js on lines 92..96
app/js-yui/profile.js on lines 97..101
app/js-yui/profile.js on lines 102..106

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

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

                Event.on(this.skipExcavatorArtifact, 'change', function() {
                    if(!this.checked) {
                        Dom.get("profileSkipAllExcavator").checked = false;
                    }
                });
Severity: Major
Found in app/js-yui/profile.js and 6 other locations - About 55 mins to fix
app/js-yui/profile.js on lines 72..76
app/js-yui/profile.js on lines 77..81
app/js-yui/profile.js on lines 82..86
app/js-yui/profile.js on lines 87..91
app/js-yui/profile.js on lines 97..101
app/js-yui/profile.js on lines 102..106

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

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

                this.ColonyTable.subscribe("cellUnhighlightEvent", function(oArgs) {
                    if (oArgs.key == "empire_name") {
                        Dom.setStyle(oArgs.el, "cursor", "auto");
                    }
                });
Severity: Major
Found in app/js-yui/stats.js and 7 other locations - About 55 mins to fix
app/js-yui/stats.js on lines 770..774
app/js-yui/stats.js on lines 776..780
app/js-yui/stats.js on lines 994..998
app/js-yui/stats.js on lines 1121..1125
app/js-yui/stats.js on lines 1127..1131
app/js-yui/stats.js on lines 1242..1246
app/js-yui/stats.js on lines 1248..1252

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

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

                this.WeeklyMedalTable.subscribe("cellHighlightEvent", function(oArgs) {
                    if (oArgs.key == "empire_name") {
                        Dom.setStyle(oArgs.el, "cursor", "help");
                    }
                });
Severity: Major
Found in app/js-yui/stats.js and 7 other locations - About 55 mins to fix
app/js-yui/stats.js on lines 770..774
app/js-yui/stats.js on lines 776..780
app/js-yui/stats.js on lines 994..998
app/js-yui/stats.js on lines 1000..1004
app/js-yui/stats.js on lines 1121..1125
app/js-yui/stats.js on lines 1127..1131
app/js-yui/stats.js on lines 1248..1252

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

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

                Event.on(this.skipExcavatorPlan, 'change', function() {
                    if(!this.checked) {
                        Dom.get("profileSkipAllExcavator").checked = false;
                    }
                });
Severity: Major
Found in app/js-yui/profile.js and 6 other locations - About 55 mins to fix
app/js-yui/profile.js on lines 72..76
app/js-yui/profile.js on lines 77..81
app/js-yui/profile.js on lines 82..86
app/js-yui/profile.js on lines 92..96
app/js-yui/profile.js on lines 97..101
app/js-yui/profile.js on lines 102..106

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

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

                Event.on(this.skipExcavatorReplaceMsg, 'change', function() {
                    if(!this.checked) {
                        Dom.get("profileSkipExcavatorReplaceMsg").checked = false;
                    }
                });
Severity: Major
Found in app/js-yui/profile.js and 6 other locations - About 55 mins to fix
app/js-yui/profile.js on lines 72..76
app/js-yui/profile.js on lines 77..81
app/js-yui/profile.js on lines 82..86
app/js-yui/profile.js on lines 87..91
app/js-yui/profile.js on lines 92..96
app/js-yui/profile.js on lines 97..101

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

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

                this.AllianceTable.subscribe("cellHighlightEvent", function(oArgs) {
                    if (oArgs.key == "alliance_name") {
                        Dom.setStyle(oArgs.el, "cursor", "help");
                    }
                });
Severity: Major
Found in app/js-yui/stats.js and 7 other locations - About 55 mins to fix
app/js-yui/stats.js on lines 776..780
app/js-yui/stats.js on lines 994..998
app/js-yui/stats.js on lines 1000..1004
app/js-yui/stats.js on lines 1121..1125
app/js-yui/stats.js on lines 1127..1131
app/js-yui/stats.js on lines 1242..1246
app/js-yui/stats.js on lines 1248..1252

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

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

                Event.on(this.skipExcavatorGlyph, 'change', function() {
                    if(!this.checked) {
                        Dom.get("profileSkipAllExcavator").checked = false;
                    }
                });
Severity: Major
Found in app/js-yui/profile.js and 6 other locations - About 55 mins to fix
app/js-yui/profile.js on lines 72..76
app/js-yui/profile.js on lines 77..81
app/js-yui/profile.js on lines 87..91
app/js-yui/profile.js on lines 92..96
app/js-yui/profile.js on lines 97..101
app/js-yui/profile.js on lines 102..106

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

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

                this.SpyTable.subscribe("cellHighlightEvent", function(oArgs) {
                    if (oArgs.key == "empire_name") {
                        Dom.setStyle(oArgs.el, "cursor", "help");
                    }
                });
Severity: Major
Found in app/js-yui/stats.js and 7 other locations - About 55 mins to fix
app/js-yui/stats.js on lines 770..774
app/js-yui/stats.js on lines 776..780
app/js-yui/stats.js on lines 994..998
app/js-yui/stats.js on lines 1000..1004
app/js-yui/stats.js on lines 1127..1131
app/js-yui/stats.js on lines 1242..1246
app/js-yui/stats.js on lines 1248..1252

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

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

        UpdateReserveStore : function(byVal) {
            var c = Dom.get("distribTotalSelected"),
                cv = c.innerHTML*1;
            c.innerHTML = cv + byVal;
        },
Severity: Major
Found in app/js-yui/building/distributionCenter.js and 3 other locations - About 55 mins to fix
app/js-yui/building/embassy.js on lines 492..496
app/js-yui/building/embassy.js on lines 497..501
app/js-yui/building/mercenariesGuild.js on lines 495..499

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

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

        destroy : function() {
            if(this.pager) {
                this.pager.destroy();
            }
            Observatory.superclass.destroy.call(this);
Severity: Minor
Found in app/js-yui/building/observatory.js and 1 other location - About 55 mins to fix
app/js-yui/building/intelligence.js on lines 23..28

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

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

    handleSidebarShowing : function() {
        var el = this.refs.sidebar;

        $(el)
            .sidebar(this.state.showSidebar ? 'show' : 'hide');
Severity: Minor
Found in app/js/components/menu/rightSidebar.jsx and 1 other location - About 55 mins to fix
app/js/components/menu/leftSidebar.jsx on lines 117..122

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

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

        updateAddCargo : function(byVal) {
            var c = Dom.get("tradeAddCargo"),
                cv = c.innerHTML*1;
            c.innerHTML = cv + byVal;
        },
Severity: Major
Found in app/js-yui/building/mercenariesGuild.js and 3 other locations - About 55 mins to fix
app/js-yui/building/distributionCenter.js on lines 225..229
app/js-yui/building/embassy.js on lines 492..496
app/js-yui/building/embassy.js on lines 497..501

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

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

    handleSidebarShowing : function() {
        var el = this.refs.sidebar;

        $(el)
            .sidebar(this.state.leftSidebar ? 'show' : 'hide');
Severity: Minor
Found in app/js/components/menu/leftSidebar.jsx and 1 other location - About 55 mins to fix
app/js/components/menu/rightSidebar.jsx on lines 268..273

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

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 (effect.target) {
          var nLi = li.cloneNode(false);
          nLi.innerHTML = this.bhgParseResult(effect.target, 'Success');
          details.appendChild(nLi);
        }
Severity: Minor
Found in app/js-yui/building/blackHoleGenerator.js and 1 other location - About 55 mins to fix
app/js-yui/building/blackHoleGenerator.js on lines 330..334

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

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

        destroy : function() {
            if(this.pager) {
                this.pager.destroy();
            }
            Intelligence.superclass.destroy.call(this);
Severity: Minor
Found in app/js-yui/building/intelligence.js and 1 other location - About 55 mins to fix
app/js-yui/building/observatory.js on lines 23..28

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

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

            tabs.push(
                <Tab title="Repair" key="Repair">
                    <RepairTab building={building} body={body} />
                </Tab>
            );
Severity: Minor
Found in app/js/components/window/building/standardTabs.jsx and 1 other location - About 55 mins to fix
app/js/components/window/building/standardTabs.jsx on lines 26..30

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

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

        updateStashExchange : function(byVal) {
            var c = Dom.get("embassyTotalExchange"),
                cv = c.innerHTML*1;
            c.innerHTML = cv + byVal;
        },
Severity: Major
Found in app/js-yui/building/embassy.js and 3 other locations - About 55 mins to fix
app/js-yui/building/distributionCenter.js on lines 225..229
app/js-yui/building/embassy.js on lines 492..496
app/js-yui/building/mercenariesGuild.js on lines 495..499

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

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