GuilhermeStracini/TCC-SENAC

View on GitHub
Src/scripts/sprydata.js

Summary

Maintainability
F
1 mo
Test Coverage

File sprydata.js has 3391 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// SpryData.js - version 0.47 - Spry Pre-Release 1.6.1
//
// Copyright (c) 2006. Adobe Systems Incorporated.
// All rights reserved.
//
Severity: Major
Found in Src/scripts/sprydata.js - About 1 wk to fix

    Function initRegions has a Cognitive Complexity of 116 (exceeds 5 allowed). Consider refactoring.
    Open

    Spry.Data.initRegions = function(rootNode)
    {
        rootNode = rootNode ? Spry.$(rootNode) : document.body;
    
        var lastRegionFound = null;
    Severity: Minor
    Found in Src/scripts/sprydata.js - About 2 days 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 processTokens has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring.
    Open

    Spry.Data.Region.prototype.processTokens = function(outputArr, token, processContext)
    {
        var i = 0;
    
        switch(token.tokenType)
    Severity: Minor
    Found in Src/scripts/sprydata.js - About 1 day 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 flattenSubPaths has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
    Open

    Spry.Data.XMLDataSet.prototype.flattenSubPaths = function(rs, subPaths)
    {
        if (!rs || !subPaths)
            return;
    
    
    Severity: Minor
    Found in Src/scripts/sprydata.js - About 1 day 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 tokenizeData has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
    Open

    Spry.Data.Region.prototype.tokenizeData = function(dataStr)
    {
        // If there is no data, there's nothing to do.
        if (!dataStr)
            return null;
    Severity: Minor
    Found in Src/scripts/sprydata.js - About 1 day 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 initRegions has 171 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Spry.Data.initRegions = function(rootNode)
    {
        rootNode = rootNode ? Spry.$(rootNode) : document.body;
    
        var lastRegionFound = null;
    Severity: Major
    Found in Src/scripts/sprydata.js - About 6 hrs to fix

      Function DSContext has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
      Open

      Spry.Data.Region.DSContext = function(dataSet, processingContext)
      {
          var m_dataSet = dataSet;
          var m_processingContext = processingContext;
          var m_curRowIndexArray = [ { rowIndex: -1 } ]; // -1 means return whatever the current row is inside the data set.
      Severity: Minor
      Found in Src/scripts/sprydata.js - About 6 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 processTokens has 119 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Spry.Data.Region.prototype.processTokens = function(outputArr, token, processContext)
      {
          var i = 0;
      
          switch(token.tokenType)
      Severity: Major
      Found in Src/scripts/sprydata.js - About 4 hrs to fix

        Function DSContext has 116 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Spry.Data.Region.DSContext = function(dataSet, processingContext)
        {
            var m_dataSet = dataSet;
            var m_processingContext = processingContext;
            var m_curRowIndexArray = [ { rowIndex: -1 } ]; // -1 means return whatever the current row is inside the data set.
        Severity: Major
        Found in Src/scripts/sprydata.js - About 4 hrs to fix

          Function processDataRefString has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
          Open

          Spry.Data.Region.processDataRefString = function(processingContext, regionStr, dataSetsToUse, isJSExpr)
          {
              if (!regionStr)
                  return "";
          
          
          Severity: Minor
          Found in Src/scripts/sprydata.js - About 4 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 getSortFunc has 109 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Spry.Data.DataSet.prototype.sort.getSortFunc = function(prop, type, order)
          {
              var sortfunc = null;
              if (type == "number")
              {
          Severity: Major
          Found in Src/scripts/sprydata.js - About 4 hrs to fix

            Function tokenizeData has 109 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            Spry.Data.Region.prototype.tokenizeData = function(dataStr)
            {
                // If there is no data, there's nothing to do.
                if (!dataStr)
                    return null;
            Severity: Major
            Found in Src/scripts/sprydata.js - About 4 hrs to fix

              Function fixupIETagAttributes has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
              Open

              Spry.Utils.fixupIETagAttributes = function(inStr)
              {
                  var outStr = "";
              
                  // Break the tag string into 3 pieces.
              Severity: Minor
              Found in Src/scripts/sprydata.js - About 4 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 ProcessingContext has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
              Open

              Spry.Data.Region.ProcessingContext = function(region)
              {
                  this.region = region;
                  this.dataSetContexts = [];
              
              
              Severity: Minor
              Found in Src/scripts/sprydata.js - About 3 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 distinct has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
              Open

              Spry.Data.DataSet.prototype.distinct = function(columnNames)
              {
                  if (this.data)
                  {
                      var oldData = this.data;
              Severity: Minor
              Found in Src/scripts/sprydata.js - About 3 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 createObjectForNode has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

              Spry.Data.XMLDataSet.createObjectForNode = function(node, encodeText, encodeCData)
              {
                  if (!node)
                      return null;
              
              
              Severity: Minor
              Found in Src/scripts/sprydata.js - About 3 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 getNodesByFunc has a Cognitive Complexity of 24 (exceeds 5 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 3 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 flattenSubPaths has 80 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Spry.Data.XMLDataSet.prototype.flattenSubPaths = function(rs, subPaths)
              {
                  if (!rs || !subPaths)
                      return;
              
              
              Severity: Major
              Found in Src/scripts/sprydata.js - About 3 hrs to fix

                Function filterData has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                Open

                Spry.Data.DataSet.prototype.filterData = function(filterFunc, filterOnly)
                {
                    // This is a destructive filter function.
                
                    var dataChanged = false;
                Severity: Minor
                Found in Src/scripts/sprydata.js - About 3 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 loadData has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                Open

                Spry.Data.HTTPSourceDataSet.LoadManager.loadData = function(reqInfo, ds, useCache)
                {
                    if (!reqInfo)
                        return null;
                
                
                Severity: Minor
                Found in Src/scripts/sprydata.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 filter has a Cognitive Complexity of 19 (exceeds 5 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 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 recalculateDataSetDependencies has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                Open

                Spry.Data.HTTPSourceDataSet.prototype.recalculateDataSetDependencies = function()
                {
                    this.hasDataRefStrings = false;
                
                    // Clear all old callbacks that may have been registered.
                Severity: Minor
                Found in Src/scripts/sprydata.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 findRowsWithColumnValues has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                Open

                Spry.Data.DataSet.prototype.findRowsWithColumnValues = function(valueObj, firstMatchOnly, unfiltered)
                {
                    var results = [];
                    var rows = this.getData(unfiltered);
                    if (rows)
                Severity: Minor
                Found in Src/scripts/sprydata.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 piRegions has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        var piRegions = Spry.Utils.getNodesByFunc(rgn, function(node)
                        {
                            try
                            {
                                if (node.nodeType == 1 /* ELEMENT_NODE */)
                Severity: Major
                Found in Src/scripts/sprydata.js - About 2 hrs to fix

                  Function applyColumnTypes has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Spry.Data.DataSet.prototype.applyColumnTypes = function()
                  {
                      var rows = this.getData(true);
                      var numRows = rows.length;
                      var colNames = [];
                  Severity: Minor
                  Found in Src/scripts/sprydata.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 fixupIETagAttributes has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  Spry.Utils.fixupIETagAttributes = function(inStr)
                  {
                      var outStr = "";
                  
                      // Break the tag string into 3 pieces.
                  Severity: Minor
                  Found in Src/scripts/sprydata.js - About 2 hrs to fix

                    Function serializeObject has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                    Spry.Utils.serializeObject = function(obj)
                    {
                        // Create a JSON representation of a given object.
                    
                        var str = "";
                    Severity: Minor
                    Found in Src/scripts/sprydata.js - About 1 hr 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 loadData has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                    Spry.Data.HTTPSourceDataSet.prototype.loadData = function()
                    {
                        if (!this.url)
                            return;
                    
                    
                    Severity: Minor
                    Found in Src/scripts/sprydata.js - About 1 hr 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 getRecordSetFromXMLDoc has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                    Spry.Data.XMLDataSet.getRecordSetFromXMLDoc = function(xmlDoc, path, suppressColumns, entityEncodeStrings)
                    {
                        if (!xmlDoc || !path)
                            return null;
                    
                    
                    Severity: Minor
                    Found in Src/scripts/sprydata.js - About 1 hr 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 strToDataSetsArray has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                    Spry.Data.Region.strToDataSetsArray = function(str, returnRegionNames)
                    {
                        var dataSetsArr = new Array;
                        var foundHash = {};
                    
                    
                    Severity: Minor
                    Found in Src/scripts/sprydata.js - About 1 hr 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 createObjectForNode has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Spry.Data.XMLDataSet.createObjectForNode = function(node, encodeText, encodeCData)
                    {
                        if (!node)
                            return null;
                    
                    
                    Severity: Minor
                    Found in Src/scripts/sprydata.js - About 1 hr to fix

                      Function processDataRefString has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      Spry.Data.Region.processDataRefString = function(processingContext, regionStr, dataSetsToUse, isJSExpr)
                      {
                          if (!regionStr)
                              return "";
                      
                      
                      Severity: Minor
                      Found in Src/scripts/sprydata.js - About 1 hr to fix

                        Function sort has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        Spry.Data.DataSet.prototype.sort = function(columnNames, sortOrder)
                        {
                            // columnNames can be either the name of a column to
                            // sort on, or an array of column names, but it can't be
                            // null/undefined.
                        Severity: Minor
                        Found in Src/scripts/sprydata.js - About 1 hr to fix

                          Function createXMLHttpRequest has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                          Open

                          Spry.Utils.createXMLHttpRequest = function()
                          {
                              var req = null;
                              try
                              {
                          Severity: Minor
                          Found in Src/scripts/sprydata.js - About 1 hr 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 getNodeText has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                          Open

                          Spry.Data.XMLDataSet.getNodeText = function(node, encodeText, encodeCData)
                          {
                              var txt = "";
                          
                              if (!node)
                          Severity: Minor
                          Found in Src/scripts/sprydata.js - About 1 hr 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 getRecordSetFromXMLDoc has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          Spry.Data.XMLDataSet.getRecordSetFromXMLDoc = function(xmlDoc, path, suppressColumns, entityEncodeStrings)
                          {
                              if (!xmlDoc || !path)
                                  return null;
                          
                          
                          Severity: Minor
                          Found in Src/scripts/sprydata.js - About 1 hr to fix

                            Function filterData has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

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

                              Function distinct has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              Spry.Data.DataSet.prototype.distinct = function(columnNames)
                              {
                                  if (this.data)
                                  {
                                      var oldData = this.data;
                              Severity: Minor
                              Found in Src/scripts/sprydata.js - About 1 hr to fix

                                Function fixUpIEInnerHTML has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                Open

                                Spry.Utils.fixUpIEInnerHTML = function(inStr)
                                {
                                    var outStr = "";
                                
                                    // Create a regular expression that will match:
                                Severity: Minor
                                Found in Src/scripts/sprydata.js - About 1 hr 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 setAttribute has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                Open

                                Spry.Utils.setAttribute = function(ele, name, value)
                                {
                                    ele = Spry.$(ele);
                                    if (!ele || !name)
                                        return;
                                Severity: Minor
                                Found in Src/scripts/sprydata.js - About 1 hr 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 loadData has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                Spry.Data.HTTPSourceDataSet.prototype.loadData = function()
                                {
                                    if (!this.url)
                                        return;
                                
                                
                                Severity: Minor
                                Found in Src/scripts/sprydata.js - About 1 hr to fix

                                  Function regions has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      var regions = Spry.Utils.getNodesByFunc(rootNode, function(node)
                                      {
                                          try
                                          {
                                              if (node.nodeType != 1 /* Node.ELEMENT_NODE */)
                                  Severity: Minor
                                  Found in Src/scripts/sprydata.js - About 1 hr to fix

                                    Function getValue has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    Spry.Data.DataSet.prototype.getValue = function(valueName, rowContext)
                                    {
                                        var result = undefined;
                                    
                                        // If a rowContext is not defined, we default to
                                    Severity: Minor
                                    Found in Src/scripts/sprydata.js - About 1 hr to fix

                                      Function recalculateDataSetDependencies has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      Spry.Data.HTTPSourceDataSet.prototype.recalculateDataSetDependencies = function()
                                      {
                                          this.hasDataRefStrings = false;
                                      
                                          // Clear all old callbacks that may have been registered.
                                      Severity: Minor
                                      Found in Src/scripts/sprydata.js - About 1 hr to fix

                                        Function loadData has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        Spry.Data.HTTPSourceDataSet.LoadManager.loadData = function(reqInfo, ds, useCache)
                                        {
                                            if (!reqInfo)
                                                return null;
                                        
                                        
                                        Severity: Minor
                                        Found in Src/scripts/sprydata.js - About 1 hr to fix

                                          Function ProcessingContext has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                          Spry.Data.Region.ProcessingContext = function(region)
                                          {
                                              this.region = region;
                                              this.dataSetContexts = [];
                                          
                                          
                                          Severity: Minor
                                          Found in Src/scripts/sprydata.js - About 1 hr to fix

                                            Function sort has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                            Spry.Data.DataSet.prototype.sort = function(columnNames, sortOrder)
                                            {
                                                // columnNames can be either the name of a column to
                                                // sort on, or an array of column names, but it can't be
                                                // null/undefined.
                                            Severity: Minor
                                            Found in Src/scripts/sprydata.js - About 1 hr 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 notifyObservers has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                            Spry.Utils.Notifier.prototype.notifyObservers = function(methodName, data)
                                            {
                                                if (!methodName)
                                                    return;
                                            
                                            
                                            Severity: Minor
                                            Found in Src/scripts/sprydata.js - About 1 hr 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 setState has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                            Spry.Data.Region.prototype.setState = function(stateName, suppressNotfications)
                                            {
                                                var stateObj = { state: stateName, mappedState: this.getMappedState(stateName) };
                                                if (!suppressNotfications)
                                                    Spry.Data.Region.notifyObservers("onPreStateChange", this, stateObj);
                                            Severity: Minor
                                            Found in Src/scripts/sprydata.js - About 1 hr 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 processContentPI has a Cognitive Complexity of 12 (exceeds 5 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

                                            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 12 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                                attach: function(rgn, node, value)
                                                {
                                                    if (!value)
                                                        return;
                                            
                                            
                                            Severity: Minor
                                            Found in Src/scripts/sprydata.js - About 1 hr 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 serializeObject has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                            Spry.Utils.serializeObject = function(obj)
                                            {
                                                // Create a JSON representation of a given object.
                                            
                                                var str = "";
                                            Severity: Minor
                                            Found in Src/scripts/sprydata.js - About 1 hr to fix

                                              Function fixUpIEInnerHTML has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                              Spry.Utils.fixUpIEInnerHTML = function(inStr)
                                              {
                                                  var outStr = "";
                                              
                                                  // Create a regular expression that will match:
                                              Severity: Minor
                                              Found in Src/scripts/sprydata.js - About 1 hr to fix

                                                Function loadURL has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                Spry.Utils.loadURL = function(method, url, async, callback, opts)
                                                {
                                                    var req = new Spry.Utils.loadURL.Request();
                                                    req.method = method;
                                                    req.url = url;
                                                Severity: Minor
                                                Found in Src/scripts/sprydata.js - About 1 hr to fix

                                                  Function loadDataIntoDataSet has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                  Spry.Data.XMLDataSet.prototype.loadDataIntoDataSet = function(rawDataDoc)
                                                  {
                                                      var rs = null;
                                                      var mainXPath = Spry.Data.Region.processDataRefString(null, this.xpath, this.dataSetsForDataRefStrings);
                                                      var subPaths = this.subPaths;
                                                  Severity: Minor
                                                  Found in Src/scripts/sprydata.js - About 1 hr to fix

                                                    Function select has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                    Spry.Utils.SelectionManager.SelectionGroup.prototype.select = function(element, className, multiSelect)
                                                    {
                                                        var selObj = null;
                                                    
                                                        if (!multiSelect)
                                                    Severity: Minor
                                                    Found in Src/scripts/sprydata.js - About 1 hr 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 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 getRowNumber has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                          Open

                                                          Spry.Data.DataSet.prototype.getRowNumber = function(row, unfiltered)
                                                          {
                                                              if (row)
                                                              {
                                                                  var rows = this.getData(unfiltered);
                                                          Severity: Minor
                                                          Found in Src/scripts/sprydata.js - About 1 hr 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 getAttribute has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                          Open

                                                          Spry.Utils.getAttribute = function(ele, name)
                                                          {
                                                              ele = Spry.$(ele);
                                                              if (!ele || !name)
                                                                  return null;
                                                          Severity: Minor
                                                          Found in Src/scripts/sprydata.js - About 1 hr 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 xhRequestProcessor has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                          Open

                                                          Spry.Data.XMLDataSet.prototype.xhRequestProcessor = function(xhRequest)
                                                          {
                                                              // XMLDataSet uses the responseXML from the xhRequest
                                                          
                                                              var resp = xhRequest.responseXML;
                                                          Severity: Minor
                                                          Found in Src/scripts/sprydata.js - About 1 hr 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 updateContent has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                          Open

                                                          Spry.Data.Region.prototype.updateContent = function()
                                                          {
                                                              var allDataSetsReady = true;
                                                          
                                                              var dsArray = this.getDataSets();
                                                          Severity: Minor
                                                          Found in Src/scripts/sprydata.js - About 1 hr 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 loadDataIntoDataSet has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                          Open

                                                          Spry.Data.XMLDataSet.prototype.loadDataIntoDataSet = function(rawDataDoc)
                                                          {
                                                              var rs = null;
                                                              var mainXPath = Spry.Data.Region.processDataRefString(null, this.xpath, this.dataSetsForDataRefStrings);
                                                              var subPaths = this.subPaths;
                                                          Severity: Minor
                                                          Found in Src/scripts/sprydata.js - About 1 hr 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 setRowAttrClickHandler has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                          Open

                                                          Spry.Data.Region.setRowAttrClickHandler = function(node, dsName, rowAttr, funcName)
                                                          {
                                                                  if (dsName)
                                                                  {
                                                                      var ds = Spry.Data.getDataSetByName(dsName);
                                                          Severity: Minor
                                                          Found in Src/scripts/sprydata.js - About 1 hr 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 updateContent has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                          Spry.Data.Region.prototype.updateContent = function()
                                                          {
                                                              var allDataSetsReady = true;
                                                          
                                                              var dsArray = this.getDataSets();
                                                          Severity: Minor
                                                          Found in Src/scripts/sprydata.js - About 1 hr to fix

                                                            Function select has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                            Spry.Utils.SelectionManager.SelectionGroup.prototype.select = function(element, className, multiSelect)
                                                            {
                                                                var selObj = null;
                                                            
                                                                if (!multiSelect)
                                                            Severity: Minor
                                                            Found in Src/scripts/sprydata.js - About 1 hr to fix

                                                              Function attach has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                                  attach: function(rgn, node, value)
                                                                  {
                                                                      if (!value)
                                                                          return;
                                                              
                                                              
                                                              Severity: Minor
                                                              Found in Src/scripts/sprydata.js - About 1 hr to fix

                                                                Function loadDataCallback has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.prototype.loadDataCallback = function(req)
                                                                {
                                                                    if (req.xhRequest.readyState != 4)
                                                                        return;
                                                                
                                                                
                                                                Severity: Minor
                                                                Found in Src/scripts/sprydata.js - About 1 hr to fix

                                                                  Function findRowsWithColumnValues has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                  Spry.Data.DataSet.prototype.findRowsWithColumnValues = function(valueObj, firstMatchOnly, unfiltered)
                                                                  {
                                                                      var results = [];
                                                                      var rows = this.getData(unfiltered);
                                                                      if (rows)
                                                                  Severity: Minor
                                                                  Found in Src/scripts/sprydata.js - About 1 hr to fix

                                                                    Function Region has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                    Open

                                                                    Spry.Data.Region = function(regionNode, name, isDetailRegion, data, dataSets, regionStates, regionStateMap, hasBehaviorAttributes)
                                                                    Severity: Major
                                                                    Found in Src/scripts/sprydata.js - About 1 hr to fix

                                                                      Function removeAttribute has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                      Open

                                                                      Spry.Utils.removeAttribute = function(ele, name)
                                                                      {
                                                                          ele = Spry.$(ele);
                                                                          if (!ele || !name)
                                                                              return;
                                                                      Severity: Minor
                                                                      Found in Src/scripts/sprydata.js - About 55 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 getSortFunc has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                      Open

                                                                      Spry.Data.DataSet.prototype.sort.getSortFunc = function(prop, type, order)
                                                                      {
                                                                          var sortfunc = null;
                                                                          if (type == "number")
                                                                          {
                                                                      Severity: Minor
                                                                      Found in Src/scripts/sprydata.js - About 55 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 loadURL has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                      Open

                                                                      Spry.Utils.loadURL = function(method, url, async, callback, opts)
                                                                      {
                                                                          var req = new Spry.Utils.loadURL.Request();
                                                                          req.method = method;
                                                                          req.url = url;
                                                                      Severity: Minor
                                                                      Found in Src/scripts/sprydata.js - About 55 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 getDataSetContext has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                      Open

                                                                      Spry.Data.Region.ProcessingContext.prototype.getDataSetContext = function(dataSet)
                                                                      {
                                                                          if (!dataSet)
                                                                          {
                                                                              // We were called without a specified data set or
                                                                      Severity: Minor
                                                                      Found in Src/scripts/sprydata.js - About 55 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 (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

                                                                              Avoid deeply nested control flow statements.
                                                                              Open

                                                                                              for (j = 0; j < token.children.length; j++)
                                                                                              {
                                                                                                  var child = token.children[j];
                                                                                                  if (child.tokenType == Spry.Data.Region.Token.PROCESSING_INSTRUCTION_TOKEN)
                                                                                                  {
                                                                              Severity: Major
                                                                              Found in Src/scripts/sprydata.js - About 45 mins to fix

                                                                                Avoid deeply nested control flow statements.
                                                                                Open

                                                                                                    if (pdsc) pdsc.addChild(dsc);
                                                                                Severity: Major
                                                                                Found in Src/scripts/sprydata.js - About 45 mins to fix

                                                                                  Avoid deeply nested control flow statements.
                                                                                  Open

                                                                                                      if (tagAttrs.charAt(endIndex) == tagAttrs.charAt(savedIndex))
                                                                                                      {
                                                                                                          endIndex++;
                                                                                                          break;
                                                                                                      }
                                                                                  Severity: Major
                                                                                  Found in Src/scripts/sprydata.js - About 45 mins to fix

                                                                                    Avoid deeply nested control flow statements.
                                                                                    Open

                                                                                                        if (hashStr)
                                                                                                            hashStr += ",";
                                                                                    Severity: Major
                                                                                    Found in Src/scripts/sprydata.js - About 45 mins to fix

                                                                                      Avoid deeply nested control flow statements.
                                                                                      Open

                                                                                                          if (dsName && ds)
                                                                                                          {
                                                                                                              // The dataSetsForDataRefStrings array serves as both an
                                                                                                              // array of data sets and a hash lookup by name.
                                                                                      
                                                                                      
                                                                                      Severity: Major
                                                                                      Found in Src/scripts/sprydata.js - About 45 mins to fix

                                                                                        Avoid deeply nested control flow statements.
                                                                                        Open

                                                                                                                if (token.data.jsExpr)
                                                                                                                    testVal = this.evaluateExpression(token.data.jsExpr, processContext);
                                                                                        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 (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 (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

                                                                                                Avoid deeply nested control flow statements.
                                                                                                Open

                                                                                                                    for (var l = 0; l < numRSRows; l++)
                                                                                                                    {
                                                                                                                        // Create a new row that will house the join result.
                                                                                                
                                                                                                                        var newRowObj = new Object;
                                                                                                Severity: Major
                                                                                                Found in Src/scripts/sprydata.js - About 45 mins to fix

                                                                                                  Avoid deeply nested control flow statements.
                                                                                                  Open

                                                                                                                  if (tokenStack[tokenStack.length - 1].tokenType != Spry.Data.Region.Token.PROCESSING_INSTRUCTION_TOKEN)
                                                                                                                  {
                                                                                                                      Spry.Debug.reportError("Invalid processing instruction close tag: " + piName + " -- " + results[0] + "\n");
                                                                                                                      return null;
                                                                                                                  }
                                                                                                  Severity: Major
                                                                                                  Found in Src/scripts/sprydata.js - About 45 mins to fix

                                                                                                    Avoid deeply nested control flow statements.
                                                                                                    Open

                                                                                                                    if (!childToProcess && defaultChild)
                                                                                                                        childToProcess = defaultChild;
                                                                                                    Severity: Major
                                                                                                    Found in Src/scripts/sprydata.js - About 45 mins to fix

                                                                                                      Avoid deeply nested control flow statements.
                                                                                                      Open

                                                                                                                          if (spType == "string")
                                                                                                                              sp = [ sp ];
                                                                                                                          else if (spType == "object" && spType.constructor == Object)
                                                                                                                              sp = [ sp ];
                                                                                                      Severity: Major
                                                                                                      Found in Src/scripts/sprydata.js - About 45 mins to fix

                                                                                                        Avoid deeply nested control flow statements.
                                                                                                        Open

                                                                                                                        if (piDesc)
                                                                                                                        {
                                                                                                                            var dataSet = null;
                                                                                                        
                                                                                                                            var selectedDataSetName = "";
                                                                                                        Severity: Major
                                                                                                        Found in Src/scripts/sprydata.js - About 45 mins to fix

                                                                                                          Avoid deeply nested control flow statements.
                                                                                                          Open

                                                                                                                      else if (token.data.name == "spry:state")
                                                                                                                      {
                                                                                                                          var testVal = true;
                                                                                                          
                                                                                                                          if (!token.data.regionState || token.data.regionState == this.currentState)
                                                                                                          Severity: Major
                                                                                                          Found in Src/scripts/sprydata.js - About 45 mins to fix

                                                                                                            Avoid deeply nested control flow statements.
                                                                                                            Open

                                                                                                                                if (ctype == "number")
                                                                                                                                    row[cname] = new Number(val);
                                                                                                                                else if (ctype == "html")
                                                                                                                                    row[cname] = Spry.Utils.decodeEntities(val);
                                                                                                            Severity: Major
                                                                                                            Found in Src/scripts/sprydata.js - About 45 mins to fix

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

                                                                                                              Spry.Data.XMLDataSet.prototype.sessionExpiredChecker = function(req)
                                                                                                              {
                                                                                                                  if (req.xhRequest.responseText == 'session expired')
                                                                                                                      return true;
                                                                                                                  else
                                                                                                              Severity: Minor
                                                                                                              Found in Src/scripts/sprydata.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 (!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

                                                                                                                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 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 $ 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 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

                                                                                                                  Avoid too many return statements within this function.
                                                                                                                  Open

                                                                                                                                      return 0;
                                                                                                                  Severity: Major
                                                                                                                  Found in Src/scripts/sprydata.js - About 30 mins to fix

                                                                                                                    Avoid too many return statements within this function.
                                                                                                                    Open

                                                                                                                        return rootToken;
                                                                                                                    Severity: Major
                                                                                                                    Found in Src/scripts/sprydata.js - About 30 mins to fix

                                                                                                                      Avoid too many return statements within this function.
                                                                                                                      Open

                                                                                                                                      return -1;
                                                                                                                      Severity: Major
                                                                                                                      Found in Src/scripts/sprydata.js - About 30 mins to fix

                                                                                                                        Avoid too many return statements within this function.
                                                                                                                        Open

                                                                                                                                                return -1;
                                                                                                                        Severity: Major
                                                                                                                        Found in Src/scripts/sprydata.js - About 30 mins to fix

                                                                                                                          Avoid too many return statements within this function.
                                                                                                                          Open

                                                                                                                                              return 0;
                                                                                                                          Severity: Major
                                                                                                                          Found in Src/scripts/sprydata.js - About 30 mins to fix

                                                                                                                            Avoid too many return statements within this function.
                                                                                                                            Open

                                                                                                                                            return 1;
                                                                                                                            Severity: Major
                                                                                                                            Found in Src/scripts/sprydata.js - About 30 mins to fix

                                                                                                                              Avoid too many return statements within this function.
                                                                                                                              Open

                                                                                                                                                  return -1;
                                                                                                                              Severity: Major
                                                                                                                              Found in Src/scripts/sprydata.js - About 30 mins to fix

                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                Open

                                                                                                                                                        return 1;
                                                                                                                                Severity: Major
                                                                                                                                Found in Src/scripts/sprydata.js - About 30 mins to fix

                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                  Open

                                                                                                                                      return null;
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/sprydata.js - About 30 mins to fix

                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                    Open

                                                                                                                                                        return 1;
                                                                                                                                    Severity: Major
                                                                                                                                    Found in Src/scripts/sprydata.js - About 30 mins to fix

                                                                                                                                      Function getValue has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      Spry.Data.DataSet.prototype.getValue = function(valueName, rowContext)
                                                                                                                                      {
                                                                                                                                          var result = undefined;
                                                                                                                                      
                                                                                                                                          // If a rowContext is not defined, we default to
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in Src/scripts/sprydata.js - About 25 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 callback has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      Spry.Utils.loadURL.callback = function(req)
                                                                                                                                      {
                                                                                                                                          if (!req || req.xhRequest.readyState != 4)
                                                                                                                                              return;
                                                                                                                                          if (req.successCallback && (req.xhRequest.status == 200 || req.xhRequest.status == 0))
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in Src/scripts/sprydata.js - About 25 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 filterAndSortData has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      Spry.Data.DataSet.prototype.filterAndSortData = function()
                                                                                                                                      {
                                                                                                                                          // If there is a data filter installed, run it.
                                                                                                                                      
                                                                                                                                          if (this.filterDataFunc)
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in Src/scripts/sprydata.js - About 25 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 nodeContainsElementNode has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      Spry.Data.XMLDataSet.nodeContainsElementNode = function(node)
                                                                                                                                      {
                                                                                                                                          if (node)
                                                                                                                                          {
                                                                                                                                              node = node.firstChild;
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in Src/scripts/sprydata.js - About 25 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 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                          attach: function(rgn, node, value)
                                                                                                                                          {
                                                                                                                                              if (value)
                                                                                                                                              {
                                                                                                                                                  rowNumAttr = node.attributes.getNamedItem("spryoddrownumber");
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in Src/scripts/sprydata.js - About 25 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 indexOf has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      Spry.Data.Region.ProcessingContext.prototype.indexOf = function(arr, item)
                                                                                                                                      {
                                                                                                                                          // Given an array, return the index of item in that array
                                                                                                                                          // or -1 if it doesn't exist.
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in Src/scripts/sprydata.js - About 25 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 buildOpenTagForRepeat has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      Spry.Data.Region.PI.buildOpenTagForRepeat = function(ele, piName)
                                                                                                                                      {
                                                                                                                                          if (!ele || !piName)
                                                                                                                                              return "";
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in Src/scripts/sprydata.js - About 25 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 setURL has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      Spry.Data.HTTPSourceDataSet.prototype.setURL = function(url, requestOptions)
                                                                                                                                      {
                                                                                                                                          if (this.url == url)
                                                                                                                                          {
                                                                                                                                              // The urls match so we may not have to do anything, but
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in Src/scripts/sprydata.js - About 25 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 loadDataCallback has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.prototype.loadDataCallback = function(req)
                                                                                                                                      {
                                                                                                                                          if (req.xhRequest.readyState != 4)
                                                                                                                                              return;
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in Src/scripts/sprydata.js - About 25 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

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

                                                                                                                                      Spry.Data.Region.behaviorAttrs["spry:setrownumber"] =
                                                                                                                                      {
                                                                                                                                          setup: function(node, value)
                                                                                                                                          {
                                                                                                                                              if (!value)
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 6 hrs to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 3628..3651

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

                                                                                                                                      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.Data.Region.behaviorAttrs["spry:setrow"] =
                                                                                                                                      {
                                                                                                                                          setup: function(node, value)
                                                                                                                                          {
                                                                                                                                              if (!value)
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 6 hrs to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 3653..3676

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

                                                                                                                                      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.Utils.addEventListener = function(element, eventType, handler, capture)
                                                                                                                                      {
                                                                                                                                          try
                                                                                                                                          {
                                                                                                                                              element = Spry.$(element);
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 3 hrs to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 239..250

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

                                                                                                                                      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.Utils.removeEventListener = function(element, eventType, handler, capture)
                                                                                                                                      {
                                                                                                                                          try
                                                                                                                                          {
                                                                                                                                              element = Spry.$(element);
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 3 hrs to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 226..237

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

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

                                                                                                                                      Spry.Data.Region.PI.instructions["spry:when"] = { tagName: "spry:when", childrenOnly: false, getOpenTag: Spry.Data.Region.PI.buildOpenTagForTest, getCloseTag: Spry.Data.Region.PI.buildCloseTag };
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 7 other locations - About 2 hrs to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 4345..4345
                                                                                                                                      Src/scripts/sprydata.js on lines 4346..4346
                                                                                                                                      Src/scripts/sprydata.js on lines 4347..4347
                                                                                                                                      Src/scripts/sprydata.js on lines 4348..4348
                                                                                                                                      Src/scripts/sprydata.js on lines 4349..4349
                                                                                                                                      Src/scripts/sprydata.js on lines 4351..4351
                                                                                                                                      Src/scripts/sprydata.js on lines 4352..4352

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

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

                                                                                                                                      Spry.Data.Region.PI.instructions["spry:repeat"] = { tagName: "spry:repeat", childrenOnly: false, getOpenTag: Spry.Data.Region.PI.buildOpenTagForRepeat, getCloseTag: Spry.Data.Region.PI.buildCloseTag };
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 7 other locations - About 2 hrs to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 4345..4345
                                                                                                                                      Src/scripts/sprydata.js on lines 4346..4346
                                                                                                                                      Src/scripts/sprydata.js on lines 4348..4348
                                                                                                                                      Src/scripts/sprydata.js on lines 4349..4349
                                                                                                                                      Src/scripts/sprydata.js on lines 4350..4350
                                                                                                                                      Src/scripts/sprydata.js on lines 4351..4351
                                                                                                                                      Src/scripts/sprydata.js on lines 4352..4352

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

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

                                                                                                                                      Spry.Data.Region.PI.instructions["spry:choose"] = { tagName: "spry:choose", childrenOnly: true, getOpenTag: Spry.Data.Region.PI.buildOpenTag, getCloseTag: Spry.Data.Region.PI.buildCloseTag };
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 7 other locations - About 2 hrs to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 4345..4345
                                                                                                                                      Src/scripts/sprydata.js on lines 4346..4346
                                                                                                                                      Src/scripts/sprydata.js on lines 4347..4347
                                                                                                                                      Src/scripts/sprydata.js on lines 4348..4348
                                                                                                                                      Src/scripts/sprydata.js on lines 4350..4350
                                                                                                                                      Src/scripts/sprydata.js on lines 4351..4351
                                                                                                                                      Src/scripts/sprydata.js on lines 4352..4352

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

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

                                                                                                                                      Spry.Data.Region.PI.instructions["spry:default"] = { tagName: "spry:default", childrenOnly: false, getOpenTag: Spry.Data.Region.PI.buildOpenTag, getCloseTag: Spry.Data.Region.PI.buildCloseTag };
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 7 other locations - About 2 hrs to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 4345..4345
                                                                                                                                      Src/scripts/sprydata.js on lines 4346..4346
                                                                                                                                      Src/scripts/sprydata.js on lines 4347..4347
                                                                                                                                      Src/scripts/sprydata.js on lines 4348..4348
                                                                                                                                      Src/scripts/sprydata.js on lines 4349..4349
                                                                                                                                      Src/scripts/sprydata.js on lines 4350..4350
                                                                                                                                      Src/scripts/sprydata.js on lines 4352..4352

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

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

                                                                                                                                      Spry.Data.Region.PI.instructions["spry:if"] = { tagName: "spry:if", childrenOnly: false, getOpenTag: Spry.Data.Region.PI.buildOpenTagForTest, getCloseTag: Spry.Data.Region.PI.buildCloseTag };
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 7 other locations - About 2 hrs to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 4345..4345
                                                                                                                                      Src/scripts/sprydata.js on lines 4347..4347
                                                                                                                                      Src/scripts/sprydata.js on lines 4348..4348
                                                                                                                                      Src/scripts/sprydata.js on lines 4349..4349
                                                                                                                                      Src/scripts/sprydata.js on lines 4350..4350
                                                                                                                                      Src/scripts/sprydata.js on lines 4351..4351
                                                                                                                                      Src/scripts/sprydata.js on lines 4352..4352

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

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

                                                                                                                                      Spry.Data.Region.PI.instructions["spry:content"] = { tagName: "spry:content", childrenOnly: true, getOpenTag: Spry.Data.Region.PI.buildOpenTagForContent, getCloseTag: Spry.Data.Region.PI.buildCloseTag };
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 7 other locations - About 2 hrs to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 4345..4345
                                                                                                                                      Src/scripts/sprydata.js on lines 4346..4346
                                                                                                                                      Src/scripts/sprydata.js on lines 4347..4347
                                                                                                                                      Src/scripts/sprydata.js on lines 4348..4348
                                                                                                                                      Src/scripts/sprydata.js on lines 4349..4349
                                                                                                                                      Src/scripts/sprydata.js on lines 4350..4350
                                                                                                                                      Src/scripts/sprydata.js on lines 4351..4351

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

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

                                                                                                                                      Spry.Data.Region.PI.instructions["spry:repeatchildren"] = { tagName: "spry:repeat", childrenOnly: true, getOpenTag: Spry.Data.Region.PI.buildOpenTagForRepeat, getCloseTag: Spry.Data.Region.PI.buildCloseTag };
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 7 other locations - About 2 hrs to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 4345..4345
                                                                                                                                      Src/scripts/sprydata.js on lines 4346..4346
                                                                                                                                      Src/scripts/sprydata.js on lines 4347..4347
                                                                                                                                      Src/scripts/sprydata.js on lines 4349..4349
                                                                                                                                      Src/scripts/sprydata.js on lines 4350..4350
                                                                                                                                      Src/scripts/sprydata.js on lines 4351..4351
                                                                                                                                      Src/scripts/sprydata.js on lines 4352..4352

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

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

                                                                                                                                      Spry.Data.Region.PI.instructions["spry:state"] = { tagName: "spry:state", childrenOnly: false, getOpenTag: Spry.Data.Region.PI.buildOpenTagForState, getCloseTag: Spry.Data.Region.PI.buildCloseTag };
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 7 other locations - About 2 hrs to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 4346..4346
                                                                                                                                      Src/scripts/sprydata.js on lines 4347..4347
                                                                                                                                      Src/scripts/sprydata.js on lines 4348..4348
                                                                                                                                      Src/scripts/sprydata.js on lines 4349..4349
                                                                                                                                      Src/scripts/sprydata.js on lines 4350..4350
                                                                                                                                      Src/scripts/sprydata.js on lines 4351..4351
                                                                                                                                      Src/scripts/sprydata.js on lines 4352..4352

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

                                                                                                                                      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

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

                                                                                                                                      Spry.Data.Region.prototype.onLoadError = function(dataSet)
                                                                                                                                      {
                                                                                                                                          if (this.currentState != "error")
                                                                                                                                              this.setState("error");
                                                                                                                                          Spry.Data.Region.notifyObservers("onError", this);
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 1 hr to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 3463..3468

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

                                                                                                                                      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.Data.Region.prototype.onSessionExpired = function(dataSet)
                                                                                                                                      {
                                                                                                                                          if (this.currentState != "expired")
                                                                                                                                              this.setState("expired");
                                                                                                                                          Spry.Data.Region.notifyObservers("onExpired", this);
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 1 hr to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 3456..3461

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

                                                                                                                                      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 (str && str.search(/[&<>"]/) != -1)
                                                                                                                                          {
                                                                                                                                              str = str.replace(/&/g, "&amp;");
                                                                                                                                              str = str.replace(/</g, "&lt;");
                                                                                                                                              str = str.replace(/>/g, "&gt;");
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 1 hr to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 422..428

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

                                                                                                                                      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 (str)
                                                                                                                                          {
                                                                                                                                              str = str.replace(/\\/g, "\\\\");
                                                                                                                                              str = str.replace(/["']/g, "\\$&");
                                                                                                                                              str = str.replace(/\n/g, "\\n");
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 1 hr to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 434..440

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

                                                                                                                                      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.Data.Region.PI.buildOpenTag = function(ele, piName)
                                                                                                                                      {
                                                                                                                                          return "<" + Spry.Data.Region.PI.instructions[piName].tagName + ">";
                                                                                                                                      };
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 1 hr to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 4340..4343

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

                                                                                                                                      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.Data.Region.PI.buildCloseTag = function(ele, piName)
                                                                                                                                      {
                                                                                                                                          return "</" + Spry.Data.Region.PI.instructions[piName].tagName + ">";
                                                                                                                                      };
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 1 hr to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 4335..4338

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

                                                                                                                                      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

                                                                                                                                          try
                                                                                                                                          {
                                                                                                                                              var testAttrValue = Spry.Utils.getAttribute(ele, piName);
                                                                                                                                              if (testAttrValue)
                                                                                                                                                  jsExpr = Spry.Utils.encodeEntities(testAttrValue);
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 1 hr to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 4318..4324

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

                                                                                                                                      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

                                                                                                                                          try
                                                                                                                                          {
                                                                                                                                              var contentAttrValue = Spry.Utils.getAttribute(ele, piName);
                                                                                                                                              if (contentAttrValue)
                                                                                                                                                  dataRefStr = Spry.Utils.encodeEntities(contentAttrValue);
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 1 hr to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 4258..4264

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

                                                                                                                                      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

                                                                                                                                                          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

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

                                                                                                                                      Spry.Data.Region.PI.buildOpenTagForTest = function(ele, piName)
                                                                                                                                      {
                                                                                                                                          return Spry.Data.Region.PI.buildOpenTagForValueAttr(ele, piName, "test");
                                                                                                                                      };
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 1 hr to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 4280..4283

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

                                                                                                                                      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.Data.Region.PI.buildOpenTagForState = function(ele, piName)
                                                                                                                                      {
                                                                                                                                          return Spry.Data.Region.PI.buildOpenTagForValueAttr(ele, piName, "name");
                                                                                                                                      };
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 1 hr to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 4275..4278

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

                                                                                                                                      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 (Spry.Data.Region.debug)
                                                                                                                                                      Spry.Debug.trace("<hr />Performing IE innerHTML fix up of Region: " + name + "<br /><br />" + Spry.Utils.encodeEntities(dataStr));
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 1 hr to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 1263..1264

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

                                                                                                                                      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 (Spry.Data.Region.debug)
                                                                                                                                                  Spry.Debug.trace("<hr />Region template markup for '" + name + "':<br /><br />" + Spry.Utils.encodeEntities(dataStr));
                                                                                                                                      Severity: Major
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 1 hr to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 1257..1258

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

                                                                                                                                      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 (ds.getLoadDataRequestIsPending())
                                                                                                                                                      allDataSetsReady = false;
                                                                                                                                                  else if (!ds.getDataWasLoaded())
                                                                                                                                                  {
                                                                                                                                                      // Kick off the load of this data set!
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 55 mins to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 3780..3787

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

                                                                                                                                      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 (ds.getLoadDataRequestIsPending())
                                                                                                                                                      allDataSetsReady = false;
                                                                                                                                                  else if (!ds.getDataWasLoaded())
                                                                                                                                                  {
                                                                                                                                                      // Kick off the loading of the data if it hasn't happened yet.
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 55 mins to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 2250..2257

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

                                                                                                                                      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

                                                                                                                                          return "<" + Spry.Data.Region.PI.instructions[piName].tagName + " select=\"" + selectAttrStr + "\"" + testAttrStr + ">";
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 50 mins to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 4272..4272

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

                                                                                                                                      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

                                                                                                                                          return "<" + Spry.Data.Region.PI.instructions[piName].tagName + " " + attrName +"=\"" + jsExpr + "\">";
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in Src/scripts/sprydata.js and 1 other location - About 50 mins to fix
                                                                                                                                      Src/scripts/sprydata.js on lines 4308..4308

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

                                                                                                                                      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 713..716

                                                                                                                                      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

                                                                                                                                      There are no issues that match your filters.

                                                                                                                                      Category
                                                                                                                                      Status