GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 605 of 605 total issues

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

function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
    var sibDir = dir == "previousSibling" && !isXML;
    for ( var i = 0, l = checkSet.length; i < l; i++ ) {
        var elem = checkSet[i];
        if ( elem ) {
Severity: Minor
Found in Src/scripts/prototype.js - About 1 hr to fix

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

    Spry.Widget.ValidationSelect.prototype.validate = function() {
        this.reset();
        // check isRequired
        if (this.isRequired) {
            // there are no options, or no option has been selected
    Severity: Minor
    Found in Src/scripts/spryvalidationselect.js - About 1 hr to fix

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

          afterUpdateInternal: function(effect) {
            effect.element.down().setStyle({bottom:
              (effect.dims[0] - effect.element.clientHeight) + 'px' });
          },
      Severity: Major
      Found in Src/scripts/effects.js and 1 other location - About 1 hr to fix
      Src/scripts/effects.js on lines 726..729

      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

            'padding-box-width': function(element) {
              var width = this.get('width'),
               pLeft = this.get('padding-left'),
               pRight = this.get('padding-right');
      
      
      Severity: Major
      Found in Src/scripts/prototype.js and 1 other location - About 1 hr to fix
      Src/scripts/prototype.js on lines 3470..3476

      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

            'padding-box-height': function(element) {
              var height = this.get('height'),
               pTop = this.get('padding-top'),
               pBottom = this.get('padding-bottom');
      
      
      Severity: Major
      Found in Src/scripts/prototype.js and 1 other location - About 1 hr to fix
      Src/scripts/prototype.js on lines 3478..3484

      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

          afterUpdateInternal: function(effect) {
            effect.element.down().setStyle({bottom:
              (effect.dims[0] - effect.element.clientHeight) + 'px' });
          },
      Severity: Major
      Found in Src/scripts/effects.js and 1 other location - About 1 hr to fix
      Src/scripts/effects.js on lines 698..701

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

      Spry.Widget.BrowserSniff = function()
      {
          var b = navigator.appName.toString();
          var up = navigator.platform.toString();
          var ua = navigator.userAgent.toString();
      Severity: Minor
      Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

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

            function showExpressInstall(regObj) {
                isExpressInstallActive = true;
                var obj = getElementById(regObj.id);
                if (obj) {
                    if (regObj.altContentId) {
        Severity: Minor
        Found in Src/scripts/swfobject_modified.js - About 1 hr to fix

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

          Spry.Utils.serializeObject = function(obj)
          {
              // Create a JSON representation of a given object.
          
              var str = "";
          Severity: Minor
          Found in Src/scripts/sprydata.js - About 1 hr to fix

            Consider simplifying this complex logical expression.
            Open

                        if ( match[1] == "nth" ) {
                            var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
                                match[2] == "even" && "2n" || match[2] == "odd" && "2n+1" ||
                                !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
            
            
            Severity: Critical
            Found in Src/scripts/prototype.js - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

                      if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
                          submit !== false && (!submit || key == submit) && (submitted = true)))) {
                        result = accumulator(result, key, value);
                      }
              Severity: Critical
              Found in Src/scripts/prototype.js - About 1 hr to fix

                Function fixUpIEInnerHTML has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Spry.Utils.fixUpIEInnerHTML = function(inStr)
                {
                    var outStr = "";
                
                    // Create a regular expression that will match:
                Severity: Minor
                Found in Src/scripts/sprydata.js - About 1 hr to fix

                  Function onChange has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  Spry.Widget.ValidationTextField.prototype.onChange = function(e)
                  {
                      if (Spry.is.opera && this.flags.operaRevertOnKeyUp) {
                          return true;
                      }
                  Severity: Minor
                  Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

                    Function loadURL has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Spry.Utils.loadURL = function(method, url, async, callback, opts)
                    {
                        var req = new Spry.Utils.loadURL.Request();
                        req.method = method;
                        req.url = url;
                    Severity: Minor
                    Found in Src/scripts/sprydata.js - About 1 hr to fix

                      Function loadDataIntoDataSet has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      Spry.Data.XMLDataSet.prototype.loadDataIntoDataSet = function(rawDataDoc)
                      {
                          var rs = null;
                          var mainXPath = Spry.Data.Region.processDataRefString(null, this.xpath, this.dataSetsForDataRefStrings);
                          var subPaths = this.subPaths;
                      Severity: Minor
                      Found in Src/scripts/sprydata.js - About 1 hr to fix

                        Function respondToReadyState has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                          respondToReadyState: function(readyState) {
                            var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
                        
                            if (state == 'Complete') {
                              try {
                        Severity: Minor
                        Found in Src/scripts/prototype.js - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function setOpacity has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                          Element.Methods.setOpacity = function(element, value) {
                            function stripAlpha(filter){
                              return filter.replace(/alpha\([^\)]*\)/gi,'');
                            }
                            element = $(element);
                        Severity: Minor
                        Found in Src/scripts/prototype.js - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function collapse has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                        Spry.Widget.SelectionDescriptor.prototype.collapse = function(begin)
                        {
                            if (Spry.is.ie && Spry.is.windows) {
                                this.range = this.element.ownerDocument.selection.createRange();
                                this.range.collapse(begin);
                        Severity: Minor
                        Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function select has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                        Spry.Utils.SelectionManager.SelectionGroup.prototype.select = function(element, className, multiSelect)
                        {
                            var selObj = null;
                        
                            if (!multiSelect)
                        Severity: Minor
                        Found in Src/scripts/sprydata.js - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

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

                        Spry.Widget.Utils.stopPropagation = function(ev)
                        {
                            if (ev.stopPropagation)
                            {
                                ev.stopPropagation();
                        Severity: Major
                        Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
                        Src/scripts/spryvalidationtextfield.js on lines 2346..2356

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

                        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