GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 605 of 605 total issues

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

      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

                        else if (regObjArr[i].expressInstall && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) { // Show the Adobe Express Install dialog if set by the web page author and if supported (fp6.0.65+ on Win/Mac OS only)
                            showExpressInstall(regObjArr[i]);
                        }
                        else { // Flash plug-in and Flash content version mismatch: display alternative content instead of Flash content
                            displayAltContent(obj);
    Severity: Major
    Found in Src/scripts/swfobject_modified.js - About 45 mins to fix

      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

            } 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

                                  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 (!(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

              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

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

                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

                  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

                    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

                        } 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 (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

                              if (stack[s].tag == pattern[p]) {
                                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 - 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

                            Avoid deeply nested control flow statements.
                            Open

                                                    if (testVal)
                                                        this.processTokenChildren(outputArr, token, processContext);
                            Severity: Major
                            Found in Src/scripts/sprydata.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                              if (!lastStartComment)
                                                                  node.insertBefore(oComment, node.firstChild);
                                                              else
                                                                  node.insertBefore(oComment, lastStartComment.nextSibling);
                              Severity: Major
                              Found in Src/scripts/sprydata.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 (bAttrValue != undefined)
                                                              {
                                                                  hasBehaviorAttributes = true;
                                                                  if (bAttrs[behaviorAttrName].setup)
                                                                      bAttrs[behaviorAttrName].setup(node, bAttrValue);
                                  Severity: Major
                                  Found in Src/scripts/sprydata.js - About 45 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language