etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

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

  if (msg)
    if (Array.isArray(msg.dest)) for (var i = 0; i < msg.dest.length; i++) {
      recvMsg(m(msg.dest[i], msg.body));
    } else {
      recvMsg(msg);
Severity: Major
Found in prototypes/fluxions/lib/flx_setTimeout.js and 3 other locations - About 2 hrs to fix
prototypes/fluxions/lib/flx.js on lines 40..45
prototypes/fluxions/lib/flx_chain.js on lines 39..44
prototypes/fluxions/lib/flx_nextTick.js on lines 44..49

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

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

  if (msg)
    if (Array.isArray(msg.dest)) for (var i = 0; i < msg.dest.length; i++) {
      recvMsg(m(msg.dest[i], msg.body));
    } else {
      recvMsg(msg);
Severity: Major
Found in prototypes/fluxions/lib/flx_chain.js and 3 other locations - About 2 hrs to fix
prototypes/fluxions/lib/flx.js on lines 40..45
prototypes/fluxions/lib/flx_nextTick.js on lines 44..49
prototypes/fluxions/lib/flx_setTimeout.js on lines 40..45

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

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 node(node) {
  return safe(node.id) + " [label=<" + node.name + "<br/><font color=\"#404040\" point-size=\"5\">" + node.kind + (node.version ? ("[" + node.version + "]") : "") + "</font><br/><font color=\"#404040\" point-size=\"5\">" + node.id + "</font>>]";
}
Severity: Major
Found in prototypes/blender.old/lib/graphviz.js and 1 other location - About 2 hrs to fix
prototypes/blender/lib/graphviz.js on lines 23..25

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

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 node(node) {
  return safe(node.id) + " [label=<" + node.name + "<br/><font color=\"#404040\" point-size=\"5\">" + node.kind + (node.version ? ("[" + node.version + "]") : "") + "</font><br/><font color=\"#404040\" point-size=\"5\">" + node.id + "</font>>]";
}
Severity: Major
Found in prototypes/blender/lib/graphviz.js and 1 other location - About 2 hrs to fix
prototypes/blender.old/lib/graphviz.js on lines 21..23

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

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

        superMatcher = function( seed, context, xml, results, expandContext ) {
            var elem, j, matcher,
                setMatched = [],
                matchedCount = 0,
                i = "0",
Severity: Major
Found in test-set/gifsockets-server-master/public/js/jquery.js - About 2 hrs to fix

    Function canvas has 63 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      sigma.renderers.canvas = function(graph, camera, settings, options) {
        if (typeof options !== 'object')
          throw 'sigma.renderers.canvas: Wrong arguments.';
    
        if (!(options.container instanceof HTMLElement))

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

      function route(path, next, name) {
        return b.expressionStatement(
          b.callExpression(
            b.memberExpression(b.identifier("web"), b.identifier("route"), false),
            [
      Severity: Major
      Found in prototypes/blender/lib/templates.js and 1 other location - About 2 hrs to fix
      prototypes/blender.old/lib/builders.js on lines 57..68

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

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

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

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

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

      Refactorings

      Further Reading

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

            if (typeof linkStrength === "function") for (i = 0; i < m; ++i) strengths[i] = +linkStrength.call(this, links[i], i); else for (i = 0; i < m; ++i) strengths[i] = linkStrength;
      Severity: Major
      Found in lib/graph-printer/old/bower_components/d3/d3.js and 2 other locations - About 2 hrs to fix
      lib/graph-printer/old/bower_components/d3/d3.js on lines 6238..6238
      lib/graph-printer/old/bower_components/d3/d3.js on lines 6242..6242

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

      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 d3_time_parseWeekNumberSunday(date, string, i) {
          d3_time_numberRe.lastIndex = 0;
          var n = d3_time_numberRe.exec(string.substring(i));
          return n ? (date.U = +n[0], i + n[0].length) : -1;
        }
      Severity: Major
      Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 2 hrs to fix
      lib/graph-printer/old/bower_components/d3/d3.js on lines 2648..2652

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

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

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

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

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

      Refactorings

      Further Reading

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

            if (typeof linkDistance === "function") for (i = 0; i < m; ++i) distances[i] = +linkDistance.call(this, links[i], i); else for (i = 0; i < m; ++i) distances[i] = linkDistance;
      Severity: Major
      Found in lib/graph-printer/old/bower_components/d3/d3.js and 2 other locations - About 2 hrs to fix
      lib/graph-printer/old/bower_components/d3/d3.js on lines 6240..6240
      lib/graph-printer/old/bower_components/d3/d3.js on lines 6242..6242

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

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

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

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

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

      Refactorings

      Further Reading

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

            if (typeof charge === "function") for (i = 0; i < n; ++i) charges[i] = +charge.call(this, nodes[i], i); else for (i = 0; i < n; ++i) charges[i] = charge;
      Severity: Major
      Found in lib/graph-printer/old/bower_components/d3/d3.js and 2 other locations - About 2 hrs to fix
      lib/graph-printer/old/bower_components/d3/d3.js on lines 6238..6238
      lib/graph-printer/old/bower_components/d3/d3.js on lines 6240..6240

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

      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 (!vector) {
            X = - (this.x * cos + this.y * sin) / this.ratio;
            Y = - (this.y * cos - this.x * sin) / this.ratio;
          }
      prototypes/express/src/console/sigma/src/classes/sigma.classes.camera.js on lines 174..177

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

      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 (!vector) {
            X = - (this.x * cos + this.y * sin) / this.ratio;
            Y = - (this.y * cos - this.x * sin) / this.ratio;
          }
      prototypes/express/src/console/sigma/src/classes/sigma.classes.camera.js on lines 146..149

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

      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

      function route(path, next, name) {
        return b.expressionStatement(
          b.callExpression(
            b.memberExpression(b.identifier("web"), b.identifier("route"), false),
            [
      Severity: Major
      Found in prototypes/blender.old/lib/builders.js and 1 other location - About 2 hrs to fix
      prototypes/blender/lib/templates.js on lines 57..68

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

      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 d3_time_parseWeekNumberMonday(date, string, i) {
          d3_time_numberRe.lastIndex = 0;
          var n = d3_time_numberRe.exec(string.substring(i));
          return n ? (date.W = +n[0], i + n[0].length) : -1;
        }
      Severity: Major
      Found in lib/graph-printer/old/bower_components/d3/d3.js and 1 other location - About 2 hrs to fix
      lib/graph-printer/old/bower_components/d3/d3.js on lines 2643..2647

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

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

        function d3_layout_packSiblings(node) {
          if (!(nodes = node.children) || !(n = nodes.length)) return;
          var nodes, xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, a, b, c, i, j, k, n;
          function bound(node) {
            xMin = Math.min(node.x - node.r, xMin);
      Severity: Major
      Found in lib/graph-printer/old/bower_components/d3/d3.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/modules/keyoverview.js - About 2 hrs to fix

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

          module.exports = function getIndexForElement(element, array, sortBy) {
              /**
               *
               * @param first    element of an array
               * @param second element of an array
          Severity: Major
          Found in test-set/Moonridge-master/utils/indexInSortedArray.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 process has 62 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                sigma.renderers.webgl.prototype.process = function() {
                  var a,
                      i,
                      l,
                      k,
                Severity
                Category
                Status
                Source
                Language