GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 605 of 605 total issues

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

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

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

Function processContentPI has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Spry.Data.Region.processContentPI = function(inStr)
{
    var outStr = "";
    var regexp = /<!--\s*<\/?spry:content\s*[^>]*>\s*-->/mg;
    var searchStartIndex = 0;
Severity: Minor
Found in Src/scripts/sprydata.js - About 1 hr to fix

    Function getNodesByFunc has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Spry.Utils.getNodesByFunc = function(root, func)
    {
        var nodeStack = new Array;
        var resultArr = new Array;
        var node = root;
    Severity: Minor
    Found in Src/scripts/sprydata.js - About 1 hr to fix

      Function filter has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Spry.Data.DataSet.prototype.filter = function(filterFunc, filterOnly)
      {
          // This is a non-destructive filter function.
      
          var dataChanged = false;
      Severity: Minor
      Found in Src/scripts/sprydata.js - About 1 hr to fix

        Function request has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          request: function(url) {
            this.url = url;
            this.method = this.options.method;
            var params = Object.isString(this.options.parameters) ?
                  this.options.parameters :
        Severity: Minor
        Found in Src/scripts/prototype.js - About 1 hr to fix

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

                                          futureValue = this.oldValue.substring(0, this.selection.start) + pressed + this.oldValue.substring(this.selection.start + 1);
          Severity: Major
          Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
          Src/scripts/spryvalidationtextfield.js on lines 1406..1406

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

          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 (results[0].search(/^.*\btest=\"/) != -1)
                              {
                                  jsExpr = results[0].replace(/^.*\btest=\"/, "");
                                  jsExpr = jsExpr.replace(/".*$/, "");
                                  jsExpr = Spry.Utils.decodeEntities(jsExpr);
          Severity: Major
          Found in Src/scripts/sprydata.js and 1 other location - About 1 hr to fix
          Src/scripts/sprydata.js on lines 3992..3997

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

          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

                  $('prevLink').observe('click', (function(event) { event.stop(); this.changeImage(this.activeImage - 1); }).bindAsEventListener(this));
          Severity: Major
          Found in Src/scripts/lightbox.js and 1 other location - About 1 hr to fix
          Src/scripts/lightbox.js on lines 169..169

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

          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 (results[0].search(/^.*\bname=\"/) != -1)
                              {
                                  regionState = results[0].replace(/^.*\bname=\"/, "");
                                  regionState = regionState.replace(/".*$/, "");
                                  regionState = Spry.Utils.decodeEntities(regionState);
          Severity: Major
          Found in Src/scripts/sprydata.js and 1 other location - About 1 hr to fix
          Src/scripts/sprydata.js on lines 3983..3988

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

          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

                              futureValue = this.oldValue.substring(0, this.selection.start) + pressed + this.oldValue.substring(this.selection.start + 1);
          Severity: Major
          Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
          Src/scripts/spryvalidationtextfield.js on lines 1360..1360

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

          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

                  $('nextLink').observe('click', (function(event) { event.stop(); this.changeImage(this.activeImage + 1); }).bindAsEventListener(this));
          Severity: Major
          Found in Src/scripts/lightbox.js and 1 other location - About 1 hr to fix
          Src/scripts/lightbox.js on lines 168..168

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

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

          Spry.Widget.SelectionDescriptor.prototype.moveTo = function(start, end)
          {
              if (Spry.is.ie && Spry.is.windows) {
                  if (this.element.nodeName == "TEXTAREA") {
                      var ta_range = this.element.createTextRange();
          Severity: Minor
          Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

            Function Selector has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            Prototype.Selector = (function() {
            
              function select() {
                throw new Error('Method "Prototype.Selector.select" must be defined.');
              }
            Severity: Minor
            Found in Src/scripts/prototype.js - About 1 hr to fix

              Function xpathSort has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function xpathSort(input, sort) {
                if (sort.length == 0) {
                  return;
                }
              
              
              Severity: Minor
              Found in Src/scripts/xpath.js - About 1 hr to fix

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

                        this.event_handlers.push([this.input, "mousedown", function(e) { if (self.isDisabled()) return true; return self.onMouseDown(e || event); }]);
                Severity: Major
                Found in Src/scripts/spryvalidationtextfield.js and 5 other locations - About 1 hr to fix
                Src/scripts/spryvalidationtextfield.js on lines 781..781
                Src/scripts/spryvalidationtextfield.js on lines 782..782
                Src/scripts/spryvalidationtextfield.js on lines 784..784
                Src/scripts/spryvalidationtextfield.js on lines 787..787
                Src/scripts/spryvalidationtextfield.js on lines 788..788

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

                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

                    case '+':
                      ret = new NumberValue(this.expr1.evaluate(ctx).numberValue() +
                                            this.expr2.evaluate(ctx).numberValue());
                      break;
                Severity: Major
                Found in Src/scripts/xpath.js and 4 other locations - About 1 hr to fix
                Src/scripts/xpath.js on lines 1511..1514
                Src/scripts/xpath.js on lines 1516..1519
                Src/scripts/xpath.js on lines 1521..1524
                Src/scripts/xpath.js on lines 1526..1529

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

                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

                    case 'mod':
                      ret = new NumberValue(this.expr1.evaluate(ctx).numberValue() %
                                            this.expr2.evaluate(ctx).numberValue());
                      break;
                Severity: Major
                Found in Src/scripts/xpath.js and 4 other locations - About 1 hr to fix
                Src/scripts/xpath.js on lines 1506..1509
                Src/scripts/xpath.js on lines 1511..1514
                Src/scripts/xpath.js on lines 1516..1519
                Src/scripts/xpath.js on lines 1526..1529

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

                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

                    case 'div':
                      ret = new NumberValue(this.expr1.evaluate(ctx).numberValue() /
                                            this.expr2.evaluate(ctx).numberValue());
                      break;
                Severity: Major
                Found in Src/scripts/xpath.js and 4 other locations - About 1 hr to fix
                Src/scripts/xpath.js on lines 1506..1509
                Src/scripts/xpath.js on lines 1511..1514
                Src/scripts/xpath.js on lines 1516..1519
                Src/scripts/xpath.js on lines 1521..1524

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

                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

                Spry.Widget.ValidationTextField.addLoadListener(function(){
                    Spry.Widget.Utils.addEventListener(window, "unload", Spry.Widget.Form.destroyAll, false);
                });
                Severity: Major
                Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
                Src/scripts/spryvalidationselect.js on lines 142..144

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

                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

                Spry.Widget.Utils.getFirstChildWithNodeNameAtAnyLevel = function(node, nodeName)
                {
                    var elements  = node.getElementsByTagName(nodeName);
                    if (elements) {
                        return elements[0];
                Severity: Major
                Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
                Src/scripts/spryvalidationselect.js on lines 401..408

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

                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