hummingbird-me/hummingbird

View on GitHub

Showing 859 of 859 total issues

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

        } else {
            date.setFullYear(input[0], input[1], input[2]);
            date.setHours(input[3], input[4], input[5], input[6]);
        }
Severity: Major
Found in app/assets/javascripts/old/moment.js and 1 other location - About 1 hr to fix
app/assets/javascripts/old/moment.js on lines 735..738

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

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(ts) {
                    ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
                }
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 2336..2338

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

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

  passwordValid: function () {
    if (!this.get('password')) { return true; }
    return this.get('passwordProblems').length === 0;
  }.property('password', 'passwordProblems'),
Severity: Major
Found in frontend/app/controllers/sign-up.js and 1 other location - About 1 hr to fix
frontend/app/controllers/settings.js on lines 76..79

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

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 (config._useUTC) {
            date.setUTCFullYear(input[0], input[1], input[2]);
            date.setUTCHours(input[3], input[4], input[5], input[6]);
        } else {
Severity: Major
Found in app/assets/javascripts/old/moment.js and 1 other location - About 1 hr to fix
app/assets/javascripts/old/moment.js on lines 738..741

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

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

    _getDragVerticalDirection: function() {
        var delta = this.positionAbs.top - this.lastPositionAbs.top;
        return delta !== 0 && (delta > 0 ? "down" : "up");
    },
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 4574..4577

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

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

                case $.ui.keyCode.PAGE_DOWN:
                    newVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) );
                    break;
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 10977..10979

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

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(rs) {
                    ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.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 2360..2362

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

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

  passwordValid: function() {
    if (!this.get('currentUser.newPassword')) { return true; }
    return this.get('passwordProblems').length === 0;
  }.property('currentUser.newPassword', 'passwordProblems'),
Severity: Major
Found in frontend/app/controllers/settings.js and 1 other location - About 1 hr to fix
frontend/app/controllers/sign-up.js on lines 65..68

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

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(ls) {
                    ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.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 2342..2344

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

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

                case $.ui.keyCode.PAGE_UP:
                    newVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) );
                    break;
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 10980..10982

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

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

    _createWidget: function( options, element ) {
        element = $( element || this.defaultElement || this )[ 0 ];
        this.element = $( element );
        this.uuid = uuid++;
        this.eventNamespace = "." + this.widgetName + this.uuid;
Severity: Minor
Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

    Function murmurhash2_32_gc has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function murmurhash2_32_gc(str, seed) {
            var
                l = str.length,
                h = seed ^ l,
                i = 0,
    Severity: Minor
    Found in app/assets/javascripts/old/jstorage.js - About 1 hr to fix

      Function compile has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        compile: function(environment, options, context, asObject) {
          this.environment = environment;
          this.options = options || {};
      
          Handlebars.log(Handlebars.logger.DEBUG, this.environment.disassemble() + "\n\n");
      Severity: Minor
      Found in app/assets/javascripts/old/handlebars-1.0.0.js - About 1 hr to fix

        Function replaceStack has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          replaceStack: function(callback) {
            var prefix = '',
                inline = this.isInline(),
                stack;
        
        
        Severity: Minor
        Found in app/assets/javascripts/old/handlebars-1.0.0.js - About 1 hr to fix

          Function didInsertElement has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            didInsertElement: function() {
              return Ember.run.next((function() {
                var a, b, x, y,
                    imageHeight = this.$("#preview").height(),
                    imageWidth = this.$("#preview").width(),
          Severity: Minor
          Found in frontend/app/views/modals/crop-cover.js - About 1 hr to fix

            Function formattedAirDates has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              formattedAirDates: function() {
                var format, formattedFinishedAiring, formattedStartedAiring, result;
            
                if (this.get('startedAiring')) {
                  format = this.get('startedAiringDateKnown') ? "D MMM YYYY" : "MMM YYYY";
            Severity: Minor
            Found in frontend/app/models/anime.js - About 1 hr to fix

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

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

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

                    _create: function() {
                        this.originalCss = {
                            display: this.element[0].style.display,
                            width: this.element[0].style.width,
                            minHeight: this.element[0].style.minHeight,
                Severity: Minor
                Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                  Function _initSource has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _initSource: function() {
                          var array, url,
                              that = this;
                          if ( $.isArray(this.options.source) ) {
                              array = this.options.source;
                  Severity: Minor
                  Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                    Function values has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        values: function( index, newValue ) {
                            var vals,
                                newValues,
                                i;
                    
                    
                    Severity: Minor
                    Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language