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

    componentWillReceiveProps : function() {
        BuildingWindowActions.buildingWindowClear();
        GenericBuildingRPCActions.requestGenericBuildingRPCView( this.props.options.url, this.props.options.id );
    },
Severity: Major
Found in app/js/components/window/genericBuilding.jsx and 1 other location - About 1 hr to fix
app/js/components/window/genericBuilding.jsx on lines 33..36

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

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

    var Lang = YAHOO.lang,
        Util = YAHOO.util,
        Dom = Util.Dom,
        Lacuna = YAHOO.lacuna,
        Game = Lacuna.Game,
Severity: Major
Found in app/js-yui/announce.js and 3 other locations - About 1 hr to fix
app/js-yui/building/capitol.js on lines 6..11
app/js-yui/building/entertainment.js on lines 6..11
app/js-yui/building/subspaceSupplyDepot.js on lines 6..11

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

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

                        for (var cKey in status.empire.colonies) {
                            Lacuna.Game.EmpireData.coloniesByName[status.empire.colonies[cKey]] = cKey;
                        }
Severity: Major
Found in app/js/game.jsx and 1 other location - About 1 hr to fix
app/js/game.jsx on lines 425..427

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

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

                <a className="item" target="_blank" href="http://community.lacunaexpanse.com/wiki"
                    onClick={LeftSidebarActions.hide}
                >
                    <i className="share alternate icon"></i>
                    Wiki
Severity: Major
Found in app/js/components/menu/leftSidebar.jsx and 6 other locations - About 1 hr to fix
app/js/components/menu/leftSidebar.jsx on lines 152..157
app/js/components/menu/leftSidebar.jsx on lines 158..163
app/js/components/menu/leftSidebar.jsx on lines 164..170
app/js/components/menu/leftSidebar.jsx on lines 171..176
app/js/components/menu/leftSidebar.jsx on lines 177..182
app/js/components/menu/leftSidebar.jsx on lines 183..188

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

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

                <a className="item" target="_blank"
                    href="http://community.lacunaexpanse.com/forums"
                    onClick={LeftSidebarActions.hide}
                >
                    <i className="comments layout icon"></i>
Severity: Major
Found in app/js/components/menu/leftSidebar.jsx and 6 other locations - About 1 hr to fix
app/js/components/menu/leftSidebar.jsx on lines 152..157
app/js/components/menu/leftSidebar.jsx on lines 158..163
app/js/components/menu/leftSidebar.jsx on lines 171..176
app/js/components/menu/leftSidebar.jsx on lines 177..182
app/js/components/menu/leftSidebar.jsx on lines 183..188
app/js/components/menu/leftSidebar.jsx on lines 189..194

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

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

                <a className="item" target="_blank" href="/changes.txt"
                    onClick={LeftSidebarActions.hide}
                >
                    <i className="code icon"></i>
                    Changes Log
Severity: Major
Found in app/js/components/menu/leftSidebar.jsx and 6 other locations - About 1 hr to fix
app/js/components/menu/leftSidebar.jsx on lines 152..157
app/js/components/menu/leftSidebar.jsx on lines 164..170
app/js/components/menu/leftSidebar.jsx on lines 171..176
app/js/components/menu/leftSidebar.jsx on lines 177..182
app/js/components/menu/leftSidebar.jsx on lines 183..188
app/js/components/menu/leftSidebar.jsx on lines 189..194

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

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

                <a className="item" target="_blank" href="http://www.lacunaexpanse.com/terms/"
                    onClick={LeftSidebarActions.hide}
                >
                    <i className="info circle icon"></i>
                    Terms of Service
Severity: Major
Found in app/js/components/menu/leftSidebar.jsx and 6 other locations - About 1 hr to fix
app/js/components/menu/leftSidebar.jsx on lines 152..157
app/js/components/menu/leftSidebar.jsx on lines 158..163
app/js/components/menu/leftSidebar.jsx on lines 164..170
app/js/components/menu/leftSidebar.jsx on lines 171..176
app/js/components/menu/leftSidebar.jsx on lines 183..188
app/js/components/menu/leftSidebar.jsx on lines 189..194

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

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

                <a className="item" target="_blank" href="/starmap/"
                    onClick={LeftSidebarActions.hide}
                >
                    <i className="map icon"></i>
                    Alliance Map
Severity: Major
Found in app/js/components/menu/leftSidebar.jsx and 6 other locations - About 1 hr to fix
app/js/components/menu/leftSidebar.jsx on lines 158..163
app/js/components/menu/leftSidebar.jsx on lines 164..170
app/js/components/menu/leftSidebar.jsx on lines 171..176
app/js/components/menu/leftSidebar.jsx on lines 177..182
app/js/components/menu/leftSidebar.jsx on lines 183..188
app/js/components/menu/leftSidebar.jsx on lines 189..194

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

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

                <a className="item" target="_blank" href="http://www.lacunaexpanse.com/help/"
                    onClick={LeftSidebarActions.hide}
                >
                    <i className="student icon"></i>
                    Help
Severity: Major
Found in app/js/components/menu/leftSidebar.jsx and 6 other locations - About 1 hr to fix
app/js/components/menu/leftSidebar.jsx on lines 152..157
app/js/components/menu/leftSidebar.jsx on lines 158..163
app/js/components/menu/leftSidebar.jsx on lines 164..170
app/js/components/menu/leftSidebar.jsx on lines 177..182
app/js/components/menu/leftSidebar.jsx on lines 183..188
app/js/components/menu/leftSidebar.jsx on lines 189..194

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

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

                <a className="item" target="_blank" href="http://lacunaexpanse.com/tutorial/"
                    onClick={LeftSidebarActions.hide}
                >
                    <i className="marker icon"></i>
                    Tutorial
Severity: Major
Found in app/js/components/menu/leftSidebar.jsx and 6 other locations - About 1 hr to fix
app/js/components/menu/leftSidebar.jsx on lines 152..157
app/js/components/menu/leftSidebar.jsx on lines 158..163
app/js/components/menu/leftSidebar.jsx on lines 164..170
app/js/components/menu/leftSidebar.jsx on lines 171..176
app/js/components/menu/leftSidebar.jsx on lines 177..182
app/js/components/menu/leftSidebar.jsx on lines 189..194

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

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(efficiency > 60) {
                Dom.setStyle(this.cBar, "border-color", 'yellow');
                Dom.setStyle(this.eBar, "background-color", 'yellow');
                Dom.setStyle(this.eBar, "color", 'black');
            }
Severity: Major
Found in app/js-yui/mapper.js and 1 other location - About 1 hr to fix
app/js-yui/mapper.js on lines 648..657

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

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

            nLi.innerHTML = [
                '<label>Habitable Orbits</label>',
                '<span>', stat.min_orbit,
                stat.max_orbit > stat.min_orbit ? ' to '+ stat.max_orbit : '',
                '</span>'
Severity: Major
Found in app/js-yui/profile.js and 1 other location - About 1 hr to fix
app/js-yui/building/geneticsLab.js on lines 155..160

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

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

EmpireRPCActions.requestEmpireRPCRedeemEssentiaCode.listen(function(o) {
    makeEmpireCall({
        method  : 'redeem_essentia_code',
        params  : [o.code],
        success : 'successEmpireRPCRedeemEssentiaCode',
Severity: Major
Found in app/js/dao/empire.js and 1 other location - About 1 hr to fix
app/js/actions/rpc/body.js on lines 59..68

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

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

            nLi.innerHTML = [
                '<label>Habitable Orbits</label>',
                '<span>', stat.min_orbit,
                stat.max_orbit > stat.min_orbit ? ' to '+ stat.max_orbit : '',
                '</span>'
Severity: Major
Found in app/js-yui/building/geneticsLab.js and 1 other location - About 1 hr to fix
app/js-yui/profile.js on lines 566..571

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

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(efficiency > 30) {
                Dom.setStyle(this.cBar, "border-color", 'orange');
                Dom.setStyle(this.eBar, "background-color", 'orange');
                Dom.setStyle(this.eBar, "color", 'white');
            }
Severity: Major
Found in app/js-yui/mapper.js and 1 other location - About 1 hr to fix
app/js-yui/mapper.js on lines 643..657

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

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

BodyRPCActions.requestBodyRPCGetBuildings.listen(function(o) {
    requestBodyCall({
        method : 'get_buildings',
        params : [
            o.bodyId
Severity: Major
Found in app/js/actions/rpc/body.js and 1 other location - About 1 hr to fix
app/js/dao/empire.js on lines 105..112

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

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("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 1000..1004
app/js-yui/stats.js on lines 1121..1125
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("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 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

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.skipExcavatorDestroyed, '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 92..96
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.skipFoundNothing, '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 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
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

Severity
Category
Status
Source
Language