hummingbird-me/hummingbird

View on GitHub

Showing 859 of 859 total issues

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

                top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
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 1979..1979

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

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

    _generatePosition: function(event) {

        var top, left,
            o = this.options,
            pageX = event.pageX,
Severity: Minor
Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

    Method from_action has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def self.from_action(data)
        user = User.find data[:user_id]
    
        if data[:action_type] == "followed"
          followed_user = User.find data[:followed_id]
    Severity: Minor
    Found in app/models/substory.rb - About 1 hr to fix

      Function set has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          set: function(models, options) {
            options = _.defaults(options || {}, setOptions);
            if (options.parse) models = this.parse(models, options);
            if (!_.isArray(models)) models = models ? [models] : [];
            var i, l, model, attrs, existing, sort;
      Severity: Minor
      Found in app/assets/javascripts/old/backbone-1.0.0.js - About 1 hr to fix

        Function getParseRegexForToken has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function getParseRegexForToken(token) {
                switch (token) {
                case 'DDDD':
                    return parseTokenThreeDigits;
                case 'YYYY':
        Severity: Minor
        Found in app/assets/javascripts/old/moment.js - About 1 hr to fix

          Function _tabKeydown has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _tabKeydown: function( event ) {
                  /*jshint maxcomplexity:15*/
                  var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
                      selectedIndex = this.tabs.index( focusedTab ),
                      goingForward = true;
          Severity: Minor
          Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

            Function template has 45 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              template: function(templateSpec) {
                // Just add water
                var container = {
                  escapeExpression: Handlebars.Utils.escapeExpression,
                  invokePartial: Handlebars.VM.invokePartial,
            Severity: Minor
            Found in app/assets/javascripts/old/handlebars-1.0.0.js - About 1 hr to fix

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

                    if (this.options.stringParams) {
                      if(val.depth) {
                        this.addDepth(val.depth);
                      }
                      this.opcode('getContext', val.depth || 0);
              Severity: Major
              Found in app/assets/javascripts/old/handlebars-1.0.0.js and 1 other location - About 1 hr to fix
              app/assets/javascripts/old/handlebars-1.0.0.js on lines 1253..1262

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

              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

                      this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.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 3049..3049

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

              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.options.stringParams) {
                      if(param.depth) {
                        this.addDepth(param.depth);
                      }
              
              
              Severity: Major
              Found in app/assets/javascripts/old/handlebars-1.0.0.js and 1 other location - About 1 hr to fix
              app/assets/javascripts/old/handlebars-1.0.0.js on lines 1069..1077

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

              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

                      this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.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 3050..3050

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

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

              Flipsnap.prototype.refresh = function() {
                var self = this;
              
                // setting max point
                self._maxPoint = (self.maxPoint === undefined) ? (function() {
              Severity: Minor
              Found in public/2013/assets/js/flipsnap.js - About 1 hr to fix

                Function fitVids has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  $.fn.fitVids = function( options ) {
                    var settings = {
                      customSelector: null
                    };
                
                
                Severity: Minor
                Found in public/2013/assets/js/jquery.fitvids.js - About 1 hr to fix

                  Function fitVids has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    $.fn.fitVids = function( options ) {
                      var settings = {
                        customSelector: null
                      };
                  
                  
                  Severity: Minor
                  Found in public/2014/assets/js/jquery.fitvids.js - About 1 hr to fix

                    Function refresh has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Flipsnap.prototype.refresh = function() {
                      var self = this;
                    
                      // setting max point
                      self._maxPoint = (self.maxPoint === undefined) ? (function() {
                    Severity: Minor
                    Found in public/2014/assets/js/flipsnap.js - About 1 hr to fix

                      Function resize has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          resize: function( event ) {
                              var woset, hoset, isParent, isOffsetRelative,
                                  that = $(this).data("ui-resizable"),
                                  o = that.options,
                                  co = that.containerOffset, cp = that.position,
                      Severity: Minor
                      Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

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

                            _mouseStart: function(event) {
                        
                                var o = this.options;
                        
                                //Create and append the visible helper
                        Severity: Minor
                        Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                          Function _setContainment has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              _setContainment: function() {
                          
                                  var over, c, ce,
                                      o = this.options;
                          
                          
                          Severity: Minor
                          Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                            Function _destroy has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                _destroy: function() {
                                    if ( this.xhr ) {
                                        this.xhr.abort();
                                    }
                            
                            
                            Severity: Minor
                            Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                              Method metadata has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                def metadata
                                  meta = {
                                    external_id: @mal_id,
                                    title: {
                                      canonical: @main_noko.css('h1').children[0].text.strip,
                              Severity: Minor
                              Found in lib/mal_import.rb - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language