etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

File d3.js has 9223 lines of code (exceeds 250 allowed). Consider refactoring.
Open

!function() {
  var d3 = {
    version: "3.4.11"
  };
  if (!Date.now) Date.now = function() {
Severity: Major
Found in lib/graph-printer/old/bower_components/d3/d3.js - About 3 wks to fix

    File jquery.js has 6570 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * jQuery JavaScript Library v1.9.1
     * http://jquery.com/
     *
     * Includes Sizzle.js
    Severity: Major
    Found in test-set/gifsockets-server-master/public/js/jquery.js - About 2 wks to fix

      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/modules/keyoverview.js and 1 other location - About 4 days to fix
      test-set/redis_key_overview-master/index-flx.js on lines 349..432

      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.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/modules/keyoverview.js and 1 other location - About 4 days to fix
      test-set/redis_key_overview-master/index-flx.js on lines 733..768

      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

      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/modules/keyoverview.js and 1 other location - About 4 days to fix
      test-set/redis_key_overview-master/index-flx.js on lines 596..645

      Duplicated Code

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

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

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

      Tuning

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

      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

      File bootstrap.js has 1517 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* ===================================================
       * bootstrap-transition.js v2.3.2
       * http://getbootstrap.com/2.3.2/javascript.html#transitions
       * ===================================================
       * Copyright 2013 Twitter, Inc.
      Severity: Major
      Found in test-set/gifsockets-server-master/public/js/bootstrap.js - About 4 days to fix

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

        function extractUp(tree, id) {
        
          var _n = {};
          var __n = {};
          var _d = {};
        Severity: Major
        Found in prototypes/blender.old/lib/extraction.js and 1 other location - About 3 days to fix
        prototypes/blender/lib/extract.js on lines 104..185

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

        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 extractUp(tree, id) {
        
          var _n = {};
          var __n = {};
          var _d = {};
        Severity: Major
        Found in prototypes/blender/lib/extract.js and 1 other location - About 3 days to fix
        prototypes/blender.old/lib/extraction.js on lines 82..163

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

        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/modules/keyoverview.js and 1 other location - About 3 days to fix
        test-set/redis_key_overview-master/index-flx.js on lines 449..504

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

        Function ForceAtlas2 has 630 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          forceatlas2.ForceAtlas2 = function(graph, options) {
            var self = this;
            this.graph = graph;
        
            this.p = sigma.utils.extend(

          Function expose has a Cognitive Complexity of 153 (exceeds 5 allowed). Consider refactoring.
          Open

          var expose = function(model, schema, opts) {
          
            var liveQueries = {};
            var modelName = model.modelName;
          
          
          Severity: Minor
          Found in test-set/Moonridge-master/mr-rpc-methods.js - About 3 days 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._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._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/modules/keyoverview.js and 1 other location - About 3 days to fix
          test-set/redis_key_overview-master/index-flx.js on lines 512..550

          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

          function extractUpOnly(tree, id) {
          
            var _n = {};
            var __n = {};
            var _d = {};
          Severity: Major
          Found in prototypes/blender.old/lib/extraction.js and 1 other location - About 3 days to fix
          prototypes/blender/lib/extract.js on lines 187..268

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

          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 extractUpOnly(tree, id) {
          
            var _n = {};
            var __n = {};
            var _d = {};
          Severity: Major
          Found in prototypes/blender/lib/extract.js and 1 other location - About 3 days to fix
          prototypes/blender.old/lib/extraction.js on lines 165..246

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

          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/modules/keyoverview.js and 1 other location - About 2 days to fix
          test-set/redis_key_overview-master/index-flx.js on lines 551..595

          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

          Severity
          Category
          Status
          Source
          Language