etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

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

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

        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

Function expose has 505 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var expose = function(model, schema, opts) {

  var liveQueries = {};
  var modelName = model.modelName;

Severity: Major
Found in test-set/Moonridge-master/mr-rpc-methods.js - About 2 days to fix

    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

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

    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.initInitVars = function() {
          this._parseCSV = {
            remainingBytes: [],
            nextCharCouldBeEscaped: false,
            value: false,
    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 168..238

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

    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

            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

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

      module.exports = function(config) {
        var app = express(),
          safeUserFields = config.safeUserFields ? config.safeUserFields : "name email roles",
          db;
      
      
      Severity: Major
      Found in test-set/express-couchUser-master/index.js - About 2 days to fix

        File sigma.layout.forceAtlas2.js has 805 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * Mathieu Jacomy @ Sciences Po Médialab & WebAtlas
         * (requires sigma.js to be loaded)
         */
        ;(function(undefined) {

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

          function plot(options) {
            if (options && options.label) {  
              this._label = options.label;
              options.label = undefined;
            }
          Severity: Major
          Found in prototypes/fluxions/bench/diffInstructions/pgfplots.js and 1 other location - About 1 day to fix
          prototypes/fluxions/bench/distribution/pgfplots.js on lines 75..105

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

          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 plot(options) {
            if (options && options.label) {  
              this._label = options.label;
              options.label = undefined;
            }
          Severity: Major
          Found in prototypes/fluxions/bench/distribution/pgfplots.js and 1 other location - About 1 day to fix
          prototypes/fluxions/bench/diffInstructions/pgfplots.js on lines 89..119

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

          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 keyoverview.js has 755 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          (function() {
            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) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
          Severity: Major
          Found in test-set/redis_key_overview-master/modules/keyoverview.js - About 1 day to fix

            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('/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/modules/keyoverview.js and 1 other location - About 1 day to fix
            test-set/redis_key_overview-master/index-flx.js on lines 306..333

            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

                if (val.match(/^#/)) {
                  val = (val || '').replace(/^#/, '');
                  result = (val.length === 3) ?
                    [
                      parseInt(val.charAt(0) + val.charAt(0), 16),
            prototypes/express/src/console/sigma/plugins/sigma.plugins.animate/sigma.plugins.animate.js on lines 25..47

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

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

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

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

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

            Refactorings

            Further Reading

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

                if (val.match(/^#/)) {
                  val = (val || '').replace(/^#/, '');
                  result = (val.length === 3) ?
                    [
                      parseInt(val.charAt(0) + val.charAt(0), 16),
            prototypes/express/src/console/sigma/src/utils/sigma.utils.js on lines 128..150

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

            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