yoichiro/chrome_mysql_admin

View on GitHub

Showing 375 of 375 total issues

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

    var loadCharacterSet = function() {
        mySQLQueryService.showCharacterSet().then(function(result) {
            $scope.characterSets = result.resultsetRows;
            $scope.characterSet = "utf8";
        }, function(reason) {
app/scripts/window/controllers/create_table_dialog_controller.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 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

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

    this.decode = function(byte_pointer) {
      // NOTE: Hack to support emitting two code points
      if (big5_pending !== null) {
        var pending = big5_pending;
        big5_pending = null;
Severity: Major
Found in app/scripts/lib/encoding.js - About 2 hrs to fix

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

        this.decode = function(byte_pointer) {
          var bite = byte_pointer.get();
          if (bite === EOF_byte) {
            if (utf8_bytes_needed !== 0) {
              return decoderError(fatal);
    Severity: Major
    Found in app/scripts/lib/encoding.js - About 2 hrs to fix

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

          var assignEventHandlers = function() {
              $scope.$on(Events.CONNECTION_CHANGED, function(event, data) {
                  onConnectionChanged();
              });
              $scope.$on(Events.DATABASE_CHANGED, function(event, database) {
      Severity: Major
      Found in app/scripts/window/controllers/rows_panel_controller.js - About 2 hrs to fix

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

                        function(initialHandshakeRequest, result) {
                            $rootScope.hideProgressBar();
                            if (result.isSuccess()) {
                                $rootScope.showMainStatusMessage("Logged in to MySQL server with SSL.");
                                deferred.resolve(initialHandshakeRequest);
        Severity: Major
        Found in app/scripts/window/services/mysql_client_service.js and 1 other location - About 2 hrs to fix
        app/scripts/window/services/mysql_client_service.js on lines 228..237

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 79.

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

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

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

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

        Refactorings

        Further Reading

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

                        function(initialHandshakeRequest, result) {
                            $rootScope.hideProgressBar();
                            if (result.isSuccess()) {
                                $rootScope.showMainStatusMessage("Logged in to MySQL server.");
                                deferred.resolve(initialHandshakeRequest);
        Severity: Major
        Found in app/scripts/window/services/mysql_client_service.js and 1 other location - About 2 hrs to fix
        app/scripts/window/services/mysql_client_service.js on lines 262..271

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 79.

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

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

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

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

        Refactorings

        Further Reading

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

            $scope.downColumn = function(index) {
                var next = $scope.selectedColumns[index + 1];
                $scope.selectedColumns[index + 1] = $scope.selectedColumns[index];
                $scope.selectedColumns[index] = next;
            };
        app/scripts/window/controllers/add_index_dialog_controller.js on lines 83..87

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 78.

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

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

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

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

        Refactorings

        Further Reading

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

            $scope.upColumn = function(index) {
                var previous = $scope.selectedColumns[index - 1];
                $scope.selectedColumns[index - 1] = $scope.selectedColumns[index];
                $scope.selectedColumns[index] = previous;
            };
        app/scripts/window/controllers/add_index_dialog_controller.js on lines 89..93

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 78.

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

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

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

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

        Refactorings

        Further Reading

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

            for (i = 0; i < index.length; ++i) {
              var entry = index[i];
              if (entry[0] <= pointer) {
                offset = entry[0];
                code_point_offset = entry[1];
        Severity: Major
        Found in app/scripts/lib/encoding.js and 1 other location - About 2 hrs to fix
        app/scripts/lib/encoding.js on lines 696..704

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 78.

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

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

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

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

        Refactorings

        Further Reading

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

            for (i = 0; i < index.length; ++i) {
              var entry = index[i];
              if (entry[1] <= code_point) {
                offset = entry[1];
                pointer_offset = entry[0];
        Severity: Major
        Found in app/scripts/lib/encoding.js and 1 other location - About 2 hrs to fix
        app/scripts/lib/encoding.js on lines 674..682

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 78.

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

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

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

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

        Refactorings

        Further Reading

        Function createRoutine has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            $scope.createRoutine = function() {
                var sql = "CREATE DEFINER=CURRENT_USER ";
                sql += $scope.routineType + " `";
                sql += $scope.routineName + "` (";
                var params = [];
        Severity: Major
        Found in app/scripts/window/controllers/create_routine_dialog_controller.js - About 2 hrs to fix

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

                      this.push({
                          field: "column" + index,
                          displayName: columnDefinition.name,
                          width: Math.min(
                              Number(columnDefinition.columnLength) * UIConstants.GRID_COLUMN_FONT_SIZE,
          Severity: Major
          Found in app/scripts/window/controllers/query_panel_controller.js and 1 other location - About 2 hrs to fix
          app/scripts/window/controllers/rows_panel_controller.js on lines 106..115

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 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

                      var params = {
                          field: "column" + index,
                          displayName: columnDefinition.name,
                          width: Math.min(
                              Number(columnDefinition.columnLength) * UIConstants.GRID_COLUMN_FONT_SIZE,
          Severity: Major
          Found in app/scripts/window/controllers/rows_panel_controller.js and 1 other location - About 2 hrs to fix
          app/scripts/window/controllers/query_panel_controller.js on lines 216..225

          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

          Function ISO2022KREncoder has 50 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function ISO2022KREncoder(options) {
              var fatal = options.fatal;
              /** @enum */
              var state = {
                ASCII: 0,
          Severity: Minor
          Found in app/scripts/lib/encoding.js - About 2 hrs to fix

            Function ISO2022JPEncoder has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function ISO2022JPEncoder(options) {
                var fatal = options.fatal;
                /** @enum */
                var state = {
                  ASCII: 0,
            Severity: Minor
            Found in app/scripts/lib/encoding.js - About 2 hrs to fix

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

                          mySQLClientService.loginWithSSL(
                              hostName,
                              Number(portNumber),
                              $scope.userName,
                              $scope.password,
              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 147..159

              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

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

                          mySQLClientService.login(
                              hostName,
                              Number(portNumber),
                              $scope.userName,
                              $scope.password
              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 131..145

              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

              Function EUCKRDecoder has 48 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

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

                Function set has 15 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        set: function(name, hostName, port, userName, password, useSSL, caCert, checkCN, usePortForwarding, ssh2HostName, ssh2Port, ssh2AuthType, ssh2UserName, ssh2Password, ssh2PrivateKey) {
                Severity: Major
                Found in app/scripts/window/services/favorite_service.js - About 1 hr to fix

                  Function loadDumpData has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      var loadDumpData = function(tables, index, deferred) {
                          if (index == tables.length) {
                              deferred.resolve(tables);
                          } else {
                              var table = tables[index];
                  Severity: Minor
                  Found in app/scripts/window/services/export_all_databases_service.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language