oglimmer/ggo

View on GitHub

Showing 183 of 183 total issues

Function AtmosphereRequest has 2082 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        AtmosphereRequest: function (options) {

            /**
             * {Object} Request parameters.
             *
Severity: Major
Found in web/src/main/webapp/js/lib/atmosphere-javascript-2.3.2.js - About 1 wk to fix

    File atmosphere-javascript-2.3.2.js has 2578 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Copyright 2015 Async-IO.org
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
    Severity: Major
    Found in web/src/main/webapp/js/lib/atmosphere-javascript-2.3.2.js - About 1 wk to fix

      File watch-1.3.0.js has 627 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /**
       * THIS VERSION 1.3
       * 
       * DEVELOPED BY
       * GIL LOPES BUENO
      Severity: Major
      Found in web/src/main/webapp/js/lib/watch-1.3.0.js - About 1 day to fix

        Function _executeRequest has 224 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    function _executeRequest(request) {
                        var rq = _request;
                        if ((request != null) || (typeof (request) !== 'undefined')) {
                            rq = request;
                        }
        Severity: Major
        Found in web/src/main/webapp/js/lib/atmosphere-javascript-2.3.2.js - About 1 day to fix

          Method build has 183 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public TutorialDelegateBasePhase build(Game game) {
          
                  return new Builder(game)
          
                          /* Some texts at the beginning */

            Function _executeWebSocket has 172 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                        function _executeWebSocket(webSocketOpened) {
            
                            _response.transport = "websocket";
            
                            var location = _buildWebSocketUrl(_request.url);
            Severity: Major
            Found in web/src/main/webapp/js/lib/atmosphere-javascript-2.3.2.js - About 6 hrs to fix

              Function _local has 167 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          function _local(request) {
                              var trace, connector, orphan, name = "atmosphere-" + request.url, connectors = {
                                  storage: function () {
                                      function onstorage(event) {
                                          if (event.key === name && event.newValue) {
              Severity: Major
              Found in web/src/main/webapp/js/lib/atmosphere-javascript-2.3.2.js - About 6 hrs to fix

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

                            if(this.command.commandType != "F") {
                                var targetFieldId = this.command.x+":"+this.command.y;
                                var field = globalData.model.boardState.corToFields[targetFieldId];
                                var color;
                                switch(this.command.commandType) {
                Severity: Major
                Found in web/src/main/webapp/js/app/Unit.js and 1 other location - About 5 hrs to fix
                web/src/main/webapp/js/app/Unit.js on lines 90..106

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 137.

                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 {
                                var targetFieldId = this.command.x+":"+this.command.y;
                                var field = globalData.model.boardState.corToFields[targetFieldId];
                                var color;
                                switch(this.command.commandType) {
                Severity: Major
                Found in web/src/main/webapp/js/app/Unit.js and 1 other location - About 5 hrs to fix
                web/src/main/webapp/js/app/Unit.js on lines 119..135

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

                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

                Function onreadystatechange has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                                    ajaxRequest.onreadystatechange = function () {
                                        _debug("ajaxRequest.onreadystatechange, new state: " + ajaxRequest.readyState);
                                        if (_abortingConnection) {
                                            _debug("onreadystatechange has been ignored due to _abortingConnection flag");
                                            return;
                Severity: Major
                Found in web/src/main/webapp/js/lib/atmosphere-javascript-2.3.2.js - About 5 hrs to fix

                  File TutorialStepFactory.java has 367 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  package de.oglimmer.ggo.logic.phase.tutorial;
                  
                  import java.lang.reflect.InvocationTargetException;
                  import java.util.function.Consumer;
                  
                  

                    Function share has 117 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                function share() {
                                    var storageService, name = "atmosphere-" + _request.url, servers = {
                                        // Powered by the storage event and the localStorage
                                        // http://www.w3.org/TR/webstorage/#event-storage
                                        storage: function () {
                    Severity: Major
                    Found in web/src/main/webapp/js/lib/atmosphere-javascript-2.3.2.js - About 4 hrs to fix

                      Function _configureIE has 106 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  function _configureIE(request) {
                                      var rq = _request;
                                      if ((request != null) && (typeof (request) !== 'undefined')) {
                                          rq = request;
                                      }
                      Severity: Major
                      Found in web/src/main/webapp/js/lib/atmosphere-javascript-2.3.2.js - About 4 hrs to fix

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

                                    if (isArray(a)) {
                                        for (var i=0; i<a.length; i++) {
                                            if (b[i] === undefined) aplus.push(i);
                                        }
                                    } else {
                        Severity: Major
                        Found in web/src/main/webapp/js/lib/watch-1.3.0.js and 1 other location - About 4 hrs to fix
                        web/src/main/webapp/js/lib/watch-1.3.0.js on lines 86..98

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

                        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 (isArray(b)) {
                                        for (var j=0; j<b.length; j++) {
                                            if (a[j] === undefined) bplus.push(j);
                                        }
                                    } else {
                        Severity: Major
                        Found in web/src/main/webapp/js/lib/watch-1.3.0.js and 1 other location - About 4 hrs to fix
                        web/src/main/webapp/js/lib/watch-1.3.0.js on lines 72..84

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

                        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

                        Function _jsonp has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                    function _jsonp(request) {
                                        // When CORS is enabled, make sure we force the proper transport.
                                        request.transport = "jsonp";
                        
                                        var rq = _request, script;
                        Severity: Major
                        Found in web/src/main/webapp/js/lib/atmosphere-javascript-2.3.2.js - About 4 hrs to fix

                          Function _executeSSE has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      function _executeSSE(sseOpened) {
                          
                                          _response.transport = "sse";
                          
                                          var location = _buildSSEUrl();
                          Severity: Major
                          Found in web/src/main/webapp/js/lib/atmosphere-javascript-2.3.2.js - About 4 hrs to fix

                            Function _configureXDR has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                        function _configureXDR(request) {
                                            var rq = _request;
                                            if ((request != null) && (typeof (request) !== 'undefined')) {
                                                rq = request;
                                            }
                            Severity: Major
                            Found in web/src/main/webapp/js/lib/atmosphere-javascript-2.3.2.js - About 3 hrs to fix

                              Function open has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                                  open: function () {
                                                      var callback = "atmosphere" + (++guid);
                              
                                                      function _reconnectOnFailure() {
                                                          rq.lastIndex = 0;
                              Severity: Major
                              Found in web/src/main/webapp/js/lib/atmosphere-javascript-2.3.2.js - About 3 hrs to fix

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

                                                    atmosphere.util.each(_request.headers, function (name, value) {
                                                        var h = atmosphere.util.isFunction(value) ? value.call(this, _request, _request, _response) : value;
                                                        if (h != null) {
                                                            query += "&" + encodeURIComponent(name) + "=" + encodeURIComponent(h);
                                                        }
                                Severity: Major
                                Found in web/src/main/webapp/js/lib/atmosphere-javascript-2.3.2.js and 1 other location - About 3 hrs to fix
                                web/src/main/webapp/js/lib/atmosphere-javascript-2.3.2.js on lines 1806..1811

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

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

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

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

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

                                Refactorings

                                Further Reading

                                Severity
                                Category
                                Status
                                Source
                                Language