GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 605 of 605 total issues

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

                                this.selection.moveTo(this.selection.start + insertedValue.length, this.selection.start + insertedValue.length);                                    
Severity: Major
Found in Src/scripts/spryvalidationtextfield.js and 4 other locations - About 40 mins to fix
Src/scripts/spryvalidationtextfield.js on lines 1297..1297
Src/scripts/spryvalidationtextfield.js on lines 1308..1308
Src/scripts/spryvalidationtextfield.js on lines 1354..1354
Src/scripts/spryvalidationtextfield.js on lines 1393..1393

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 5 locations. Consider refactoring.
Open

                            this.selection.moveTo(this.selection.start + autocomplete.length, this.selection.start + autocomplete.length);
Severity: Major
Found in Src/scripts/spryvalidationtextfield.js and 4 other locations - About 40 mins to fix
Src/scripts/spryvalidationtextfield.js on lines 1297..1297
Src/scripts/spryvalidationtextfield.js on lines 1308..1308
Src/scripts/spryvalidationtextfield.js on lines 1387..1387
Src/scripts/spryvalidationtextfield.js on lines 1393..1393

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

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

            if (node == root)
                node = null;
            else
                try { node = node.nextSibling; } catch (e) { node = null; }
Severity: Minor
Found in Src/scripts/sprydata.js and 1 other location - About 40 mins to fix
Src/scripts/sprydata.js on lines 704..707

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 Src/scripts/effects.js and 1 other location - About 40 mins to fix
Src/scripts/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

Function PSEUDO has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

        PSEUDO: function(match, curLoop, inplace, result, not){
Severity: Minor
Found in Src/scripts/prototype.js - About 35 mins to fix

    Function xPathStep has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function xPathStep(nodes, steps, step, input, ctx) {
    Severity: Minor
    Found in Src/scripts/xpath.js - About 35 mins to fix

      Function loadURL has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      Spry.Utils.loadURL = function(method, url, async, callback, opts)
      Severity: Minor
      Found in Src/scripts/sprydata.js - About 35 mins to fix

        Function makeFunctionCallExpr2 has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        function makeFunctionCallExpr2(name, pareno, arg1, args, parenc) {
        Severity: Minor
        Found in Src/scripts/xpath.js - About 35 mins to fix

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

              if (options.setTop)    element.style.top   = (p[1] - delta[1] + options.offsetTop) + 'px';
          Severity: Minor
          Found in Src/scripts/prototype.js and 1 other location - About 35 mins to fix
          Src/scripts/prototype.js on lines 2474..2474

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

          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 (options.setLeft)   element.style.left  = (p[0] - delta[0] + options.offsetLeft) + 'px';
          Severity: Minor
          Found in Src/scripts/prototype.js and 1 other location - About 35 mins to fix
          Src/scripts/prototype.js on lines 2475..2475

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

          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

              for (var i = 0, length = elements.length; i < length; i++) {
                Element.extend(elements[i]);
              }
          Severity: Minor
          Found in Src/scripts/prototype.js and 1 other location - About 35 mins to fix
          Src/scripts/prototype.js on lines 4649..4651

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

          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

                          for ( var i = 0, l = array.length; i < l; i++ ) {
                              ret.push( array[i] );
                          }
          Severity: Minor
          Found in Src/scripts/prototype.js and 1 other location - About 35 mins to fix
          Src/scripts/prototype.js on lines 3946..3948

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

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

            request: function(form, options) {
              form = $(form), options = Object.clone(options || { });
          
              var params = options.parameters, action = form.readAttribute('action') || '';
              if (action.blank()) action = window.location.href;
          Severity: Minor
          Found in Src/scripts/prototype.js - About 35 mins 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 ValidationTextField has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

          Spry.Widget.ValidationTextField = function(element, type, options)
          {
              type = Spry.Widget.Utils.firstValid(type, "none");
              if (typeof type != 'string') {
                  this.showError('The second parameter in the constructor should be the validation type, the options are the third parameter.');
          Severity: Minor
          Found in Src/scripts/spryvalidationtextfield.js - About 35 mins 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 debugOut has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

          Spry.Debug.debugOut = function(str, bgColor)
          {
              if (!Spry.Debug.debugWindow)
              {
                  Spry.Debug.createDebugWindow();
          Severity: Minor
          Found in Src/scripts/sprydata.js - About 35 mins 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 lang has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

            'lang': function(ctx) {
              assert(this.args.length == 1);
              var lang = this.args[0].evaluate(ctx).stringValue();
              var xmllang;
              var n = ctx.node;
          Severity: Minor
          Found in Src/scripts/xpath.js - About 35 mins 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 $ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

          Spry.$ = function(element)
          {
              if (arguments.length > 1)
              {
                  for (var i = 0, elements = [], length = arguments.length; i < length; i++)
          Severity: Minor
          Found in Src/scripts/sprydata.js - About 35 mins 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 _children has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

            _children: function(element, children) {
              if(children.tagName) {
                element.appendChild(children);
                return;
              }
          Severity: Minor
          Found in Src/scripts/builder.js - About 35 mins 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 extractRequestOptions has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

          Spry.Utils.loadURL.Request.prototype.extractRequestOptions = function(opts, undefineRequestProps)
          {
              if (!opts)
                  return;
          
          
          Severity: Minor
          Found in Src/scripts/sprydata.js - About 35 mins 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 attach has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              attach: function(rgn, node, value)
              {
                  if (value)
                  {
                      rowNumAttr = node.attributes.getNamedItem("spryevenrownumber");
          Severity: Minor
          Found in Src/scripts/sprydata.js - About 35 mins 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