GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 605 of 605 total issues

File prototype.js has 4969 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*  Prototype JavaScript framework, version 1.7
 *  (c) 2005-2010 Sam Stephenson
 *
 *  Prototype is freely distributable under the terms of an MIT-style license.
 *  For details, see the Prototype web site: http://www.prototypejs.org/
Severity: Major
Found in Src/scripts/prototype.js - About 2 wks to fix

    File sprydata.js has 3391 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // SpryData.js - version 0.47 - Spry Pre-Release 1.6.1
    //
    // Copyright (c) 2006. Adobe Systems Incorporated.
    // All rights reserved.
    //
    Severity: Major
    Found in Src/scripts/sprydata.js - About 1 wk to fix

      Function swfobject has a Cognitive Complexity of 401 (exceeds 5 allowed). Consider refactoring.
      Open

      var swfobject = function() {
          
          var UNDEF = "undefined",
              OBJECT = "object",
              SHOCKWAVE_FLASH = "Shockwave Flash",
      Severity: Minor
      Found in Src/scripts/swfobject_modified.js - About 1 wk 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

      File spryvalidationtextfield.js has 1933 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // SpryValidationTextField.js - version 0.37 - Spry Pre-Release 1.6.1
      //
      // Copyright (c) 2006. Adobe Systems Incorporated.
      // All rights reserved.
      //
      Severity: Major
      Found in Src/scripts/spryvalidationtextfield.js - About 5 days to fix

        File xpath.js has 1777 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        // xpath.js - version 0.7 - Spry Pre-Release 1.6.1
        //
        // Code from xmltoken.js.
        //
        // Copyright 2006 Google Inc.
        Severity: Major
        Found in Src/scripts/xpath.js - About 4 days to fix

          Function onKeyPress has a Cognitive Complexity of 165 (exceeds 5 allowed). Consider refactoring.
          Open

          Spry.Widget.ValidationTextField.prototype.onKeyPress = function(e)
          {
              if (this.flags.skp) {
                  this.flags.skp = false;
                  Spry.Widget.Utils.stopEvent(e);
          Severity: Minor
          Found in Src/scripts/spryvalidationtextfield.js - About 3 days 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 swfobject has 576 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var swfobject = function() {
              
              var UNDEF = "undefined",
                  OBJECT = "object",
                  SHOCKWAVE_FLASH = "Shockwave Flash",
          Severity: Major
          Found in Src/scripts/swfobject_modified.js - About 2 days to fix

            File effects.js has 1014 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            // script.aculo.us effects.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
            
            // Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
            // Contributors:
            //  Justin Palmer (http://encytemedia.com/)
            Severity: Major
            Found in Src/scripts/effects.js - About 2 days to fix

              Function initRegions has a Cognitive Complexity of 116 (exceeds 5 allowed). Consider refactoring.
              Open

              Spry.Data.initRegions = function(rootNode)
              {
                  rootNode = rootNode ? Spry.$(rootNode) : document.body;
              
                  var lastRegionFound = null;
              Severity: Minor
              Found in Src/scripts/sprydata.js - About 2 days 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 processTokens has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring.
              Open

              Spry.Data.Region.prototype.processTokens = function(outputArr, token, processContext)
              {
                  var i = 0;
              
                  switch(token.tokenType)
              Severity: Minor
              Found in Src/scripts/sprydata.js - About 1 day 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

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

                      if (this.form) {
                          // if no "onSubmit" handler has been attached to the current form, attach one
                          if (!this.form.attachedSubmitHandler && !this.form.onsubmit) {
                              this.form.onsubmit = function(e) { e = e || event; return Spry.Widget.Form.onSubmit(e, e.srcElement || e.currentTarget) };
                              this.form.attachedSubmitHandler = true;                 
              Severity: Major
              Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 day to fix
              Src/scripts/spryvalidationselect.js on lines 185..197

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

              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 (this.form) {
                          // if no "onSubmit" handler has been attached to the current form, attach one
                          if (!this.form.attachedSubmitHandler && !this.form.onsubmit) {
                              this.form.onsubmit = function(e) { e = e || event; return Spry.Widget.Form.onSubmit(e, e.srcElement || e.currentTarget) };
                              this.form.attachedSubmitHandler = true;                 
              Severity: Major
              Found in Src/scripts/spryvalidationselect.js and 1 other location - About 1 day to fix
              Src/scripts/spryvalidationtextfield.js on lines 812..824

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

              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

              File swfobject_modified.js has 578 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*!    SWFObject v2.0 <http://code.google.com/p/swfobject/>
                  Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis
                  This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
              */
              
              
              Severity: Major
              Found in Src/scripts/swfobject_modified.js - About 1 day to fix

                Function flattenSubPaths has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
                Open

                Spry.Data.XMLDataSet.prototype.flattenSubPaths = function(rs, subPaths)
                {
                    if (!rs || !subPaths)
                        return;
                
                
                Severity: Minor
                Found in Src/scripts/sprydata.js - About 1 day 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

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

                                        if(this.isPositionAtEndOfGroup(futureValue, this.selection.start+1, group)) 
                                        {
                                            if (group != this.lastDateGroup)
                                            {
                                                if (this.nextDateDelimiterExists(futureValue, this.selection.start + 1, group))
                Severity: Major
                Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 day to fix
                Src/scripts/spryvalidationtextfield.js on lines 1413..1429

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

                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(this.isPositionAtEndOfGroup(futureValue, this.selection.start+1, group)) 
                                        {
                                            if (group != this.lastDateGroup)
                                            {
                                                if (this.nextDateDelimiterExists(futureValue, this.selection.start + 1, group))
                Severity: Major
                Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 day to fix
                Src/scripts/spryvalidationtextfield.js on lines 1459..1475

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

                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 tokenizeData has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
                Open

                Spry.Data.Region.prototype.tokenizeData = function(dataStr)
                {
                    // If there is no data, there's nothing to do.
                    if (!dataStr)
                        return null;
                Severity: Minor
                Found in Src/scripts/sprydata.js - About 1 day 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 onKeyPress has 214 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Spry.Widget.ValidationTextField.prototype.onKeyPress = function(e)
                {
                    if (this.flags.skp) {
                        this.flags.skp = false;
                        Spry.Widget.Utils.stopEvent(e);
                Severity: Major
                Found in Src/scripts/spryvalidationtextfield.js - About 1 day to fix

                  Function Enumerable has 209 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var Enumerable = (function() {
                    function each(iterator, context) {
                      var index = 0;
                      try {
                        this._each(function(value) {
                  Severity: Major
                  Found in Src/scripts/prototype.js - About 1 day to fix

                    Function punycode_encode has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                    Open

                    Spry.Widget.Utils.punycode_encode = function (input, max_out) {
                        var inputc = input.split("");
                        input = [];
                        for(var i=0; i<inputc.length; i++) {
                            input.push(inputc[i].charCodeAt(0));
                    Severity: Minor
                    Found in Src/scripts/spryvalidationtextfield.js - About 1 day 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

                    Severity
                    Category
                    Status
                    Source
                    Language