plainblack/Lacuna-Web-Client

View on GitHub

Showing 811 of 1,320 total issues

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

            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

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

                    <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

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

    handleClick : function() {
        GenericBuildingRPCActions.requestGenericBuildingRPCRepair(this.state.genericBuildingStore.url, this.state.genericBuildingStore.id);
    },
Severity: Minor
Found in app/js/components/window/building/repairTab.jsx and 1 other location - About 35 mins to fix
app/js/components/window/building/productionTab.jsx on lines 41..43

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="Collapse all"
                            className="item"
                            onClick={this.collapse}
                            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 305..314

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

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

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

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

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

                    "name_spies" : {
                        "description": "Set the name of all spies",
                        "parameters": [
                            {"name":"options", "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 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 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

                "logout" : {
                    "description": "logout empire",
                    "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 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_star_map" : {
                    "description" : "Retrieves a chunk of the star map (lite version).",
                    "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 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

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

                "init_chat" : {
                    "description": "Get chat login data.",
                    "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 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 8 locations. Consider refactoring.
Open

                <div
                    className="ui green large labeled icon button"
                    onClick={this.authorizeAllies}
                >
                    <i className="warning sign icon"></i>
Severity: Major
Found in app/js/components/window/sitterManager/authorizeEmpiresTab.jsx and 7 other locations - About 30 mins to fix
app/js/components/window/captcha.jsx on lines 124..126
app/js/components/window/captcha.jsx on lines 127..129
app/js/components/window/captcha.jsx on lines 130..132
app/js/components/window/essentia/getEssentiaTab.jsx on lines 33..36
app/js/components/window/essentia/getEssentiaTab.jsx on lines 53..56
app/js/components/window/sitterManager/currentSittersTab.jsx on lines 33..36
app/js/components/window/sitterManager/currentSittersTab.jsx on lines 37..40

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 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