opsforgeio/cabot

View on GitHub

Showing 1,637 of 1,637 total issues

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

        if ( factor.from.x !== factor.to.x ) {
            props = props.concat( hProps );
            el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
            el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
        }
Severity: Major
Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 3 hrs to fix
cabot/static/theme/js/jquery-ui.js on lines 11126..11130

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

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

    while (lArc.circle && abs(x - lArc.circle.x) < ε && abs(y - lArc.circle.cy) < ε) {
      previous = lArc.P;
      disappearing.unshift(lArc);
      d3_geom_voronoiDetachBeach(lArc);
      lArc = previous;
Severity: Major
Found in cabot/static/arachnys/js/d3.js and 1 other location - About 3 hrs to fix
cabot/static/arachnys/js/d3.js on lines 4835..4840

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

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

            child.to = {
                height: c_original.height * factor.to.y,
                width: c_original.width * factor.to.x,
                outerHeight: c_original.height * factor.to.y,
                outerWidth: c_original.width * factor.to.x
Severity: Major
Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 3 hrs to fix
cabot/static/theme/js/jquery-ui.js on lines 11186..11191

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

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

            child.from = {
                height: c_original.height * factor.from.y,
                width: c_original.width * factor.from.x,
                outerHeight: c_original.outerHeight * factor.from.y,
                outerWidth: c_original.outerWidth * factor.from.x
Severity: Major
Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 3 hrs to fix
cabot/static/theme/js/jquery-ui.js on lines 11192..11197

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

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 ( factor.from.y !== factor.to.y ) {
            props = props.concat( vProps );
            el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );
            el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );
        }
Severity: Major
Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 3 hrs to fix
cabot/static/theme/js/jquery-ui.js on lines 11133..11137

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

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

    while (rArc.circle && abs(x - rArc.circle.x) < ε && abs(y - rArc.circle.cy) < ε) {
      next = rArc.N;
      disappearing.push(rArc);
      d3_geom_voronoiDetachBeach(rArc);
      rArc = next;
Severity: Major
Found in cabot/static/arachnys/js/d3.js and 1 other location - About 3 hrs to fix
cabot/static/arachnys/js/d3.js on lines 4826..4831

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

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

    _mouseDrag: function(event) {

        this.dragged = true;

        if (this.options.disabled) {
Severity: Major
Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

    Function Datepicker has 74 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function Datepicker() {
        this._curInst = null; // The current instance in use
        this._keyEvent = false; // If the last event was a key event
        this._disabledInputs = []; // List of date picker inputs that have been disabled
        this._datepickerShowing = false; // True if the popup picker is showing , false if not
    Severity: Major
    Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

      Function d3_scale_ordinal has 74 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function d3_scale_ordinal(domain, ranger) {
          var index, range, rangeBand;
          function scale(x) {
            return range[((index.get(x) || ranger.t === "range" && index.set(x, domain.push(x))) - 1) % range.length];
          }
      Severity: Major
      Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

        Function buildFragment has 74 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          buildFragment: function( elems, context, scripts, selection ) {
            var j, elem, contains,
              tmp, tag, tbody, wrap,
              l = elems.length,
        
        
        Severity: Major
        Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 2 hrs to fix

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

                                  var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,
                                      scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft,
                                      x = e.clientX + scrollX,
                                      y = e.clientY + scrollY;
          Severity: Major
          Found in cabot/static/arachnys/js/raphael.js and 1 other location - About 2 hrs to fix
          cabot/static/arachnys/js/raphael.js on lines 2269..2272

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

          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

              affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
                false    : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
                'bottom' : offsetTop != null && scrollTop <= offsetTop ?
                'top'    : false
          Severity: Major
          Found in cabot/static/theme/js/bootstrap.js and 1 other location - About 2 hrs to fix
          cabot/static/bootstrap/js/bootstrap.js on lines 1539..1541

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

          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

              var affix = this.unpin   != null && (scrollTop + this.unpin <= position.top) ? false :
                          offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
                          offsetTop    != null && (scrollTop <= offsetTop) ? 'top' : false
          Severity: Major
          Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 2 hrs to fix
          cabot/static/theme/js/bootstrap.js on lines 1978..1981

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

          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

                              var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,
                                  scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft,
                                  x = e.clientX + scrollX,
                                  y = e.clientY + scrollY;
          Severity: Major
          Found in cabot/static/arachnys/js/raphael.js and 1 other location - About 2 hrs to fix
          cabot/static/arachnys/js/raphael.js on lines 2241..2244

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

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

              _create: function() {
                  this.activeMenu = this.element;
                  // flag used to prevent firing of the click handler
                  // as the event bubbles up through nested menus
                  this.mouseHandled = false;
          Severity: Major
          Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

            Function d3_locale_numberFormat has 73 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function d3_locale_numberFormat(locale) {
                var locale_decimal = locale.decimal, locale_thousands = locale.thousands, locale_grouping = locale.grouping, locale_currency = locale.currency, formatGroup = locale_grouping ? function(value) {
                  var i = value.length, t = [], j = 0, g = locale_grouping[0];
                  while (i > 0 && g > 0) {
                    t.push(value.substring(i -= g, i + g));
            Severity: Major
            Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

              Function add has 73 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                add: function( elem, types, handler, data, selector ) {
                  var tmp, events, t, handleObjIn,
                    special, eventHandle, handleObj,
                    handlers, type, namespaces, origType,
                    elemData = jQuery._data( elem );
              Severity: Major
              Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 2 hrs to fix

                Function widget has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                $.widget = function( name, base, prototype ) {
                    var fullName, existingConstructor, constructor, basePrototype,
                        // proxiedPrototype allows the provided prototype to remain unmodified
                        // so that it can be used as a mixin for multiple widgets (#8876)
                        proxiedPrototype = {},
                Severity: Major
                Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

                  Function graticule has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    d3.geo.graticule = function() {
                      var x1, x0, X1, X0, y1, y0, Y1, Y0, dx = 10, dy = dx, DX = 90, DY = 360, x, y, X, Y, precision = 2.5;
                      function graticule() {
                        return {
                          type: "MultiLineString",
                  Severity: Major
                  Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

                    Function d3_geom_voronoiConnectEdge has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function d3_geom_voronoiConnectEdge(edge, extent) {
                        var vb = edge.b;
                        if (vb) return true;
                        var va = edge.a, x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], lSite = edge.l, rSite = edge.r, lx = lSite.x, ly = lSite.y, rx = rSite.x, ry = rSite.y, fx = (lx + rx) / 2, fy = (ly + ry) / 2, fm, fb;
                        if (ry === ly) {
                    Severity: Major
                    Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix
                      Severity
                      Category
                      Status
                      Source
                      Language