hummingbird-me/hummingbird

View on GitHub

Showing 859 of 859 total issues

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

      {
        "name": "Anitro Mobile",
        "author": [
          { "name": "Killerrin", "link": "http://hummingbird.me/users/Killerrin" },
        ],
Severity: Major
Found in frontend/app/routes/apps/index.js and 3 other locations - About 2 hrs to fix
frontend/app/routes/apps/index.js on lines 12..25
frontend/app/routes/apps/index.js on lines 26..39
frontend/app/routes/apps/index.js on lines 138..151

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

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 if (classes && classes.indexOf('tip-right') > -1) {
          objPos(tip, (target.offset().top + (this.outerHeight(target) / 2) - nubHeight*2.5), 'auto', 'auto', (target.offset().left + this.outerWidth(target) + nubHeight), width)
            .removeClass('tip-override');
        }
Severity: Major
Found in app/assets/javascripts/old/application.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/old/application.js on lines 203..209

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

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 if (classes && classes.indexOf('tip-left') > -1) {
          objPos(tip, (target.offset().top + (this.outerHeight(target) / 2) - nubHeight*2.5), 'auto', 'auto', (target.offset().left - this.outerWidth(tip) - nubHeight), width)
            .removeClass('tip-override');
        } else if (classes && classes.indexOf('tip-right') > -1) {
          objPos(tip, (target.offset().top + (this.outerHeight(target) / 2) - nubHeight*2.5), 'auto', 'auto', (target.offset().left + this.outerWidth(target) + nubHeight), width)
Severity: Major
Found in app/assets/javascripts/old/application.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/old/application.js on lines 206..209

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

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

Method sanitize_review has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def sanitize_review(html)
    allow_youtube_transformer = lambda do |env|
      node      = env[:node]
      node_name = env[:node_name]

Severity: Major
Found in app/helpers/reviews_helper.rb - About 2 hrs to fix

    Function _init has 62 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function _init(){
            /* Check if browser supports localStorage */
            var localStorageReallyWorks = false;
            if("localStorage" in window){
                try {
    Severity: Major
    Found in app/assets/javascripts/old/jstorage.js - About 2 hrs to fix

      Function _showDatepicker has 61 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _showDatepicker: function(input) {
              input = input.target || input;
              if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger
                  input = $("input", input.parentNode)[0];
              }
      Severity: Major
      Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 2 hrs to fix

        Function FastClick has 60 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function FastClick(layer) {
            'use strict';
            var oldOnClick, self = this;
        
        
        
        Severity: Major
        Found in public/2014/assets/js/fastclick.js - About 2 hrs to fix

          Function FastClick has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function FastClick(layer) {
              'use strict';
              var oldOnClick, self = this;
          
          
          
          Severity: Major
          Found in public/2013/assets/js/fastclick.js - About 2 hrs to fix

            Function drag has 60 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                drag: function(event, ui) {
            
                    var inst = $(this).data("ui-draggable"), that = this;
            
                    $.each(inst.sortables, function() {
            Severity: Major
            Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 2 hrs to fix

              Function drag has 60 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  drag: function(event, ui) {
              
                      var ts, bs, ls, rs, l, r, t, b, i, first,
                          inst = $(this).data("ui-draggable"),
                          o = inst.options,
              Severity: Major
              Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 2 hrs to fix

                Method create_or_update_from_hash has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def self.create_or_update_from_hash(hash)
                    # First the creation logic
                    # TODO: stop hard-coding the ID column
                    anime = Anime.find_by(mal_id: hash[:external_id])
                    if anime.nil? && Anime.where(title: hash[:title][:canonical]).count > 1
                Severity: Major
                Found in app/models/anime.rb - About 2 hrs to fix

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

                                      if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
                                          selectee.$element.removeClass("ui-selected");
                                          selectee.selected = false;
                  
                                          selectee.$element.addClass("ui-unselecting");
                  Severity: Major
                  Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 2 hrs to fix
                  app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 3818..3827

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

                  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 (!event.metaKey && !event.ctrlKey) {
                                  selectee.$element.removeClass("ui-selected");
                                  selectee.selected = false;
                                  selectee.$element.addClass("ui-unselecting");
                                  selectee.unselecting = true;
                  Severity: Major
                  Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 2 hrs to fix
                  app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 3932..3942

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

                  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

                    _.each(methods, function(method) {
                      Collection.prototype[method] = function() {
                        var args = slice.call(arguments);
                        args.unshift(this.models);
                        return _[method].apply(_, args);
                  Severity: Major
                  Found in app/assets/javascripts/old/backbone-1.0.0.js and 1 other location - About 2 hrs to fix
                  app/assets/javascripts/old/backbone-1.0.0.js on lines 576..582

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

                  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

                    _.each(modelMethods, function(method) {
                      Model.prototype[method] = function() {
                        var args = slice.call(arguments);
                        args.unshift(this.attributes);
                        return _[method].apply(_, args);
                  Severity: Major
                  Found in app/assets/javascripts/old/backbone-1.0.0.js and 1 other location - About 2 hrs to fix
                  app/assets/javascripts/old/backbone-1.0.0.js on lines 949..955

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

                  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(inst.snapElements[i].snapping) {
                                      (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
                                  }
                  Severity: Major
                  Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 2 hrs to fix
                  app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 2368..2370

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

                  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(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {
                                  (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
                              }
                  Severity: Major
                  Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 2 hrs to fix
                  app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 2321..2323

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

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

                    var eq = function(a, b, aStack, bStack) {
                      // Identical objects are equal. `0 === -0`, but they aren't identical.
                      // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
                      if (a === b) return a !== 0 || 1 / a == 1 / b;
                      // A strict comparison is necessary because `null == undefined`.
                  Severity: Major
                  Found in app/assets/javascripts/old/underscore-1.4.4.js - About 2 hrs to fix

                    Function _generatePosition has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _generatePosition: function(event) {
                    
                            var containment, co, top, left,
                                o = this.options,
                                scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent,
                    Severity: Major
                    Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 2 hrs to fix

                      File garlic.js has 263 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /*
                        Garlic.js allows you to automatically persist your forms' text field values locally,
                        until the form is submitted. This way, your users don't lose any precious data if they
                        accidentally close their tab or browser.
                      
                      
                      Severity: Minor
                      Found in app/assets/javascripts/old/garlic.js - About 2 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language