GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 605 of 605 total issues

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

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

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

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

function xpathCollectDescendantsReverse(nodelist, node) {
  for (var n = node.lastChild; n; n = n.previousSibling) {
    nodelist.push(n);
    arguments.callee(nodelist, n);
  }
Severity: Major
Found in Src/scripts/xpath.js and 1 other location - About 1 hr to fix
Src/scripts/xpath.js on lines 2359..2364

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

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

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

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
  function iter(name) {
    return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
  }

Severity: Minor
Found in Src/scripts/prototype.js - About 1 hr to fix

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

        var onDomLoad = function() {
            if (!ua.w3cdom) {
                return;
            }
            addDomLoadEvent(main);
    Severity: Minor
    Found in Src/scripts/swfobject_modified.js - About 1 hr to fix

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

      Effect.SlideUp = function(element) {
        element = $(element).cleanWhitespace();
        var oldInnerBottom = element.down().getStyle('bottom');
        var elementDimensions = element.getDimensions();
        return new Effect.Scale(element, window.opera ? 0 : 1,
      Severity: Minor
      Found in Src/scripts/effects.js - About 1 hr to fix

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

            function main() { // Static publishing only
                var rl = regObjArr.length;
                for (var i = 0; i < rl; i++) { // For each registered object element
                    var id = regObjArr[i].id;
                    if (ua.pv[0] > 0) {
        Severity: Minor
        Found in Src/scripts/swfobject_modified.js - About 1 hr to fix

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

            initialize: function(element) {
              this.element = $(element);
              if (!this.element) throw(Effect._elementDoesNotExistError);
              var options = Object.extend({
                style: { }
          Severity: Minor
          Found in Src/scripts/effects.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

                    Consider simplifying this complex logical expression.
                    Open

                        if (element && isPercentage) {
                          context = context || element.parentNode;
                          var decimal = toDecimal(value);
                          var whole = null;
                          var position = element.getStyle('position');
                    Severity: Major
                    Found in Src/scripts/prototype.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

                        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

                                    this.event_handlers.push([this.selectElement, "change", function(e) { if (self.isDisabled()) return true; return self.onChange(e); }]);
                        Severity: Minor
                        Found in Src/scripts/spryvalidationselect.js and 1 other location - About 55 mins to fix
                        Src/scripts/spryvalidationselect.js on lines 176..176

                        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

                        Severity
                        Category
                        Status
                        Source
                        Language