GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 605 of 605 total issues

Function attachBehaviors has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Spry.Widget.ValidationTextField.prototype.attachBehaviors = function()
{
    if (this.element) {
        if (this.element.nodeName == "INPUT") {
            this.input = this.element;
Severity: Major
Found in Src/scripts/spryvalidationtextfield.js - About 2 hrs to fix

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

    Spry.Widget.Utils.setOptions = function(obj, optionsObj, ignoreUndefinedProps)
    {
        if (!optionsObj)
            return;
        for (var optionName in optionsObj)
    Severity: Major
    Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 2 hrs to fix
    Src/scripts/spryvalidationselect.js on lines 388..398

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

    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.setOptions = function(obj, optionsObj, ignoreUndefinedProps)
    {
        if (!optionsObj)
            return;
        for (var optionName in optionsObj)
    Severity: Major
    Found in Src/scripts/spryvalidationselect.js and 1 other location - About 2 hrs to fix
    Src/scripts/spryvalidationtextfield.js on lines 2156..2166

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

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

    function xpathMatchStack(stack, pattern) {
    
      // NOTE(mesch): The stack matches for variable cardinality are
      // greedy but don't do backtracking. This would be an issue only
      // with rules of the form A* A, i.e. with an element with variable
    Severity: Major
    Found in Src/scripts/xpath.js - About 2 hrs to fix

      Function ua has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          var ua = function() {
              var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF && typeof doc.appendChild != UNDEF && typeof doc.replaceChild != UNDEF && typeof doc.removeChild != UNDEF && typeof doc.cloneNode != UNDEF,
                  playerVersion = [0,0,0],
                  d = null;
              if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
      Severity: Major
      Found in Src/scripts/swfobject_modified.js - About 2 hrs to fix

        Function xpathParseInit has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function xpathParseInit() {
          if (xpathRules.length) {
            return;
          }
        
        
        Severity: Major
        Found in Src/scripts/xpath.js - About 2 hrs to fix

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

              if (this.args.length > 0) {
                s = this.args[0].evaluate(ctx).stringValue();
              } else {
                s = new NodeSetValue([ ctx.node ]).stringValue();
              }
          Severity: Major
          Found in Src/scripts/xpath.js and 1 other location - About 2 hrs to fix
          Src/scripts/xpath.js on lines 1269..1273

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

          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.args.length > 0) {
                s = this.args[0].evaluate(ctx).stringValue();
              } else {
                s = new NodeSetValue([ ctx.node ]).stringValue();
              }
          Severity: Major
          Found in Src/scripts/xpath.js and 1 other location - About 2 hrs to fix
          Src/scripts/xpath.js on lines 1259..1263

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

          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

            } else if (this.axis == xpathAxis.PRECEDING) {
              for (var n = input; n; n = n.parentNode) {
                for (var nn = n.previousSibling; nn; nn = nn.previousSibling) {
                  nodelist.push(nn);
                  xpathCollectDescendantsReverse(nodelist, nn);
          Severity: Major
          Found in Src/scripts/xpath.js and 1 other location - About 2 hrs to fix
          Src/scripts/xpath.js on lines 948..987

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

          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

            } else if (this.axis == xpathAxis.FOLLOWING) {
              for (var n = input; n; n = n.parentNode) {
                for (var nn = n.nextSibling; nn; nn = nn.nextSibling) {
                  nodelist.push(nn);
                  xpathCollectDescendants(nodelist, nn);
          Severity: Major
          Found in Src/scripts/xpath.js and 1 other location - About 2 hrs to fix
          Src/scripts/xpath.js on lines 969..987

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

          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

                'right': function(element) {
                  var parent = hasLayout(element.getOffsetParent());
                  var rect = element.getBoundingClientRect(),
                   pRect = parent.getBoundingClientRect();
          
          
          Severity: Major
          Found in Src/scripts/prototype.js and 1 other location - About 2 hrs to fix
          Src/scripts/prototype.js on lines 3610..3616

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

          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

                'bottom': function(element) {
                  var parent = hasLayout(element.getOffsetParent());
                  var rect = element.getBoundingClientRect(),
                   pRect = parent.getBoundingClientRect();
          
          
          Severity: Major
          Found in Src/scripts/prototype.js and 1 other location - About 2 hrs to fix
          Src/scripts/prototype.js on lines 3602..3608

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

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

            insert: function(element, insertions) {
              element = $(element);
          
              if (Object.isString(insertions) || Object.isNumber(insertions) ||
                  Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
          Severity: Minor
          Found in Src/scripts/prototype.js - About 2 hrs 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 evaluate has 52 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          BinaryExpr.prototype.evaluate = function(ctx) {
            var ret;
            switch (this.op.value) {
              case 'or':
                ret = new BooleanValue(this.expr1.evaluate(ctx).booleanValue() ||
          Severity: Major
          Found in Src/scripts/xpath.js - About 2 hrs to fix

            Function initialize has 52 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                initialize: function() {    
                    
                    this.updateImageList();
                    
                    this.keyboardAction = this.keyboardAction.bindAsEventListener(this);
            Severity: Major
            Found in Src/scripts/lightbox.js - About 2 hrs to fix

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

                    while (s - ds >= 0 && stack[s - ds].tag == pattern[p]) {
                      qmatch.push(stack[s - ds]);
                      ds += 1;
                      match.matchlength += 1;
                    }
              Severity: Major
              Found in Src/scripts/xpath.js and 1 other location - About 2 hrs to fix
              Src/scripts/xpath.js on lines 556..560

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

              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

                      while (s - ds >= 0 && stack[s - ds].tag == pattern[p]) {
                        qmatch.push(stack[s - ds]);
                        ds += 1;
                        match.matchlength += 1;
                      }
              Severity: Major
              Found in Src/scripts/xpath.js and 1 other location - About 2 hrs to fix
              Src/scripts/xpath.js on lines 537..541

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

              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

                          sortfunc = function(a, b)
                          {
                              var dA = a[prop];
                              var dB = b[prop];
                              dA = dA ? (new Date(dA)) : 0;
              Severity: Major
              Found in Src/scripts/sprydata.js and 1 other location - About 2 hrs to fix
              Src/scripts/sprydata.js on lines 1862..1869

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

              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

                          sortfunc = function(a, b)
                          {
                              var dA = a[prop];
                              var dB = b[prop];
                              dA = dA ? (new Date(dA)) : 0;
              Severity: Major
              Found in Src/scripts/sprydata.js and 1 other location - About 2 hrs to fix
              Src/scripts/sprydata.js on lines 1853..1860

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

              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