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

        if (adjustBySize) {
          if (logAttr) {
            if (distributedAttr) {
              return new this.logAttraction_degreeDistributed_antiCollision(c);
            } else {
prototypes/express/src/console/sigma/plugins/sigma.layout.forceAtlas2/sigma.layout.forceAtlas2.js on lines 445..459

Duplicated Code

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

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

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

Tuning

This issue has a mass of 80.

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

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

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

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

Refactorings

Further Reading

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

      if (_settings('mouseEnabled'))
        _self.dispatchEvent('click', {
          x: sigma.utils.getX(e) - e.target.width / 2,
          y: sigma.utils.getY(e) - e.target.height / 2
        });
prototypes/express/src/console/sigma/src/captors/sigma.captors.mouse.js on lines 78..82

Duplicated Code

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

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

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

Tuning

This issue has a mass of 80.

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

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

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

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

Refactorings

Further Reading

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

  d3.layout.hierarchy = function() {
    var sort = d3_layout_hierarchySort, children = d3_layout_hierarchyChildren, value = d3_layout_hierarchyValue;
    function hierarchy(root) {
      var stack = [ root ], nodes = [], node;
      root.depth = 0;
Severity: Major
Found in lib/graph-printer/old/bower_components/d3/d3.js - About 2 hrs to fix

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

          linRepulsion_antiCollision: function(c) {
            this.coefficient = c;
            this.apply_nn = function(n1, n2) {
              var factor;
    
    

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

        if (e.t > 0) {
          color = one.color('rgb(255, 0, 73)').value(- 1 + e.t * 0.05, true).css();
          e.t -= 1;
        }
        else
      Severity: Major
      Found in prototypes/express/src/console/script.js and 1 other location - About 2 hrs to fix
      prototypes/express/src/console/script.js on lines 200..205

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 79.

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

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

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

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

      Refactorings

      Further Reading

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

        if (e.t > 0) {
          color = one.color('rgb(255, 0, 73)').value(- 1 + e.t * 0.05, true).css();
          e.t -= 1;
        }
        else
      Severity: Major
      Found in prototypes/express/src/console/script.js and 1 other location - About 2 hrs to fix
      prototypes/express/src/console/script.js on lines 255..260

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 79.

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

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

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

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

      Refactorings

      Further Reading

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

        sigma.utils.getY = function(e) {
          return (
            (e.offsetY !== undefined && e.offsetY) ||
            (e.layerY !== undefined && e.layerY) ||
            (e.clientY !== undefined && e.clientY)
      prototypes/express/src/console/sigma/src/utils/sigma.utils.js on lines 178..184

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 79.

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

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

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

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

      Refactorings

      Further Reading

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

            for (var j = 0; j < tree.dep.length; j++) {
              if (tree.dep[j].to === tree.ids[i].id) {
                // console.log("   + ", tree.dep[j]);
                _up.push(j);
              }
      Severity: Major
      Found in prototypes/blender.old/lib/reduction.js and 1 other location - About 2 hrs to fix
      prototypes/blender.old/lib/reduction.js on lines 43..48

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 79.

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

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

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

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

      Refactorings

      Further Reading

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

        sigma.utils.getX = function(e) {
          return (
            (e.offsetX !== undefined && e.offsetX) ||
            (e.layerX !== undefined && e.layerX) ||
            (e.clientX !== undefined && e.clientX)
      prototypes/express/src/console/sigma/src/utils/sigma.utils.js on lines 192..198

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 79.

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

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

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

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

      Refactorings

      Further Reading

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

            for (var j = 0; j < tree.dep.length; j++) {
              if (tree.dep[j].name === tree.ids[i].id) {
                // console.log("   - ", tree.dep[j]);
                _down.push(j);
              }
      Severity: Major
      Found in prototypes/blender.old/lib/reduction.js and 1 other location - About 2 hrs to fix
      prototypes/blender.old/lib/reduction.js on lines 49..54

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 79.

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

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

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

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

      Refactorings

      Further Reading

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

        d3.layout.stack = function() {
          var values = d3_identity, order = d3_layout_stackOrderDefault, offset = d3_layout_stackOffsetZero, out = d3_layout_stackOut, x = d3_layout_stackX, y = d3_layout_stackY;
          function stack(data, index) {
            var series = data.map(function(d, i) {
              return values.call(stack, d, i);
      Severity: Major
      Found in lib/graph-printer/old/bower_components/d3/d3.js - About 2 hrs to fix

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

        exports = module.exports = function(options) {
          var config = Hash({
            rules: {},
            stylesheets: ['/endpoint/css/reset.css',
                            '/endpoint/css/style.css'],
        Severity: Major
        Found in test-set/express-endpoint-master/lib/middleware/errorHandler.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

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

                  if (!color)
                    switch (settings('edgeColor')) {
                      case 'source':
                        color = source.color || settings('defaultNodeColor');
                        break;
            prototypes/express/src/console/sigma/src/renderers/webgl/sigma.webgl.edges.def.js on lines 26..37
            prototypes/express/src/console/sigma/src/renderers/webgl/sigma.webgl.edges.fast.js on lines 23..34

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 78.

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

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

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

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

            Refactorings

            Further Reading

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

                  if (!color)
                    switch (settings('edgeColor')) {
                      case 'source':
                        color = source.color || settings('defaultNodeColor');
                        break;
            prototypes/express/src/console/sigma/src/renderers/webgl/sigma.webgl.edges.arrow.js on lines 27..38
            prototypes/express/src/console/sigma/src/renderers/webgl/sigma.webgl.edges.def.js on lines 26..37

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 78.

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

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

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

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

            Refactorings

            Further Reading

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

                  if (!color)
                    switch (settings('edgeColor')) {
                      case 'source':
                        color = source.color || settings('defaultNodeColor');
                        break;
            prototypes/express/src/console/sigma/src/renderers/webgl/sigma.webgl.edges.arrow.js on lines 27..38
            prototypes/express/src/console/sigma/src/renderers/webgl/sigma.webgl.edges.fast.js on lines 23..34

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 78.

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

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

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

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

            Refactorings

            Further Reading

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

              return {
                id: meHash,
                nodes: [
                  cons.Node(undefined, "this." + node.name, meHash, "MemberExpression"),
                  cons.Node(undefined, "this", thisHash, "ThisExpression")
            Severity: Major
            Found in prototypes/blender/lib/extraction.js and 1 other location - About 2 hrs to fix
            prototypes/blender.old/index.js on lines 223..233

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 78.

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

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

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

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

            Refactorings

            Further Reading

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

                  return {
                    id: meHash,
                    nodes: [
                      depB.node(undefined, "this." + node.name, meHash, "MemberExpression"),
                      depB.node(undefined, "this", thisHash, "ThisExpression")
            Severity: Major
            Found in prototypes/blender.old/index.js and 1 other location - About 2 hrs to fix
            prototypes/blender/lib/extraction.js on lines 180..190

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 78.

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

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

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

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

            Refactorings

            Further Reading

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

            function extractDown(tree, id) {
            
              var _n = {};
              var __n = {};
              var _d = {};
            Severity: Major
            Found in prototypes/blender.old/lib/extraction.js - About 2 hrs to fix

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

              function registerScp(name, fn, scp) {
                return b.expressionStatement(
                  b.callExpression(
                    b.memberExpression(b.identifier("flx"), b.identifier("register"), false),
                    [
              Severity: Major
              Found in prototypes/blender.old/lib/builders.js and 2 other locations - About 2 hrs to fix
              prototypes/blender/lib/templates.js on lines 44..55
              prototypes/shreder/lib/builders.js on lines 59..70

              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

              Severity
              Category
              Status
              Source
              Language