opsforgeio/cabot

View on GitHub

Showing 1,637 of 1,637 total issues

Function _clear has 77 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _clear: function(event, noPropagation) {

        this.reverting = false;
        // We delay all events that have to be triggered to after the point where the placeholder has been removed and
        // everything else normalized again
Severity: Major
Found in cabot/static/theme/js/jquery-ui.js - About 3 hrs to fix

    Function $ has 77 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        this.$ = function ( sSelector, oOpts )
        {
          var i, iLen, a = [], tr;
          var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
          var aoData = oSettings.aoData;
    Severity: Major
    Found in cabot/static/theme/js/jquery.dataTables.min.js - About 3 hrs to fix

      Function _pathToRelative has 77 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              pathToRelative = R._pathToRelative = function (pathArray) {
                  var pth = paths(pathArray);
                  if (pth.rel) {
                      return pathClone(pth.rel);
                  }
      Severity: Major
      Found in cabot/static/arachnys/js/raphael.js - About 3 hrs to fix

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

            _activate: function(event) {
                var draggable = $.ui.ddmanager.current;
                if(this.options.activeClass) {
                    this.element.addClass(this.options.activeClass);
                }
        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 2010..2018

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

        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

                    target.drawLine(
                        Math.round((q2 - minValue) * unitSize + canvasLeft),
                        Math.round(canvasHeight * 0.1),
                        Math.round((q2 - minValue) * unitSize + canvasLeft),
                        Math.round(canvasHeight * 0.9),
        Severity: Major
        Found in cabot/static/theme/js/jquery.sparkline.min.js and 2 other locations - About 3 hrs to fix
        cabot/static/theme/js/jquery.sparkline.min.js on lines 2499..2504
        cabot/static/theme/js/jquery.sparkline.min.js on lines 2512..2516

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

        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

                    target.drawLine(Math.round((rwhisker - minValue) * unitSize + canvasLeft),
                        Math.round(canvasHeight / 2),
                        Math.round((q3 - minValue) * unitSize + canvasLeft),
                        Math.round(canvasHeight / 2),
                        options.get('lineColor')).append();
        Severity: Major
        Found in cabot/static/theme/js/jquery.sparkline.min.js and 2 other locations - About 3 hrs to fix
        cabot/static/theme/js/jquery.sparkline.min.js on lines 2499..2504
        cabot/static/theme/js/jquery.sparkline.min.js on lines 2524..2529

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

        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 (hoset + that.size.height >= that.parentData.height) {
                    that.size.height = that.parentData.height - hoset;
                    if (pRatio) {
                        that.size.width = that.size.height * that.aspectRatio;
                    }
        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 3051..3056

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

        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

                    target.drawLine(
                        Math.round((lwhisker - minValue) * unitSize + canvasLeft),
                        Math.round(canvasHeight / 2),
                        Math.round((q1 - minValue) * unitSize + canvasLeft),
                        Math.round(canvasHeight / 2),
        Severity: Major
        Found in cabot/static/theme/js/jquery.sparkline.min.js and 2 other locations - About 3 hrs to fix
        cabot/static/theme/js/jquery.sparkline.min.js on lines 2512..2516
        cabot/static/theme/js/jquery.sparkline.min.js on lines 2524..2529

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

        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

                next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
                    "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" +
                    " title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>" :
                    (hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+ nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>"));
        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 9231..9234

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

        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 (this.options.hideHover !== 'always') {
                this.hover = new Morris.Hover({
                  parent: this.el
                });
                this.on('hovermove', this.onHoverMove);
        Severity: Major
        Found in cabot/static/arachnys/js/morris.js and 1 other location - About 3 hrs to fix
        cabot/static/arachnys/js/morris.js on lines 1301..1308

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

        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 (woset + that.size.width >= that.parentData.width) {
                    that.size.width = that.parentData.width - woset;
                    if (pRatio) {
                        that.size.height = that.size.width / that.aspectRatio;
                    }
        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 3058..3063

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

        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

            _deactivate: function(event) {
                var draggable = $.ui.ddmanager.current;
                if(this.options.activeClass) {
                    this.element.removeClass(this.options.activeClass);
                }
        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 2000..2008

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

        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 (this.options.hideHover !== 'always') {
                this.hover = new Morris.Hover({
                  parent: this.el
                });
                this.on('hovermove', this.onHoverMove);
        Severity: Major
        Found in cabot/static/arachnys/js/morris.js and 1 other location - About 3 hrs to fix
        cabot/static/arachnys/js/morris.js on lines 659..666

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

        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

                prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
                    "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" +
                    " title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>" :
                    (hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+ prevText +"'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>"));
        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 9241..9244

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

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

            function _fnSortAttachListener ( oSettings, nNode, iDataIndex, fnCallback )
            {
              _fnBindAction( nNode, {}, function (e) {
                /* If the column is not sortable - don't to anything */
                if ( oSettings.aoColumns[iDataIndex].bSortable === false )
        Severity: Major
        Found in cabot/static/theme/js/jquery.dataTables.min.js - About 3 hrs to fix

          Function albersUsa has 76 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            d3.geo.albersUsa = function() {
              var lower48 = d3.geo.albers();
              var alaska = d3.geo.conicEqualArea().rotate([ 154, 0 ]).center([ -2, 58.5 ]).parallels([ 55, 65 ]);
              var hawaii = d3.geo.conicEqualArea().rotate([ 157, 0 ]).center([ -3, 19.9 ]).parallels([ 8, 18 ]);
              var point, pointStream = {
          Severity: Major
          Found in cabot/static/arachnys/js/d3.js - About 3 hrs to fix

            Function d3_geo_resample has 76 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function d3_geo_resample(project) {
                var δ2 = .5, cosMinDistance = Math.cos(30 * d3_radians), maxDepth = 16;
                function resample(stream) {
                  return (maxDepth ? resampleRecursive : resampleNone)(stream);
                }
            Severity: Major
            Found in cabot/static/arachnys/js/d3.js - About 3 hrs to fix

              Function Sizzle has 76 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function Sizzle( selector, context, results, seed ) {
                var match, elem, m, nodeType,
                  // QSA vars
                  i, groups, old, nid, newContext, newSelector;
              
              
              Severity: Major
              Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 3 hrs to fix

                Function _mouseDrag has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _mouseDrag: function(event) {
                        var i, item, itemElement, intersection,
                            o = this.options,
                            scrolled = false;
                
                
                Severity: Major
                Found in cabot/static/theme/js/jquery-ui.js - About 3 hrs to fix

                  Function _mouseStart has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _mouseStart: function(event, overrideHandle, noActivation) {
                  
                          var i, body,
                              o = this.options;
                  
                  
                  Severity: Major
                  Found in cabot/static/theme/js/jquery-ui.js - About 3 hrs to fix
                    Severity
                    Category
                    Status
                    Source
                    Language