GuilhermeStracini/TCC-SENAC

View on GitHub
Src/scripts/spryvalidationtextfield.js

Summary

Maintainability
F
1 mo
Test Coverage

File spryvalidationtextfield.js has 1933 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// SpryValidationTextField.js - version 0.37 - Spry Pre-Release 1.6.1
//
// Copyright (c) 2006. Adobe Systems Incorporated.
// All rights reserved.
//
Severity: Major
Found in Src/scripts/spryvalidationtextfield.js - About 5 days to fix

    Function onKeyPress has a Cognitive Complexity of 165 (exceeds 5 allowed). Consider refactoring.
    Open

    Spry.Widget.ValidationTextField.prototype.onKeyPress = function(e)
    {
        if (this.flags.skp) {
            this.flags.skp = false;
            Spry.Widget.Utils.stopEvent(e);
    Severity: Minor
    Found in Src/scripts/spryvalidationtextfield.js - About 3 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 onKeyPress has 214 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Spry.Widget.ValidationTextField.prototype.onKeyPress = function(e)
    {
        if (this.flags.skp) {
            this.flags.skp = false;
            Spry.Widget.Utils.stopEvent(e);
    Severity: Major
    Found in Src/scripts/spryvalidationtextfield.js - About 1 day to fix

      Function punycode_encode has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
      Open

      Spry.Widget.Utils.punycode_encode = function (input, max_out) {
          var inputc = input.split("");
          input = [];
          for(var i=0; i<inputc.length; i++) {
              input.push(inputc[i].charCodeAt(0));
      Severity: Minor
      Found in Src/scripts/spryvalidationtextfield.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 doValidations has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
      Open

      Spry.Widget.ValidationTextField.prototype.doValidations = function(testValue, revertValue)
      {
          if (this.isDisabled()) return false;
      
          if (this.flags.locked) {
      Severity: Minor
      Found in Src/scripts/spryvalidationtextfield.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 update has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
      Open

      Spry.Widget.SelectionDescriptor.prototype.update = function()
      {
          if (Spry.is.ie && Spry.is.windows) {
              var sel = this.element.ownerDocument.selection;
              if (this.element.nodeName == "TEXTAREA") {
      Severity: Minor
      Found in Src/scripts/spryvalidationtextfield.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 validation has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
      Open

              validation: function(value, options) {
                  //    HH:MM:SS T
                  var formatRegExp = /([hmst]+)/gi;
                  var valueRegExp = /(\d+|AM?|PM?)/gi;
                  var formatGroups = options.format.match(formatRegExp);
      Severity: Minor
      Found in Src/scripts/spryvalidationtextfield.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 onKeyDown has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
      Open

      Spry.Widget.ValidationTextField.prototype.onKeyDown = function(e)
      {
          this.saveState();
          this.keyCode = e.keyCode;
      
      
      Severity: Minor
      Found in Src/scripts/spryvalidationtextfield.js - About 5 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 attachBehaviors has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
      Open

      Spry.Widget.ValidationTextField.prototype.attachBehaviors = function()
      {
          if (this.element) {
              if (this.element.nodeName == "INPUT") {
                  this.input = this.element;
      Severity: Minor
      Found in Src/scripts/spryvalidationtextfield.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 validation has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
      Open

              validation: function(value, options) {
                  //fix for ?ID=223429 and ?ID=223387
                  /* the following regexp matches components of an URI as specified in http://tools.ietf.org/html/rfc3986#page-51 page 51, Appendix B.
                      scheme    = $2
                      authority = $4
      Severity: Minor
      Found in Src/scripts/spryvalidationtextfield.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 validateIP has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
      Open

      Spry.Widget.ValidationTextField.validateIP = function (value, format)
      {
          var validIPv6Addresses = [
              //preferred
              /^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}(?:\/\d{1,3})?$/i,
      Severity: Minor
      Found in Src/scripts/spryvalidationtextfield.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 validation has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
      Open

              validation: function(value, options) {
                  var formatRegExp = /^([mdy]+)[\.\-\/\\\s]+([mdy]+)[\.\-\/\\\s]+([mdy]+)$/i;
                  var valueRegExp = this.dateValidationPattern;
                  var formatGroups = options.format.match(formatRegExp);
                  var valueGroups = value.match(valueRegExp);
      Severity: Minor
      Found in Src/scripts/spryvalidationtextfield.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 doValidations has 96 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Spry.Widget.ValidationTextField.prototype.doValidations = function(testValue, revertValue)
      {
          if (this.isDisabled()) return false;
      
          if (this.flags.locked) {
      Severity: Major
      Found in Src/scripts/spryvalidationtextfield.js - About 3 hrs to fix

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

        Spry.Widget.Utils.getCharacterFromEvent = function(e){
            var keyDown = e.type == "keydown";
        
            var code = null;
            var character = null;
        Severity: Minor
        Found in Src/scripts/spryvalidationtextfield.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 validateIP has 66 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Spry.Widget.ValidationTextField.validateIP = function (value, format)
        {
            var validIPv6Addresses = [
                //preferred
                /^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}(?:\/\d{1,3})?$/i,
        Severity: Major
        Found in Src/scripts/spryvalidationtextfield.js - About 2 hrs to fix

          Function punycode_encode has 66 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Spry.Widget.Utils.punycode_encode = function (input, max_out) {
              var inputc = input.split("");
              input = [];
              for(var i=0; i<inputc.length; i++) {
                  input.push(inputc[i].charCodeAt(0));
          Severity: Major
          Found in Src/scripts/spryvalidationtextfield.js - About 2 hrs to fix

            Function validation has 62 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    validation: function(value, options) {
                        var formatRegExp = /^([mdy]+)[\.\-\/\\\s]+([mdy]+)[\.\-\/\\\s]+([mdy]+)$/i;
                        var valueRegExp = this.dateValidationPattern;
                        var formatGroups = options.format.match(formatRegExp);
                        var valueGroups = value.match(valueRegExp);
            Severity: Major
            Found in Src/scripts/spryvalidationtextfield.js - About 2 hrs to fix

              Function validation has 62 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      validation: function(value, options) {
                          //    HH:MM:SS T
                          var formatRegExp = /([hmst]+)/gi;
                          var valueRegExp = /(\d+|AM?|PM?)/gi;
                          var formatGroups = options.format.match(formatRegExp);
              Severity: Major
              Found in Src/scripts/spryvalidationtextfield.js - About 2 hrs to fix

                Function init has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Spry.Widget.ValidationTextField.prototype.init = function(element, options)
                {
                    this.element = this.getElement(element);
                    this.errors = 0;
                    this.flags = {locked: false, restoreSelection: true};
                Severity: Major
                Found in Src/scripts/spryvalidationtextfield.js - About 2 hrs to fix

                  Function onKeyDown has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  Spry.Widget.ValidationTextField.prototype.onKeyDown = function(e)
                  {
                      this.saveState();
                      this.keyCode = e.keyCode;
                  
                  
                  Severity: Major
                  Found in Src/scripts/spryvalidationtextfield.js - About 2 hrs to fix

                    Function attachBehaviors has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Spry.Widget.ValidationTextField.prototype.attachBehaviors = function()
                    {
                        if (this.element) {
                            if (this.element.nodeName == "INPUT") {
                                this.input = this.element;
                    Severity: Major
                    Found in Src/scripts/spryvalidationtextfield.js - About 2 hrs to fix

                      Function BrowserSniff has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                      Open

                      Spry.Widget.BrowserSniff = function()
                      {
                          var b = navigator.appName.toString();
                          var up = navigator.platform.toString();
                          var ua = navigator.userAgent.toString();
                      Severity: Minor
                      Found in Src/scripts/spryvalidationtextfield.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 update has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      Spry.Widget.SelectionDescriptor.prototype.update = function()
                      {
                          if (Spry.is.ie && Spry.is.windows) {
                              var sel = this.element.ownerDocument.selection;
                              if (this.element.nodeName == "TEXTAREA") {
                      Severity: Major
                      Found in Src/scripts/spryvalidationtextfield.js - About 2 hrs to fix

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

                        Spry.Widget.SelectionDescriptor.prototype.moveTo = function(start, end)
                        {
                            if (Spry.is.ie && Spry.is.windows) {
                                if (this.element.nodeName == "TEXTAREA") {
                                    var ta_range = this.element.createTextRange();
                        Severity: Minor
                        Found in Src/scripts/spryvalidationtextfield.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 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 validation has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  validation: function(value, options) {
                                      //fix for ?ID=223429 and ?ID=223387
                                      /* the following regexp matches components of an URI as specified in http://tools.ietf.org/html/rfc3986#page-51 page 51, Appendix B.
                                          scheme    = $2
                                          authority = $4
                          Severity: Minor
                          Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

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

                            Spry.Widget.ValidationTextField.prototype.validate = function() {
                            
                                this.resetClasses();
                                //possible states: required, format, rangeMin, rangeMax, charsMin, charsMax
                                if (this.validateOn & Spry.Widget.ValidationTextField.ONSUBMIT) {
                            Severity: Minor
                            Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

                              Consider simplifying this complex logical expression.
                              Open

                                  if (this.input) {
                                      if (this.maxChars) {
                                          this.input.removeAttribute("maxLength");
                                      }
                                      this.putHint();
                              Severity: Critical
                              Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

                                Function compilePattern has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                Spry.Widget.ValidationTextField.prototype.compilePattern = function() {
                                    if (!this.pattern) {
                                        return;
                                    }
                                    var compiled = [];
                                Severity: Minor
                                Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

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

                                          validation: function(value, options) {
                                              var regExp = null;
                                              options.format = options.format || 'ALL';
                                              switch (options.format.toUpperCase()) {
                                                  case 'ALL': regExp = /^[3-6]{1}[0-9]{12,18}$/; break;
                                  Severity: Minor
                                  Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

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

                                    Spry.Widget.Utils.getCharacterFromEvent = function(e){
                                        var keyDown = e.type == "keydown";
                                    
                                        var code = null;
                                        var character = null;
                                    Severity: Minor
                                    Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

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

                                              validation: function(value, options) {
                                                  var regExp = null;
                                                  options.format = options.format || 'ALL';
                                                  switch (options.format.toUpperCase()) {
                                                      case 'ALL': regExp = /^[3-6]{1}[0-9]{12,18}$/; break;
                                      Severity: Minor
                                      Found in Src/scripts/spryvalidationtextfield.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 compilePattern has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      Spry.Widget.ValidationTextField.prototype.compilePattern = function() {
                                          if (!this.pattern) {
                                              return;
                                          }
                                          var compiled = [];
                                      Severity: Minor
                                      Found in Src/scripts/spryvalidationtextfield.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 destroy has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      Spry.Widget.ValidationTextField.prototype.destroy = function() {
                                          if (this.event_handlers)
                                              for (var i=0; i<this.event_handlers.length; i++) {
                                                  Spry.Widget.Utils.removeEventListener(this.event_handlers[i][0], this.event_handlers[i][1], this.event_handlers[i][2], false);
                                              }
                                      Severity: Minor
                                      Found in Src/scripts/spryvalidationtextfield.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 onChange has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      Spry.Widget.ValidationTextField.prototype.onChange = function(e)
                                      {
                                          if (Spry.is.opera && this.flags.operaRevertOnKeyUp) {
                                              return true;
                                          }
                                      Severity: Minor
                                      Found in Src/scripts/spryvalidationtextfield.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 BrowserSniff has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      Spry.Widget.BrowserSniff = function()
                                      {
                                          var b = navigator.appName.toString();
                                          var up = navigator.platform.toString();
                                          var ua = navigator.userAgent.toString();
                                      Severity: Minor
                                      Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

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

                                        Spry.Widget.ValidationTextField.prototype.onChange = function(e)
                                        {
                                            if (Spry.is.opera && this.flags.operaRevertOnKeyUp) {
                                                return true;
                                            }
                                        Severity: Minor
                                        Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

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

                                          Spry.Widget.SelectionDescriptor.prototype.collapse = function(begin)
                                          {
                                              if (Spry.is.ie && Spry.is.windows) {
                                                  this.range = this.element.ownerDocument.selection.createRange();
                                                  this.range.collapse(begin);
                                          Severity: Minor
                                          Found in Src/scripts/spryvalidationtextfield.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 moveTo has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                          Spry.Widget.SelectionDescriptor.prototype.moveTo = function(start, end)
                                          {
                                              if (Spry.is.ie && Spry.is.windows) {
                                                  if (this.element.nodeName == "TEXTAREA") {
                                                      var ta_range = this.element.createTextRange();
                                          Severity: Minor
                                          Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

                                            Function validation has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                                    validation: function(value, options) {
                                                        if (value == '' || value == '-' || value == '+') {
                                                            return false;
                                                        }
                                                        var regExp = /^[\-\+]?\d*$/;
                                            Severity: Minor
                                            Found in Src/scripts/spryvalidationtextfield.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 9 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                            Spry.Widget.ValidationTextField.prototype.validate = function() {
                                            
                                                this.resetClasses();
                                                //possible states: required, format, rangeMin, rangeMax, charsMin, charsMax
                                                if (this.validateOn & Spry.Widget.ValidationTextField.ONSUBMIT) {
                                            Severity: Minor
                                            Found in Src/scripts/spryvalidationtextfield.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 (!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 (!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 (q < t) {
                                                                        break;
                                                                    }
                                                Severity: Major
                                                Found in Src/scripts/spryvalidationtextfield.js - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                      if(group == this.lastDateGroup) 
                                                                      {
                                                                          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 (pressed == autocomplete) 
                                                                        {
                                                                            if (this.nextDateDelimiterExists(this.oldValue, this.selection.start, group))
                                                                            {
                                                                                futureValue = this.oldValue;
                                                    Severity: Major
                                                    Found in Src/scripts/spryvalidationtextfield.js - About 45 mins to fix

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

                                                      Spry.Widget.ValidationTextField.prototype.getAutoComplete = function(from, direction) {
                                                          if (direction == -1) {
                                                              var n = '', m = '';
                                                              while(from && (n = this.getAutoComplete(--from) )) {
                                                                  m = n;
                                                      Severity: Minor
                                                      Found in Src/scripts/spryvalidationtextfield.js - About 45 mins to fix

                                                      Cognitive Complexity

                                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                      A method's cognitive complexity is based on a few simple rules:

                                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                      • Code is considered more complex for each "break in the linear flow of the code"
                                                      • Code is considered more complex when "flow breaking structures are nested"

                                                      Further reading

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                          for (var sel_end = 0; range_all.compareEndPoints('StartToEnd', range) < 0; sel_end++){
                                                                              range_all.moveStart('character', 1);
                                                                          }
                                                      Severity: Major
                                                      Found in Src/scripts/spryvalidationtextfield.js - About 45 mins to fix

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

                                                        Spry.Widget.ValidationTextField.prototype.init = function(element, options)
                                                        {
                                                            this.element = this.getElement(element);
                                                            this.errors = 0;
                                                            this.flags = {locked: false, restoreSelection: true};
                                                        Severity: Minor
                                                        Found in Src/scripts/spryvalidationtextfield.js - About 45 mins to fix

                                                        Cognitive Complexity

                                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                        A method's cognitive complexity is based on a few simple rules:

                                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                        • Code is considered more complex for each "break in the linear flow of the code"
                                                        • Code is considered more complex when "flow breaking structures are nested"

                                                        Further reading

                                                        Avoid deeply nested control flow statements.
                                                        Open

                                                                            for (var sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start ++){
                                                                                range_all.moveStart('character', 1);
                                                                            }
                                                        Severity: Major
                                                        Found in Src/scripts/spryvalidationtextfield.js - About 45 mins to fix

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                              if (out >= max_out) {
                                                                                  return false;
                                                                              }
                                                          Severity: Major
                                                          Found in Src/scripts/spryvalidationtextfield.js - About 45 mins to fix

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

                                                            Spry.Widget.Utils.contains = function (who, what)
                                                            {
                                                                if (typeof who.contains == 'object') {
                                                                    return what && who && (who == what || who.contains(what));
                                                                } else {
                                                            Severity: Minor
                                                            Found in Src/scripts/spryvalidationtextfield.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

                                                            Function ValidationTextField has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                            Open

                                                            Spry.Widget.ValidationTextField = function(element, type, options)
                                                            {
                                                                type = Spry.Widget.Utils.firstValid(type, "none");
                                                                if (typeof type != 'string') {
                                                                    this.showError('The second parameter in the constructor should be the validation type, the options are the third parameter.');
                                                            Severity: Minor
                                                            Found in Src/scripts/spryvalidationtextfield.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 false;
                                                            Severity: Major
                                                            Found in Src/scripts/spryvalidationtextfield.js - About 30 mins to fix

                                                              Avoid too many return statements within this function.
                                                              Open

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

                                                                Avoid too many return statements within this function.
                                                                Open

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

                                                                  Avoid too many return statements within this function.
                                                                  Open

                                                                                              return Spry.Widget.ValidationTextField.validateIP(address, 'ipv4');
                                                                  Severity: Major
                                                                  Found in Src/scripts/spryvalidationtextfield.js - About 30 mins to fix

                                                                    Avoid too many return statements within this function.
                                                                    Open

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

                                                                      Avoid too many return statements within this function.
                                                                      Open

                                                                              if (!prefLen) return false;
                                                                      Severity: Major
                                                                      Found in Src/scripts/spryvalidationtextfield.js - About 30 mins to fix

                                                                        Avoid too many return statements within this function.
                                                                        Open

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

                                                                          Avoid too many return statements within this function.
                                                                          Open

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

                                                                            Avoid too many return statements within this function.
                                                                            Open

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

                                                                              Avoid too many return statements within this function.
                                                                              Open

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

                                                                                Avoid too many return statements within this function.
                                                                                Open

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

                                                                                  Avoid too many return statements within this function.
                                                                                  Open

                                                                                                                  this.redTextFlash(); return false;                        
                                                                                  Severity: Major
                                                                                  Found in Src/scripts/spryvalidationtextfield.js - About 30 mins to fix

                                                                                    Avoid too many return statements within this function.
                                                                                    Open

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

                                                                                      Avoid too many return statements within this function.
                                                                                      Open

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

                                                                                        Avoid too many return statements within this function.
                                                                                        Open

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

                                                                                          Avoid too many return statements within this function.
                                                                                          Open

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

                                                                                            Avoid too many return statements within this function.
                                                                                            Open

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

                                                                                              Avoid too many return statements within this function.
                                                                                              Open

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

                                                                                                Avoid too many return statements within this function.
                                                                                                Open

                                                                                                                    this.redTextFlash(); return false;
                                                                                                Severity: Major
                                                                                                Found in Src/scripts/spryvalidationtextfield.js - About 30 mins to fix

                                                                                                  Avoid too many return statements within this function.
                                                                                                  Open

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

                                                                                                    Avoid too many return statements within this function.
                                                                                                    Open

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

                                                                                                      Avoid too many return statements within this function.
                                                                                                      Open

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

                                                                                                        Avoid too many return statements within this function.
                                                                                                        Open

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

                                                                                                          Avoid too many return statements within this function.
                                                                                                          Open

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

                                                                                                            Avoid too many return statements within this function.
                                                                                                            Open

                                                                                                                                    this.redTextFlash(); return false;
                                                                                                            Severity: Major
                                                                                                            Found in Src/scripts/spryvalidationtextfield.js - About 30 mins to fix

                                                                                                              Avoid too many return statements within this function.
                                                                                                              Open

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

                                                                                                                Avoid too many return statements within this function.
                                                                                                                Open

                                                                                                                                                this.redTextFlash(); return false;
                                                                                                                Severity: Major
                                                                                                                Found in Src/scripts/spryvalidationtextfield.js - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this function.
                                                                                                                  Open

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

                                                                                                                    Avoid too many return statements within this function.
                                                                                                                    Open

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

                                                                                                                      Avoid too many return statements within this function.
                                                                                                                      Open

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

                                                                                                                        Avoid too many return statements within this function.
                                                                                                                        Open

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

                                                                                                                          Avoid too many return statements within this function.
                                                                                                                          Open

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

                                                                                                                            Avoid too many return statements within this function.
                                                                                                                            Open

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

                                                                                                                              Avoid too many return statements within this function.
                                                                                                                              Open

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

                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                Open

                                                                                                                                                        this.redTextFlash(); return false;
                                                                                                                                Severity: Major
                                                                                                                                Found in Src/scripts/spryvalidationtextfield.js - About 30 mins to fix

                                                                                                                                  Function compileDatePattern has a Cognitive Complexity of 6 (exceeds 5 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 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

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

                                                                                                                                          if (this.form) {
                                                                                                                                              // if no "onSubmit" handler has been attached to the current form, attach one
                                                                                                                                              if (!this.form.attachedSubmitHandler && !this.form.onsubmit) {
                                                                                                                                                  this.form.onsubmit = function(e) { e = e || event; return Spry.Widget.Form.onSubmit(e, e.srcElement || e.currentTarget) };
                                                                                                                                                  this.form.attachedSubmitHandler = true;                 
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 day to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 185..197

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

                                                                                                                                  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(this.isPositionAtEndOfGroup(futureValue, this.selection.start+1, group)) 
                                                                                                                                                          {
                                                                                                                                                              if (group != this.lastDateGroup)
                                                                                                                                                              {
                                                                                                                                                                  if (this.nextDateDelimiterExists(futureValue, this.selection.start + 1, group))
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 day to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1413..1429

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

                                                                                                                                  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(this.isPositionAtEndOfGroup(futureValue, this.selection.start+1, group)) 
                                                                                                                                                          {
                                                                                                                                                              if (group != this.lastDateGroup)
                                                                                                                                                              {
                                                                                                                                                                  if (this.nextDateDelimiterExists(futureValue, this.selection.start + 1, group))
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 day to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1459..1475

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

                                                                                                                                  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 (!Spry.Widget.Form.validate) {
                                                                                                                                      Spry.Widget.Form.validate = function(vform) {
                                                                                                                                          var isValid = true;
                                                                                                                                          var isElementValid = true;
                                                                                                                                          var q = Spry.Widget.Form.onSubmitWidgetQueue;
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 7 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 314..328

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

                                                                                                                                  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.Widget.Utils.destroyWidgets = function (container)
                                                                                                                                  {
                                                                                                                                      if (typeof container == 'string') {
                                                                                                                                          container = document.getElementById(container);
                                                                                                                                      }
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 7 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 425..438

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

                                                                                                                                  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.Widget.Form.onReset) {
                                                                                                                                      Spry.Widget.Form.onReset = function(e, vform)
                                                                                                                                      {
                                                                                                                                          var q = Spry.Widget.Form.onSubmitWidgetQueue;
                                                                                                                                          var qlen = q.length;
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 6 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 340..352

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

                                                                                                                                  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.Widget.Form.destroy) {
                                                                                                                                      Spry.Widget.Form.destroy = function(form)
                                                                                                                                      {
                                                                                                                                          var q = Spry.Widget.Form.onSubmitWidgetQueue;
                                                                                                                                          for (var i = 0; i < Spry.Widget.Form.onSubmitWidgetQueue.length; i++) {
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 6 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 354..365

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

                                                                                                                                  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

                                                                                                                                  Spry.Widget.Utils.getFirstParentWithNodeName = function(node, nodeName)
                                                                                                                                  {
                                                                                                                                      while (node.parentNode
                                                                                                                                              && node.parentNode.nodeName.toLowerCase() != nodeName.toLowerCase()
                                                                                                                                              && node.parentNode.nodeName != 'BODY') {
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 5 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 410..423

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

                                                                                                                                  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.Widget.Form.destroyAll) {
                                                                                                                                      Spry.Widget.Form.destroyAll = function()
                                                                                                                                      {
                                                                                                                                          var q = Spry.Widget.Form.onSubmitWidgetQueue;
                                                                                                                                          for (var i = 0; i < Spry.Widget.Form.onSubmitWidgetQueue.length; i++) {
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 5 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 367..378

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

                                                                                                                                  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.Widget.SelectionDescriptor.prototype.move = function(amount)
                                                                                                                                  {
                                                                                                                                      if (Spry.is.ie && Spry.is.windows) {
                                                                                                                                          this.range.move("character", amount);
                                                                                                                                          this.range.select();
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 4 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1941..1950

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

                                                                                                                                  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.Widget.SelectionDescriptor.prototype.moveEnd = function(amount)
                                                                                                                                  {
                                                                                                                                      if (Spry.is.ie && Spry.is.windows) {
                                                                                                                                          this.range.moveEnd("character", amount);
                                                                                                                                          this.range.select();
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 4 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1895..1904

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

                                                                                                                                  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.Widget.ValidationTextField.prototype.removeClassName = function(ele, className)
                                                                                                                                  {
                                                                                                                                      if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) == -1))
                                                                                                                                          return;
                                                                                                                                      ele.className = ele.className.replace(new RegExp("\\s*\\b" + className + "\\b", "g"), "");
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 4 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 209..214

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

                                                                                                                                  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.Widget.Utils.contains = function (who, what)
                                                                                                                                  {
                                                                                                                                      if (typeof who.contains == 'object') {
                                                                                                                                          return what && who && (who == what || who.contains(what));
                                                                                                                                      } else {
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 4 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 440..454

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

                                                                                                                                  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.Widget.ValidationTextField.prototype.addClassName = function(ele, className)
                                                                                                                                  {
                                                                                                                                      if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) != -1))
                                                                                                                                          return;
                                                                                                                                      ele.className += (ele.className ? " " : "") + className;
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 3 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 202..207

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

                                                                                                                                  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.Widget.ValidationTextField.processLoadQueue = function(handler)
                                                                                                                                  {
                                                                                                                                      Spry.Widget.ValidationTextField.onloadDidFire = true;
                                                                                                                                      var q = Spry.Widget.ValidationTextField.loadQueue;
                                                                                                                                      var qlen = q.length;
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 3 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 122..129

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

                                                                                                                                  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.Widget.ValidationTextField.addLoadListener = function(handler)
                                                                                                                                  {
                                                                                                                                      if (typeof window.addEventListener != 'undefined')
                                                                                                                                          window.addEventListener('load', handler, false);
                                                                                                                                      else if (typeof document.addEventListener != 'undefined')
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 3 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 131..139

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

                                                                                                                                  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 (this.event_handlers)
                                                                                                                                          for (var i=0; i<this.event_handlers.length; i++) {
                                                                                                                                              Spry.Widget.Utils.removeEventListener(this.event_handlers[i][0], this.event_handlers[i][1], this.event_handlers[i][2], false);
                                                                                                                                          }
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 3 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 93..96

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

                                                                                                                                  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<this.event_handlers.length; i++) {
                                                                                                                                              Spry.Widget.Utils.addEventListener(this.event_handlers[i][0], this.event_handlers[i][1], this.event_handlers[i][2], false);
                                                                                                                                          }
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 2 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 179..181

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

                                                                                                                                  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.validation && this.maxValue !== null && continueValidations) {
                                                                                                                                          var maxValue = this.validation(this.maxValue.toString(), this.options);
                                                                                                                                          if (maxValue !== false) {
                                                                                                                                              if( this.typedValue > maxValue) {
                                                                                                                                                  errors = errors | Spry.Widget.ValidationTextField.ERROR_RANGE_MAX;
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 2 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1021..1029

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

                                                                                                                                  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.validation && this.minValue !== null && continueValidations) {
                                                                                                                                          var minValue = this.validation(this.minValue.toString(), this.options);
                                                                                                                                          if (minValue !== false) {
                                                                                                                                              if (this.typedValue < minValue) {
                                                                                                                                                  errors = errors | Spry.Widget.ValidationTextField.ERROR_RANGE_MIN;
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 2 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1031..1039

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

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

                                                                                                                                  Spry.Widget.Utils.removeEventListener = function(element, eventType, handler, capture)
                                                                                                                                  {
                                                                                                                                      try
                                                                                                                                      {
                                                                                                                                          if (element.removeEventListener)
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 3 other locations - About 2 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 456..466
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 468..478
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 2292..2302

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

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

                                                                                                                                  Spry.Widget.Utils.addEventListener = function(element, eventType, handler, capture)
                                                                                                                                  {
                                                                                                                                      try
                                                                                                                                      {
                                                                                                                                          if (element.addEventListener)
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 3 other locations - About 2 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 456..466
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 468..478
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 2304..2314

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

                                                                                                                                  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 (!Spry.Widget.Form.onSubmit) {
                                                                                                                                      Spry.Widget.Form.onSubmit = function(e, form)
                                                                                                                                      {
                                                                                                                                          if (Spry.Widget.Form.validate(form) == false) {
                                                                                                                                              return false;
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 2 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 330..338

                                                                                                                                  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

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

                                                                                                                                  Spry.Widget.Utils.setOptions = function(obj, optionsObj, ignoreUndefinedProps)
                                                                                                                                  {
                                                                                                                                      if (!optionsObj)
                                                                                                                                          return;
                                                                                                                                      for (var optionName in optionsObj)
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 2 hrs to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 388..398

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

                                                                                                                                  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

                                                                                                                                                  case "dd":
                                                                                                                                                      groupPatterns[i-1] = "\\d{1,2}";
                                                                                                                                                      fullGroupPatterns[i-1] = "\\d\\d";
                                                                                                                                                      dateValidationPatternString += "(" + groupPatterns[i-1] + ")";
                                                                                                                                                      autocompleteCharacters[i-1] = null;
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1141..1146

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

                                                                                                                                  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

                                                                                                                                                  case "mm":
                                                                                                                                                      groupPatterns[i-1] = "\\d{1,2}";
                                                                                                                                                      fullGroupPatterns[i-1] = "\\d\\d";
                                                                                                                                                      dateValidationPatternString += "(" + groupPatterns[i-1] + ")";
                                                                                                                                                      autocompleteCharacters[i-1] = null;
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1135..1140

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

                                                                                                                                  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

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

                                                                                                                                      if (this.errors & Spry.Widget.ValidationTextField.ERROR_CHARS_MAX) {
                                                                                                                                          this.addClassName(this.element, this.invalidCharsMaxClass);
                                                                                                                                          this.addClassName(this.additionalError, this.invalidCharsMaxClass);
                                                                                                                                          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 1775..1779
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1781..1785
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1787..1791

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

                                                                                                                                      if (this.errors & Spry.Widget.ValidationTextField.ERROR_CHARS_MIN) {
                                                                                                                                          this.addClassName(this.element, this.invalidCharsMinClass);
                                                                                                                                          this.addClassName(this.additionalError, this.invalidCharsMinClass);
                                                                                                                                          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 1775..1779
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1781..1785
                                                                                                                                  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 5 locations. Consider refactoring.
                                                                                                                                  Open

                                                                                                                                      if (this.errors & Spry.Widget.ValidationTextField.ERROR_FORMAT) {
                                                                                                                                          this.addClassName(this.element, this.invalidFormatClass);
                                                                                                                                          this.addClassName(this.additionalError, this.invalidFormatClass);
                                                                                                                                          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 1775..1779
                                                                                                                                  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 5 locations. Consider refactoring.
                                                                                                                                  Open

                                                                                                                                      if (this.errors & Spry.Widget.ValidationTextField.ERROR_RANGE_MAX) {
                                                                                                                                          this.addClassName(this.element, this.invalidRangeMaxClass);
                                                                                                                                          this.addClassName(this.additionalError, this.invalidRangeMaxClass);
                                                                                                                                          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 1775..1779
                                                                                                                                  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

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

                                                                                                                                              if (Spry.Widget.Utils.specialCharacters.indexOf("," + code + ",") != -1) {
                                                                                                                                                  character = null;
                                                                                                                                              } else {
                                                                                                                                                  character = String.fromCharCode(code);
                                                                                                                                              }
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 2227..2231

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

                                                                                                                                  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 (Spry.Widget.Utils.specialCharacters.indexOf("," + code + ",") != -1) {
                                                                                                                                              character = null;
                                                                                                                                          } else {
                                                                                                                                              character = String.fromCharCode(code);
                                                                                                                                          }
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 2218..2222

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

                                                                                                                                  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.Widget.ValidationTextField.prototype.isPositionAtEndOfGroup = function (value, pos, group)
                                                                                                                                  {
                                                                                                                                      var test_value = value.substring(0, pos);
                                                                                                                                      return this.getRegExpForFullGroup(group).test(test_value);
                                                                                                                                  };
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1204..1208

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

                                                                                                                                  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.Widget.ValidationTextField.prototype.isValueValid = function(value, pos, group) 
                                                                                                                                  {
                                                                                                                                      var test_value = value.substring(0, pos);
                                                                                                                                      return this.getRegExpForGroup(group).test(test_value);
                                                                                                                                  };
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1211..1215

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

                                                                                                                                  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.Widget.Utils.stopPropagation = function(ev)
                                                                                                                                  {
                                                                                                                                      if (ev.stopPropagation)
                                                                                                                                      {
                                                                                                                                          ev.stopPropagation();
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 2346..2356

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

                                                                                                                                  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.Widget.Utils.preventDefault = function(ev)
                                                                                                                                  {
                                                                                                                                      if (ev.preventDefault)
                                                                                                                                      {
                                                                                                                                          ev.preventDefault();
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 2330..2340

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

                                                                                                                                  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

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

                                                                                                                                  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

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

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

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

                                                                                                                                          this.event_handlers.push([this.input, "mousedown", function(e) { if (self.isDisabled()) return true; return self.onMouseDown(e || event); }]);
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 5 other locations - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 781..781
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 782..782
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 784..784
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 787..787
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 788..788

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

                                                                                                                                  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.Widget.ValidationTextField.addLoadListener(function(){
                                                                                                                                      Spry.Widget.Utils.addEventListener(window, "unload", Spry.Widget.Form.destroyAll, false);
                                                                                                                                  });
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 142..144

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

                                                                                                                                  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

                                                                                                                                  Spry.Widget.Utils.getFirstChildWithNodeNameAtAnyLevel = function(node, nodeName)
                                                                                                                                  {
                                                                                                                                      var elements  = node.getElementsByTagName(nodeName);
                                                                                                                                      if (elements) {
                                                                                                                                          return elements[0];
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 401..408

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

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

                                                                                                                                          this.event_handlers.push([this.input, "keypress", function(e) { if (self.isDisabled()) return true; return self.onKeyPress(e || event); }]);
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 5 other locations - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 781..781
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 784..784
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 787..787
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 788..788
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 790..790

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

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

                                                                                                                                          this.event_handlers.push([this.input, "blur", function(e) { if (self.isDisabled()) return true; return self.onBlur(e || event); }]);
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 5 other locations - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 781..781
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 782..782
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 784..784
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 787..787
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 790..790

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

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

                                                                                                                                              this.event_handlers.push([this.input, "keyup", function(e) { if (self.isDisabled()) return true; return self.onKeyUp(e || event); }]);
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 5 other locations - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 781..781
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 782..782
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 787..787
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 788..788
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 790..790

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

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

                                                                                                                                          this.event_handlers.push([this.input, "focus", function(e) { if (self.isDisabled()) return true; return self.onFocus(e || event); }]);
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 5 other locations - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 781..781
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 782..782
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 784..784
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 788..788
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 790..790

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

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

                                                                                                                                          this.event_handlers.push([this.input, "keydown", function(e) { if (self.isDisabled()) return true; return self.onKeyDown(e || event); }]);
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 5 other locations - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 782..782
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 784..784
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 787..787
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 788..788
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 790..790

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

                                                                                                                                  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.Widget.ValidationTextField.prototype.getElement = function(ele)
                                                                                                                                  {
                                                                                                                                      if (ele && typeof ele == "string")
                                                                                                                                          return document.getElementById(ele);
                                                                                                                                      return ele;
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationselect.js on lines 115..120

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

                                                                                                                                  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

                                                                                                                                                  case "yy":
                                                                                                                                                      groupPatterns[i-1] = "\\d{1,2}";
                                                                                                                                                      fullGroupPatterns[i-1] = "\\d\\d";
                                                                                                                                                      dateValidationPatternString += "(\\d\\d)";
                                                                                                                                                      autocompleteCharacters[i-1] = null;
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1153..1158

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

                                                                                                                                  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

                                                                                                                                                  case "yyyy":
                                                                                                                                                      groupPatterns[i-1] = "\\d{1,4}";
                                                                                                                                                      fullGroupPatterns[i-1] = "\\d\\d\\d\\d";
                                                                                                                                                      dateValidationPatternString += "(\\d\\d\\d\\d)";
                                                                                                                                                      autocompleteCharacters[i-1] = null;
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 1 hr to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1147..1152

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

                                                                                                                                  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) + 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 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

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

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

                                                                                                                                      if(!mustRevert && this.maxChars !== null && continueValidations) {
                                                                                                                                          if (testValue.length > this.maxChars) {
                                                                                                                                              errors = errors | Spry.Widget.ValidationTextField.ERROR_CHARS_MAX;
                                                                                                                                              continueValidations = false;
                                                                                                                                          }
                                                                                                                                  Severity: Minor
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 55 mins to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 996..1001

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

                                                                                                                                  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.minChars !== null  && continueValidations) {
                                                                                                                                          if (testValue.length < this.minChars) {
                                                                                                                                              errors = errors | Spry.Widget.ValidationTextField.ERROR_CHARS_MIN;
                                                                                                                                              continueValidations = false;
                                                                                                                                          }
                                                                                                                                  Severity: Minor
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 55 mins to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1003..1008

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

                                                                                                                                  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 (secondIndex != -1) {
                                                                                                                                                      var theSecond = parseInt(valueGroups[secondIndex], 10);
                                                                                                                                                      if (isNaN(theSecond) || theSecond > 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 333..338

                                                                                                                                  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('submit') != -1 ? Spry.Widget.ValidationTextField.ONSUBMIT : 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 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 5 locations. Consider refactoring.
                                                                                                                                  Open

                                                                                                                                      this.validateOn = this.validateOn | (validateOn.indexOf('change') != -1 ? Spry.Widget.ValidationTextField.ONCHANGE : 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 103..103

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

                                                                                                                                  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

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

                                                                                                                                          if (this.flags.operaPasteOperation) {
                                                                                                                                              window.clearInterval(this.flags.operaPasteOperation);
                                                                                                                                              this.flags.operaPasteOperation = null;
                                                                                                                                          }
                                                                                                                                  Severity: Minor
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 40 mins to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1103..1106

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

                                                                                                                                  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 (this.flags.operaPasteOperation) {
                                                                                                                                          window.clearInterval(this.flags.operaPasteOperation);
                                                                                                                                          this.flags.operaPasteOperation = null;
                                                                                                                                      }
                                                                                                                                  Severity: Minor
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 40 mins to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1494..1497

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

                                                                                                                                  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.selection.moveTo(this.selection.start + insertedValue.length, this.selection.start + insertedValue.length);                                    
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 4 other locations - About 40 mins to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1297..1297
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1308..1308
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1354..1354
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1387..1387

                                                                                                                                  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

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

                                                                                                                                                          this.selection.moveTo(this.selection.start + autocomplete.length, this.selection.start + autocomplete.length);
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 4 other locations - About 40 mins to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1308..1308
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1354..1354
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1387..1387
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1393..1393

                                                                                                                                  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

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

                                                                                                                                              this.selection.moveTo(this.selection.start + autocomplete.length, this.selection.start + autocomplete.length);
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 4 other locations - About 40 mins to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1297..1297
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1354..1354
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1387..1387
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1393..1393

                                                                                                                                  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

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

                                                                                                                                                                  this.selection.moveTo(this.selection.start + insertedValue.length, this.selection.start + insertedValue.length);                                    
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 4 other locations - About 40 mins to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1297..1297
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1308..1308
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1354..1354
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1393..1393

                                                                                                                                  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

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

                                                                                                                                                              this.selection.moveTo(this.selection.start + autocomplete.length, this.selection.start + autocomplete.length);
                                                                                                                                  Severity: Major
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 4 other locations - About 40 mins to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1297..1297
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1308..1308
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1387..1387
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1393..1393

                                                                                                                                  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 (this.keyCode == 8 || this.keyCode == 46 ) {
                                                                                                                                          var mr = this.doValidations(this.input.value, this.input.value);
                                                                                                                                          if (mr) {
                                                                                                                                              return true;
                                                                                                                                          }
                                                                                                                                  Severity: Minor
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 35 mins to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1257..1262

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

                                                                                                                                  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 (this.keyCode == 8 || this.keyCode == 46) {
                                                                                                                                          var mr = this.doValidations(this.input.value, this.input.value);
                                                                                                                                          if (mr) {
                                                                                                                                              return true;
                                                                                                                                          }
                                                                                                                                  Severity: Minor
                                                                                                                                  Found in Src/scripts/spryvalidationtextfield.js and 1 other location - About 35 mins to fix
                                                                                                                                  Src/scripts/spryvalidationtextfield.js on lines 1511..1516

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

                                                                                                                                  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