hummingbird-me/hummingbird

View on GitHub

Showing 859 of 859 total issues

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

        sw: function(event, dx, dy) {
            return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
        },
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 3365..3367
app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 3371..3373
app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 3374..3376

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

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

        nw: function(event, dx, dy) {
            return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
        }
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 3365..3367
app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 3368..3370
app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 3371..3373

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

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

        ne: function(event, dx, dy) {
            return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
        },
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 3365..3367
app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 3368..3370
app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 3374..3376

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

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

        } else {
            pixelTotal = this.elementSize.height;
            pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 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 10604..10607

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

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 ( this.orientation === "horizontal" ) {
            pixelTotal = this.elementSize.width;
            pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
        } else {
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 10607..10610

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

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

    start: function(options) {
      if (History.started) throw new Error("Backbone.history has already been started");
      History.started = true;

      // Figure out the initial configuration. Do we need an iframe?
Severity: Minor
Found in app/assets/javascripts/old/backbone-1.0.0.js - About 1 hr to fix

    Function setupController has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      setupController: function(controller){
    
        // Every object will be mapped to contain a value for fkey (the query key)
        // and fval (the query value). These values will be sent to the server to
        // request the respective search results.
    Severity: Minor
    Found in frontend/app/routes/filter-anime.js - About 1 hr to fix

      Function _position has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              _position: function() {
                  var position = this.options.position,
                      myAt = [],
                      offset = [ 0, 0 ],
                      isVisible;
      Severity: Minor
      Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

        Function _slide has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _slide: function( event, index, newVal ) {
                var otherVal,
                    newValues,
                    allowed;
        
        
        Severity: Minor
        Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

          Function _eventHandler has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _eventHandler: function( event ) {
                  var options = this.options,
                      active = this.active,
                      anchor = $( event.currentTarget ),
                      tab = anchor.closest( "li" ),
          Severity: Minor
          Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

            Function _create has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                _create: function() {
                    var that = this,
                        options = this.options;
            
                    this.running = false;
            Severity: Minor
            Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

              Function start has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  start: function() {
                      var element, p, co, ch, cw, width, height,
                          that = $(this).data("ui-resizable"),
                          o = that.options,
                          el = that.element,
              Severity: Minor
              Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                Function setLibraryRating has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    setLibraryRating: function(userRating, media){
                
                      if(media.get('libraryEntry') != null){
                        this.updateLibraryEntry(media, userRating);
                        return;
                Severity: Minor
                Found in frontend/app/controllers/onboarding/library.js - About 1 hr to fix

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

                              done = function(newRating) {
                                if (newRating === null) {
                                  newRating = "";
                                }
                                $(widget).attr('data-rating', newRating);
                  Severity: Major
                  Found in app/assets/javascripts/old/awesome_rating.js and 1 other location - About 1 hr to fix
                  app/assets/javascripts/old/awesome_rating.js on lines 78..84

                  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

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

                                  match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
                                      return regex.test( $( this ).children( "a" ).text() );
                                  });
                  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 9843..9845

                  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

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

                              done = function(newRating) {
                                if (newRating === null) {
                                  newRating = "";
                                }
                                $(widget).attr('data-rating', newRating);
                  Severity: Major
                  Found in app/assets/javascripts/old/awesome_rating.js and 1 other location - About 1 hr to fix
                  app/assets/javascripts/old/awesome_rating.js on lines 113..119

                  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

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

                              match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
                                  return regex.test( $( this ).children( "a" ).text() );
                              });
                  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 9855..9857

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

                                  if(event.pageX - this.offset.click.left > containment[2]) {
                                      pageX = containment[2] + this.offset.click.left;
                                  }
                  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 1963..1965
                  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 4 locations. Consider refactoring.
                  Open

                                  if(event.pageX - this.offset.click.left < containment[0]) {
                                      pageX = containment[0] + this.offset.click.left;
                                  }
                  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 1963..1965
                  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 4 locations. Consider refactoring.
                  Open

                                  if(event.pageY - this.offset.click.top > containment[3]) {
                                      pageY = containment[3] + 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 1963..1965
                  app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1966..1968

                  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

                  Severity
                  Category
                  Status
                  Source
                  Language