plainblack/Lacuna-Web-Client

View on GitHub

Showing 811 of 1,320 total issues

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

        _getAbandonAllProbesTab : function() {
            this.probesTab = new YAHOO.widget.Tab({ label: "Abandon All Probes", content: [
                    '<div>',
                    '    <button type="button" id="observatoryBigRedButton">Abandon All Probes!</button>',
                    '</div>'
Severity: Major
Found in app/js-yui/building/observatory.js and 1 other location - About 2 hrs to fix
app/js-yui/building/miningMinistry.js on lines 53..63

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

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

        _getAbandonAllPlatformsTab : function() {
            this.probesTab = new YAHOO.widget.Tab({ label: "Abandon All Platforms", content: [
                    '<div>',
                    '    <button type="button" id="miningMinistryBigRedButton">Abandon All Platforms!</button>',
                    '</div>'
Severity: Major
Found in app/js-yui/building/miningMinistry.js and 1 other location - About 2 hrs to fix
app/js-yui/building/observatory.js on lines 47..57

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

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

            if(this.building.level >= 18) {
                opts[opts.length] = '<option value="proposeMembersColonize">Members Only Colonization</option>';
                dis[dis.length] = [
                '    <div id="proposeMembersColonize" class="proposeOption" style="display:none;">',
                '        Allow only members to colonize planets under this stations jurisdiction.<br />',
Severity: Major
Found in app/js-yui/module/parliament.js and 4 other locations - About 2 hrs to fix
app/js-yui/module/parliament.js on lines 269..278
app/js-yui/module/parliament.js on lines 374..383
app/js-yui/module/parliament.js on lines 384..393
app/js-yui/module/parliament.js on lines 437..446

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

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

            if(this.building.level >= 13) {
                opts[opts.length] = '<option value="proposeMembersMining">Members Only Mining Rights</option>';
                dis[dis.length] = [
                '    <div id="proposeMembersMining" class="proposeOption" style="display:none;">',
                '        Allow only members to mine on asteroids under this stations jurisdiction.<br />',
Severity: Major
Found in app/js-yui/module/parliament.js and 4 other locations - About 2 hrs to fix
app/js-yui/module/parliament.js on lines 364..373
app/js-yui/module/parliament.js on lines 374..383
app/js-yui/module/parliament.js on lines 384..393
app/js-yui/module/parliament.js on lines 437..446

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

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

            if(this.building.level >= 18) {
                opts[opts.length] = '<option value="proposeMembersStations">Members Only Stations</option>';
                dis[dis.length] = [
                '    <div id="proposeMembersStations" class="proposeOption" style="display:none;">',
                '        Allow only members to setup stations under this stations jurisdiction.<br />',
Severity: Major
Found in app/js-yui/module/parliament.js and 4 other locations - About 2 hrs to fix
app/js-yui/module/parliament.js on lines 269..278
app/js-yui/module/parliament.js on lines 364..373
app/js-yui/module/parliament.js on lines 384..393
app/js-yui/module/parliament.js on lines 437..446

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

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

            if(this.building.level >= 23) {
                opts[opts.length] = '<option value="proposeNeutralizeBHG">Neutralize BHG</option>';
                dis[dis.length] = [
                '    <div id="proposeNeutralizeBHG" class="proposeOption" style="display:none;">',
                '        Neutralizes all Black Hole Generators under this stations jurisdiction.<br />',
Severity: Major
Found in app/js-yui/module/parliament.js and 4 other locations - About 2 hrs to fix
app/js-yui/module/parliament.js on lines 269..278
app/js-yui/module/parliament.js on lines 364..373
app/js-yui/module/parliament.js on lines 374..383
app/js-yui/module/parliament.js on lines 384..393

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

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

            if(this.building.level >= 20) {
                opts[opts.length] = '<option value="proposeMembersExcavation">Members Only Excavation</option>';
                dis[dis.length] = [
                '    <div id="proposeMembersExcavation" class="proposeOption" style="display:none;">',
                '        Allow only members to excavate on bodies under this stations jurisdiction.<br />',
Severity: Major
Found in app/js-yui/module/parliament.js and 4 other locations - About 2 hrs to fix
app/js-yui/module/parliament.js on lines 269..278
app/js-yui/module/parliament.js on lines 364..373
app/js-yui/module/parliament.js on lines 374..383
app/js-yui/module/parliament.js on lines 437..446

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

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

            }, {
                success : function(o){
                    YAHOO.log(o, "info", "Intelligence.SpyHandlePagination.view_spies.success");
                    require('js/actions/menu/loader').hide();
                    this.rpcSuccess(o);
Severity: Major
Found in app/js-yui/building/intelligence.js and 1 other location - About 2 hrs to fix
app/js-yui/building/shipyard.js on lines 106..115

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

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

                this.service.view_build_queue({session_id:Game.GetSession(),building_id:this.building.id,page_number:1}, {
                    success : function(o){
                        YAHOO.log(o, "info", "Shipyard.getQueue.view_build_queue.success");
                        require('js/actions/menu/loader').hide();
                        this.rpcSuccess(o);
Severity: Major
Found in app/js-yui/building/shipyard.js and 1 other location - About 2 hrs to fix
app/js-yui/building/intelligence.js on lines 387..396

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

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

        var moveKeyListener = new KL(document, {
            keys : [ KL.KEY.UP, KL.KEY.DOWN, KL.KEY.LEFT, KL.KEY.RIGHT ]
        }, { fn: this.moveKey, scope:this, correctScope:true }, KL.KEYDOWN);
Severity: Major
Found in app/js-yui/mapper.js and 1 other location - About 2 hrs to fix
app/js-yui/mapper.js on lines 1434..1436

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

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

        var moveKeyUpListener = new KL(document, {
            keys : [ KL.KEY.UP, KL.KEY.DOWN, KL.KEY.LEFT, KL.KEY.RIGHT ]
        }, { fn: this.moveKeyUp, scope:this, correctScope:true }, KL.KEYUP);
Severity: Major
Found in app/js-yui/mapper.js and 1 other location - About 2 hrs to fix
app/js-yui/mapper.js on lines 1431..1433

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

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

            oTextboxList.itemSelectEvent.subscribe(function(e, oArgs) {
                oArgs[0]._elTextbox.value = "";
                var data = oArgs[2];
                Lacuna.Stats.EmpireTable.find(data.empire_id, data.page_number);
            });
Severity: Major
Found in app/js-yui/stats.js and 1 other location - About 2 hrs to fix
app/js-yui/stats.js on lines 928..932

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

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

            oTextboxList.itemSelectEvent.subscribe(function(e, oArgs) {
                oArgs[0]._elTextbox.value = "";
                var data = oArgs[2];
                Lacuna.Stats.AllianceTable.find(data.alliance_id, data.page_number);
            });
Severity: Major
Found in app/js-yui/stats.js and 1 other location - About 2 hrs to fix
app/js-yui/stats.js on lines 687..691

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

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

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

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

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

Refactorings

Further Reading

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

                                if(this.resources[name]) {
                                    nOpt = opt.cloneNode(false);
                                    nOpt.value = name;
                                    nOpt.innerHTML = [name.titleCaps(), ' (', this.resources[name], ')'].join('');
                                    optGroup.appendChild(nOpt);
Severity: Major
Found in app/js-yui/building/transporter.js and 1 other location - About 2 hrs to fix
app/js-yui/building/transporter.js on lines 380..385

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

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

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

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

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

Refactorings

Further Reading

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

                        else if(this.resources[r] && resource) {
                            nOpt = opt.cloneNode(false);
                            nOpt.value = r;
                            nOpt.innerHTML = [r.titleCaps(), ' (', this.resources[r], ')'].join('');
                            elm.appendChild(nOpt);
Severity: Major
Found in app/js-yui/building/transporter.js and 1 other location - About 2 hrs to fix
app/js-yui/building/transporter.js on lines 370..375

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

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

        destroy : function() {
            if(this.availablePager) {
                this.availablePager.destroy();
            }
            if(this.minePage) {
Severity: Major
Found in app/js-yui/building/mercenariesGuild.js and 3 other locations - About 2 hrs to fix
app/js-yui/building/security.js on lines 25..33
app/js-yui/building/tradeMinistry.js on lines 160..168
app/js-yui/building/transporter.js on lines 160..168

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

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

        destroy : function() {
            if(this.pagerPrisoners) {
                this.pagerPrisoners.destroy();
            }
            if(this.pagerSpies) {
Severity: Major
Found in app/js-yui/building/security.js and 3 other locations - About 2 hrs to fix
app/js-yui/building/mercenariesGuild.js on lines 31..39
app/js-yui/building/tradeMinistry.js on lines 160..168
app/js-yui/building/transporter.js on lines 160..168

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

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

        destroy : function() {
            if(this.availablePager) {
                this.availablePager.destroy();
            }
            if(this.minePage) {
Severity: Major
Found in app/js-yui/building/tradeMinistry.js and 3 other locations - About 2 hrs to fix
app/js-yui/building/mercenariesGuild.js on lines 31..39
app/js-yui/building/security.js on lines 25..33
app/js-yui/building/transporter.js on lines 160..168

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

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

        destroy : function() {
            if(this.availablePager) {
                this.availablePager.destroy();
            }
            if(this.minePage) {
Severity: Major
Found in app/js-yui/building/transporter.js and 3 other locations - About 2 hrs to fix
app/js-yui/building/mercenariesGuild.js on lines 31..39
app/js-yui/building/security.js on lines 25..33
app/js-yui/building/tradeMinistry.js on lines 160..168

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

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

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

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

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

Refactorings

Further Reading

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

                        for(n=0; n<toDonateLis.length; n++) {
                            if(toDonateLis[n].Object) {
                                Event.purgeElement(toDonateLis[n]);
                                toDonateLis[n].parentNode.removeChild(toDonateLis[n]);
                            }
Severity: Major
Found in app/js-yui/building/embassy.js and 1 other location - About 2 hrs to fix
app/js-yui/building/embassy.js on lines 566..571

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language