plainblack/Lacuna-Web-Client

View on GitHub
app/js-yui/smd.js

Summary

Maintainability
F
1 mo
Test Coverage

File smd.js has 2791 lines of code (exceeds 250 allowed). Consider refactoring.
Open

YAHOO.namespace("lacuna");
if (typeof YAHOO.lacuna.SMD == "undefined" || !YAHOO.lacuna.SMD) {

(function(){
    var smd = {
Severity: Major
Found in app/js-yui/smd.js - About 1 wk to fix

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

                Recycler : {
                    "SMDVersion":"2.0",
                    "description": "Waste Recycler",
                    "envelope":"JSON-RPC-2.0",
                    "transport":"POST",
    Severity: Major
    Found in app/js-yui/smd.js and 1 other location - About 1 day to fix
    app/js-yui/smd.js on lines 831..860

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

    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

                Exchanger : {
                    "SMDVersion":"2.0",
                    "description": "Waste Exchanger",
                    "envelope":"JSON-RPC-2.0",
                    "transport":"POST",
    Severity: Major
    Found in app/js-yui/smd.js and 1 other location - About 1 day to fix
    app/js-yui/smd.js on lines 1462..1491

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

    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

                PlanetaryCommand : {
                    "SMDVersion":"2.0",
                    "description": "Planetary Command",
    
                    "envelope":"JSON-RPC-2.0",
    Severity: Major
    Found in app/js-yui/smd.js and 1 other location - About 6 hrs to fix
    app/js-yui/smd.js on lines 793..830

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

    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

                Entertainment : {
                    "SMDVersion":"2.0",
                    "description": "Entertainment",
                    "envelope":"JSON-RPC-2.0",
                    "transport":"POST",
    Severity: Major
    Found in app/js-yui/smd.js and 1 other location - About 6 hrs to fix
    app/js-yui/smd.js on lines 1422..1461

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

    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

                StationCommand : {
                    "SMDVersion":"2.0",
                    "description": "Station Command",
    
                    "envelope":"JSON-RPC-2.0",
    Severity: Major
    Found in app/js-yui/smd.js and 1 other location - About 6 hrs to fix
    app/js-yui/smd.js on lines 6..31

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

    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

            Alliance : {
                "SMDVersion":"2.0",
                "description": "Body",
                "envelope":"JSON-RPC-2.0",
                "transport":"POST",
    Severity: Major
    Found in app/js-yui/smd.js and 1 other location - About 6 hrs to fix
    app/js-yui/smd.js on lines 3886..3912

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

    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

                OreStorage : {
                    "SMDVersion":"2.0",
                    "description": "Ore Storage",
                    "envelope":"JSON-RPC-2.0",
                    "transport":"POST",
    Severity: Major
    Found in app/js-yui/smd.js and 1 other location - About 4 hrs to fix
    app/js-yui/smd.js on lines 861..880

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

    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

                FoodReserve : {
                    "SMDVersion":"2.0",
                    "description": "Food Reserve",
                    "envelope":"JSON-RPC-2.0",
                    "transport":"POST",
    Severity: Major
    Found in app/js-yui/smd.js and 1 other location - About 4 hrs to fix
    app/js-yui/smd.js on lines 1376..1395

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

    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

                        "view_all_ships" : {
                            "description": "Returns a list of all ships",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 2 other locations - About 4 hrs to fix
    app/js-yui/smd.js on lines 1717..1741
    app/js-yui/smd.js on lines 1780..1807

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

    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

                        "fetch_spies" : {
                            "description": "Sends a specified ship to fetch specified spies from on_body_id, and bring them back to to_body_id. See also prepare_fetch_spies",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"on_body_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 2 other locations - About 4 hrs to fix
    app/js-yui/smd.js on lines 1780..1807
    app/js-yui/smd.js on lines 1983..2010

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

    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

                        "send_spies" : {
                            "description": "Sends one or more of spies to a planet using a selected ship. See also prepare_send_spies.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"on_body_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 2 other locations - About 4 hrs to fix
    app/js-yui/smd.js on lines 1717..1741
    app/js-yui/smd.js on lines 1983..2010

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

    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

                WaterStorage : {
                    "SMDVersion":"2.0",
                    "description": "Water Storage",
                    "envelope":"JSON-RPC-2.0",
                    "transport":"POST",
    Severity: Major
    Found in app/js-yui/smd.js and 2 other locations - About 4 hrs to fix
    app/js-yui/smd.js on lines 327..345
    app/js-yui/smd.js on lines 774..792

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

    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

                EnergyReserve : {
                    "SMDVersion":"2.0",
                    "description": "Energy Reserve",
                    "envelope":"JSON-RPC-2.0",
                    "transport":"POST",
    Severity: Major
    Found in app/js-yui/smd.js and 2 other locations - About 4 hrs to fix
    app/js-yui/smd.js on lines 327..345
    app/js-yui/smd.js on lines 2855..2873

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

    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

                Capitol : {
                    "SMDVersion":"2.0",
                    "description": "Capitol",
                    "envelope":"JSON-RPC-2.0",
                    "transport":"POST",
    Severity: Major
    Found in app/js-yui/smd.js and 2 other locations - About 4 hrs to fix
    app/js-yui/smd.js on lines 774..792
    app/js-yui/smd.js on lines 2855..2873

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

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

                        "update_supply_chain" : {
                            "description": "",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 3 hrs to fix
    app/js-yui/smd.js on lines 56..66
    app/js-yui/smd.js on lines 1045..1055
    app/js-yui/smd.js on lines 1935..1945
    app/js-yui/smd.js on lines 2269..2279
    app/js-yui/smd.js on lines 2473..2483

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

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

                        "send_ship_types" : {
                            "description": "Sends a group of ships to a specified body or star. Use with get_fleet_for.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"body_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 3 hrs to fix
    app/js-yui/smd.js on lines 56..66
    app/js-yui/smd.js on lines 1045..1055
    app/js-yui/smd.js on lines 2269..2279
    app/js-yui/smd.js on lines 2473..2483
    app/js-yui/smd.js on lines 2493..2503

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

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

                        "create_supply_chain" : {
                            "description": "",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 3 hrs to fix
    app/js-yui/smd.js on lines 56..66
    app/js-yui/smd.js on lines 1045..1055
    app/js-yui/smd.js on lines 1935..1945
    app/js-yui/smd.js on lines 2269..2279
    app/js-yui/smd.js on lines 2493..2503

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

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

                    "get_buildable" : {
                        "description": "Provides a list of all the building types that are available to be built on a given space on a planet.",
                        "parameters": [
                            {"name":"session_id", "type":"string", "optional":false},
                            {"name":"body_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 3 hrs to fix
    app/js-yui/smd.js on lines 1045..1055
    app/js-yui/smd.js on lines 1935..1945
    app/js-yui/smd.js on lines 2269..2279
    app/js-yui/smd.js on lines 2473..2483
    app/js-yui/smd.js on lines 2493..2503

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

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

                        "add_to_market" : {
                            "description": "",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 3 hrs to fix
    app/js-yui/smd.js on lines 56..66
    app/js-yui/smd.js on lines 1045..1055
    app/js-yui/smd.js on lines 1935..1945
    app/js-yui/smd.js on lines 2473..2483
    app/js-yui/smd.js on lines 2493..2503

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

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

                        "add_to_market" : {
                            "description": "",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 3 hrs to fix
    app/js-yui/smd.js on lines 56..66
    app/js-yui/smd.js on lines 1935..1945
    app/js-yui/smd.js on lines 2269..2279
    app/js-yui/smd.js on lines 2473..2483
    app/js-yui/smd.js on lines 2493..2503

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

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

                        "send_invite" : {
                            "description": "Can only be called by alliance leader. Invite an empire to an alliance.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 3 hrs to fix
    app/js-yui/smd.js on lines 515..537
    app/js-yui/smd.js on lines 538..560
    app/js-yui/smd.js on lines 561..583
    app/js-yui/smd.js on lines 704..726
    app/js-yui/smd.js on lines 2804..2830

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

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

                        "accept_invite" : {
                            "description": "Accept an invitation. Returns the same output as get_alliance_status.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 3 hrs to fix
    app/js-yui/smd.js on lines 492..514
    app/js-yui/smd.js on lines 515..537
    app/js-yui/smd.js on lines 561..583
    app/js-yui/smd.js on lines 704..726
    app/js-yui/smd.js on lines 2804..2830

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

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

                        "withdraw_invite" : {
                            "description": "Can only be called by alliance leader. Delete an invitation.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 3 hrs to fix
    app/js-yui/smd.js on lines 492..514
    app/js-yui/smd.js on lines 538..560
    app/js-yui/smd.js on lines 561..583
    app/js-yui/smd.js on lines 704..726
    app/js-yui/smd.js on lines 2804..2830

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

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

                        "push_items" : {
                            "description": "",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 3 hrs to fix
    app/js-yui/smd.js on lines 492..514
    app/js-yui/smd.js on lines 515..537
    app/js-yui/smd.js on lines 538..560
    app/js-yui/smd.js on lines 561..583
    app/js-yui/smd.js on lines 704..726

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

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

                        "reject_invite" : {
                            "description": "Delete an invitation.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 3 hrs to fix
    app/js-yui/smd.js on lines 492..514
    app/js-yui/smd.js on lines 515..537
    app/js-yui/smd.js on lines 538..560
    app/js-yui/smd.js on lines 704..726
    app/js-yui/smd.js on lines 2804..2830

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

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

                        "expel_member" : {
                            "description": "Forcibly removes a member from an alliance. Returns the same thing as get_alliance_status. Can only be called by the alliance leader.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 3 hrs to fix
    app/js-yui/smd.js on lines 492..514
    app/js-yui/smd.js on lines 515..537
    app/js-yui/smd.js on lines 538..560
    app/js-yui/smd.js on lines 561..583
    app/js-yui/smd.js on lines 2804..2830

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

    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

                        "view_market" : {
                            "description": "Displays a list of trades available at the present time.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 2 other locations - About 3 hrs to fix
    app/js-yui/smd.js on lines 982..991
    app/js-yui/smd.js on lines 2764..2773

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

    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

                        "assign_spy" : {
                            "description": "Set a spy on a new task.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 2 other locations - About 3 hrs to fix
    app/js-yui/smd.js on lines 2413..2422
    app/js-yui/smd.js on lines 2764..2773

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

    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

                        "view_market" : {
                            "description": "Displays a list of trades available at the present time.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 2 other locations - About 3 hrs to fix
    app/js-yui/smd.js on lines 982..991
    app/js-yui/smd.js on lines 2413..2422

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

    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

                        "name_ship" : {
                            "description": "Set the name of a ship.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 1 other location - About 3 hrs to fix
    app/js-yui/smd.js on lines 203..218

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

    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

                        "assemble_glyphs" : {
                            "description": "Turns glyphs into rare ancient items.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 1 other location - About 3 hrs to fix
    app/js-yui/smd.js on lines 1882..1897

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

    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

                        "assign_alliance_leader" : {
                            "description": "Sets a new empire to lead the alliance. Can only be called by the current alliance leader. Returns the same thing as get_alliance_status.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 3 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 417..437
    app/js-yui/smd.js on lines 659..682
    app/js-yui/smd.js on lines 683..703

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

    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

                        "create_alliance" : {
                            "description": "Create a new alliance. Returns the same output as get_alliance_status.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 3 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 638..658
    app/js-yui/smd.js on lines 659..682
    app/js-yui/smd.js on lines 683..703

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

    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

                        "update_alliance" : {
                            "description": "Updates the properties of an alliance. Returns the same thing as get_alliance_status. Can only be called by the alliance leader.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 3 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 417..437
    app/js-yui/smd.js on lines 638..658
    app/js-yui/smd.js on lines 683..703

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

    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

                        "leave_alliance" : {
                            "description": "A member of an alliance revokes their own membership.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 3 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 417..437
    app/js-yui/smd.js on lines 638..658
    app/js-yui/smd.js on lines 659..682

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

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

                        "burn_spy" : {
                            "description": "Allows you to eliminate one of your spies from your payroll.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 12 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 926..941
    app/js-yui/smd.js on lines 942..967
    app/js-yui/smd.js on lines 1352..1373
    app/js-yui/smd.js on lines 1500..1522
    app/js-yui/smd.js on lines 1541..1562
    app/js-yui/smd.js on lines 1678..1716
    app/js-yui/smd.js on lines 1742..1779
    app/js-yui/smd.js on lines 1818..1881
    app/js-yui/smd.js on lines 1946..1982
    app/js-yui/smd.js on lines 2011..2043
    app/js-yui/smd.js on lines 2044..2076
    app/js-yui/smd.js on lines 3815..3847

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

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

                        "view_foreign_ships" : {
                            "description": "Shows you all the foreign ships that are incoming. However, the list is filtered by the stealth of the ship vs the level of the PoliceStation.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 12 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 926..941
    app/js-yui/smd.js on lines 942..967
    app/js-yui/smd.js on lines 968..981
    app/js-yui/smd.js on lines 1352..1373
    app/js-yui/smd.js on lines 1500..1522
    app/js-yui/smd.js on lines 1541..1562
    app/js-yui/smd.js on lines 1678..1716
    app/js-yui/smd.js on lines 1742..1779
    app/js-yui/smd.js on lines 1818..1881
    app/js-yui/smd.js on lines 1946..1982
    app/js-yui/smd.js on lines 2011..2043
    app/js-yui/smd.js on lines 2044..2076

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

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

                        "abandon_probe" : {
                            "description": "The probe is deactivated, and allowed to burn up in the star.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 4 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 273..281
    app/js-yui/smd.js on lines 1212..1220
    app/js-yui/smd.js on lines 1221..1229
    app/js-yui/smd.js on lines 1230..1238

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

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

                        "view_prisoners" : {
                            "description": "Displays a list of the spies that have been captured.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 12 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 926..941
    app/js-yui/smd.js on lines 942..967
    app/js-yui/smd.js on lines 968..981
    app/js-yui/smd.js on lines 1352..1373
    app/js-yui/smd.js on lines 1541..1562
    app/js-yui/smd.js on lines 1678..1716
    app/js-yui/smd.js on lines 1742..1779
    app/js-yui/smd.js on lines 1818..1881
    app/js-yui/smd.js on lines 1946..1982
    app/js-yui/smd.js on lines 2011..2043
    app/js-yui/smd.js on lines 2044..2076
    app/js-yui/smd.js on lines 3815..3847

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

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

                        "add_cargo_ship_to_fleet" : {
                            "description": "Take a cargo ship from the space port and add it to the mining fleet.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 4 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 273..281
    app/js-yui/smd.js on lines 1221..1229
    app/js-yui/smd.js on lines 1230..1238
    app/js-yui/smd.js on lines 1335..1343

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

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

                        "view_spies" : {
                            "description": "Returns the list of spies you have on your roster.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 12 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 926..941
    app/js-yui/smd.js on lines 968..981
    app/js-yui/smd.js on lines 1352..1373
    app/js-yui/smd.js on lines 1500..1522
    app/js-yui/smd.js on lines 1541..1562
    app/js-yui/smd.js on lines 1678..1716
    app/js-yui/smd.js on lines 1742..1779
    app/js-yui/smd.js on lines 1818..1881
    app/js-yui/smd.js on lines 1946..1982
    app/js-yui/smd.js on lines 2011..2043
    app/js-yui/smd.js on lines 2044..2076
    app/js-yui/smd.js on lines 3815..3847

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

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

                        "get_probed_stars" : {
                            "description": "Returns a list of the stars that have been probed by this planet.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 12 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 926..941
    app/js-yui/smd.js on lines 942..967
    app/js-yui/smd.js on lines 968..981
    app/js-yui/smd.js on lines 1500..1522
    app/js-yui/smd.js on lines 1541..1562
    app/js-yui/smd.js on lines 1678..1716
    app/js-yui/smd.js on lines 1742..1779
    app/js-yui/smd.js on lines 1818..1881
    app/js-yui/smd.js on lines 1946..1982
    app/js-yui/smd.js on lines 2011..2043
    app/js-yui/smd.js on lines 2044..2076
    app/js-yui/smd.js on lines 3815..3847

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

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

                        "prepare_fetch_spies" : {
                            "description": "Gathers the information needed to call the fetch_spies method",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"on_body_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 12 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 926..941
    app/js-yui/smd.js on lines 942..967
    app/js-yui/smd.js on lines 968..981
    app/js-yui/smd.js on lines 1352..1373
    app/js-yui/smd.js on lines 1500..1522
    app/js-yui/smd.js on lines 1541..1562
    app/js-yui/smd.js on lines 1742..1779
    app/js-yui/smd.js on lines 1818..1881
    app/js-yui/smd.js on lines 1946..1982
    app/js-yui/smd.js on lines 2011..2043
    app/js-yui/smd.js on lines 2044..2076
    app/js-yui/smd.js on lines 3815..3847

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

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

                        "view_ships_travelling" : {
                            "description": "Returns a list of the ships that are travelling to or from this planet. NOTE: All inbound/outbound ships are shown regardless of which space port they will eventually land at.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 12 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 926..941
    app/js-yui/smd.js on lines 942..967
    app/js-yui/smd.js on lines 968..981
    app/js-yui/smd.js on lines 1352..1373
    app/js-yui/smd.js on lines 1500..1522
    app/js-yui/smd.js on lines 1541..1562
    app/js-yui/smd.js on lines 1678..1716
    app/js-yui/smd.js on lines 1742..1779
    app/js-yui/smd.js on lines 1818..1881
    app/js-yui/smd.js on lines 1946..1982
    app/js-yui/smd.js on lines 2011..2043
    app/js-yui/smd.js on lines 3815..3847

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

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

                        "prepare_send_spies" : {
                            "description": "Gathers the information needed to call the send_spies method.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"on_body_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 12 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 926..941
    app/js-yui/smd.js on lines 942..967
    app/js-yui/smd.js on lines 968..981
    app/js-yui/smd.js on lines 1352..1373
    app/js-yui/smd.js on lines 1500..1522
    app/js-yui/smd.js on lines 1541..1562
    app/js-yui/smd.js on lines 1678..1716
    app/js-yui/smd.js on lines 1818..1881
    app/js-yui/smd.js on lines 1946..1982
    app/js-yui/smd.js on lines 2011..2043
    app/js-yui/smd.js on lines 2044..2076
    app/js-yui/smd.js on lines 3815..3847

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

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

                        "get_ships_for" : {
                            "description": "Provides a list of incoming ships and ships that are available to send to a specific target. Use with send_ship.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"from_body_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 12 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 926..941
    app/js-yui/smd.js on lines 942..967
    app/js-yui/smd.js on lines 968..981
    app/js-yui/smd.js on lines 1352..1373
    app/js-yui/smd.js on lines 1500..1522
    app/js-yui/smd.js on lines 1541..1562
    app/js-yui/smd.js on lines 1678..1716
    app/js-yui/smd.js on lines 1742..1779
    app/js-yui/smd.js on lines 1946..1982
    app/js-yui/smd.js on lines 2011..2043
    app/js-yui/smd.js on lines 2044..2076
    app/js-yui/smd.js on lines 3815..3847

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

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

                        "train_spy" : {
                            "description": "Allows you to train more spies",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 12 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 942..967
    app/js-yui/smd.js on lines 968..981
    app/js-yui/smd.js on lines 1352..1373
    app/js-yui/smd.js on lines 1500..1522
    app/js-yui/smd.js on lines 1541..1562
    app/js-yui/smd.js on lines 1678..1716
    app/js-yui/smd.js on lines 1742..1779
    app/js-yui/smd.js on lines 1818..1881
    app/js-yui/smd.js on lines 1946..1982
    app/js-yui/smd.js on lines 2011..2043
    app/js-yui/smd.js on lines 2044..2076
    app/js-yui/smd.js on lines 3815..3847

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

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

                        "view_foreign_spies" : {
                            "description": "Displays a list of the spies that are on your planet, and have a level lower than your security ministry.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 12 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 926..941
    app/js-yui/smd.js on lines 942..967
    app/js-yui/smd.js on lines 968..981
    app/js-yui/smd.js on lines 1352..1373
    app/js-yui/smd.js on lines 1500..1522
    app/js-yui/smd.js on lines 1678..1716
    app/js-yui/smd.js on lines 1742..1779
    app/js-yui/smd.js on lines 1818..1881
    app/js-yui/smd.js on lines 1946..1982
    app/js-yui/smd.js on lines 2011..2043
    app/js-yui/smd.js on lines 2044..2076
    app/js-yui/smd.js on lines 3815..3847

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

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

                        "send_ship" : {
                            "description": "Sends a ship to a specified body or star. Use with get_ships_for.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"ship_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 12 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 926..941
    app/js-yui/smd.js on lines 942..967
    app/js-yui/smd.js on lines 968..981
    app/js-yui/smd.js on lines 1352..1373
    app/js-yui/smd.js on lines 1500..1522
    app/js-yui/smd.js on lines 1541..1562
    app/js-yui/smd.js on lines 1678..1716
    app/js-yui/smd.js on lines 1742..1779
    app/js-yui/smd.js on lines 1818..1881
    app/js-yui/smd.js on lines 2011..2043
    app/js-yui/smd.js on lines 2044..2076
    app/js-yui/smd.js on lines 3815..3847

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

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

                        "remove_cargo_ship_from_fleet" : {
                            "description": "Tell one of the cargo ships in the mining fleet to come home and park at the space port.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 4 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 273..281
    app/js-yui/smd.js on lines 1212..1220
    app/js-yui/smd.js on lines 1230..1238
    app/js-yui/smd.js on lines 1335..1343

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

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

                        "abandon_platform" : {
                            "description": "Close down an existing mining platform.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 4 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 273..281
    app/js-yui/smd.js on lines 1212..1220
    app/js-yui/smd.js on lines 1221..1229
    app/js-yui/smd.js on lines 1335..1343

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

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

                        "abandon_excavator" : {
                            "description": "Close down an existing excavator site.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 4 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 1212..1220
    app/js-yui/smd.js on lines 1221..1229
    app/js-yui/smd.js on lines 1230..1238
    app/js-yui/smd.js on lines 1335..1343

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

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

                        "view_foreign_ships" : {
                            "description": "Shows you all the foreign ships that are incoming. However, the list is filtered by the stealth of the ship vs the level of the SpacePort.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 12 other locations - About 2 hrs to fix
    app/js-yui/smd.js on lines 926..941
    app/js-yui/smd.js on lines 942..967
    app/js-yui/smd.js on lines 968..981
    app/js-yui/smd.js on lines 1352..1373
    app/js-yui/smd.js on lines 1500..1522
    app/js-yui/smd.js on lines 1541..1562
    app/js-yui/smd.js on lines 1678..1716
    app/js-yui/smd.js on lines 1742..1779
    app/js-yui/smd.js on lines 1818..1881
    app/js-yui/smd.js on lines 1946..1982
    app/js-yui/smd.js on lines 2044..2076
    app/js-yui/smd.js on lines 3815..3847

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

    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

                    "spy_rank" : {
                        "description": "Returns a sorted list of spies ranked according to various stats.",
                        "parameters": [
                            {"name":"session_id", "type":"string", "optional":false},
                            {"name":"sort_by", "type":"string", "optional":true} //Defaults to level_rank. Possible values are: level_rank  success_rate_rank and dirtiest_rank
    Severity: Major
    Found in app/js-yui/smd.js and 1 other location - About 1 hr to fix
    app/js-yui/smd.js on lines 3984..4009

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

    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

                    "colony_rank" : {
                        "description": "Returns a sorted list of planets ranked according to various stats.",
                        "parameters": [
                            {"name":"session_id", "type":"string", "optional":false},
                            {"name":"sort_by", "type":"string", "optional":true} //Defaults to population_rank. Possible values are: population_rank
    Severity: Major
    Found in app/js-yui/smd.js and 1 other location - About 1 hr to fix
    app/js-yui/smd.js on lines 4010..4035

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

    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

                        "dissolve_alliance" : {
                            "description": "Can only be called by alliance leader. Disbands and existing alliance.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false}
    Severity: Major
    Found in app/js-yui/smd.js and 3 other locations - About 1 hr to fix
    app/js-yui/smd.js on lines 457..491
    app/js-yui/smd.js on lines 584..610
    app/js-yui/smd.js on lines 611..637

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

    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

                        "list_planets" : {
                            "description": "",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 2 other locations - About 1 hr to fix
    app/js-yui/smd.js on lines 1027..1034
    app/js-yui/smd.js on lines 2193..2200

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

    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

                        "get_pending_invites" : {
                            "description": "Can only be called by the alliance leader. Returns a list of invitations that have been sent out, but that have not been accepted, rejected, or withdrawn.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false}
    Severity: Major
    Found in app/js-yui/smd.js and 3 other locations - About 1 hr to fix
    app/js-yui/smd.js on lines 438..456
    app/js-yui/smd.js on lines 457..491
    app/js-yui/smd.js on lines 611..637

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

    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

                        "get_alliance_status" : {
                            "description": "Returns everything about an alliance that members should know.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false}
    Severity: Major
    Found in app/js-yui/smd.js and 3 other locations - About 1 hr to fix
    app/js-yui/smd.js on lines 438..456
    app/js-yui/smd.js on lines 584..610
    app/js-yui/smd.js on lines 611..637

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

    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

                        "view_planet" : {
                            "description": "",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 2 other locations - About 1 hr to fix
    app/js-yui/smd.js on lines 1027..1034
    app/js-yui/smd.js on lines 2185..2192

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

    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

                        "research_species" : {
                            "description": "",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
    Severity: Major
    Found in app/js-yui/smd.js and 2 other locations - About 1 hr to fix
    app/js-yui/smd.js on lines 2185..2192
    app/js-yui/smd.js on lines 2193..2200

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

    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

                        "get_my_invites" : {
                            "description": "Returns a list of invitations that have been offered to this empire.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false}
    Severity: Major
    Found in app/js-yui/smd.js and 3 other locations - About 1 hr to fix
    app/js-yui/smd.js on lines 438..456
    app/js-yui/smd.js on lines 457..491
    app/js-yui/smd.js on lines 584..610

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

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

                        "mass_abandon_platform" : {
                            "description": "Close down all existing mining platforms.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false}
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 1 hr to fix
    app/js-yui/smd.js on lines 282..289
    app/js-yui/smd.js on lines 1009..1016
    app/js-yui/smd.js on lines 1344..1351
    app/js-yui/smd.js on lines 1404..1411
    app/js-yui/smd.js on lines 1412..1419

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

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

                        "throw_a_party" : {
                            "description": "Initiates a party. It will cost you 10,000 food, and the party will last for a day. For 10,000 food you'll get 3,000 happiness. For each type of food available in quantities of 500 or more, you'll get a multiplier added to that. So if you have 4 types of food, you'll get 12,000 happiness. In addition, you get a 0.3 to your multiplier for each level of park that you have. Therefore a level 10 park is the same as adding three extra foods to your party!",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false}
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 1 hr to fix
    app/js-yui/smd.js on lines 282..289
    app/js-yui/smd.js on lines 1009..1016
    app/js-yui/smd.js on lines 1239..1246
    app/js-yui/smd.js on lines 1344..1351
    app/js-yui/smd.js on lines 1412..1419

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

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

                        "mass_abandon_excavator" : {
                            "description": "Close down all existing excavator sites.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false}
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 1 hr to fix
    app/js-yui/smd.js on lines 1009..1016
    app/js-yui/smd.js on lines 1239..1246
    app/js-yui/smd.js on lines 1344..1351
    app/js-yui/smd.js on lines 1404..1411
    app/js-yui/smd.js on lines 1412..1419

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

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

                        "abandon_all_probes" : {
                            "description": "All probes are deactivated, and allowed to burn up in the stars.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false}
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 1 hr to fix
    app/js-yui/smd.js on lines 282..289
    app/js-yui/smd.js on lines 1009..1016
    app/js-yui/smd.js on lines 1239..1246
    app/js-yui/smd.js on lines 1404..1411
    app/js-yui/smd.js on lines 1412..1419

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

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

                        "subsidize_party" : {
                            "description": "Will spend 2 essentia to complete the current party immediately.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false}
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 1 hr to fix
    app/js-yui/smd.js on lines 282..289
    app/js-yui/smd.js on lines 1009..1016
    app/js-yui/smd.js on lines 1239..1246
    app/js-yui/smd.js on lines 1344..1351
    app/js-yui/smd.js on lines 1404..1411

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

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

                        "subsidize_training" : {
                            "description": "Will spend 1 essentia per spy to complete the training of all spies immediately.",
                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false}
    Severity: Major
    Found in app/js-yui/smd.js and 5 other locations - About 1 hr to fix
    app/js-yui/smd.js on lines 282..289
    app/js-yui/smd.js on lines 1239..1246
    app/js-yui/smd.js on lines 1344..1351
    app/js-yui/smd.js on lines 1404..1411
    app/js-yui/smd.js on lines 1412..1419

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

    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

                            "parameters": [
                                {"name":"session_id", "type":"string", "optional":false},
                                {"name":"building_id", "type":"string", "optional":false},
                                {"name":"onoff", "type":"number", "optional":false} // 0 or 1
                            ],
    Severity: Major
    Found in app/js-yui/smd.js and 1 other location - About 1 hr to fix
    app/js-yui/smd.js on lines 3963..3967

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

    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

                        "parameters": [
                            {"name":"session_id", "type":"string", "optional":false},
                            {"name":"sort_by", "type":"string", "optional":false},
                            {"name":"empire_name", "type":"string", "optional":false} //Must be at least 3 characters to search.
                        ],
    Severity: Major
    Found in app/js-yui/smd.js and 1 other location - About 1 hr to fix
    app/js-yui/smd.js on lines 1295..1299

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

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

                    "boost_ore" : {
                        "description": "Spends 5 essentia, and boosts ore production 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 8 other locations - About 40 mins to fix
    app/js-yui/smd.js on lines 2963..2988
    app/js-yui/smd.js on lines 3053..3071
    app/js-yui/smd.js on lines 3072..3084
    app/js-yui/smd.js on lines 3085..3097
    app/js-yui/smd.js on lines 3098..3110
    app/js-yui/smd.js on lines 3124..3136
    app/js-yui/smd.js on lines 3137..3149
    app/js-yui/smd.js on lines 4036..4057

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

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

                    "boost_storage" : {
                        "description": "Spends 5 essentia, and boosts storage (all 5 types) 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 8 other locations - About 40 mins to fix
    app/js-yui/smd.js on lines 2963..2988
    app/js-yui/smd.js on lines 3053..3071
    app/js-yui/smd.js on lines 3072..3084
    app/js-yui/smd.js on lines 3085..3097
    app/js-yui/smd.js on lines 3098..3110
    app/js-yui/smd.js on lines 3111..3123
    app/js-yui/smd.js on lines 3124..3136
    app/js-yui/smd.js on lines 4036..4057

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

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

                    "view_profile" : {
                        "description": "Provides a list of the editable properties of the current empire's profile. See also the edit_profile and view_public_profile  methods.",
                        "parameters": [
                            {"name":"session_id", "type":"string", "optional":false}
                        ],
    Severity: Major
    Found in app/js-yui/smd.js and 8 other locations - About 40 mins to fix
    app/js-yui/smd.js on lines 3053..3071
    app/js-yui/smd.js on lines 3072..3084
    app/js-yui/smd.js on lines 3085..3097
    app/js-yui/smd.js on lines 3098..3110
    app/js-yui/smd.js on lines 3111..3123
    app/js-yui/smd.js on lines 3124..3136
    app/js-yui/smd.js on lines 3137..3149
    app/js-yui/smd.js on lines 4036..4057

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

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

                    "weekly_medal_winners" : {
                        "description": "Returns a list of the empires who won this week's weekly medals.",
                        "parameters": [
                            {"name":"session_id", "type":"string", "optional":false}
                        ],
    Severity: Major
    Found in app/js-yui/smd.js and 8 other locations - About 40 mins to fix
    app/js-yui/smd.js on lines 2963..2988
    app/js-yui/smd.js on lines 3053..3071
    app/js-yui/smd.js on lines 3072..3084
    app/js-yui/smd.js on lines 3085..3097
    app/js-yui/smd.js on lines 3098..3110
    app/js-yui/smd.js on lines 3111..3123
    app/js-yui/smd.js on lines 3124..3136
    app/js-yui/smd.js on lines 3137..3149

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

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

                    "boost_food" : {
                        "description": "Spends 5 essentia, and boosts food production 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 8 other locations - About 40 mins to fix
    app/js-yui/smd.js on lines 2963..2988
    app/js-yui/smd.js on lines 3053..3071
    app/js-yui/smd.js on lines 3085..3097
    app/js-yui/smd.js on lines 3098..3110
    app/js-yui/smd.js on lines 3111..3123
    app/js-yui/smd.js on lines 3124..3136
    app/js-yui/smd.js on lines 3137..3149
    app/js-yui/smd.js on lines 4036..4057

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

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

                    "view_boosts" : {
                        "description": "Shows the dates at which boosts have expired or will expire. Boosts are subsidies applied to various resources using essentia.",
                        "parameters": [
                            {"name":"session_id", "type":"string", "optional":false}
                        ],
    Severity: Major
    Found in app/js-yui/smd.js and 8 other locations - About 40 mins to fix
    app/js-yui/smd.js on lines 2963..2988
    app/js-yui/smd.js on lines 3072..3084
    app/js-yui/smd.js on lines 3085..3097
    app/js-yui/smd.js on lines 3098..3110
    app/js-yui/smd.js on lines 3111..3123
    app/js-yui/smd.js on lines 3124..3136
    app/js-yui/smd.js on lines 3137..3149
    app/js-yui/smd.js on lines 4036..4057

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

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

                    "boost_energy" : {
                        "description": "Spends 5 essentia, and boosts energy production 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 8 other locations - About 40 mins to fix
    app/js-yui/smd.js on lines 2963..2988
    app/js-yui/smd.js on lines 3053..3071
    app/js-yui/smd.js on lines 3072..3084
    app/js-yui/smd.js on lines 3085..3097
    app/js-yui/smd.js on lines 3111..3123
    app/js-yui/smd.js on lines 3124..3136
    app/js-yui/smd.js on lines 3137..3149
    app/js-yui/smd.js on lines 4036..4057

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

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

                    "boost_water" : {
                        "description": "Spends 5 essentia, and boosts water production 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 8 other locations - About 40 mins to fix
    app/js-yui/smd.js on lines 2963..2988
    app/js-yui/smd.js on lines 3053..3071
    app/js-yui/smd.js on lines 3072..3084
    app/js-yui/smd.js on lines 3098..3110
    app/js-yui/smd.js on lines 3111..3123
    app/js-yui/smd.js on lines 3124..3136
    app/js-yui/smd.js on lines 3137..3149
    app/js-yui/smd.js on lines 4036..4057

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

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

                    "boost_happiness" : {
                        "description": "Spends 5 essentia, and boosts happiness production 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 8 other locations - About 40 mins to fix
    app/js-yui/smd.js on lines 2963..2988
    app/js-yui/smd.js on lines 3053..3071
    app/js-yui/smd.js on lines 3072..3084
    app/js-yui/smd.js on lines 3085..3097
    app/js-yui/smd.js on lines 3098..3110
    app/js-yui/smd.js on lines 3111..3123
    app/js-yui/smd.js on lines 3137..3149
    app/js-yui/smd.js on lines 4036..4057

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

    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

                        "cancel_build" : {
                            "description": "Cancel 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 354..358
    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

                    "fetch" : {
                        "description": "Retrieves a captcha that is required in order to call the solve method.",
                        "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 3258..3264
    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

                    "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

                    "disable_self_destruct" : {
                        "description": "Disables the self distruction countdown.",
                        "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 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

                    "redefine_species_limits" : {
                        "description": "Defines the extra limits placed upon a user that want's to redefine their species.",
                        "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 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

                        "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

                    "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

                        "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

                    "is_name_available" : {
                        "description": "check if empire name is available",
                        "parameters": [
                            {"name":"name", "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 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_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

                    "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

                    "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

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

                    "get_body_status" : {
                        "description" : "Retrieves the status of a body to display in the star map.",
                        "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 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
    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

                    "boost_building" : {
                        "description": "Spends 5 essentia, and boosts building queues 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 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

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

                    "enable_self_destruct" : {
                        "description": "Enables a destruction countdown of 24 hours. Sometime after the timer runs out, the empire will vaporize.",
                        "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 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_ship" : {
                            "description": "Will spend 1 essentia to build the ship immediately.",
                            "parameters": [
                                {"name":"args", "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 1002..1008
    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_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

    There are no issues that match your filters.

    Category
    Status