etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

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

    db.get('org.couchdb.user:' + req.params.name, function(err,user) {
      if (err) { return res.send(err.status_code ? err.status_code : 500, err); }
      return res.send(200, JSON.stringify({ok: true, user: strip(user) }));
    });
Severity: Major
Found in test-set/express-couchUser-master/index.js and 1 other location - About 2 hrs to fix
test-set/express-couchUser-master/index.js on lines 301..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 76.

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 _Dep(id, to, type) {

  function inspect() {
    return this.id + " ⇢  " + this.to + "[" + this.type + "]";
  }
Severity: Major
Found in prototypes/blender.old/lib/dependency.js and 1 other location - About 2 hrs to fix
prototypes/blender.old/lib/resolution.js on lines 59..72

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

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

      db.insert(user, user._id, function(err,user) {
        if (err) { return res.send(err.status_code ? err.status_code : 500, err); }
        return res.send(200, JSON.stringify({ok: true, user: strip(user) }));
      });
Severity: Major
Found in test-set/express-couchUser-master/index.js and 1 other location - About 2 hrs to fix
test-set/express-couchUser-master/index.js on lines 376..379

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

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('maxEdgeSize') && !settings('minEdgeSize')) {
      c = 1;
      d = 0;
    } else if (settings('maxEdgeSize') === settings('minEdgeSize')) {
      c = 0;
prototypes/express/src/console/sigma/src/middlewares/sigma.middlewares.rescale.js on lines 94..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 76.

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 _Dep(id, to, type) {

  function inspect() {
    return this.id + " ⇢  " + this.to + "[" + this.type + "]";
  }
Severity: Major
Found in prototypes/blender.old/lib/resolution.js and 1 other location - About 2 hrs to fix
prototypes/blender.old/lib/dependency.js on lines 114..127

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

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('maxNodeSize') && !settings('minNodeSize')) {
      a = 1;
      b = 0;
    } else if (settings('maxNodeSize') === settings('minNodeSize')) {
      a = 0;
prototypes/express/src/console/sigma/src/middlewares/sigma.middlewares.rescale.js on lines 105..114

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

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

    function bind(group, groupData) {
      var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), updateNodes = new Array(m), enterNodes = new Array(m), exitNodes = new Array(n), node, nodeData;
      if (key) {
        var nodeByKeyValue = new d3_Map(), dataByKeyValue = new d3_Map(), keyValues = [], keyValue;
        for (i = -1; ++i < n; ) {
Severity: Major
Found in lib/graph-printer/old/bower_components/d3/d3.js - About 2 hrs to fix

    Function ajaxConvert has 51 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function ajaxConvert( s, response ) {
        var conv2, current, conv, tmp,
            converters = {},
            i = 0,
            // Work with a copy of dataTypes in case we need to modify it for conversion
    Severity: Major
    Found in test-set/gifsockets-server-master/public/js/jquery.js - About 2 hrs to fix

      Function internalData has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function internalData( elem, name, data, pvt /* Internal Use Only */ ){
          if ( !jQuery.acceptData( elem ) ) {
              return;
          }
      
      
      Severity: Major
      Found in test-set/gifsockets-server-master/public/js/jquery.js - About 2 hrs to fix

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

        module.exports = function (dataDir) {
        
          if( typeof dataDir === 'undefined' ) {
            throw new Error('Missing data directory');
          }
        Severity: Major
        Found in test-set/node.tingo-rest-master/index.js - About 2 hrs to fix

          Function remove has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              remove: function( elem, types, handler, selector, mappedTypes ) {
                  var j, handleObj, tmp,
                      origCount, t, events,
                      special, handlers, type,
                      namespaces, origType,
          Severity: Major
          Found in test-set/gifsockets-server-master/public/js/jquery.js - About 2 hrs to fix

            Function reduce has 51 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function reduce(tree) {
            
              // _down = {};
              // _up = {}
            
            
            Severity: Major
            Found in prototypes/blender.old/lib/reduction.js - About 2 hrs to fix

              Function _handleStart has 51 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function _handleStart(e) {
                    if (_settings('touchEnabled')) {
                      var x0,
                          x1,
                          y0,

                Function gexf has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  sigma.parsers.gexf = function(target, sig, callback) {
                    var i,
                        l,
                        arr,
                        obj;

                  Function getNodes has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function getNodes(e) {
                        if (e) {
                          mX = 'x' in e.data ? e.data.x : mX;
                          mY = 'y' in e.data ? e.data.y : mY;
                        }

                    Function d3_transitionNode has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function d3_transitionNode(node, i, id, inherit) {
                        var lock = node.__transition__ || (node.__transition__ = {
                          active: 0,
                          count: 0
                        }), transition = lock[id];
                    Severity: Minor
                    Found in lib/graph-printer/old/bower_components/d3/d3.js - About 2 hrs to fix

                      Function chord has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        d3.svg.chord = function() {
                          var source = d3_source, target = d3_target, radius = d3_svg_chordRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
                          function chord(d, i) {
                            var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i);
                            return "M" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.r, s.p1, s.r, s.p0) : curve(s.r, s.p1, t.r, t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(t.r, t.p1, s.r, s.p0)) + "Z";
                      Severity: Minor
                      Found in lib/graph-printer/old/bower_components/d3/d3.js - About 2 hrs to fix

                        Function d3_interpolateTransform has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          function d3_interpolateTransform(a, b) {
                            var s = [], q = [], n, A = d3.transform(a), B = d3.transform(b), ta = A.translate, tb = B.translate, ra = A.rotate, rb = B.rotate, wa = A.skew, wb = B.skew, ka = A.scale, kb = B.scale;
                            if (ta[0] != tb[0] || ta[1] != tb[1]) {
                              s.push("translate(", null, ",", null, ")");
                              q.push({
                        Severity: Minor
                        Found in lib/graph-printer/old/bower_components/d3/d3.js - About 2 hrs to fix

                          Function d3_scale_linear has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            function d3_scale_linear(domain, range, interpolate, clamp) {
                              var output, input;
                              function rescale() {
                                var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear, uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;
                                output = linear(domain, range, uninterpolate, interpolate);
                          Severity: Minor
                          Found in lib/graph-printer/old/bower_components/d3/d3.js - About 2 hrs to fix

                            Function parseArgs has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function parseArgs(args) {
                            
                            
                              function options() {
                              
                            Severity: Minor
                            Found in lib/lib/interface.js - About 2 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language