GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 605 of 605 total issues

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

        if (mustRevert) {
            this.setValue(this.oldValue);
            this.selection.moveTo(this.selection.start, this.selection.start);
        } else {
            this.onChange();
Severity: Minor
Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 50 mins to fix
Src/scripts/spryvalidationtextfield.js on lines 1292..1298

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

    this.validateOn = this.validateOn | (validateOn.indexOf('blur') != -1 ? Spry.Widget.ValidationTextField.ONBLUR : 0);
Severity: Major
Found in Src/scripts/spryvalidationtextfield.js and 4 other locations - About 50 mins to fix
Src/scripts/spryvalidationselect.js on lines 44..44
Src/scripts/spryvalidationselect.js on lines 45..45
Src/scripts/spryvalidationtextfield.js on lines 102..102
Src/scripts/spryvalidationtextfield.js on lines 104..104

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

                    if (!mustRevert) {
                        this.setValue(this.fixedValue);
                        this.selection.moveTo(this.fixedValue.length, this.fixedValue.length);
                    } else {
                        this.setValue(this.oldValue.substring(0, this.selection.start) + autocomplete);
Severity: Minor
Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 50 mins to fix
Src/scripts/spryvalidationtextfield.js on lines 1112..1117

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 + " 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 5 locations. Consider refactoring.
Open

    this.validateOn = this.validateOn | (validateOn.indexOf('blur') != -1 ? Spry.Widget.ValidationSelect.ONBLUR : 0);
Severity: Major
Found in Src/scripts/spryvalidationselect.js and 4 other locations - About 50 mins to fix
Src/scripts/spryvalidationselect.js on lines 45..45
Src/scripts/spryvalidationtextfield.js on lines 102..102
Src/scripts/spryvalidationtextfield.js on lines 103..103
Src/scripts/spryvalidationtextfield.js on lines 104..104

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

    for (var i = 0; i < qlen; i++) {
        if (q[i] == this) {
            q.splice(i, 1);
            break;
        }
Severity: Minor
Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 50 mins to fix
Src/scripts/spryvalidationselect.js on lines 104..109

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

                if (minuteIndex != -1) {
                    var theMinute = parseInt(valueGroups[minuteIndex], 10);
                    if (isNaN(theMinute) || theMinute > 59) {
                        return false;
                    }
Severity: Minor
Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 50 mins to fix
Src/scripts/spryvalidationtextfield.js on lines 339..344

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

    this.validateOn = this.validateOn | (validateOn.indexOf('change') != -1 ? Spry.Widget.ValidationSelect.ONCHANGE : 0);
Severity: Major
Found in Src/scripts/spryvalidationselect.js and 4 other locations - About 50 mins to fix
Src/scripts/spryvalidationselect.js on lines 44..44
Src/scripts/spryvalidationtextfield.js on lines 102..102
Src/scripts/spryvalidationtextfield.js on lines 103..103
Src/scripts/spryvalidationtextfield.js on lines 104..104

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

Function dirNodeCheck has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
Severity: Minor
Found in Src/scripts/prototype.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        if (!mustRevert) {
                            this.setValue(this.fixedValue);
                            this.selection.moveTo(this.fixedValue.length, this.fixedValue.length);
                        } else {
                            this.setValue(this.oldValue.substring(0, this.selection.start) + autocomplete);
    Severity: Major
    Found in Src/scripts/spryvalidationtextfield.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                  if ( a == b ) {
                      hasDuplicate = true;
                  }
      Severity: Major
      Found in Src/scripts/prototype.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if ( !isXML ) {
                                elem.sizcache = doneName;
                                elem.sizset = i;
                            }
        Severity: Major
        Found in Src/scripts/prototype.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if (!this.isValueValid(futureValue, this.selection.start + 1, group)) 
                              {
                                  this.redTextFlash(); return false;
                              }
                              else 
          Severity: Major
          Found in Src/scripts/spryvalidationtextfield.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                            if (!attribute) return null;
            Severity: Major
            Found in Src/scripts/prototype.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if ( !inplace ) {
                                      curLoop = result;
                                  }
              Severity: Major
              Found in Src/scripts/prototype.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                      if (element.tagName.toUpperCase() == 'IMG' && element.width) {
                        element.width++; element.width--;
                      } else try {
                        var n = document.createTextNode(' ');
                        element.appendChild(n);
                Severity: Major
                Found in Src/scripts/prototype.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if (q < t) {
                                          break;
                                      }
                  Severity: Major
                  Found in Src/scripts/spryvalidationtextfield.js - About 45 mins to fix

                    Function CLASS has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            CLASS: function(match, curLoop, inplace, result, not, isXML){
                    Severity: Minor
                    Found in Src/scripts/prototype.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                              if (value[1]) return parseFloat(value[1]) / 100;
                      Severity: Major
                      Found in Src/scripts/prototype.js - About 45 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language