plainblack/Lacuna-Web-Client

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

Summary

Maintainability
F
1 mo
Test Coverage

File stats.js has 1179 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

var StatsWindowActions = require('js/actions/windows/stats');

var _ = require('lodash');
Severity: Major
Found in app/js-yui/stats.js - About 3 days to fix

    Function EmpireStats has 175 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    EmpireStats : function(){
                      if(this.EmpireTable) {
                          this.EmpireTable.requery();
                      }
                      else {
    Severity: Major
    Found in app/js-yui/stats.js - About 7 hrs to fix

      Function AllianceStats has 173 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              AllianceStats : function(){
                  if(this.AllianceTable) {
                      this.AllianceTable.requery();
                  }
                  else {
      Severity: Major
      Found in app/js-yui/stats.js - About 6 hrs to fix

        Function SpyStats has 107 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                SpyStats : function(){
                    if(this.SpyTable) {
                        this.SpyTable.requery();
                    }
                    else {
        Severity: Major
        Found in app/js-yui/stats.js - About 4 hrs to fix

          Function ColonyStats has 105 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  ColonyStats : function(){
                      if(this.ColonyTable) {
                          this.ColonyTable.requery();
                      }
                      else {
          Severity: Major
          Found in app/js-yui/stats.js - About 4 hrs to fix

            Function WeeklyMedalStats has 99 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    WeeklyMedalStats : function(){
                        if(this.WeeklyMedalTable) {
                            this.WeeklyMedalTable.requery();
                        }
                        else {
            Severity: Major
            Found in app/js-yui/stats.js - About 3 hrs to fix

              Function build has 59 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      build: _.once(function() {
                          this.id = "stats";
              
                          var container = document.createElement("div");
                          container.id = this.id;
              Severity: Major
              Found in app/js-yui/stats.js - About 2 hrs to fix

                Function _getHtml has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        _getHtml : function() {
                            return [
                            '    <div class="hd">Universe Stats</div>',
                            '    <div class="bd">',
                            '        <div id="statsTabs" class="yui-navset">',
                Severity: Major
                Found in app/js-yui/stats.js - About 2 hrs to fix

                  Function _getOrbitsHtml has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  _getOrbitsHtml : function() {
                                       var data = this._serverOverview.orbits;
                  
                                       return  ['<ul class="statsList">',
                                               '<li><label>Orbits</label><ul class="statsSubList">',
                  Severity: Major
                  Found in app/js-yui/stats.js - About 2 hrs to fix

                    Function _getBodiesHtml has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            _getBodiesHtml : function() {
                                var data = this._serverOverview.bodies;
                                return [
                                    '<ul class="statsList">',
                                    '<li><label>Total Bodies:</label>', Lib.formatNumber(data.count), '</li>',
                    Severity: Minor
                    Found in app/js-yui/stats.js - About 1 hr to fix

                      Function AllianceFindCreate has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              AllianceFindCreate : function() {
                                  var dataSource = new Util.XHRDataSource("/stats");
                                  dataSource.connMethodPost = "POST";
                                  dataSource.maxCacheEntries = 2;
                                  dataSource.responseType = YAHOO.util.XHRDataSource.TYPE_JSON;
                      Severity: Minor
                      Found in app/js-yui/stats.js - About 1 hr to fix

                        Function EmpireFindCreate has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                EmpireFindCreate : function() {
                                    var dataSource = new Util.XHRDataSource("/stats");
                                    dataSource.connMethodPost = "POST";
                                    dataSource.maxCacheEntries = 2;
                                    dataSource.responseType = YAHOO.util.XHRDataSource.TYPE_JSON;
                        Severity: Minor
                        Found in app/js-yui/stats.js - About 1 hr to fix

                          Function _getSpiesHtml has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          _getSpiesHtml : function() {
                                              var data = this._serverOverview.spies;
                                              return ['<ul class="statsList">',
                                                     '<li><label>Total Spies:</label>', Lib.formatNumber(data.count), '</li>',
                                                     '<li><label>Average Defense:</label>', Lib.formatNumber(data.average_defense), '</li>',
                          Severity: Minor
                          Found in app/js-yui/stats.js - About 1 hr to fix

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

                                            this.EmpireTable.find = function(id, page) {
                                                // Get the current state
                                                var oState = this.getState(),
                                                    sort = (oState.sortedBy) ? oState.sortedBy.key : oSelf.getColumnSet().keys[0].getKey();
                            
                            
                            Severity: Major
                            Found in app/js-yui/stats.js and 1 other location - About 1 day to fix
                            app/js-yui/stats.js on lines 830..864

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

                            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.AllianceTable.find = function(id, page) {
                                                // Get the current state
                                                var oState = this.getState(),
                                                    sort = (oState.sortedBy) ? oState.sortedBy.key : oSelf.getColumnSet().keys[0].getKey();
                            
                            
                            Severity: Major
                            Found in app/js-yui/stats.js and 1 other location - About 1 day to fix
                            app/js-yui/stats.js on lines 589..623

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

                            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.AllianceTable.set("generateRequest", function(oState, oSelf) {
                                                // Set defaults
                                                oState = oState || {pagination:null, sortedBy:null};
                                                var sort = encodeURIComponent((oState.sortedBy) ? oState.sortedBy.key : oSelf.getColumnSet().keys[0].getKey()),
                                                    dir = (oState.sortedBy && oState.sortedBy.dir === YAHOO.widget.DataTable.CLASS_DESC) ? "desc" : "asc",
                            Severity: Major
                            Found in app/js-yui/stats.js and 1 other location - About 1 day to fix
                            app/js-yui/stats.js on lines 625..645

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

                            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.EmpireTable.set("generateRequest", function(oState, oSelf) {
                                                // Set defaults
                                                oState = oState || {pagination:null, sortedBy:null};
                                                var sort = encodeURIComponent((oState.sortedBy) ? oState.sortedBy.key : oSelf.getColumnSet().keys[0].getKey()),
                                                    dir = (oState.sortedBy && oState.sortedBy.dir === YAHOO.widget.DataTable.CLASS_DESC) ? "desc" : "asc",
                            Severity: Major
                            Found in app/js-yui/stats.js and 1 other location - About 1 day to fix
                            app/js-yui/stats.js on lines 866..886

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

                            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.ColonyTable.set("generateRequest", function(oState, oSelf) {
                                                // Set defaults
                                                oState = oState || {pagination:null, sortedBy:null};
                                                var sort = encodeURIComponent((oState.sortedBy) ? oState.sortedBy.key : oSelf.getColumnSet().keys[0].getKey()),
                                                    dir = (oState.sortedBy && oState.sortedBy.dir === YAHOO.widget.DataTable.CLASS_DESC) ? "desc" : "asc",
                            Severity: Major
                            Found in app/js-yui/stats.js and 1 other location - About 1 day to fix
                            app/js-yui/stats.js on lines 1167..1185

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

                            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.SpyTable.set("generateRequest", function(oState, oSelf) {
                                                // Set defaults
                                                oState = oState || {pagination:null, sortedBy:null};
                                                var sort = encodeURIComponent((oState.sortedBy) ? oState.sortedBy.key : oSelf.getColumnSet().keys[0].getKey()),
                                                    dir = (oState.sortedBy && oState.sortedBy.dir === YAHOO.widget.DataTable.CLASS_DESC) ? "desc" : "asc",
                            Severity: Major
                            Found in app/js-yui/stats.js and 1 other location - About 1 day to fix
                            app/js-yui/stats.js on lines 1040..1058

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

                            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.EmpireTable.requery = function(page) {
                                                // Get the current state
                                                var oState = this.getState();
                            
                                                if(Lang.isNumber(page)) {
                            Severity: Major
                            Found in app/js-yui/stats.js and 1 other location - About 1 day to fix
                            app/js-yui/stats.js on lines 805..829

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

                            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.AllianceTable.requery = function(page) {
                                                // Get the current state
                                                var oState = this.getState();
                            
                                                if(Lang.isNumber(page)) {
                            Severity: Major
                            Found in app/js-yui/stats.js and 1 other location - About 1 day to fix
                            app/js-yui/stats.js on lines 564..588

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

                            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

                                            this.SpyTable.requery = function() {
                                                // Get the current state
                                                var oState = this.getState();
                            
                                                // Reset record offset, if paginated
                            Severity: Major
                            Found in app/js-yui/stats.js and 2 other locations - About 6 hrs to fix
                            app/js-yui/stats.js on lines 1014..1038
                            app/js-yui/stats.js on lines 1262..1286

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

                            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

                                            this.ColonyTable.requery = function() {
                                                // Get the current state
                                                var oState = this.getState();
                            
                                                // Reset record offset, if paginated
                            Severity: Major
                            Found in app/js-yui/stats.js and 2 other locations - About 6 hrs to fix
                            app/js-yui/stats.js on lines 1141..1165
                            app/js-yui/stats.js on lines 1262..1286

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

                            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

                                            this.WeeklyMedalTable.requery = function() {
                                                // Get the current state
                                                var oState = this.getState();
                            
                                                // Reset record offset, if paginated
                            Severity: Major
                            Found in app/js-yui/stats.js and 2 other locations - About 6 hrs to fix
                            app/js-yui/stats.js on lines 1014..1038
                            app/js-yui/stats.js on lines 1141..1165

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

                            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.SpyTable = new YAHOO.widget.ScrollingDataTable("statsSpyTable", this.SpyColumns, this.SpyData, {
                                                width:"100%",
                                                height:sHt + "px",
                                                initialRequest: Lang.JSON.stringify({
                                                        "id": YAHOO.rpc.Service._requestId++,
                            Severity: Major
                            Found in app/js-yui/stats.js and 1 other location - About 5 hrs to fix
                            app/js-yui/stats.js on lines 972..987

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

                            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.ColonyTable = new YAHOO.widget.ScrollingDataTable("statsColonyTable", this.ColonyColumns, this.ColonyData, {
                                                width:"100%",
                                                height:cHt + "px",
                                                initialRequest: Lang.JSON.stringify({
                                                        "id": YAHOO.rpc.Service._requestId++,
                            Severity: Major
                            Found in app/js-yui/stats.js and 1 other location - About 5 hrs to fix
                            app/js-yui/stats.js on lines 1099..1114

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

                            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

                                            this.WeeklyMedalTable.subscribe("cellClickEvent", function(ev) {
                                                var target = Event.getTarget(ev),
                                                    column = this.getColumn(target);
                                                if (column.key == "empire_name") {
                                                    var record = this.getRecord(target);
                            Severity: Major
                            Found in app/js-yui/stats.js and 3 other locations - About 3 hrs to fix
                            app/js-yui/stats.js on lines 781..788
                            app/js-yui/stats.js on lines 1005..1012
                            app/js-yui/stats.js on lines 1132..1139

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

                            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

                                            this.SpyTable.subscribe("cellClickEvent", function(ev) {
                                                var target = Event.getTarget(ev),
                                                    column = this.getColumn(target);
                                                if (column.key == "empire_name") {
                                                    var record = this.getRecord(target);
                            Severity: Major
                            Found in app/js-yui/stats.js and 3 other locations - About 3 hrs to fix
                            app/js-yui/stats.js on lines 781..788
                            app/js-yui/stats.js on lines 1005..1012
                            app/js-yui/stats.js on lines 1253..1260

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

                            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

                                            this.AllianceTable.subscribe("cellClickEvent", function(ev) {
                                                var target = Event.getTarget(ev),
                                                    column = this.getColumn(target);
                                                if (column.key == "alliance_name") {
                                                    var record = this.getRecord(target);
                            Severity: Major
                            Found in app/js-yui/stats.js and 3 other locations - About 3 hrs to fix
                            app/js-yui/stats.js on lines 1005..1012
                            app/js-yui/stats.js on lines 1132..1139
                            app/js-yui/stats.js on lines 1253..1260

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

                            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

                                            this.ColonyTable.subscribe("cellClickEvent", function(ev) {
                                                var target = Event.getTarget(ev),
                                                    column = this.getColumn(target);
                                                if (column.key == "empire_name") {
                                                    var record = this.getRecord(target);
                            Severity: Major
                            Found in app/js-yui/stats.js and 3 other locations - About 3 hrs to fix
                            app/js-yui/stats.js on lines 781..788
                            app/js-yui/stats.js on lines 1132..1139
                            app/js-yui/stats.js on lines 1253..1260

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

                            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.EmpireTable.handleDataReturnPayload = function(oRequest, oResponse, oPayload) {
                                                oPayload.totalRecords = oResponse.meta.totalRecords;
                                                var pn = oResponse.meta.pageNumber-1;
                                                oPayload.pagination = {
                                                    rowsPerPage:25,
                            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 796..804

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

                            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.AllianceTable.handleDataReturnPayload = function(oRequest, oResponse, oPayload) {
                                                oPayload.totalRecords = oResponse.meta.totalRecords;
                                                var pn = oResponse.meta.pageNumber-1;
                                                oPayload.pagination = {
                                                    rowsPerPage:25,
                            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 555..563

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

                            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.EmpireTable.subscribe("postRenderEvent", function(){
                                                var els = this.getSelectedTrEls();
                                                if(els && els.length > 0) {
                                                    this._elBdContainer.scrollTop = els[els.length-1].offsetTop;
                                                }
                            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 789..794

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

                                            this.AllianceTable.subscribe("postRenderEvent", function(){
                                                var els = this.getSelectedTrEls();
                                                if(els && els.length > 0) {
                                                    this._elBdContainer.scrollTop = els[els.length-1].offsetTop;
                                                }
                            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 548..553

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

                                        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

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

                                                  {key:"rank", label:"Rank",formatter:function(el, oRecord, oColumn, oData) {
                                                                                                                                var oState = this.getState();
                                                                                                                                el.innerHTML = Math.floor(oState.pagination.recordOffset + this.rankCounter++);
                                                                                                                            }},
                            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 703..706

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

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

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

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

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

                            Refactorings

                            Further Reading

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

                                                {key:"rank", label:"Rank",formatter:function(el, oRecord, oColumn, oData) {
                                                    var oState = this.getState();
                                                    el.innerHTML = Math.floor(oState.pagination.recordOffset + this.rankCounter++);
                                                }},
                            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 460..463

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

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

                                var Lang = YAHOO.lang,
                                    Util = YAHOO.util,
                                    Dom = Util.Dom,
                                    Event = Util.Event,
                                    Sel = Util.Selector,
                            Severity: Major
                            Found in app/js-yui/stats.js and 16 other locations - About 1 hr to fix
                            app/js-yui/building.js on lines 8..15
                            app/js-yui/building/development.js on lines 6..13
                            app/js-yui/building/distributionCenter.js on lines 6..13
                            app/js-yui/building/geneticsLab.js on lines 6..13
                            app/js-yui/building/missionCommand.js on lines 6..13
                            app/js-yui/building/network19.js on lines 6..13
                            app/js-yui/building/park.js on lines 6..13
                            app/js-yui/building/planetaryCommand.js on lines 13..20
                            app/js-yui/building/shipyard.js on lines 6..13
                            app/js-yui/building/spaceStationLab.js on lines 6..13
                            app/js-yui/login.js on lines 13..20
                            app/js-yui/mapPlanet.js on lines 12..19
                            app/js-yui/mapStar.js on lines 8..15
                            app/js-yui/module/parliament.js on lines 6..13
                            app/js-yui/module/stationCommand.js on lines 6..13
                            app/js-yui/profile.js on lines 13..20

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

                            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.EmpireTable.set("formatRow", function(elTr, oRecord) {
                                                if(this.selectedEmpireId && oRecord.getData("empire_id") == this.selectedEmpireId) {
                                                    this.selectRow(oRecord);
                                                }
                                                return true;
                            Severity: Major
                            Found in app/js-yui/stats.js and 1 other location - About 1 hr to fix
                            app/js-yui/stats.js on lines 887..892

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

                                            this.AllianceTable.set("formatRow", function(elTr, oRecord) {
                                                if(this.selectedAllianceId && oRecord.getData("alliance_id") == this.selectedAllianceId) {
                                                    this.selectRow(oRecord);
                                                }
                                                return true;
                            Severity: Major
                            Found in app/js-yui/stats.js and 1 other location - About 1 hr to fix
                            app/js-yui/stats.js on lines 646..651

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

                                            this.EmpireTable.subscribe("cellHighlightEvent", function(oArgs) {
                                                if (oArgs.key == "empire_name" || oArgs.key == "alliance_name") {
                                                    Dom.setStyle(oArgs.el, "cursor", "help");
                                                }
                                            });
                            Severity: Major
                            Found in app/js-yui/stats.js and 1 other location - About 1 hr to fix
                            app/js-yui/stats.js on lines 530..534

                            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

                                            this.EmpireTable.subscribe("cellUnhighlightEvent", function(oArgs) {
                                                if (oArgs.key == "empire_name" || oArgs.key == "alliance_name") {
                                                    Dom.setStyle(oArgs.el, "cursor", "auto");
                                                }
                                            });
                            Severity: Major
                            Found in app/js-yui/stats.js and 1 other location - About 1 hr to fix
                            app/js-yui/stats.js on lines 524..528

                            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

                                                initialRequest: Lang.JSON.stringify({
                                                        "id": YAHOO.rpc.Service._requestId++,
                                                        "method": "alliance_rank",
                                                        "jsonrpc": "2.0",
                                                        "params": [
                            Severity: Major
                            Found in app/js-yui/stats.js and 1 other location - About 1 hr to fix
                            app/js-yui/stats.js on lines 1226..1233

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

                            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

                                                initialRequest: Lang.JSON.stringify({
                                                        "id": YAHOO.rpc.Service._requestId++,
                                                        "method": "weekly_medal_winners",
                                                        "jsonrpc": "2.0",
                                                        "params": [
                            Severity: Major
                            Found in app/js-yui/stats.js and 1 other location - About 1 hr to fix
                            app/js-yui/stats.js on lines 751..758

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

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

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

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

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

                            Refactorings

                            Further Reading

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

                                        var oTextboxList = new YAHOO.lacuna.TextboxList("statsEmpireFind", dataSource, { //config options
                                            maxResultsDisplayed: 10,
                                            minQueryLength:3,
                                            multiSelect:false,
                                            forceSelection:true,
                            Severity: Major
                            Found in app/js-yui/stats.js and 3 other locations - About 1 hr to fix
                            app/js-yui/building/embassy.js on lines 234..242
                            app/js-yui/messaging.js on lines 251..259
                            app/js-yui/stats.js on lines 905..913

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

                                        var oTextboxList = new YAHOO.lacuna.TextboxList("statsAllianceFind", dataSource, { //config options
                                            maxResultsDisplayed: 10,
                                            minQueryLength:3,
                                            multiSelect:false,
                                            forceSelection:true,
                            Severity: Major
                            Found in app/js-yui/stats.js and 3 other locations - About 1 hr to fix
                            app/js-yui/building/embassy.js on lines 234..242
                            app/js-yui/messaging.js on lines 251..259
                            app/js-yui/stats.js on lines 664..672

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

                                            this.SpyTable.subscribe("cellHighlightEvent", function(oArgs) {
                                                if (oArgs.key == "empire_name") {
                                                    Dom.setStyle(oArgs.el, "cursor", "help");
                                                }
                                            });
                            Severity: Major
                            Found in app/js-yui/stats.js and 7 other locations - About 55 mins to fix
                            app/js-yui/stats.js on lines 770..774
                            app/js-yui/stats.js on lines 776..780
                            app/js-yui/stats.js on lines 994..998
                            app/js-yui/stats.js on lines 1000..1004
                            app/js-yui/stats.js on lines 1127..1131
                            app/js-yui/stats.js on lines 1242..1246
                            app/js-yui/stats.js on lines 1248..1252

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 54.

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

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

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

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

                            Refactorings

                            Further Reading

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

                                            this.ColonyTable.subscribe("cellHighlightEvent", function(oArgs) {
                                                if (oArgs.key == "empire_name") {
                                                    Dom.setStyle(oArgs.el, "cursor", "help");
                                                }
                                            });
                            Severity: Major
                            Found in app/js-yui/stats.js and 7 other locations - About 55 mins to fix
                            app/js-yui/stats.js on lines 770..774
                            app/js-yui/stats.js on lines 776..780
                            app/js-yui/stats.js on lines 1000..1004
                            app/js-yui/stats.js on lines 1121..1125
                            app/js-yui/stats.js on lines 1127..1131
                            app/js-yui/stats.js on lines 1242..1246
                            app/js-yui/stats.js on lines 1248..1252

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 54.

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

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

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

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

                            Refactorings

                            Further Reading

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

                                            this.AllianceTable.subscribe("cellHighlightEvent", function(oArgs) {
                                                if (oArgs.key == "alliance_name") {
                                                    Dom.setStyle(oArgs.el, "cursor", "help");
                                                }
                                            });
                            Severity: Major
                            Found in app/js-yui/stats.js and 7 other locations - About 55 mins to fix
                            app/js-yui/stats.js on lines 776..780
                            app/js-yui/stats.js on lines 994..998
                            app/js-yui/stats.js on lines 1000..1004
                            app/js-yui/stats.js on lines 1121..1125
                            app/js-yui/stats.js on lines 1127..1131
                            app/js-yui/stats.js on lines 1242..1246
                            app/js-yui/stats.js on lines 1248..1252

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 54.

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

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

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

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

                            Refactorings

                            Further Reading

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

                                            this.WeeklyMedalTable.subscribe("cellHighlightEvent", function(oArgs) {
                                                if (oArgs.key == "empire_name") {
                                                    Dom.setStyle(oArgs.el, "cursor", "help");
                                                }
                                            });
                            Severity: Major
                            Found in app/js-yui/stats.js and 7 other locations - About 55 mins to fix
                            app/js-yui/stats.js on lines 770..774
                            app/js-yui/stats.js on lines 776..780
                            app/js-yui/stats.js on lines 994..998
                            app/js-yui/stats.js on lines 1000..1004
                            app/js-yui/stats.js on lines 1121..1125
                            app/js-yui/stats.js on lines 1127..1131
                            app/js-yui/stats.js on lines 1248..1252

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 54.

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

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

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

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

                            Refactorings

                            Further Reading

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

                                            this.ColonyTable.subscribe("cellUnhighlightEvent", function(oArgs) {
                                                if (oArgs.key == "empire_name") {
                                                    Dom.setStyle(oArgs.el, "cursor", "auto");
                                                }
                                            });
                            Severity: Major
                            Found in app/js-yui/stats.js and 7 other locations - About 55 mins to fix
                            app/js-yui/stats.js on lines 770..774
                            app/js-yui/stats.js on lines 776..780
                            app/js-yui/stats.js on lines 994..998
                            app/js-yui/stats.js on lines 1121..1125
                            app/js-yui/stats.js on lines 1127..1131
                            app/js-yui/stats.js on lines 1242..1246
                            app/js-yui/stats.js on lines 1248..1252

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 54.

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

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

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

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

                            Refactorings

                            Further Reading

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

                                            this.WeeklyMedalTable.subscribe("cellUnhighlightEvent", function(oArgs) {
                                                if (oArgs.key == "empire_name") {
                                                    Dom.setStyle(oArgs.el, "cursor", "auto");
                                                }
                                            });
                            Severity: Major
                            Found in app/js-yui/stats.js and 7 other locations - About 55 mins to fix
                            app/js-yui/stats.js on lines 770..774
                            app/js-yui/stats.js on lines 776..780
                            app/js-yui/stats.js on lines 994..998
                            app/js-yui/stats.js on lines 1000..1004
                            app/js-yui/stats.js on lines 1121..1125
                            app/js-yui/stats.js on lines 1127..1131
                            app/js-yui/stats.js on lines 1242..1246

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 54.

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

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

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

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

                            Refactorings

                            Further Reading

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

                                            this.SpyTable.subscribe("cellUnhighlightEvent", function(oArgs) {
                                                if (oArgs.key == "empire_name") {
                                                    Dom.setStyle(oArgs.el, "cursor", "auto");
                                                }
                                            });
                            Severity: Major
                            Found in app/js-yui/stats.js and 7 other locations - About 55 mins to fix
                            app/js-yui/stats.js on lines 770..774
                            app/js-yui/stats.js on lines 776..780
                            app/js-yui/stats.js on lines 994..998
                            app/js-yui/stats.js on lines 1000..1004
                            app/js-yui/stats.js on lines 1121..1125
                            app/js-yui/stats.js on lines 1242..1246
                            app/js-yui/stats.js on lines 1248..1252

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 54.

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

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

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

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

                            Refactorings

                            Further Reading

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

                                            this.AllianceTable.subscribe("cellUnhighlightEvent", function(oArgs) {
                                                if (oArgs.key == "alliance_name") {
                                                    Dom.setStyle(oArgs.el, "cursor", "auto");
                                                }
                                            });
                            Severity: Major
                            Found in app/js-yui/stats.js and 7 other locations - About 55 mins to fix
                            app/js-yui/stats.js on lines 770..774
                            app/js-yui/stats.js on lines 994..998
                            app/js-yui/stats.js on lines 1000..1004
                            app/js-yui/stats.js on lines 1121..1125
                            app/js-yui/stats.js on lines 1127..1131
                            app/js-yui/stats.js on lines 1242..1246
                            app/js-yui/stats.js on lines 1248..1252

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 54.

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

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

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

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

                            Refactorings

                            Further Reading

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

                                            this.tabView.getTab(3).subscribe("activeChange", function(e) {
                                                if(e.newValue) {
                                                    this.SpyStats();
                                                }
                                            }, this, true);
                            Severity: Major
                            Found in app/js-yui/stats.js and 3 other locations - About 55 mins to fix
                            app/js-yui/stats.js on lines 53..57
                            app/js-yui/stats.js on lines 63..67
                            app/js-yui/stats.js on lines 68..72

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

                            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

                                            this.tabView.getTab(5).subscribe("activeChange", function(e) {
                                                if(e.newValue) {
                                                    this.getServerStats();
                                                }
                                            }, this, true);
                            Severity: Major
                            Found in app/js-yui/stats.js and 3 other locations - About 55 mins to fix
                            app/js-yui/stats.js on lines 53..57
                            app/js-yui/stats.js on lines 58..62
                            app/js-yui/stats.js on lines 63..67

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

                            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

                                            this.tabView.getTab(4).subscribe("activeChange", function(e) {
                                                if(e.newValue) {
                                                    this.WeeklyMedalStats();
                                                }
                                            }, this, true);
                            Severity: Major
                            Found in app/js-yui/stats.js and 3 other locations - About 55 mins to fix
                            app/js-yui/stats.js on lines 53..57
                            app/js-yui/stats.js on lines 58..62
                            app/js-yui/stats.js on lines 68..72

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

                            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

                                            this.tabView.getTab(2).subscribe("activeChange", function(e) {
                                                if(e.newValue) {
                                                    this.ColonyStats();
                                                }
                                            }, this, true);
                            Severity: Major
                            Found in app/js-yui/stats.js and 3 other locations - About 55 mins to fix
                            app/js-yui/stats.js on lines 58..62
                            app/js-yui/stats.js on lines 63..67
                            app/js-yui/stats.js on lines 68..72

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

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

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

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

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

                            Refactorings

                            Further Reading

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

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

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 46.

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

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

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

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

                            Refactorings

                            Further Reading

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

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

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 46.

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

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

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

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

                            Refactorings

                            Further Reading

                            There are no issues that match your filters.

                            Category
                            Status