NUBIC/surveyor

View on GitHub

Showing 658 of 658 total issues

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

                if (tp_inst) {
                    if (tp_inst._defaults.timeOnly && (inst.input.val() != inst.lastVal)) {
                        try {
                            $.datepicker._updateDatepicker(inst);
                        } catch (err) {
lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js on lines 1371..1379

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

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

    _open: function( event, target, content ) {
        var tooltip, events, delayedShow,
            positionOption = $.extend( {}, this.options.position );

        if ( !content ) {
Severity: Major
Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 2 hrs to fix

    Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
        if ( postFilter && !postFilter[ expando ] ) {
            postFilter = setMatcher( postFilter );
        }
        if ( postFinder && !postFinder[ expando ] ) {
    Severity: Major
    Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 2 hrs to fix

      Function done has 65 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              function done( status, nativeStatusText, responses, headers ) {
                  var isSuccess, success, error, response, modified,
                      statusText = nativeStatusText;
      
                  // Called once
      Severity: Major
      Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 2 hrs to fix

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

                    tp_inst.millisec = tp_inst._defaults.millisec < tp_inst._defaults.millisecMin? tp_inst._defaults.millisecMin : 
                                    tp_inst._defaults.millisec > tp_inst._defaults.millisecMax? tp_inst._defaults.millisecMax : tp_inst._defaults.millisec;
        lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js on lines 240..241
        lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js on lines 242..243
        lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js on lines 244..245

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

        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

                    this.element.siblings( ":visible" ).each(function() {
                        var elem = $( this ),
                            position = elem.css( "position" );
        
                        if ( position === "absolute" || position === "fixed" ) {
        Severity: Major
        Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 2 hrs to fix
        lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 14122..14130

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

        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

                    tp_inst.second = tp_inst._defaults.second < tp_inst._defaults.secondMin? tp_inst._defaults.secondMin : 
                                    tp_inst._defaults.second > tp_inst._defaults.secondMax? tp_inst._defaults.secondMax : tp_inst._defaults.second;
        lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js on lines 240..241
        lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js on lines 242..243
        lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js on lines 246..247

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

        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

                    tp_inst.minute = tp_inst._defaults.minute < tp_inst._defaults.minuteMin? tp_inst._defaults.minuteMin : 
                                    tp_inst._defaults.minute > tp_inst._defaults.minuteMax? tp_inst._defaults.minuteMax : tp_inst._defaults.minute;
        lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js on lines 240..241
        lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js on lines 244..245
        lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js on lines 246..247

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

        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

                    this.element.siblings( ":visible" ).each(function() {
                        var elem = $( this ),
                            position = elem.css( "position" );
        
                        if ( position === "absolute" || position === "fixed" ) {
        Severity: Major
        Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 2 hrs to fix
        lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 1785..1793

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

        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

                    tp_inst.hour = tp_inst._defaults.hour < tp_inst._defaults.hourMin? tp_inst._defaults.hourMin : 
                                    tp_inst._defaults.hour > tp_inst._defaults.hourMax? tp_inst._defaults.hourMax : tp_inst._defaults.hour;
        lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js on lines 242..243
        lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js on lines 244..245
        lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js on lines 246..247

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

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

        $.effects.effect.bounce = function( o, done ) {
            var el = $( this ),
                props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
        
                // defaults:
        Severity: Major
        Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 2 hrs to fix

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

              hide: function( speed ) {
                  if ( standardSpeed( speed ) ) {
                      return this._hide.apply( this, arguments );
                  } else {
                      var args = _normalizeArguments.apply( this, arguments );
          Severity: Major
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 2 hrs to fix
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 8254..8262

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

          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

              show: function( speed ) {
                  if ( standardSpeed( speed ) ) {
                      return this._show.apply( this, arguments );
                  } else {
                      var args = _normalizeArguments.apply( this, arguments );
          Severity: Major
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 2 hrs to fix
          lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 8265..8273

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

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

              _contactContainers: function(event) {
                  var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom,
                      innermostContainer = null,
                      innermostIndex = null;
          
          
          Severity: Major
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.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 lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 2 hrs to fix

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

                      superMatcher = function( seed, context, xml, results, expandContext ) {
                          var elem, j, matcher,
                              setMatched = [],
                              matchedCount = 0,
                              i = "0",
              Severity: Major
              Found in lib/assets/javascripts/surveyor/jquery-1.9.0.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 lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.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 lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 2 hrs to fix

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

                        Deferred: function( func ) {
                            var tuples = [
                                    // action, add listener, listener list, final state
                                    [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
                                    [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
                    Severity: Major
                    Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - 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 lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 2 hrs to fix
                      lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 11120..11129

                      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

                      Severity
                      Category
                      Status
                      Source
                      Language