etnbrd/flx-compiler

View on GitHub
test-set/redis_key_overview-master/index-flx.js

Summary

Maintainability
F
1 mo
Test Coverage

File index-flx.js has 887 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var flx = require('flx');


(function () {
  var app, bodyparser, e, express, extend, hbs, ov, ovOptions, overview, redis, rediscli, _defaults;
Severity: Major
Found in test-set/redis_key_overview-master/index-flx.js - About 2 days to fix

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

            Overview.prototype.generateRoutes = function () {
              this.express.get('/generate', function (_this) {
                return function (req, res) {
                  var _ref;
                  if ((_ref = _this.initStatus) != null ? _ref.initializing : void 0) {
    Severity: Major
    Found in test-set/redis_key_overview-master/index-flx.js - About 4 hrs to fix

      Function generateViews has 82 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              Overview.prototype.generateViews = function () {
                var _conReading, _keystream;
                _keystream = fs.createReadStream(this.options.keyfilename);
                this.emit('initStatusUpdate', 'Started reading the keys from local file, requesting information about the key from redis and packing these information.');
                _conReading = function (_this) {
      Severity: Major
      Found in test-set/redis_key_overview-master/index-flx.js - About 3 hrs to fix

        Function initInitVars has 69 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                Overview.prototype.initInitVars = function () {
                  this._parseCSV = {
                    remainingBytes: [],
                    nextCharCouldBeEscaped: false,
                    value: false,
        Severity: Major
        Found in test-set/redis_key_overview-master/index-flx.js - About 2 hrs to fix

          Function initialize has 62 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  Overview.prototype.initialize = function () {
                    this.on('initStatusUpdate', function (_this) {
                      return function (statusmsg) {
                        _this.initStatus.status.push({
                          'code': 200,
          Severity: Major
          Found in test-set/redis_key_overview-master/index-flx.js - About 2 hrs to fix

            Function _getKeySizeAndType has 54 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    Overview.prototype._getKeySizeAndType = function (keys, last) {
                      var _collection, _commands, _i, _key, _len;
                      if (last) {
                        if (this._totalKeyAmount <= this._timesRequested * this.options.multiLength) {
                          this.lastKeySizeAndTypeRequest = false;
            Severity: Major
            Found in test-set/redis_key_overview-master/index-flx.js - About 2 hrs to fix

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

                      Overview.prototype._getTopMembers = function (collection, type, last) {
                        var _element, _foundCount, _foundSize, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _topcountkey, _topsizekey;
                        if (last) {
                          this._createOverview();
                          return;
              Severity: Minor
              Found in test-set/redis_key_overview-master/index-flx.js - About 1 hr to fix

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

                        Overview.prototype._createOverview = function () {
                          var type, val, _ref;
                          this._templateDataParsed = this._parseDataForTemplate();
                          _ref = this._typePlurals;
                          for (type in _ref) {
                Severity: Minor
                Found in test-set/redis_key_overview-master/index-flx.js - About 1 hr to fix

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

                          Overview.prototype._getMemberCount = function (keys, last) {
                            var _collection, _command, _commands, _i, _key, _len;
                            if (last) {
                              if (this.memberRequests.remaining === 0) {
                                this._getTopMembers(null, null, true);
                  Severity: Minor
                  Found in test-set/redis_key_overview-master/index-flx.js - About 1 hr to fix

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

                            Overview.prototype._diffKeysAndSummarize = function (collection, last) {
                              var k, v, _element, _i, _len, _ref;
                              if (last) {
                                this.emit('initStatusUpdate', 'Finished getting the necessary key information from redis.');
                                this._createKeyOverview();
                    Severity: Minor
                    Found in test-set/redis_key_overview-master/index-flx.js - About 1 hr to fix

                      Function _parseDataForTemplate has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              Overview.prototype._parseDataForTemplate = function () {
                                var i, k, v, _i, _ref, _ref1, _templateDataParsed;
                                _templateDataParsed = {};
                                _ref = this._templateData;
                                for (k in _ref) {
                      Severity: Minor
                      Found in test-set/redis_key_overview-master/index-flx.js - About 1 hr to fix

                        Function _createKeyOverview has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                Overview.prototype._createKeyOverview = function () {
                                  var _finCreating, _keytemplatedata;
                                  this.emit('initStatusUpdate', 'Starting to parse information into html pages.');
                                  /*msg._sign.*/_finCreating = function (_this) {
                                    return function () {
                        Severity: Minor
                        Found in test-set/redis_key_overview-master/index-flx.js - About 1 hr to fix

                          Function Overview has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  function Overview(express, redis, options) {
                                    this.express = express;
                                    this.redis = redis;
                                    this.options = options;
                                    this._formatByte = __bind(this._formatByte, this);
                          Severity: Minor
                          Found in test-set/redis_key_overview-master/index-flx.js - About 1 hr to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                if (_this._parseCSV.nextCharactersAreUnicode === 1) {
                                                  _this._parseCSV.firstPartOfHex = sd.write(_byteBuffer);
                                                } else {
                                                  _realByteString = _this._parseCSV.firstPartOfHex + sd.write(_byteBuffer);
                                                  _realByte = parseInt(_realByteString, 16);
                            Severity: Major
                            Found in test-set/redis_key_overview-master/index-flx.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                    if (_byte === 120) {
                                                      _this._parseCSV.nextCharactersAreUnicode = 2;
                                                    } else {
                                                      _foundEscapedChar = false;
                                                      _ref = _this._escapedCharacters;
                              Severity: Major
                              Found in test-set/redis_key_overview-master/index-flx.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                  } else if (_byte === 92) {
                                                    _this._parseCSV.nextCharCouldBeEscaped = true;
                                                  } else if (_byte === 34) {
                                                    _key = sd.write(new Buffer(_this._parseCSV.remainingBytes));
                                                    _this._parseCSV.remainingBytes = [];
                                Severity: Major
                                Found in test-set/redis_key_overview-master/index-flx.js - About 45 mins to fix

                                  Function capsule has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  flx.register('anonymous-1004', function capsule(msg) {
                                    (function () {
                                      if (msg._sign._last === msg._sign.k && msg._sign._fin) {
                                        msg._sign._this.emit('initStatusUpdate', 'Finished creating html files.');
                                        if (msg._sign._this._keysDeleted > 0) {
                                  Severity: Minor
                                  Found in test-set/redis_key_overview-master/index-flx.js - About 25 mins to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

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

                                          Overview.prototype.generateViews = function () {
                                            var _conReading, _keystream;
                                            _keystream = fs.createReadStream(this.options.keyfilename);
                                            this.emit('initStatusUpdate', 'Started reading the keys from local file, requesting information about the key from redis and packing these information.');
                                            _conReading = function (_this) {
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 4 days to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 321..404

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

                                  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

                                          Overview.prototype._parseDataForTemplate = function () {
                                            var i, k, v, _i, _ref, _ref1, _templateDataParsed;
                                            _templateDataParsed = {};
                                            _ref = this._templateData;
                                            for (k in _ref) {
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 4 days to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 703..738

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

                                  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

                                          Overview.prototype._getTopMembers = function (collection, type, last) {
                                            var _element, _foundCount, _foundSize, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _topcountkey, _topsizekey;
                                            if (last) {
                                              this._createOverview();
                                              return;
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 4 days to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 564..613

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

                                  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

                                          Overview.prototype._getKeySizeAndType = function (keys, last) {
                                            var _collection, _commands, _i, _key, _len;
                                            if (last) {
                                              if (this._totalKeyAmount <= this._timesRequested * this.options.multiLength) {
                                                this.lastKeySizeAndTypeRequest = false;
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 3 days to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 423..471

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

                                  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

                                          Overview.prototype._diffKeysAndSummarize = function (collection, last) {
                                            var k, v, _element, _i, _len, _ref;
                                            if (last) {
                                              this.emit('initStatusUpdate', 'Finished getting the necessary key information from redis.');
                                              this._createKeyOverview();
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 3 days to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 481..519

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

                                  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

                                          Overview.prototype._getMemberCount = function (keys, last) {
                                            var _collection, _command, _commands, _i, _key, _len;
                                            if (last) {
                                              if (this.memberRequests.remaining === 0) {
                                                this._getTopMembers(null, null, true);
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 2 days to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 521..562

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

                                  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

                                          Overview.prototype._parseKeysForTemplate = function () {
                                            var types, _obj, _ref, _typ;
                                            types = {
                                              'types': [],
                                              topcount: this.options.topcount
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 2 days to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 740..762

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

                                  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 Overview(express, redis, options) {
                                            this.express = express;
                                            this.redis = redis;
                                            this.options = options;
                                            this._formatByte = __bind(this._formatByte, this);
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 2 days to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 24..55

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

                                  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

                                          Overview.prototype.initInitVars = function () {
                                            this._parseCSV = {
                                              remainingBytes: [],
                                              nextCharCouldBeEscaped: false,
                                              value: false,
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 2 days to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 122..192

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

                                  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

                                          Overview.prototype.initialize = function () {
                                            this.on('initStatusUpdate', function (_this) {
                                              return function (statusmsg) {
                                                _this.initStatus.status.push({
                                                  'code': 200,
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 2 days to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 57..120

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

                                  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.express.get('/initstatuspercent', function (_this) {
                                              return function (req, res) {
                                                var _sendStatusPercent, _timeobj;
                                                if (_this.initStatus.percent['new']) {
                                                  _this.initStatus.percent['new'] = false;
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 1 day to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 277..304

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

                                  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.express.get('/initstatus', function (_this) {
                                              return function (req, res) {
                                                var _sendStatus, _status, _timeobj;
                                                if (_this.initStatus.status.length > 0) {
                                                  _status = _this.initStatus.status.shift();
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 1 day to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 252..276

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

                                  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

                                          Overview.prototype._packKeys = function (key, last) {
                                            if (last) {
                                              if (this._multiKeys.key.length > 0) {
                                                this._getKeySizeAndType(this._multiKeys.key, false);
                                              }
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 1 day to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 406..421

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

                                  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 Overview, StringDecoder, eventemitter, exec, fs, hbs, sd, _, __bind = function (fn, me) {
                                            return function () {
                                              return fn.apply(me, arguments);
                                            };
                                          }, __hasProp = {}.hasOwnProperty, __extends = function (child, parent) {
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 7 hrs to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 2..5

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

                                  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

                                          Overview.prototype._formatByte = function (bytes) {
                                            var i, k, sizes;
                                            if (bytes === 0) {
                                              return '0 Byte';
                                            }
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 5 hrs to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 768..777

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

                                  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.express.get('/:type', function (_this) {
                                              return function (req, res, next) {
                                                return res.sendfile('./static/html/' + req.params.type + 'overview.html', function (error) {
                                                  if (error != null) {
                                                    next();
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 2 hrs to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 305..313

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

                                  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

                                          Overview.prototype._catSize = function (data) {
                                            var startindex, term;
                                            term = 'serializedlength';
                                            startindex = data.indexOf(term);
                                            startindex += term.length + 1;
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 2 hrs to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 473..479

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 81.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                            this.express.get('/', function (_this) {
                                              return function (req, res) {
                                                res.sendfile('./static/html/keyoverview.html', function (error) {
                                                  if (error != null) {
                                                    res.redirect(307, '/init');
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 3 other locations - About 2 hrs to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 234..242
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 243..251
                                  test-set/redis_key_overview-master/index-flx.js on lines 263..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 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 4 locations. Consider refactoring.
                                  Open

                                            this.express.get('/init', function (_this) {
                                              return function (req, res) {
                                                res.sendfile('./static/html/init.html', function (error) {
                                                  if (error != null) {
                                                    res.send(500, 'Fatal Error: Init file is missing!');
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 3 other locations - About 2 hrs to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 234..242
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 243..251
                                  test-set/redis_key_overview-master/index-flx.js on lines 272..280

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

                                    app.use(function (req, res, next) {
                                      res.header('Access-Control-Allow-Origin', '*');
                                      res.header('Access-Control-Allow-Methods', 'PUT, DELETE, POST, GET, OPTIONS');
                                      res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
                                      next();
                                  Severity: Major
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 1 hr to fix
                                  test-set/redis_key_overview-master/index.js on lines 53..58

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

                                            /*msg._sign.*/_finCreating = function (_this) {
                                              return function () {
                                                console.log('key file ready');
                                                _this.initStatus.initializing = false;
                                              };
                                  Severity: Minor
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 45 mins to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 669..674

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

                                  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.express.all('*', function (_this) {
                                              return function (req, res) {
                                                res.send(404, 'File not found');
                                              };
                                            }(this));
                                  Severity: Minor
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 40 mins to fix
                                  test-set/redis_key_overview-master/modules/keyoverview.js on lines 314..318

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

                                  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

                                    _defaults = {
                                      'redis': {},
                                      'server': { 'port': 3000 },
                                      'keyoverview': {
                                        'keyfilename': 'keys.csv',
                                  Severity: Minor
                                  Found in test-set/redis_key_overview-master/index-flx.js and 1 other location - About 35 mins to fix
                                  test-set/redis_key_overview-master/index.js on lines 21..31

                                  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