concord-consortium/rigse

View on GitHub

Showing 2,136 of 2,138 total issues

Consider simplifying this complex logical expression.
Open

                if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {

                    // Don't re-trigger an onFOO event when we call its FOO() method
                    old = elem[ ontype ];

Severity: Major
Found in rails/app/assets/javascripts/jquery/jquery.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

    if ( !jQuery.support.opacity ) {
        jQuery.cssHooks.opacity = {
            get: function( elem, computed ) {
                // IE uses filters for opacity
                return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
    Severity: Major
    Found in rails/app/assets/javascripts/jquery/jquery.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

                  if ( matcher[ expando ] ) {
                      // Find the next relative operator (if any) for proper handling
                      j = ++i;
                      for ( ; j < len; j++ ) {
                          if ( Expr.relative[ tokens[j].type ] ) {
      Severity: Major
      Found in rails/app/assets/javascripts/jquery/jquery.js - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                    if (!options.HtmlText && this.textEnabled) {
                        var style = {
                            size: options.fontSize*1.1,
                            color: options.grid.color
                        };
        Severity: Major
        Found in rails/app/assets/javascripts/flotr/flotr_out.js - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                          if ((doc = node.ownerDocument) && (win = doc.defaultView) && 
                              win.getSelection && doc.createRange && 
                              (selection = window.getSelection()) && 
                              selection.removeAllRanges) {
                                  range = doc.createRange();
          Severity: Major
          Found in rails/app/assets/javascripts/flotr/flotr_out.js - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                    if(n.series && (n.mouse && n.mouse.track && !prevHit || (prevHit /*&& (n.x != prevHit.x || n.y != prevHit.y)*/))){
                        var mt = this.mouseTrack || this.el.select(".flotr-mouse-value")[0],
                            pos = '', 
                            s = n.series,
                            p = n.mouse.position, 
            Severity: Major
            Found in rails/app/assets/javascripts/flotr/flotr_out.js - About 40 mins to fix

              Consider simplifying this complex logical expression.
              Open

                      if(n.series && (n.mouse && n.mouse.track && !prevHit || (prevHit /*&& (n.x != prevHit.x || n.y != prevHit.y)*/))){
                          var mt = this.mouseTrack || this.el.select(".flotr-mouse-value")[0],
                              pos = '', 
                              s = n.series,
                              p = n.mouse.position, 
              Severity: Major
              Found in rails/app/assets/javascripts/flotr/flotr.js - About 40 mins to fix

                Consider simplifying this complex logical expression.
                Open

                                if ((doc = node.ownerDocument) && (win = doc.defaultView) && 
                                    win.getSelection && doc.createRange && 
                                    (selection = window.getSelection()) && 
                                    selection.removeAllRanges) {
                                        range = doc.createRange();
                Severity: Major
                Found in rails/app/assets/javascripts/flotr/flotr.js - About 40 mins to fix

                  Consider simplifying this complex logical expression.
                  Open

                              if (!options.HtmlText && this.textEnabled) {
                                  var style = {
                                      size: options.fontSize*1.1,
                                      color: options.grid.color
                                  };
                  Severity: Major
                  Found in rails/app/assets/javascripts/flotr/flotr.js - About 40 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                                if((tag_name = src.tagName.toUpperCase()) && (
                                    tag_name=='INPUT' || tag_name=='SELECT' || tag_name=='OPTION' ||
                                    tag_name=='BUTTON' || tag_name=='TEXTAREA')) return;
                    Severity: Major
                    Found in rails/app/assets/javascripts/livepipe/resizable.js - About 40 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                            if((tag_name = src.tagName.toUpperCase()) && (
                              tag_name=='INPUT' ||
                              tag_name=='SELECT' ||
                              tag_name=='OPTION' ||
                              tag_name=='BUTTON' ||
                      Severity: Major
                      Found in rails/app/assets/javascripts/dragdrop.js - About 40 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                            if request.format && request.format.html? && current_settings && current_settings.require_user_consent? && !current_visitor.portal_student.nil? && !current_visitor.asked_age?
                              unless session_sensitive_path
                                flash.keep
                                redirect_to(ask_consent_portal_student_path(current_visitor.portal_student))
                              end
                        Severity: Major
                        Found in rails/app/controllers/application_controller.rb - About 40 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                              if request.format && request.format.html? && current_settings && current_settings.use_student_security_questions && !current_visitor.portal_student.nil? && current_visitor.security_questions.size < 3
                                unless session_sensitive_path
                                  flash.keep
                                  redirect_to(edit_user_security_questions_path(current_visitor))
                                end
                          Severity: Major
                          Found in rails/app/controllers/application_controller.rb - About 40 mins to fix

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

                              var IS_DONTENUM_BUGGY = (function(){
                                for (var p in { toString: 1 }) {
                                  if (p === 'toString') return false;
                                }
                                return true;
                            Severity: Minor
                            Found in rails/app/assets/javascripts/prototype.js and 1 other location - About 40 mins to fix
                            rails/app/assets/javascripts/prototype.js on lines 66..71

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

                            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

                                        while ( i-- ) {
                                            if ( seed[ (j = matchIndexes[i]) ] ) {
                                                seed[j] = !(matches[j] = seed[j]);
                                            }
                                        }
                            Severity: Minor
                            Found in rails/app/assets/javascripts/jquery/jquery.js and 1 other location - About 40 mins to fix
                            rails/app/assets/javascripts/prototype.js on lines 4894..4898

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

                            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

                                         afterFinishInternal: function(effect) {
                                           effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle);
                                         }
                            Severity: Minor
                            Found in rails/app/assets/javascripts/effects.js and 1 other location - About 40 mins to fix
                            rails/app/assets/javascripts/effects.js on lines 648..650

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

                            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

                                do {
                                    c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
                                } while(i < len && c1 == -1);
                            Severity: Minor
                            Found in rails/app/assets/javascripts/flotr/base64.js and 1 other location - About 40 mins to fix
                            rails/app/assets/javascripts/flotr/base64.js on lines 76..78

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

                            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

                              var IS_DONTENUM_BUGGY = (function(){
                                for (var p in { toString: 1 }) {
                                  if (p === 'toString') return false;
                                }
                                return true;
                            Severity: Minor
                            Found in rails/app/assets/javascripts/prototype.js and 1 other location - About 40 mins to fix
                            rails/app/assets/javascripts/prototype.js on lines 170..175

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

                            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

                                    while ( i-- ) {
                                      if ( seed[ (j = matchIndexes[i]) ] ) {
                                        seed[j] = !(matches[j] = seed[j]);
                                      }
                                    }
                            Severity: Minor
                            Found in rails/app/assets/javascripts/prototype.js and 1 other location - About 40 mins to fix
                            rails/app/assets/javascripts/jquery/jquery.js on lines 3978..3982

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

                            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

                                    afterFinishInternal: function(effect) {
                                      effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle);
                                    }
                            Severity: Minor
                            Found in rails/app/assets/javascripts/effects.js and 1 other location - About 40 mins to fix
                            rails/app/assets/javascripts/effects.js on lines 816..818

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

                            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