opsforgeio/cabot

View on GitHub

Showing 1,637 of 1,637 total issues

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

                        t2 = dj.t + abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t);
Severity: Major
Found in cabot/static/arachnys/js/raphael.js and 1 other location - About 1 hr to fix
cabot/static/arachnys/js/raphael.js on lines 1206..1206

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

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

        this.offset = {
            top: this.offset.top - this.margins.top,
            left: this.offset.left - this.margins.left
        };
Severity: Major
Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 1 hr to fix
cabot/static/theme/js/jquery-ui.js on lines 1104..1107

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

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 t1 = di.t + abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t),
Severity: Major
Found in cabot/static/arachnys/js/raphael.js and 1 other location - About 1 hr to fix
cabot/static/arachnys/js/raphael.js on lines 1207..1207

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

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

    GeometryCollection: function(object, listener) {
      var geometries = object.geometries, i = -1, n = geometries.length;
      while (++i < n) d3_geo_streamGeometry(geometries[i], listener);
    }
Severity: Major
Found in cabot/static/arachnys/js/d3.js and 1 other location - About 1 hr to fix
cabot/static/arachnys/js/d3.js on lines 2825..2828

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

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

            && (bbox1.y < bbox2.y2 && bbox1.y > bbox2.y || bbox2.y < bbox1.y2 && bbox2.y > bbox1.y);
Severity: Major
Found in cabot/static/arachnys/js/raphael.js and 1 other location - About 1 hr to fix
cabot/static/arachnys/js/raphael.js on lines 1086..1086

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

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

    setTimeout(function () {
      state == 'loadingText' ?
        $el.addClass(d).attr(d, d) :
        $el.removeClass(d).removeAttr(d);
    }, 0)
Severity: Major
Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
cabot/static/theme/js/bootstrap.js on lines 197..201

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

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

            this.headers.next()
                .each(function() {
                    $( this ).height( Math.max( 0, maxHeight -
                        $( this ).innerHeight() + $( this ).height() ) );
                })
Severity: Major
Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 1 hr to fix
cabot/static/theme/js/jquery-ui.js on lines 14288..14291

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

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

        this.offset = {
            top: this.offset.top - this.margins.top,
            left: this.offset.left - this.margins.left
        };
Severity: Major
Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 1 hr to fix
cabot/static/theme/js/jquery-ui.js on lines 3679..3682

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

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 ( jQuery.isFunction( value ) ) {
      return this.each(function( j ) {
        jQuery( this ).removeClass( value.call( this, j, this.className ) );
      });
    }
Severity: Major
Found in cabot/static/bootstrap/js/jquery-1.10.2.js and 1 other location - About 1 hr to fix
cabot/static/bootstrap/js/jquery-1.10.2.js on lines 4088..4092

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

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

            this.panels.each(function() {
                $( this ).height( Math.max( 0, maxHeight -
                    $( this ).innerHeight() + $( this ).height() ) );
            })
Severity: Major
Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 1 hr to fix
cabot/static/theme/js/jquery-ui.js on lines 6380..6384

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

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 ( jQuery.isFunction( value ) ) {
      return this.each(function( j ) {
        jQuery( this ).addClass( value.call( this, j, this.className ) );
      });
    }
Severity: Major
Found in cabot/static/bootstrap/js/jquery-1.10.2.js and 1 other location - About 1 hr to fix
cabot/static/bootstrap/js/jquery-1.10.2.js on lines 4127..4131

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

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

function _normalizeArguments( effect, options, speed, callback ) {

    // allow passing all options as the first parameter
    if ( $.isPlainObject( effect ) ) {
        options = effect;
Severity: Minor
Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

    Function _refreshItems has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _refreshItems: function(event) {
    
            this.items = [];
            this.containers = [this];
    
    
    Severity: Minor
    Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

      Function fnInit has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            "fnInit": function ( oSettings, nPaging, fnCallbackDraw )
            {
              var oLang = oSettings.oLanguage.oPaginate;
              var oClasses = oSettings.oClasses;
              var fnClickHandler = function ( e ) {
      Severity: Minor
      Found in cabot/static/theme/js/jquery.dataTables.min.js - About 1 hr to fix

        Function _fnAddColumn has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function _fnAddColumn( oSettings, nTh )
            {
              var oDefaults = DataTable.defaults.columns;
              var iCol = oSettings.aoColumns.length;
              var oCol = $.extend( {}, DataTable.models.oColumn, oDefaults, {
        Severity: Minor
        Found in cabot/static/theme/js/jquery.dataTables.min.js - About 1 hr to fix

          Function _size has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _size: function() {
                  // If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
                  // divs will both have width and height set, so we need to reset them
                  var nonContentHeight, minContentHeight, maxContentHeight,
                      options = this.options;
          Severity: Minor
          Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

            Function left has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    left: function( position, data ) {
                        var within = data.within,
                            withinOffset = within.offset.left + within.scrollLeft,
                            outerWidth = within.width,
                            offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
            Severity: Minor
            Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

              Function left has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      left: function( position, data ) {
                          var within = data.within,
                              withinOffset = within.offset.left + within.scrollLeft,
                              outerWidth = within.width,
                              offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
              Severity: Minor
              Found in cabot/static/theme/js/jquery.ui.position.js - About 1 hr to fix

                Function path2vml has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        path2vml = function (path) {
                            var total =  /[ahqstv]/ig,
                                command = R._pathToAbsolute;
                            Str(path).match(total) && (command = R._path2curve);
                            total = /[clmz]/g;
                Severity: Minor
                Found in cabot/static/arachnys/js/raphael.js - About 1 hr to fix

                  Function labelSeries has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    Morris.labelSeries = function(dmin, dmax, pxwidth, specName, xLabelFormat) {
                      var d, d0, ddensity, name, ret, s, spec, t, _i, _len, _ref;
                      ddensity = 200 * (dmax - dmin) / pxwidth;
                      d0 = new Date(dmin);
                      spec = Morris.LABEL_SPECS[specName];
                  Severity: Minor
                  Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language