NUBIC/surveyor

View on GitHub

Showing 658 of 658 total issues

Function dispatch has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    dispatch: function( event ) {

        // Make a writable jQuery.Event from the native event object
        event = jQuery.event.fix( event );

Severity: Minor
Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 1 hr to fix

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

            se: function(event, dx, dy) {
                return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
            },
    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 10670..10672
    lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 10673..10675
    lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 10676..10678

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

    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

            ne: function(event, dx, dy) {
                return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
            },
    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 10667..10669
    lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 10670..10672
    lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 10676..10678

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Method build_and_set has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def build_and_set(context, r)
        case r[:field_type]
        when "text"
          self.attributes = {
            :response_class => "string",
    Severity: Minor
    Found in lib/surveyor/redcap_parser.rb - About 1 hr to fix

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

              sw: function(event, dx, dy) {
                  return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
              },
      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 10667..10669
      lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 10673..10675
      lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 10676..10678

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

      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

              nw: function(event, dx, dy) {
                  return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
              }
      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 10667..10669
      lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 10670..10672
      lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 10673..10675

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

      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 ( this.orientation === "horizontal" ) {
                  pixelTotal = this.elementSize.width;
                  pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
              } else {
      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 11519..11522

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

              } else {
                  pixelTotal = this.elementSize.height;
                  pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
              }
      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 11516..11519

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

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

              _position: function() {
                  var position = this.options.position,
                      myAt = [],
                      offset = [ 0, 0 ],
                      isVisible;
      Severity: Minor
      Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

        Function _eventHandler has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _eventHandler: function( event ) {
                var options = this.options,
                    active = this.active,
                    anchor = $( event.currentTarget ),
                    tab = anchor.closest( "li" ),
        Severity: Minor
        Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

          Function effect has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              effect: function( /* effect, options, speed, callback */ ) {
                  var args = _normalizeArguments.apply( this, arguments ),
                      mode = args.mode,
                      queue = args.queue,
                      effectMethod = $.effects.effect[ args.effect ];
          Severity: Minor
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

            Function _slide has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                _slide: function( event, index, newVal ) {
                    var otherVal,
                        newValues,
                        allowed;
            
            
            Severity: Minor
            Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

                  _create: function() {
                      var that = this,
                          options = this.options;
              
                      this.running = false;
              Severity: Minor
              Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

                Function start has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    start: function() {
                        var element, p, co, ch, cw, width, height,
                            that = $(this).data("ui-resizable"),
                            o = that.options,
                            el = that.element,
                Severity: Minor
                Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

                  Function style has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      style: function( elem, name, value, extra ) {
                          // Don't set styles on text and comment nodes
                          if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                              return;
                          }
                  Severity: Minor
                  Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 1 hr to fix

                    Function cleanData has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        cleanData: function( elems, /* internal */ acceptData ) {
                            var data, id, elem, type,
                                i = 0,
                                internalKey = jQuery.expando,
                                cache = jQuery.cache,
                    Severity: Minor
                    Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 1 hr to fix

                      Function data has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          data: function( key, value ) {
                              var attrs, name,
                                  elem = this[0],
                                  i = 0,
                                  data = null;
                      Severity: Minor
                      Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 1 hr to fix

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

                        if ( !$.fn.addBack ) {
                            $.fn.addBack = function( selector ) {
                                return this.add( selector == null ?
                                    this.prevObject : this.prevObject.filter( selector )
                                );
                        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 226..232

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

                        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 < containment[0]) {
                                            pageX = 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 6290..6292
                        lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 6293..6295
                        lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 6296..6298

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

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

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

                        if ( !$.fn.addBack ) {
                            $.fn.addBack = function( selector ) {
                                return this.add( selector == null ?
                                    this.prevObject : this.prevObject.filter( selector )
                                );
                        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 7846..7852

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

                        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