hummingbird-me/hummingbird

View on GitHub

Showing 859 of 859 total issues

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

                if(event.pageY - this.offset.click.top < containment[1]) {
                    pageY = containment[1] + this.offset.click.top;
                }
Severity: Major
Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 3 other locations - About 1 hr to fix
app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1960..1962
app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1966..1968
app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1969..1971

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

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 ( toShow.length && toHide.length ) {
            toHide.prev().attr( "tabIndex", -1 );
        } else if ( toShow.length ) {
            this.headers.filter(function() {
                return $( this ).attr( "tabIndex" ) === 0;
Severity: Major
Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 1 hr to fix
app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 12105..12112

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

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 ( toShow.length && toHide.length ) {
            eventData.oldTab.attr( "tabIndex", -1 );
        } else if ( toShow.length ) {
            this.tabs.filter(function() {
                return $( this ).attr( "tabIndex" ) === 0;
Severity: Major
Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 1 hr to fix
app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 5717..5724

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

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

  $.fn.garlic = function ( option, fn ) {
    var options = $.extend(true, {}, $.fn.garlic.defaults, option, this.data() )
      , storage = new Storage()
      , returnValue = false;

Severity: Minor
Found in app/assets/javascripts/old/garlic.js - About 1 hr to fix

    Function top has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            top: function( position, data ) {
                var within = data.within,
                    withinOffset = within.offset.top + within.scrollTop,
                    outerHeight = within.height,
                    offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
    Severity: Minor
    Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

      Function intersect has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      $.ui.intersect = function(draggable, droppable, toleranceMode) {
      
          if (!droppable.offset) {
              return false;
          }
      Severity: Minor
      Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

        Function _keydown has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _keydown: function( event ) {
                /*jshint maxcomplexity:15*/
                if ( event.altKey || event.ctrlKey ) {
                    return;
                }
        Severity: Minor
        Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

          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 app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 5580..5584

          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

          FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {
              'use strict';
          
              // On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.
              if (eventTarget.nodeType === Node.TEXT_NODE) {
          Severity: Major
          Found in public/2014/assets/js/fastclick.js and 1 other location - About 1 hr to fix
          public/2013/assets/js/fastclick.js on lines 360..369

          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

          FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {
              'use strict';
          
              // On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.
              if (eventTarget.nodeType === Node.TEXT_NODE) {
          Severity: Major
          Found in public/2013/assets/js/fastclick.js and 1 other location - About 1 hr to fix
          public/2014/assets/js/fastclick.js on lines 360..369

          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 app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1589..1592

          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 app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 12001..12004

          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 app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 4160..4163

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

              save: function(key, val, options) {
                var attrs, method, xhr, attributes = this.attributes;
          
                // Handle both `"key", value` and `{key: value}` -style arguments.
                if (key == null || typeof key === 'object') {
          Severity: Minor
          Found in app/assets/javascripts/old/backbone-1.0.0.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 app/assets/javascripts/old/jquery-ui-custom-1.10.3.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 app/assets/javascripts/old/jquery-ui-custom-1.10.3.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 app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

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

                              function adjust() {
                                  var height, original;
                  
                                  if (mirrored !== ta) {
                                      initMirror();
                  Severity: Minor
                  Found in app/assets/javascripts/old/jquery.autosize.js - About 1 hr to fix

                    Method as_json has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        def as_json
                          resource_fields = {}
                          linked = {}
                          json = {
                            title => resource_fields,
                    Severity: Minor
                    Found in app/serializers/api/v2/object_serialization_strategy.rb - About 1 hr to fix

                      Method myanimelist has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def myanimelist
                          file = params.require(:file)
                      
                          # Prepare the file
                          # Check the magic number for gzip because some browsers are stupid
                      Severity: Minor
                      Found in app/controllers/settings/import_controller.rb - About 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language