GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 605 of 605 total issues

Avoid deeply nested control flow statements.
Open

                            if (typeof par.flashvars != UNDEF) {
                                par.flashvars += "&" + i + "=" + flashvarsObj[i];
                            }
                            else {
                                par.flashvars = i + "=" + flashvarsObj[i];
Severity: Major
Found in Src/scripts/swfobject_modified.js - About 45 mins to fix

    Function contains has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    Spry.Widget.Utils.contains = function (who, what)
    {
        if (typeof who.contains == 'object') {
            return what && who && (who == what || who.contains(what));
        } else {
    Severity: Minor
    Found in Src/scripts/spryvalidationselect.js - About 45 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

    Avoid deeply nested control flow statements.
    Open

                            if (!(c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "param") && !(c[i].nodeType == 8)) {
                                ac.appendChild(c[i].cloneNode(true));
                            }
    Severity: Major
    Found in Src/scripts/swfobject_modified.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
                              o.setAttribute("class", attObj[m]);
                          }
                          else if (m != "classid") { // Filter out IE specific attribute
                              o.setAttribute(m, attObj[m]);
      Severity: Major
      Found in Src/scripts/swfobject_modified.js - About 45 mins to fix

        Function loop has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

          loop: function(timePos) {
            if (timePos >= this.startOn) {
              if (timePos >= this.finishOn) {
                this.render(1.0);
                this.cancel();
        Severity: Minor
        Found in Src/scripts/effects.js - About 45 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

        Avoid deeply nested control flow statements.
        Open

              for (var nn = n.nextSibling; nn; nn = nn.nextSibling) {
                nodelist.push(nn);
                xpathCollectDescendants(nodelist, nn);
              }
        Severity: Major
        Found in Src/scripts/xpath.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                  if (cmp(s, nn)) {
                    ret = true;
                    break;
                  }
          Severity: Major
          Found in Src/scripts/xpath.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                } else if (stack[s].tag == pattern[p]) {
                  match.push(stack[s]);
                  ds += 1;
                  match.matchlength += 1;
            
            
            Severity: Major
            Found in Src/scripts/xpath.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements
                                          fixParams(obj);
                                      }
              Severity: Major
              Found in Src/scripts/swfobject_modified.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    if (l != "movie") { // Filter out IE specific param element
                                        e.setAttribute(l, parObj[l]);
                                    }
                Severity: Major
                Found in Src/scripts/swfobject_modified.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                for(attr in arguments[1])
                                  element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
                  Severity: Major
                  Found in Src/scripts/builder.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        if (k == "data") {
                                            e.setAttribute("src", attObj[k]);
                                        }
                                        else if (k.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
                                            e.setAttribute("class", attObj[k]);
                    Severity: Major
                    Found in Src/scripts/swfobject_modified.js - About 45 mins to fix

                      Function evaluate has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                      UnionExpr.prototype.evaluate = function(ctx) {
                        var nodes1 = this.expr1.evaluate(ctx).nodeSetValue();
                        var nodes2 = this.expr2.evaluate(ctx).nodeSetValue();
                        var I1 = nodes1.length;
                        for (var i2 = 0; i2 < nodes2.length; ++i2) {
                      Severity: Minor
                      Found in Src/scripts/xpath.js - About 45 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

                      Avoid deeply nested control flow statements.
                      Open

                          } else if (v1.type == 'string') {
                            var s = v1.stringValue();
                            var n = v2.nodeSetValue();
                      
                            ret = false;
                      Severity: Major
                      Found in Src/scripts/xpath.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                          } else if (this.axis == xpathAxis.NAMESPACE) {
                            alert('not implemented: axis namespace');
                        
                          } else if (this.axis == xpathAxis.PARENT) {
                            if (input.parentNode) {
                        Severity: Major
                        Found in Src/scripts/xpath.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                for (var i = 0;  i < n.length; ++i) {
                                  var nn = xmlValue(n[i]) - 0;
                                  if (cmp(nn, s)) {
                                    ret = true;
                                    break;
                          Severity: Major
                          Found in Src/scripts/xpath.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                if (a_l_c > b_l_c)
                                                    return 1;
                                                else if (a_l_c < b_l_c)
                                                    return -1;
                                                else if (a_c > b_c)
                            Severity: Major
                            Found in Src/scripts/sprydata.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if (attr && attr.nodeType == 2 /* Node.ATTRIBUTE_NODE */)
                                                          obj[namePrefix + attr.name] = attr.value;
                              Severity: Major
                              Found in Src/scripts/sprydata.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                if (!lastEndComment)
                                                                    node.appendChild(cComment);
                                                                else
                                                                    node.insertBefore(cComment, lastEndComment);
                                Severity: Major
                                Found in Src/scripts/sprydata.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                  if (childToProcess)
                                                      this.processTokenChildren(outputArr, childToProcess, processContext);
                                  Severity: Major
                                  Found in Src/scripts/sprydata.js - About 45 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language