NUBIC/surveyor

View on GitHub

Showing 658 of 658 total issues

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

                if (this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null) {
                    this.hourMaxOriginal = o.hourMax;
                    this.minuteMaxOriginal = o.minuteMax;
                    this.secondMaxOriginal = o.secondMax;
                    this.millisecMaxOriginal = o.millisecMax;
lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js on lines 539..544

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

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.hourMinOriginal === null || this.minuteMinOriginal === null || this.secondMinOriginal === null || this.millisecMinOriginal === null) {
                    this.hourMinOriginal = o.hourMin;
                    this.minuteMinOriginal = o.minuteMin;
                    this.secondMinOriginal = o.secondMin;
                    this.millisecMinOriginal = o.millisecMin;
lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js on lines 584..589

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

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

                delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); };  }).call(this, this.containers[i]));
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 13076..13076

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

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

                delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); };  }).call(this, this.containers[i]));
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 13079..13079

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

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

$.effects.effect.clip = function( o, done ) {
    // Create element
    var el = $( this ),
        props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
        mode = $.effects.setMode( el, o.mode || "hide" ),
Severity: Minor
Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

    Function name has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $.fn[ name ] = function( options ) {
            var isMethodCall = typeof options === "string",
                args = slice.call( arguments, 1 ),
                returnValue = this;
    
    
    Severity: Minor
    Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

      Function when has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          when: function( subordinate /* , ..., subordinateN */ ) {
              var i = 0,
                  resolveValues = core_slice.call( arguments ),
                  length = resolveValues.length,
      
      
      Severity: Minor
      Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 1 hr to fix

        Function load has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            load: function( index, event ) {
                index = this._getIndex( index );
                var that = this,
                    tab = this.tabs.eq( index ),
                    anchor = tab.find( ".ui-tabs-anchor" ),
        Severity: Minor
        Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

              _hideDatepicker: function(input) {
                  var showAnim, duration, postProcess, onClose,
                      inst = this._curInst;
          
                  if (!inst || (input && inst !== $.data(input, PROP_NAME))) {
          Severity: Minor
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

                _dialogDatepicker: function(input, date, onSelect, settings, pos) {
                    var id, browserWidth, browserHeight, scrollX, scrollY,
                        inst = this._dialogInst; // internal instance
            
                    if (!inst) {
            Severity: Minor
            Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

                  _mouseCapture: function(event, overrideHandle) {
                      var currentItem = null,
                          validHandle = false,
                          that = this;
              
              
              Severity: Minor
              Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

                    _toggle: function( data ) {
                        var toShow = data.newPanel,
                            toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
                
                        // handle activating a panel during the animation for another activation
                Severity: Minor
                Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

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

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

                        drag: function( event ) {
                    
                            var i = $(this).data("ui-draggable"), o = i.options, scrolled = false;
                    
                            if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
                    Severity: Minor
                    Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

                          cancel: function() {
                      
                              if(this.dragging) {
                      
                                  this._mouseUp({ target: null });
                      Severity: Minor
                      Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

                            _createTitlebar: function() {
                                var uiDialogTitle;
                        
                                this.uiDialogTitlebar = $("<div>")
                                    .addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix")
                        Severity: Minor
                        Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

                          $.effects.effect.pulsate = function( o, done ) {
                              var elem = $( this ),
                                  mode = $.effects.setMode( elem, o.mode || "show" ),
                                  show = mode === "show",
                                  hide = mode === "hide",
                          Severity: Minor
                          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

                                _resetButton: function() {
                                    if ( this.type === "input" ) {
                                        if ( this.options.label ) {
                                            this.element.val( this.options.label );
                                        }
                            Severity: Minor
                            Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

                                  access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
                                      var i = 0,
                                          length = elems.length,
                                          bulk = key == null;
                              
                              
                              Severity: Minor
                              Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 1 hr to fix

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

                                    clone: function( elem, dataAndEvents, deepDataAndEvents ) {
                                        var destElements, srcElements, node, i, clone,
                                            inPage = jQuery.contains( elem.ownerDocument, elem );
                                
                                        if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
                                Severity: Minor
                                Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language