GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 605 of 605 total issues

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

  var oldStyle = {
    top: element.style.top,
    left: element.style.left,
    height: element.style.height,
    width: element.style.width,
Severity: Major
Found in Src/scripts/effects.js and 1 other location - About 1 hr to fix
Src/scripts/effects.js on lines 833..838

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

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

  var oldStyle = {
    top: element.style.top,
    left: element.style.left,
    height: element.style.height,
    width: element.style.width,
Severity: Major
Found in Src/scripts/effects.js and 1 other location - About 1 hr to fix
Src/scripts/effects.js on lines 759..764

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

Function _createResponder has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function _createResponder(element, eventName, handler) {
    var registry = Element.retrieve(element, 'prototype_event_registry');

    if (Object.isUndefined(registry)) {
      CACHE.push(element);
Severity: Minor
Found in Src/scripts/prototype.js - About 1 hr to fix

    Function getPixelValue has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function getPixelValue(value, property, context) {
        var element = null;
        if (Object.isElement(value)) {
          element = value;
          value = element.getStyle(property);
    Severity: Minor
    Found in Src/scripts/prototype.js - About 1 hr to fix

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

      Spry.Widget.ValidationTextField.prototype.compileDatePattern = function () 
      {
          var dateValidationPatternString = "";
          var groupPatterns = [];
          var fullGroupPatterns = [];
      Severity: Minor
      Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

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

        function xpathReduce(stack, ahead) {
          var cand = null;
        
          if (stack.length > 0) {
            var top = stack[stack.length-1];
        Severity: Minor
        Found in Src/scripts/xpath.js - About 1 hr to fix

          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

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

                if (!this.options.sync)
                  Effect.Queues.get(Object.isString(this.options.queue) ?
                    'global' : this.options.queue.scope).add(this);
            Severity: Major
            Found in Src/scripts/effects.js and 1 other location - About 1 hr to fix
            Src/scripts/effects.js on lines 291..293

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

            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 (!this.options.sync)
                  Effect.Queues.get(Object.isString(this.options.queue) ?
                    'global' : this.options.queue.scope).remove(this);
            Severity: Major
            Found in Src/scripts/effects.js and 1 other location - About 1 hr to fix
            Src/scripts/effects.js on lines 268..270

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

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

                    _begin: function() {
                      if (this._prepared) return;
                
                      var element = this.element;
                      if (isDisplayed(element)) {
                Severity: Minor
                Found in Src/scripts/prototype.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 xpathParseInit has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function xpathParseInit() {
                    if (xpathRules.length) {
                      return;
                    }
                  
                  
                  Severity: Minor
                  Found in Src/scripts/xpath.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 validate has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Spry.Widget.ValidationSelect.prototype.validate = function() {
                      this.reset();
                      // check isRequired
                      if (this.isRequired) {
                          // there are no options, or no option has been selected
                  Severity: Minor
                  Found in Src/scripts/spryvalidationselect.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 getPageSize has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                  Open

                      getPageSize: function() {
                              
                           var xScroll, yScroll;
                          
                          if (window.innerHeight && window.scrollMaxY) {    
                  Severity: Minor
                  Found in Src/scripts/lightbox.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

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

                      if (this.errors & Spry.Widget.ValidationTextField.ERROR_RANGE_MIN) {
                          this.addClassName(this.element, this.invalidRangeMinClass);
                          this.addClassName(this.additionalError, this.invalidRangeMinClass);
                          return false;
                      }
                  Severity: Major
                  Found in Src/scripts/spryvalidationtextfield.js and 4 other locations - About 1 hr to fix
                  Src/scripts/spryvalidationtextfield.js on lines 1769..1773
                  Src/scripts/spryvalidationtextfield.js on lines 1781..1785
                  Src/scripts/spryvalidationtextfield.js on lines 1787..1791
                  Src/scripts/spryvalidationtextfield.js on lines 1793..1797

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

                  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

                    var options = Object.extend({
                      direction: 'center',
                      moveTransition: Effect.Transitions.sinoidal,
                      scaleTransition: Effect.Transitions.sinoidal,
                      opacityTransition: Effect.Transitions.none
                  Severity: Major
                  Found in Src/scripts/effects.js and 1 other location - About 1 hr to fix
                  Src/scripts/effects.js on lines 753..758

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

                  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