plainblack/Lacuna-Web-Client

View on GitHub

Showing 811 of 1,320 total issues

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

            this.Self.service.subsidize_one_build({ args: {
                session_id:Game.GetSession(),
                building_id:this.Self.building.id,
                scheduled_id:this.ScheduledId
            }}, {
Severity: Minor
Found in app/js-yui/building/development.js and 1 other location - About 35 mins to fix
app/js-yui/building/development.js on lines 157..161

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

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

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

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

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

Refactorings

Further Reading

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

            Event.addListener(this.elCreate, "click", function(e){Event.stopEvent(e);this.createEmpire();}, this, true);
Severity: Minor
Found in app/js-yui/login.js and 2 other locations - About 35 mins to fix
app/js-yui/login.js on lines 92..92
app/js-yui/login.js on lines 93..93

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

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

            this.Self.service.cancel_build({ args: {
                session_id:Game.GetSession(),
                building_id:this.Self.building.id,
                scheduled_id:this.ScheduledId
            }}, {
Severity: Minor
Found in app/js-yui/building/development.js and 1 other location - About 35 mins to fix
app/js-yui/building/development.js on lines 180..184

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

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

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

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

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

Refactorings

Further Reading

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

            Event.addListener(this.elForm, "submit", function(e){Event.stopEvent(e);this.handleLogin();}, this, true);
Severity: Minor
Found in app/js-yui/login.js and 2 other locations - About 35 mins to fix
app/js-yui/login.js on lines 91..91
app/js-yui/login.js on lines 92..92

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

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

                        nLi.innerHTML = ['<img src="',Lib.AssetUrl,'star_system/',obj.asteroid.image,'.png" />',obj.asteroid.name].join('');
Severity: Minor
Found in app/js-yui/building/miningMinistry.js and 1 other location - About 35 mins to fix
app/js-yui/building/archaeology.js on lines 349..349

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

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

    getInitialState : function() {
        if (this.state) {
            this.state = this.getDefaultData();
        }
        return this.state;
Severity: Minor
Found in app/js/stores/windows/stats.js and 1 other location - About 35 mins to fix
app/js/stores/windows/notes.js on lines 24..29

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

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

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

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

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

Refactorings

Further Reading

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

            Event.addListener(this.elReset, "click", function(e){Event.stopEvent(e);this.resetPassword();}, this, true);
Severity: Minor
Found in app/js-yui/login.js and 2 other locations - About 35 mins to fix
app/js-yui/login.js on lines 91..91
app/js-yui/login.js on lines 93..93

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

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

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

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

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

Refactorings

Further Reading

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

                    <a
                        title="Go to home planet"
                        className="item"
                        onClick={this.homePlanet}
                        style={{
Severity: Minor
Found in app/js/components/menu/rightSidebar.jsx and 2 other locations - About 35 mins to fix
app/js/components/menu/rightSidebar.jsx on lines 305..314
app/js/components/menu/rightSidebar.jsx on lines 316..325

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

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

    getInitialState : function() {
        if (this.state) {
            this.state = this.getDefaultData();
        }
        return this.state;
Severity: Minor
Found in app/js/stores/windows/notes.js and 1 other location - About 35 mins to fix
app/js/stores/windows/stats.js on lines 24..29

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

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

            nLi.innerHTML = ['<img src="',Lib.AssetUrl,'star_system/',obj.body.image,'.png" />', obj.body.name].join('');
Severity: Minor
Found in app/js-yui/building/archaeology.js and 1 other location - About 35 mins to fix
app/js-yui/building/miningMinistry.js on lines 156..156

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

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 (column.key == "empire_name") {
                        record = this.getRecord(target);
                        Lacuna.Info.Empire.Load(record.getData("empire_id"));
                    }
                    else if (column.key == "alliance_name") {
Severity: Minor
Found in app/js-yui/stats.js and 1 other location - About 35 mins to fix
app/js-yui/stats.js on lines 543..546

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

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

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

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

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

Refactorings

Further Reading

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

                        <a
                            title="Expand all"
                            className="item"
                            onClick={this.expand}
                            style={{
Severity: Minor
Found in app/js/components/menu/rightSidebar.jsx and 2 other locations - About 35 mins to fix
app/js/components/menu/rightSidebar.jsx on lines 293..302
app/js/components/menu/rightSidebar.jsx on lines 316..325

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

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

                    else if (column.key == "alliance_name") {
                        record = this.getRecord(target);
                        Lacuna.Info.Alliance.Load(record.getData("alliance_id"));
                    }
Severity: Minor
Found in app/js-yui/stats.js and 1 other location - About 35 mins to fix
app/js-yui/stats.js on lines 539..546

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

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

    onUpgradeClick : function() {
        GenericBuildingRPCActions.requestGenericBuildingRPCUpgrade(this.props.building.url, this.props.building.id);
    },
Severity: Minor
Found in app/js/components/window/building/productionTab.jsx and 1 other location - About 35 mins to fix
app/js/components/window/building/repairTab.jsx on lines 21..23

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

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

                "boost_spy_training" : {
                    "description": "Spends 5 essentia, and boosts spy training on all planets for 7 days. If a boost is already underway, calling again will add 7 more days.",
                    "parameters": [
                        {"name":"session_id", "type":"string", "optional":false}
                    ],
Severity: Major
Found in app/js-yui/smd.js and 18 other locations - About 30 mins to fix
app/js-yui/smd.js on lines 75..79
app/js-yui/smd.js on lines 310..316
app/js-yui/smd.js on lines 354..358
app/js-yui/smd.js on lines 359..363
app/js-yui/smd.js on lines 1002..1008
app/js-yui/smd.js on lines 1590..1596
app/js-yui/smd.js on lines 2884..2890
app/js-yui/smd.js on lines 2903..2909
app/js-yui/smd.js on lines 2910..2916
app/js-yui/smd.js on lines 2956..2962
app/js-yui/smd.js on lines 3150..3156
app/js-yui/smd.js on lines 3164..3170
app/js-yui/smd.js on lines 3171..3177
app/js-yui/smd.js on lines 3222..3228
app/js-yui/smd.js on lines 3237..3243
app/js-yui/smd.js on lines 3258..3264
app/js-yui/smd.js on lines 3276..3282
app/js-yui/smd.js on lines 3482..3486

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

                "get_invite_friend_url" : {
                    "description": "Returns a URL that can be pasted into a blog, forum, or whatever to invite friends.",
                    "parameters": [
                        {"name":"session_id", "type":"string", "optional":false}
                    ],
Severity: Major
Found in app/js-yui/smd.js and 18 other locations - About 30 mins to fix
app/js-yui/smd.js on lines 75..79
app/js-yui/smd.js on lines 310..316
app/js-yui/smd.js on lines 354..358
app/js-yui/smd.js on lines 359..363
app/js-yui/smd.js on lines 1002..1008
app/js-yui/smd.js on lines 1590..1596
app/js-yui/smd.js on lines 2884..2890
app/js-yui/smd.js on lines 2903..2909
app/js-yui/smd.js on lines 2910..2916
app/js-yui/smd.js on lines 2956..2962
app/js-yui/smd.js on lines 3150..3156
app/js-yui/smd.js on lines 3157..3163
app/js-yui/smd.js on lines 3164..3170
app/js-yui/smd.js on lines 3171..3177
app/js-yui/smd.js on lines 3222..3228
app/js-yui/smd.js on lines 3237..3243
app/js-yui/smd.js on lines 3276..3282
app/js-yui/smd.js on lines 3482..3486

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

                    "generate_singularity" : {
                        "description": "Performs action on specified target.",
                        "parameters": [
                            {"name":"params", "type":"object", "optional":false}
                        ],
Severity: Major
Found in app/js-yui/smd.js and 18 other locations - About 30 mins to fix
app/js-yui/smd.js on lines 75..79
app/js-yui/smd.js on lines 354..358
app/js-yui/smd.js on lines 359..363
app/js-yui/smd.js on lines 1002..1008
app/js-yui/smd.js on lines 1590..1596
app/js-yui/smd.js on lines 2884..2890
app/js-yui/smd.js on lines 2903..2909
app/js-yui/smd.js on lines 2910..2916
app/js-yui/smd.js on lines 2956..2962
app/js-yui/smd.js on lines 3150..3156
app/js-yui/smd.js on lines 3157..3163
app/js-yui/smd.js on lines 3164..3170
app/js-yui/smd.js on lines 3171..3177
app/js-yui/smd.js on lines 3222..3228
app/js-yui/smd.js on lines 3237..3243
app/js-yui/smd.js on lines 3258..3264
app/js-yui/smd.js on lines 3276..3282
app/js-yui/smd.js on lines 3482..3486

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

                "get_status" : {
                    "description": "get quick empire status",
                    "parameters": [
                        {"name":"session_id", "type":"string", "optional":false}
                    ],
Severity: Major
Found in app/js-yui/smd.js and 18 other locations - About 30 mins to fix
app/js-yui/smd.js on lines 75..79
app/js-yui/smd.js on lines 310..316
app/js-yui/smd.js on lines 354..358
app/js-yui/smd.js on lines 359..363
app/js-yui/smd.js on lines 1002..1008
app/js-yui/smd.js on lines 1590..1596
app/js-yui/smd.js on lines 2884..2890
app/js-yui/smd.js on lines 2903..2909
app/js-yui/smd.js on lines 2910..2916
app/js-yui/smd.js on lines 3150..3156
app/js-yui/smd.js on lines 3157..3163
app/js-yui/smd.js on lines 3164..3170
app/js-yui/smd.js on lines 3171..3177
app/js-yui/smd.js on lines 3222..3228
app/js-yui/smd.js on lines 3237..3243
app/js-yui/smd.js on lines 3258..3264
app/js-yui/smd.js on lines 3276..3282
app/js-yui/smd.js on lines 3482..3486

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

                    "subsidize_one_build" : {
                        "description": "Instantly finish any one building on the build queue.",
                        "parameters": [{"name":"args", "type":"object", "optional":false}],
                        "returns":{"type":"object"}
                    },
Severity: Major
Found in app/js-yui/smd.js and 18 other locations - About 30 mins to fix
app/js-yui/smd.js on lines 75..79
app/js-yui/smd.js on lines 310..316
app/js-yui/smd.js on lines 359..363
app/js-yui/smd.js on lines 1002..1008
app/js-yui/smd.js on lines 1590..1596
app/js-yui/smd.js on lines 2884..2890
app/js-yui/smd.js on lines 2903..2909
app/js-yui/smd.js on lines 2910..2916
app/js-yui/smd.js on lines 2956..2962
app/js-yui/smd.js on lines 3150..3156
app/js-yui/smd.js on lines 3157..3163
app/js-yui/smd.js on lines 3164..3170
app/js-yui/smd.js on lines 3171..3177
app/js-yui/smd.js on lines 3222..3228
app/js-yui/smd.js on lines 3237..3243
app/js-yui/smd.js on lines 3258..3264
app/js-yui/smd.js on lines 3276..3282
app/js-yui/smd.js on lines 3482..3486

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

                "view_species_stats" : {
                    "description": "Returns a list of the stats associated with an empire's species as it was originally created.",
                    "parameters": [
                        {"name":"session_id", "type":"string", "optional":false}
                    ],
Severity: Major
Found in app/js-yui/smd.js and 18 other locations - About 30 mins to fix
app/js-yui/smd.js on lines 75..79
app/js-yui/smd.js on lines 310..316
app/js-yui/smd.js on lines 354..358
app/js-yui/smd.js on lines 359..363
app/js-yui/smd.js on lines 1002..1008
app/js-yui/smd.js on lines 1590..1596
app/js-yui/smd.js on lines 2884..2890
app/js-yui/smd.js on lines 2903..2909
app/js-yui/smd.js on lines 2910..2916
app/js-yui/smd.js on lines 2956..2962
app/js-yui/smd.js on lines 3150..3156
app/js-yui/smd.js on lines 3157..3163
app/js-yui/smd.js on lines 3164..3170
app/js-yui/smd.js on lines 3171..3177
app/js-yui/smd.js on lines 3222..3228
app/js-yui/smd.js on lines 3258..3264
app/js-yui/smd.js on lines 3276..3282
app/js-yui/smd.js on lines 3482..3486

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