NUBIC/surveyor

View on GitHub

Showing 658 of 658 total issues

Consider simplifying this complex logical expression.
Open

            if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
                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 })));
                }
                inst.snapElements[i].snapping = false;
Severity: Critical
Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 4 hrs to fix

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

                    (over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top  - this.margins.bottom
    Severity: Major
    Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 3 hrs to fix
    lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 6223..6223

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

    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

                    (over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right,
    Severity: Major
    Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 3 hrs to fix
    lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 6224..6224

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

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

    function defaultPrefilter( elem, props, opts ) {
        /*jshint validthis:true */
        var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire,
            anim = this,
            style = elem.style,
    Severity: Major
    Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 3 hrs to fix

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

                      co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
      Severity: Major
      Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 3 hrs to fix
      lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 12909..12909

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

      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

                      co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
      Severity: Major
      Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 3 hrs to fix
      lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 12910..12910

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

      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 ( factor.from.x !== factor.to.x ) {
                      child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );
                      child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );
                  }
      Severity: Major
      Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 3 hrs to fix
      lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 9118..9121

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

      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 ( factor.from.y !== factor.to.y ) {
                      child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );
                      child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );
                  }
      Severity: Major
      Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 3 hrs to fix
      lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 9124..9127

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

      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

          _hoverable: function( element ) {
              this.hoverable = this.hoverable.add( element );
              this._on( element, {
                  mouseenter: function( event ) {
                      $( event.currentTarget ).addClass( "ui-state-hover" );
      Severity: Major
      Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 3 hrs to fix
      lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 752..762

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

      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

          _focusable: function( element ) {
              this.focusable = this.focusable.add( element );
              this._on( element, {
                  focusin: function( event ) {
                      $( event.currentTarget ).addClass( "ui-state-focus" );
      Severity: Major
      Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 3 hrs to fix
      lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 740..750

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

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

                      send: function( headers, complete ) {
      
                          // Get a new xhr
                          var handle, i,
                              xhr = s.xhr();
      Severity: Major
      Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 3 hrs to fix

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

            el.animate( animation, {
                queue: false,
                duration: o.duration,
                easing: o.easing,
                complete: function() {
        Severity: Major
        Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 3 hrs to fix
        lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 8616..8628

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

        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

            el.animate( animation, {
                queue: false,
                duration: o.duration,
                easing: o.easing,
                complete: function() {
        Severity: Major
        Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 3 hrs to fix
        lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 9284..9296

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

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

            _refresh: function() {
                var maxHeight,
                    options = this.options,
                    heightStyle = options.heightStyle,
                    parent = this.element.parent(),
        Severity: Major
        Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 3 hrs to fix

          Function trigger has 85 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              trigger: function( event, data, elem, onlyHandlers ) {
          
                  var i, cur, tmp, bubbleType, ontype, handle, special,
                      eventPath = [ elem || document ],
                      type = event.type || event,
          Severity: Major
          Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 3 hrs to fix

            Function _doKeyDown has 84 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                _doKeyDown: function(event) {
                    var onSelect, dateStr, sel,
                        inst = $.datepicker._getInst(event.target),
                        handled = true,
                        isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
            Severity: Major
            Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 3 hrs to fix

              Function Animation has 84 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function Animation( elem, properties, options ) {
                  var result,
                      stopped,
                      index = 0,
                      length = animationPrefilters.length,
              Severity: Major
              Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 3 hrs to fix

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

                  jQuery('.surveyor_check_boxes input[type=text]').change(function(){
                    var textValue = $(this).val()
                    if (textValue.length > 0) {
                      $(this).parent().children().has('input[type="checkbox"]')[0].children[0].checked = true;
                    }
                Severity: Major
                Found in lib/assets/javascripts/surveyor/jquery.surveyor.js and 1 other location - About 3 hrs to fix
                lib/assets/javascripts/surveyor/jquery.surveyor.js on lines 67..72

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

                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

                  jQuery('.surveyor_radio input[type=text]').change(function(){
                    var textValue = $(this).val()
                    if (textValue.length > 0) {
                      $(this).parent().children().has('input[type="radio"]')[0].children[0].checked = true;
                    }
                Severity: Major
                Found in lib/assets/javascripts/surveyor/jquery.surveyor.js and 1 other location - About 3 hrs to fix
                lib/assets/javascripts/surveyor/jquery.surveyor.js on lines 60..65

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

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

                    _keydown: function( event ) {
                        /*jshint maxcomplexity:20*/
                        var match, prev, character, skip, regex,
                            preventDefault = true;
                
                
                Severity: Major
                Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 3 hrs to fix
                  Severity
                  Category
                  Status
                  Source
                  Language