etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

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

      if (!req.session || !req.session.user) {
        return res.send(401,JSON.stringify({ok:false, message: "Not currently logged in."}));
      }
Severity: Major
Found in test-set/express-couchUser-master/index.js and 4 other locations - About 1 hr to fix
test-set/express-couchUser-master/index.js on lines 196..198
test-set/express-couchUser-master/index.js on lines 312..314
test-set/express-couchUser-master/index.js on lines 372..374
test-set/express-couchUser-master/index.js on lines 471..473

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

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 5 locations. Consider refactoring.
Open

      if (!req.body || !req.body.email) {
        return res.send(400, JSON.stringify({ok: false, message: 'An email address must be passed as part of the query string before a verification code can be sent.'}));
      }
Severity: Major
Found in test-set/express-couchUser-master/index.js and 4 other locations - About 1 hr to fix
test-set/express-couchUser-master/index.js on lines 196..198
test-set/express-couchUser-master/index.js on lines 363..365
test-set/express-couchUser-master/index.js on lines 372..374
test-set/express-couchUser-master/index.js on lines 471..473

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

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 5 locations. Consider refactoring.
Open

    if (!req.session || !req.session.user) {
      return res.send(401,JSON.stringify({ok:false, message: "You must be logged in to use this function"}));
    }
Severity: Major
Found in test-set/express-couchUser-master/index.js and 4 other locations - About 1 hr to fix
test-set/express-couchUser-master/index.js on lines 196..198
test-set/express-couchUser-master/index.js on lines 312..314
test-set/express-couchUser-master/index.js on lines 363..365
test-set/express-couchUser-master/index.js on lines 372..374

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

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 5 locations. Consider refactoring.
Open

    if (!req.session || !req.session.user) {
      return res.send(401,JSON.stringify({ok:false, message: "You must be logged in to use this function."}));
    }
Severity: Major
Found in test-set/express-couchUser-master/index.js and 4 other locations - About 1 hr to fix
test-set/express-couchUser-master/index.js on lines 196..198
test-set/express-couchUser-master/index.js on lines 312..314
test-set/express-couchUser-master/index.js on lines 363..365
test-set/express-couchUser-master/index.js on lines 471..473

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

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 5 locations. Consider refactoring.
Open

    if (!req.body || !req.body.email) {
      return res.send(400, JSON.stringify({ok: false, message: 'An email address is required.'}));
    }
Severity: Major
Found in test-set/express-couchUser-master/index.js and 4 other locations - About 1 hr to fix
test-set/express-couchUser-master/index.js on lines 312..314
test-set/express-couchUser-master/index.js on lines 363..365
test-set/express-couchUser-master/index.js on lines 372..374
test-set/express-couchUser-master/index.js on lines 471..473

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

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 getScopeName(scope) {
  if (scope.block.id)
    return scope.block.id.name;
  if (scope.block.type === 'Program')
    return 'Program';
Severity: Major
Found in lib/analyzer/helpers.js and 1 other location - About 1 hr to fix
lib/mapper/helpers.js on lines 11..18

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

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 (body.rows && body.rows.length === 0) {
          return res.send(500, JSON.stringify({ok: false, message: 'Not Found'}));
        }
Severity: Major
Found in test-set/express-couchUser-master/index.js and 1 other location - About 1 hr to fix
test-set/express-couchUser-master/index.js on lines 209..211

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

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 (body.rows && body.rows.length === 0) {
        return res.send(500, JSON.stringify({ ok: false, message: 'No user found with that email.' }));
      }
Severity: Major
Found in test-set/express-couchUser-master/index.js and 1 other location - About 1 hr to fix
test-set/express-couchUser-master/index.js on lines 294..296

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

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

    $.ajax("/initstatus").done(function(data, textstatus, jqXHR) {
      if (data === "FIN") {
        $('#msgs').append("<p>FINISHED</p>");
        $('#msgs').append("<a class='btn btn-primary' href='/'>Show Overview</a>");
        _clear = true;
Severity: Major
Found in test-set/redis_key_overview-master/static/js/init.js and 1 other location - About 1 hr to fix
test-set/redis_key_overview-master/static/js/init.js on lines 7..20

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

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 getScopeName(scope) {
  if (scope.block.id)
    return scope.block.id.name;
  if (scope.block.type === 'Program')
    return 'Program';
Severity: Major
Found in lib/mapper/helpers.js and 1 other location - About 1 hr to fix
lib/analyzer/helpers.js on lines 14..21

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

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

    $.ajax("/initstatuspercent").done(function(data, textstatus, jqXHR) {
      $("#percent").html("Status: " + data + " %");
      if (data === "100") {
        _requestStatus();
      } else {
Severity: Major
Found in test-set/redis_key_overview-master/static/js/init.js and 1 other location - About 1 hr to fix
test-set/redis_key_overview-master/static/js/init.js on lines 24..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 58.

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

  function d3_selection_on(type, listener, capture) {
    var name = "__on" + type, i = type.indexOf("."), wrap = d3_selection_onListener;
    if (i > 0) type = type.substring(0, i);
    var filter = d3_selection_onFilters.get(type);
    if (filter) type = filter, wrap = d3_selection_onFilter;
Severity: Minor
Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

    Function position has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function position(row, u, rect, flush) {
          var i = -1, n = row.length, x = rect.x, y = rect.y, v = u ? round(row.area / u) : 0, o;
          if (u == rect.dx) {
            if (flush || v > rect.dy) v = rect.dy;
            while (++i < n) {
    Severity: Minor
    Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

      Function diagonal has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        d3.svg.diagonal = function() {
          var source = d3_source, target = d3_target, projection = d3_svg_diagonalProjection;
          function diagonal(d, i) {
            var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, {
              x: p0.x,
      Severity: Minor
      Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

        Function apportion has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function apportion(v, w, ancestor) {
              if (w) {
                var vip = v, vop = v, vim = w, vom = vip.parent.children[0], sip = vip.m, sop = vop.m, sim = vim.m, som = vom.m, shift;
                while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) {
                  vom = d3_layout_treeLeft(vom);
        Severity: Minor
        Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

          Function attr has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            d3_transitionPrototype.attr = function(nameNS, value) {
              if (arguments.length < 2) {
                for (value in nameNS) this.attr(value, nameNS[value]);
                return this;
              }
          Severity: Minor
          Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

            Function d3_geom_voronoiCloseCells has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function d3_geom_voronoiCloseCells(extent) {
                var x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], x2, y2, x3, y3, cells = d3_geom_voronoiCells, iCell = cells.length, cell, iHalfEdge, halfEdges, nHalfEdges, start, end;
                while (iCell--) {
                  cell = cells[iCell];
                  if (!cell || !cell.prepare()) continue;
            Severity: Minor
            Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

              Function d3_geo_centroidRingStart has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function d3_geo_centroidRingStart() {
                  var λ00, φ00, x0, y0, z0;
                  d3_geo_centroid.point = function(λ, φ) {
                    λ00 = λ, φ00 = φ;
                    d3_geo_centroid.point = nextPoint;
              Severity: Minor
              Found in lib/graph-printer/old/bower_components/d3/d3.js - About 1 hr to fix

                Function fix has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    fix: function( event ) {
                        if ( event[ jQuery.expando ] ) {
                            return event;
                        }
                
                
                Severity: Minor
                Found in test-set/gifsockets-server-master/public/js/jquery.js - About 1 hr to fix

                  Function finish has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      finish: function( type ) {
                          if ( type !== false ) {
                              type = type || "fx";
                          }
                          return this.each(function() {
                  Severity: Minor
                  Found in test-set/gifsockets-server-master/public/js/jquery.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language