NUBIC/surveyor

View on GitHub

Showing 658 of 658 total issues

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 lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

        _setOption: function( key, value ) {
            var i,
                valsLength = 0;
    
            if ( $.isArray( this.options.values ) ) {
    Severity: Minor
    Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

      function select( selector, context, results, seed ) {
          var i, tokens, token, type, find,
              match = tokenize( selector );
      
          if ( !seed ) {
      Severity: Minor
      Found in lib/assets/javascripts/surveyor/jquery-1.9.0.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 lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

                          if(event.pageY - this.offset.click.top < this.containment[1]) {
                              pageY = this.containment[1] + this.offset.click.top;
                          }
          Severity: Major
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 3 other locations - About 1 hr to fix
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 12966..12968
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 12972..12974
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 12975..12977

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

          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 < this.containment[0]) {
                              pageX = this.containment[0] + this.offset.click.left;
                          }
          Severity: Major
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 3 other locations - About 1 hr to fix
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 12969..12971
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 12972..12974
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 12975..12977

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

          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 > this.containment[3]) {
                              pageY = this.containment[3] + this.offset.click.top;
                          }
          Severity: Major
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 3 other locations - About 1 hr to fix
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 12966..12968
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 12969..12971
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 12972..12974

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

          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 > this.containment[2]) {
                              pageX = this.containment[2] + this.offset.click.left;
                          }
          Severity: Major
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 3 other locations - About 1 hr to fix
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 12966..12968
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 12969..12971
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 12975..12977

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

          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 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
                                      +$.datepicker._get(inst, "stepBigMonths") :
                                      +$.datepicker._get(inst, "stepMonths")), "M");
                                  break; // next month/year on page down/+ ctrl
          Severity: Major
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 1 hr to fix
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 3598..3601

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

          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 - inst.helperProportions.width }).left - inst.margins.left;
                          }
          Severity: Major
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 1 hr to fix
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 6691..6693

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

          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 ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
                      this._activate( this._focusNextTab( this.options.active - 1, false ) );
                      return true;
                  }
          Severity: Major
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 1 hr to fix
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 13849..13852

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

          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 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
                                      -$.datepicker._get(inst, "stepBigMonths") :
                                      -$.datepicker._get(inst, "stepMonths")), "M");
                                  break; // previous month/year on page up/+ ctrl
          Severity: Major
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 1 hr to fix
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 3602..3605

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

          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 ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
                      this._activate( this._focusNextTab( this.options.active + 1, true ) );
                      return true;
                  }
          Severity: Major
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 1 hr to fix
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 13845..13848

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

          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 - inst.helperProportions.width }).left - inst.margins.left;
                          }
          Severity: Major
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 1 hr to fix
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 6667..6669

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

          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(bs) {
                              ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
                          }
          Severity: Major
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 1 hr to fix
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 6661..6663

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

          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 - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
                          }
          Severity: Major
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 1 hr to fix
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 6685..6687

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

          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 _mouseStart has 43 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 lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

                refresh: function() {
                    var menus,
                        icon = this.options.icons.submenu,
                        submenus = this.element.find( this.options.menus );
            
            
            Severity: Minor
            Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

              Function ajaxHandleResponses has 43 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function ajaxHandleResponses( s, jqXHR, responses ) {
              
                  var ct, type, finalDataType, firstDataType,
                      contents = s.contents,
                      dataTypes = s.dataTypes,
              Severity: Minor
              Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 1 hr to fix

                Function handleRange has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    $.timepicker.handleRange = function(method, startTime, endTime, options) {
                        $.fn[method].call(startTime, $.extend({
                            onClose: function(dateText, inst) {
                                checkDates(this, endTime, dateText);
                            },
                Severity: Minor
                Found in lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js - About 1 hr to fix
                  Severity
                  Category
                  Status
                  Source
                  Language