yoichiro/chrome_mysql_admin

View on GitHub

Showing 375 of 375 total issues

Function decode has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    this.decode = function(byte_pointer) {
      var bite = byte_pointer.get();
      if (bite === EOF_byte && euckr_lead === 0) {
        return EOF_code_point;
      }
Severity: Minor
Found in app/scripts/lib/encoding.js - About 1 hr to fix

    Function CodePointInputStream has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function CodePointInputStream(string) {
        /** @type {number} */
        var pos = 0;
        /** @type {Array.<number>} */
        var cps = (/** @return {Array.<number>} Code points. */function() {
    Severity: Minor
    Found in app/scripts/lib/encoding.js - About 1 hr to fix

      Function encode has 43 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          this.encode = function(output_byte_stream, code_point_pointer) {
            var code_point = code_point_pointer.get();
            if (code_point === EOF_code_point) {
              return EOF_byte;
            }
      Severity: Minor
      Found in app/scripts/lib/encoding.js - About 1 hr to fix

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

                    if (jQuery.isEmptyObject(primaryKeyColumns)) {
                        angular.forEach(columnDefinitions, function(columnDefinition, index) {
                            var condition =
                                    "`" + columnDefinition.name + "`" +
                                    createEqualRightExpression(originalRow.values[index]);
        Severity: Major
        Found in app/scripts/window/services/sql_expression_service.js and 1 other location - About 1 hr to fix
        app/scripts/window/services/sql_expression_service.js on lines 39..46

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

        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 {
                        angular.forEach(primaryKeyColumns, function(primaryKeyColumn, index) {
                            var condition =
                                    "`" + primaryKeyColumn.name + "`" +
                                    createEqualRightExpression(originalRow.values[index]);
        Severity: Major
        Found in app/scripts/window/services/sql_expression_service.js and 1 other location - About 1 hr to fix
        app/scripts/window/services/sql_expression_service.js on lines 32..39

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

        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 encode has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            this.encode = function(output_byte_stream, code_point_pointer) {
              var code_point = code_point_pointer.get();
              if (code_point === EOF_code_point) {
                return EOF_byte;
              }
        Severity: Minor
        Found in app/scripts/lib/encoding.js - About 1 hr to fix

          Function updateRow has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              $scope.updateRow = function() {
                  resetErrorMessage();
                  var sql = "UPDATE `" + targetObjectService.getTable().name + "` ";
                  var sets = [];
                  angular.forEach($scope.values, function(value, columnName) {
          Severity: Minor
          Found in app/scripts/window/controllers/update_row_dialog_controller.js - About 1 hr to fix

            Function UTF16Decoder has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function UTF16Decoder(utf16_be, options) {
                var fatal = options.fatal;
                var /** @type {?number} */ utf16_lead_byte = null,
                    /** @type {?number} */ utf16_lead_surrogate = null;
                /**
            Severity: Minor
            Found in app/scripts/lib/encoding.js - About 1 hr to fix

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

                  this.offset = function(n) {
                    pos += n;
                    if (pos < 0) {
                      throw new Error('Seeking past start of the buffer');
                    }
              Severity: Major
              Found in app/scripts/lib/encoding.js and 1 other location - About 1 hr to fix
              app/scripts/lib/encoding.js on lines 59..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 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

                      $scope.$on(Events.CONTINUE_SSH2_PORT_FORWARDING, function(event, data) {
                          ssh2KnownHostService.addLastChecked().then(function(result) {
                              continueSsh2PortForwarding(function(port) {
                                  doConnectToMySQL("127.0.0.1", port);
                              });
              Severity: Major
              Found in app/scripts/window/controllers/login_form_controller.js and 1 other location - About 1 hr to fix
              app/scripts/window/controllers/login_form_controller.js on lines 75..81

              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

                      $scope.$on(Events.CONTINUE_SSH2_PORT_FORWARDING_FOR_TEST, function(event, data) {
                          ssh2KnownHostService.addLastChecked().then(function(result) {
                              continueSsh2PortForwarding(function(port) {
                                  doTestConnectToMySQL("127.0.0.1", port);
                              });
              Severity: Major
              Found in app/scripts/window/controllers/login_form_controller.js and 1 other location - About 1 hr to fix
              app/scripts/window/controllers/login_form_controller.js on lines 68..74

              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.offset = function(n) {
                    pos += n;
                    if (pos < 0) {
                      throw new Error('Seeking past start of the buffer');
                    }
              Severity: Major
              Found in app/scripts/lib/encoding.js and 1 other location - About 1 hr to fix
              app/scripts/lib/encoding.js on lines 153..161

              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

              Function startPortForwarding has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  var startPortForwarding = function(event) {
                      var hostName = $scope.ssh2HostName;
                      var port = $scope.ssh2PortNumber;
                      ssh2PortForwardingService.connect(hostName, port).then(function(result) {
                          var fingerprint = result.values[0];
              Severity: Minor
              Found in app/scripts/window/controllers/login_form_controller.js - About 1 hr to fix

                Function controller has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        controller: ["$scope", "GraphTypes", function($scope, GraphTypes) {
                            this.assignEventHandlers = function(scope, element) {
                                window.addEventListener("resize", function(e) {
                                    scope.replot();
                                });
                Severity: Minor
                Found in app/scripts/window/directives/status_graph.js - About 1 hr to fix

                  Function ShiftJISDecoder has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function ShiftJISDecoder(options) {
                      var fatal = options.fatal;
                      var /** @type {number} */ shiftjis_lead = 0x00;
                      /**
                       * @param {ByteInputStream} byte_pointer
                  Severity: Minor
                  Found in app/scripts/lib/encoding.js - About 1 hr to fix

                    Function decode has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        this.decode = function(byte_pointer) {
                          var bite = byte_pointer.get();
                          if (bite === EOF_byte && utf16_lead_byte === null &&
                              utf16_lead_surrogate === null) {
                            return EOF_code_point;
                    Severity: Minor
                    Found in app/scripts/lib/encoding.js - About 1 hr to fix

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

                          var adjustGraphContainerHeight = function() {
                              $("#graphContainer").height(
                                  $(window).height() -
                                      UIConstants.WINDOW_TITLE_PANEL_HEIGHT -
                                      UIConstants.NAVBAR_HEIGHT -
                      app/scripts/window/controllers/procedures_functions_panel_controller.js on lines 51..57
                      app/scripts/window/controllers/rows_panel_controller.js on lines 95..101

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

                          var adjustRoutinesPanelHeight = function() {
                              $("#routinesGrid").height(
                                  ($(window).height() -
                                   UIConstants.WINDOW_TITLE_PANEL_HEIGHT -
                                   UIConstants.NAVBAR_HEIGHT -
                      app/scripts/window/controllers/rows_panel_controller.js on lines 95..101
                      app/scripts/window/controllers/status_graph_panel_controller.js on lines 56..62

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

                          var adjustRowsPanelHeight = function() {
                              $("#rowsGrid").height(
                                  $(window).height() -
                                      UIConstants.WINDOW_TITLE_PANEL_HEIGHT -
                                      UIConstants.NAVBAR_HEIGHT -
                      Severity: Major
                      Found in app/scripts/window/controllers/rows_panel_controller.js and 2 other locations - About 1 hr to fix
                      app/scripts/window/controllers/procedures_functions_panel_controller.js on lines 51..57
                      app/scripts/window/controllers/status_graph_panel_controller.js on lines 56..62

                      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

                      Function loadStructure has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          var loadStructure = function(tables, sqls) {
                              if (tables.length === 0) {
                                  $("#findSameRowsDialog").modal("hide");
                                  anyQueryExecuteService.showAndExecuteQueryPanel(
                                      sqls.join(";\n"),
                      Severity: Minor
                      Found in app/scripts/window/controllers/find_same_rows_dialog_controller.js - About 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language