mambax7/moduleinstaller

View on GitHub
assets/js/prototype.js

Summary

Maintainability
F
1 mo
Test Coverage

File prototype.js has 6104 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*  Prototype JavaScript framework, version 1.7.3
 *  (c) 2005-2010 Sam Stephenson
 *
 *  Prototype is freely distributable under the terms of an MIT-style license.
 *  For details, see the Prototype web site: http://www.prototypejs.org/
Severity: Major
Found in assets/js/prototype.js - About 2 wks to fix

    Function setDocument has 215 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        setDocument = Sizzle.setDocument = function (node) {
            var hasCompare,
                doc = node ? node.ownerDocument || node : preferredDoc,
                parent = doc.defaultView;
    
    
    Severity: Major
    Found in assets/js/prototype.js - About 1 day to fix

      Function Enumerable has 206 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var Enumerable = (function () {
          function each(iterator, context) {
              try {
                  this._each(iterator, context);
              } catch (e) {
      Severity: Major
      Found in assets/js/prototype.js - About 1 day to fix

        Function Serializers has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
        Open

        Form.Element.Serializers = (function () {
            function input(element, value) {
                switch (element.type.toLowerCase()) {
                    case 'checkbox':
                    case 'radio':
        Severity: Minor
        Found in assets/js/prototype.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 Hash has 99 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var Hash = Class.create(Enumerable, (function () {
            function initialize(object) {
                this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
            }
        
        
        Severity: Major
        Found in assets/js/prototype.js - About 3 hrs to fix

          Function Class has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

          var Class = (function () {
          
              var IS_DONTENUM_BUGGY = (function () {
                  for (var p in {toString: 1}) {
                      if (p === 'toString') return false;
          Severity: Minor
          Found in assets/js/prototype.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 Sizzle has 76 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function Sizzle(selector, context, results, seed) {
                  var match, elem, m, nodeType,
                      i, groups, old, nid, newContext, newSelector;
          
                  if ((context ? context.ownerDocument || context : preferredDoc) !== document) {
          Severity: Major
          Found in assets/js/prototype.js - About 3 hrs to fix

            Function Class has 70 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var Class = (function () {
            
                var IS_DONTENUM_BUGGY = (function () {
                    for (var p in {toString: 1}) {
                        if (p === 'toString') return false;
            Severity: Major
            Found in assets/js/prototype.js - About 2 hrs to fix

              Function Enumerable has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

              var Enumerable = (function () {
                  function each(iterator, context) {
                      try {
                          this._each(iterator, context);
                      } catch (e) {
              Severity: Minor
              Found in assets/js/prototype.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 matcherFromGroupMatchers has 68 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function matcherFromGroupMatchers(elementMatchers, setMatchers) {
                      var bySet = setMatchers.length > 0,
                          byElement = elementMatchers.length > 0,
                          superMatcher = function (seed, context, xml, results, outermost) {
                              var elem, j, matcher,
              Severity: Major
              Found in assets/js/prototype.js - About 2 hrs to fix

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

                    function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
                        if (postFilter && !postFilter[expando]) {
                            postFilter = setMatcher(postFilter);
                        }
                        if (postFinder && !postFinder[expando]) {
                Severity: Major
                Found in assets/js/prototype.js - About 2 hrs to fix

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

                              superMatcher = function (seed, context, xml, results, outermost) {
                                  var elem, j, matcher,
                                      matchedCount = 0,
                                      i = "0",
                                      unmatched = seed && [],
                  Severity: Major
                  Found in assets/js/prototype.js - About 2 hrs to fix

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

                                "CHILD": function (type, what, argument, first, last) {
                                    var simple = type.slice(0, 3) !== "nth",
                                        forward = type.slice(-4) !== "last",
                                        ofType = what === "of-type";
                    
                    
                    Severity: Major
                    Found in assets/js/prototype.js - About 2 hrs to fix

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

                      Form.Element.Serializers = (function () {
                          function input(element, value) {
                              switch (element.type.toLowerCase()) {
                                  case 'checkbox':
                                  case 'radio':
                      Severity: Major
                      Found in assets/js/prototype.js - About 2 hrs to fix

                        Consider simplifying this complex logical expression.
                        Open

                                                    if (forward && useCache) {
                                                        outerCache = parent[expando] || (parent[expando] = {});
                                                        cache = outerCache[type] || [];
                                                        nodeIndex = cache[0] === dirruns && cache[1];
                                                        diff = cache[0] === dirruns && cache[2];
                        Severity: Critical
                        Found in assets/js/prototype.js - About 2 hrs to fix

                          Function Str has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function Str(key, holder, stack) {
                                  var value = holder[key];
                                  if (Type(value) === OBJECT_TYPE && typeof value.toJSON === 'function') {
                                      value = value.toJSON(key);
                                  }
                          Severity: Major
                          Found in assets/js/prototype.js - About 2 hrs to fix

                            Function clonePosition has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function clonePosition(element, source, options) {
                                    options = Object.extend({
                                        setLeft: true,
                                        setTop: true,
                                        setWidth: true,
                            Severity: Minor
                            Found in assets/js/prototype.js - About 2 hrs to fix

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

                                  setRequestHeaders: function () {
                                      var headers = {
                                          'X-Requested-With': 'XMLHttpRequest',
                                          'X-Prototype-Version': Prototype.Version,
                                          'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
                              Severity: Minor
                              Found in assets/js/prototype.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 request has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  request: function (url) {
                                      this.url = url;
                                      this.method = this.options.method;
                                      var params = Object.isString(this.options.parameters) ?
                                          this.options.parameters :
                              Severity: Minor
                              Found in assets/js/prototype.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 select has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  select = Sizzle.select = function (selector, context, results, seed) {
                                      var i, tokens, token, type, find,
                                          compiled = typeof selector === "function" && selector,
                                          match = !seed && tokenize((selector = compiled.selector || selector));
                              
                              
                              Severity: Minor
                              Found in assets/js/prototype.js - About 1 hr to fix

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

                                    function tokenize(selector, parseOnly) {
                                        var matched, match, tokens, type,
                                            soFar, groups, preFilters,
                                            cached = tokenCache[selector + " "];
                                
                                
                                Severity: Minor
                                Found in assets/js/prototype.js - About 1 hr to fix

                                  Function matcherFromTokens has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function matcherFromTokens(tokens) {
                                          var checkContext, matcher, j,
                                              len = tokens.length,
                                              leadingRelative = Expr.relative[tokens[0].type],
                                              implicitRelative = leadingRelative || Expr.relative[" "],
                                  Severity: Minor
                                  Found in assets/js/prototype.js - About 1 hr to fix

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

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

                                      Function _begin has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              _begin: function () {
                                                  if (this._isPrepared()) return;
                                      
                                                  var element = this.element;
                                                  if (isDisplayed(element)) {
                                      Severity: Minor
                                      Found in assets/js/prototype.js - About 1 hr to fix

                                        Function findDOMClass has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            function findDOMClass(tagName) {
                                                var klass;
                                                var trans = {
                                                    "OPTGROUP": "OptGroup",
                                                    "TEXTAREA": "TextArea",
                                        Severity: Minor
                                        Found in assets/js/prototype.js - About 1 hr to fix

                                          Function serializeElements has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              serializeElements: function (elements, options) {
                                                  if (typeof options != 'object') options = {hash: !!options};
                                                  else if (Object.isUndefined(options.hash)) options.hash = true;
                                                  var key, value, submitted = false, submit = options.submit, accumulator, initial;
                                          
                                          
                                          Severity: Minor
                                          Found in assets/js/prototype.js - About 1 hr to fix

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

                                            if (!document.getElementsByClassName) document.getElementsByClassName = function (instanceMethods) {
                                                function iter(name) {
                                                    return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
                                                }
                                            
                                            
                                            Severity: Minor
                                            Found in assets/js/prototype.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 addCombinator has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                function addCombinator(matcher, combinator, base) {
                                                    var dir = combinator.dir,
                                                        checkNonElements = base && dir === "parentNode",
                                                        doneName = done++;
                                            
                                            
                                            Severity: Minor
                                            Found in assets/js/prototype.js - About 1 hr to fix

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

                                                  function update(element, content) {
                                                      element = $(element);
                                              
                                                      var descendants = element.getElementsByTagName('*'),
                                                          i = descendants.length;
                                              Severity: Minor
                                              Found in assets/js/prototype.js - About 1 hr to fix

                                                Function addMethods has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                    function addMethods(methods) {
                                                        if (arguments.length === 0) addFormMethods();
                                                
                                                        if (arguments.length === 2) {
                                                            var tagName = methods;
                                                Severity: Minor
                                                Found in assets/js/prototype.js - About 1 hr to fix

                                                  Consider simplifying this complex logical expression.
                                                  Open

                                                                  if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
                                                                      submit !== false && (!submit || key == submit) && (submitted = true)))) {
                                                                      result = accumulator(result, key, value);
                                                                  }
                                                  Severity: Critical
                                                  Found in assets/js/prototype.js - About 1 hr to fix

                                                    Consider simplifying this complex logical expression.
                                                    Open

                                                                                } else if (useCache && (cache = (elem[expando] || (elem[expando] = {}))[type]) && cache[0] === dirruns) {
                                                                                    diff = cache[1];
                                                    
                                                                                } else {
                                                                                    while ((node = ++nodeIndex && node && node[dir] ||
                                                    Severity: Critical
                                                    Found in assets/js/prototype.js - About 1 hr to fix

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

                                                          function addMethods(source) {
                                                              var ancestor = this.superclass && this.superclass.prototype,
                                                                  properties = Object.keys(source);
                                                      
                                                              if (IS_DONTENUM_BUGGY) {
                                                      Severity: Minor
                                                      Found in assets/js/prototype.js - About 1 hr to fix

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

                                                            respondToReadyState: function (readyState) {
                                                                var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
                                                        
                                                                if (state == 'Complete') {
                                                                    try {
                                                        Severity: Minor
                                                        Found in assets/js/prototype.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 Selector has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                        Prototype.Selector = (function () {
                                                        
                                                            function select() {
                                                                throw new Error('Method "Prototype.Selector.select" must be defined.');
                                                            }
                                                        Severity: Minor
                                                        Found in assets/js/prototype.js - About 1 hr to fix

                                                          Function request has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                              request: function (url) {
                                                                  this.url = url;
                                                                  this.method = this.options.method;
                                                                  var params = Object.isString(this.options.parameters) ?
                                                                      this.options.parameters :
                                                          Severity: Minor
                                                          Found in assets/js/prototype.js - About 1 hr to fix

                                                            Function replace_IE has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                                function replace_IE(element, content) {
                                                                    element = $(element);
                                                                    if (content && content.toElement)
                                                                        content = content.toElement();
                                                                    if (Object.isElement(content)) {
                                                            Severity: Minor
                                                            Found in assets/js/prototype.js - About 1 hr to fix

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

                                                              if (!document.getElementsByClassName) document.getElementsByClassName = function (instanceMethods) {
                                                                  function iter(name) {
                                                                      return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
                                                                  }
                                                              
                                                              
                                                              Severity: Minor
                                                              Found in assets/js/prototype.js - About 1 hr to fix

                                                                Consider simplifying this complex logical expression.
                                                                Open

                                                                        if (element && isPercentage) {
                                                                            context = context || element.parentNode;
                                                                            var decimal = toDecimal(value), whole = null;
                                                                
                                                                            var isHorizontal = property.include('left') || property.include('right') ||
                                                                Severity: Major
                                                                Found in assets/js/prototype.js - About 1 hr to fix

                                                                  Consider simplifying this complex logical expression.
                                                                  Open

                                                                              if (tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                                                                                  support.getById && context.nodeType === 9 && documentIsHTML &&
                                                                                  Expr.relative[tokens[1].type]) {
                                                                  
                                                                                  context = (Expr.find["ID"](token.matches[0].replace(runescape, funescape), context) || [])[0];
                                                                  Severity: Major
                                                                  Found in assets/js/prototype.js - About 1 hr to fix

                                                                    Consider simplifying this complex logical expression.
                                                                    Open

                                                                                if (element === document.body) {
                                                                                    var bodyScrollNode = document.documentElement || document.body.parentNode || document.body;
                                                                                    valueT += !Object.isUndefined(window.pageYOffset) ? window.pageYOffset : bodyScrollNode.scrollTop || 0;
                                                                                    valueL += !Object.isUndefined(window.pageXOffset) ? window.pageXOffset : bodyScrollNode.scrollLeft || 0;
                                                                                    break;
                                                                    Severity: Major
                                                                    Found in assets/js/prototype.js - About 1 hr to fix

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

                                                                      Prototype.Selector = (function () {
                                                                      
                                                                          function select() {
                                                                              throw new Error('Method "Prototype.Selector.select" must be defined.');
                                                                          }
                                                                      Severity: Minor
                                                                      Found in assets/js/prototype.js - About 55 mins to fix

                                                                      Cognitive Complexity

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

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

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

                                                                      Further reading

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

                                                                      var Hash = Class.create(Enumerable, (function () {
                                                                          function initialize(object) {
                                                                              this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
                                                                          }
                                                                      
                                                                      
                                                                      Severity: Minor
                                                                      Found in assets/js/prototype.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 (context.ownerDocument && (elem = context.ownerDocument.getElementById(m)) &&
                                                                                                  contains(context, elem) && elem.id === m) {
                                                                                                  results.push(elem);
                                                                                                  return results;
                                                                                              }
                                                                      Severity: Major
                                                                      Found in assets/js/prototype.js - About 45 mins to fix

                                                                        Avoid deeply nested control flow statements.
                                                                        Open

                                                                                                                if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) {
                                                                                                                    return false;
                                                                                                                }
                                                                        Severity: Major
                                                                        Found in assets/js/prototype.js - About 45 mins to fix

                                                                          Avoid deeply nested control flow statements.
                                                                          Open

                                                                                                          if (!(unmatched[i] || setMatched[i])) {
                                                                                                              setMatched[i] = pop.call(results);
                                                                                                          }
                                                                          Severity: Major
                                                                          Found in assets/js/prototype.js - About 45 mins to fix

                                                                            Avoid deeply nested control flow statements.
                                                                            Open

                                                                                                            if ((newCache[2] = matcher(elem, context, xml))) {
                                                                                                                return true;
                                                                                                            }
                                                                            Severity: Major
                                                                            Found in assets/js/prototype.js - About 45 mins to fix

                                                                              Avoid deeply nested control flow statements.
                                                                              Open

                                                                                                      if (elem && elem.parentNode) {
                                                                                                          if (elem.id === m) {
                                                                                                              results.push(elem);
                                                                                                              return results;
                                                                                                          }
                                                                              Severity: Major
                                                                              Found in assets/js/prototype.js - About 45 mins to fix

                                                                                Avoid deeply nested control flow statements.
                                                                                Open

                                                                                                            if ((elem = matcherOut[i])) {
                                                                                                                temp.push((matcherIn[i] = elem));
                                                                                                            }
                                                                                Severity: Major
                                                                                Found in assets/js/prototype.js - About 45 mins to fix

                                                                                  Avoid deeply nested control flow statements.
                                                                                  Open

                                                                                                          if (Expr.relative[tokens[j].type]) {
                                                                                                              break;
                                                                                                          }
                                                                                  Severity: Major
                                                                                  Found in assets/js/prototype.js - About 45 mins to fix

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

                                                                                        function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
                                                                                    Severity: Minor
                                                                                    Found in assets/js/prototype.js - About 45 mins to fix

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

                                                                                          updateContent: function (responseText) {
                                                                                              var receiver = this.container[this.success() ? 'success' : 'failure'],
                                                                                                  options = this.options;
                                                                                      
                                                                                              if (!options.evalScripts) responseText = responseText.stripScripts();
                                                                                      Severity: Minor
                                                                                      Found in assets/js/prototype.js - About 45 mins to fix

                                                                                      Cognitive Complexity

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

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

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

                                                                                      Further reading

                                                                                      Avoid deeply nested control flow statements.
                                                                                      Open

                                                                                                              if (!selector) {
                                                                                                                  push.apply(results, seed);
                                                                                                                  return results;
                                                                                                              }
                                                                                      Severity: Major
                                                                                      Found in assets/js/prototype.js - About 45 mins to fix

                                                                                        Avoid deeply nested control flow statements.
                                                                                        Open

                                                                                                            if (Element.getStyle(element, 'position') == 'absolute') break;
                                                                                        Severity: Major
                                                                                        Found in assets/js/prototype.js - About 45 mins to fix

                                                                                          Avoid deeply nested control flow statements.
                                                                                          Open

                                                                                                                              if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) {
                                                                                                                                  if (useCache) {
                                                                                                                                      (node[expando] || (node[expando] = {}))[type] = [dirruns, diff];
                                                                                                                                  }
                                                                                          
                                                                                          
                                                                                          Severity: Major
                                                                                          Found in assets/js/prototype.js - About 45 mins to fix

                                                                                            Consider simplifying this complex logical expression.
                                                                                            Open

                                                                                                    if (support.matchesSelector && documentIsHTML &&
                                                                                                        (!rbuggyMatches || !rbuggyMatches.test(expr)) &&
                                                                                                        (!rbuggyQSA || !rbuggyQSA.test(expr))) {
                                                                                            
                                                                                                        try {
                                                                                            Severity: Major
                                                                                            Found in assets/js/prototype.js - About 40 mins to fix

                                                                                              Consider simplifying this complex logical expression.
                                                                                              Open

                                                                                                              if (matcher[expando]) {
                                                                                                                  j = ++i;
                                                                                                                  for (; j < len; j++) {
                                                                                                                      if (Expr.relative[tokens[j].type]) {
                                                                                                                          break;
                                                                                              Severity: Major
                                                                                              Found in assets/js/prototype.js - About 40 mins to fix

                                                                                                Consider simplifying this complex logical expression.
                                                                                                Open

                                                                                                                if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) ||
                                                                                                                    (classNames && classNames.all(function (name) {
                                                                                                                        return !name.toString().blank() && cn.include(' ' + name + ' ');
                                                                                                                    }))))
                                                                                                                    elements.push(Element.extend(child));
                                                                                                Severity: Major
                                                                                                Found in assets/js/prototype.js - About 40 mins to fix

                                                                                                  Consider simplifying this complex logical expression.
                                                                                                  Open

                                                                                                          if (/\d/.test(value) && element && element.runtimeStyle && !(isPercentage && isViewport)) {
                                                                                                              var style = element.style.left, rStyle = element.runtimeStyle.left;
                                                                                                              element.runtimeStyle.left = element.currentStyle.left;
                                                                                                              element.style.left = value || 0;
                                                                                                              value = element.style.pixelLeft;
                                                                                                  Severity: Major
                                                                                                  Found in assets/js/prototype.js - About 40 mins to fix

                                                                                                    Function condense has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                    Open

                                                                                                        function condense(unmatched, map, filter, context, xml) {
                                                                                                    Severity: Minor
                                                                                                    Found in assets/js/prototype.js - About 35 mins to fix

                                                                                                      Function CHILD has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                      Open

                                                                                                                  "CHILD": function (type, what, argument, first, last) {
                                                                                                      Severity: Minor
                                                                                                      Found in assets/js/prototype.js - About 35 mins to fix

                                                                                                        Function superMatcher has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                                    superMatcher = function (seed, context, xml, results, outermost) {
                                                                                                        Severity: Minor
                                                                                                        Found in assets/js/prototype.js - About 35 mins to fix

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

                                                                                                              request: function (form, options) {
                                                                                                                  form = $(form), options = Object.clone(options || {});
                                                                                                          
                                                                                                                  var params = options.parameters, action = form.readAttribute('action') || '';
                                                                                                                  if (action.blank()) action = window.location.href;
                                                                                                          Severity: Minor
                                                                                                          Found in assets/js/prototype.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 results;
                                                                                                          Severity: Major
                                                                                                          Found in assets/js/prototype.js - About 30 mins to fix

                                                                                                            Avoid too many return statements within this function.
                                                                                                            Open

                                                                                                                    return select(selector.replace(rtrim, "$1"), context, results, seed);
                                                                                                            Severity: Major
                                                                                                            Found in assets/js/prototype.js - About 30 mins to fix

                                                                                                              Avoid too many return statements within this function.
                                                                                                              Open

                                                                                                                              return compare & 4 ? -1 : 1;
                                                                                                              Severity: Major
                                                                                                              Found in assets/js/prototype.js - About 30 mins to fix

                                                                                                                Avoid too many return statements within this function.
                                                                                                                Open

                                                                                                                                    return results;
                                                                                                                Severity: Major
                                                                                                                Found in assets/js/prototype.js - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this function.
                                                                                                                  Open

                                                                                                                                      return results;
                                                                                                                  Severity: Major
                                                                                                                  Found in assets/js/prototype.js - About 30 mins to fix

                                                                                                                    Avoid too many return statements within this function.
                                                                                                                    Open

                                                                                                                            return false;
                                                                                                                    Severity: Major
                                                                                                                    Found in assets/js/prototype.js - About 30 mins to fix

                                                                                                                      Avoid too many return statements within this function.
                                                                                                                      Open

                                                                                                                              return value;
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/prototype.js - About 30 mins to fix

                                                                                                                        Avoid too many return statements within this function.
                                                                                                                        Open

                                                                                                                                            return sortInput ?
                                                                                                                                                (indexOf.call(sortInput, a) - indexOf.call(sortInput, b)) :
                                                                                                                                                0;
                                                                                                                        Severity: Major
                                                                                                                        Found in assets/js/prototype.js - About 30 mins to fix

                                                                                                                          Avoid too many return statements within this function.
                                                                                                                          Open

                                                                                                                                  return 0;
                                                                                                                          Severity: Major
                                                                                                                          Found in assets/js/prototype.js - About 30 mins to fix

                                                                                                                            Avoid too many return statements within this function.
                                                                                                                            Open

                                                                                                                                                        return results;
                                                                                                                            Severity: Major
                                                                                                                            Found in assets/js/prototype.js - About 30 mins to fix

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

                                                                                                                                  initialize: function (request) {
                                                                                                                                      this.request = request;
                                                                                                                                      var transport = this.transport = request.transport,
                                                                                                                                          readyState = this.readyState = transport.readyState;
                                                                                                                              
                                                                                                                              
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js - About 25 mins to fix

                                                                                                                              Cognitive Complexity

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

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

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

                                                                                                                              Further reading

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

                                                                                                                                  getInputs: function (form, typeName, name) {
                                                                                                                                      form = $(form);
                                                                                                                                      var inputs = form.getElementsByTagName('input');
                                                                                                                              
                                                                                                                                      if (!typeName && !name) return $A(inputs).map(Element.extend);
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js - About 25 mins to fix

                                                                                                                              Cognitive Complexity

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

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

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

                                                                                                                              Further reading

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

                                                                                                                              var ObjectRange = Class.create(Enumerable, (function () {
                                                                                                                                  function initialize(start, end, exclusive) {
                                                                                                                                      this.start = start;
                                                                                                                                      this.end = end;
                                                                                                                                      this.exclusive = exclusive;
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js - About 25 mins to fix

                                                                                                                              Cognitive Complexity

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

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

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

                                                                                                                              Further reading

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

                                                                                                                                          'width': function (element) {
                                                                                                                                              if (!this._preComputing) this._begin();
                                                                                                                              
                                                                                                                                              var bWidth = this.get('border-box-width');
                                                                                                                                              if (bWidth <= 0) {
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 7 hrs to fix
                                                                                                                              assets/js/prototype.js on lines 3839..3857

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

                                                                                                                              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

                                                                                                                                          'height': function (element) {
                                                                                                                                              if (!this._preComputing) this._begin();
                                                                                                                              
                                                                                                                                              var bHeight = this.get('border-box-height');
                                                                                                                                              if (bHeight <= 0) {
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 7 hrs to fix
                                                                                                                              assets/js/prototype.js on lines 3859..3876

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

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

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

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

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

                                                                                                                              Refactorings

                                                                                                                              Further Reading

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

                                                                                                                                  function min(iterator, context) {
                                                                                                                                      iterator = iterator || Prototype.K;
                                                                                                                                      var result;
                                                                                                                                      this.each(function (value, index) {
                                                                                                                                          value = iterator.call(context, value, index, this);
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 2 hrs to fix
                                                                                                                              assets/js/prototype.js on lines 997..1006

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

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

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

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

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

                                                                                                                              Refactorings

                                                                                                                              Further Reading

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

                                                                                                                                  function max(iterator, context) {
                                                                                                                                      iterator = iterator || Prototype.K;
                                                                                                                                      var result;
                                                                                                                                      this.each(function (value, index) {
                                                                                                                                          value = iterator.call(context, value, index, this);
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 2 hrs to fix
                                                                                                                              assets/js/prototype.js on lines 1008..1017

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

                                                                                                                              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

                                                                                                                                  Object.extend(methods, {
                                                                                                                                      recursivelyCollect: recursivelyCollect,
                                                                                                                                      ancestors: ancestors,
                                                                                                                                      descendants: descendants,
                                                                                                                                      firstDescendant: firstDescendant,
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 2 hrs to fix
                                                                                                                              assets/js/prototype.js on lines 4440..4459

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

                                                                                                                              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

                                                                                                                                  Element.addMethods({
                                                                                                                                      getLayout: getLayout,
                                                                                                                                      measure: measure,
                                                                                                                                      getWidth: getWidth,
                                                                                                                                      getHeight: getHeight,
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 2 hrs to fix
                                                                                                                              assets/js/prototype.js on lines 2739..2760

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

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

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

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

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

                                                                                                                              Refactorings

                                                                                                                              Further Reading

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

                                                                                                                                  function pointerY(event) {
                                                                                                                                      var docElement = document.documentElement,
                                                                                                                                          body = document.body || {scrollTop: 0};
                                                                                                                              
                                                                                                                                      return event.pageY || (event.clientY +
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 2 hrs to fix
                                                                                                                              assets/js/prototype.js on lines 6886..6893

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

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

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

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

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

                                                                                                                              Refactorings

                                                                                                                              Further Reading

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

                                                                                                                                  function pointerX(event) {
                                                                                                                                      var docElement = document.documentElement,
                                                                                                                                          body = document.body || {scrollLeft: 0};
                                                                                                                              
                                                                                                                                      return event.pageX || (event.clientX +
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 2 hrs to fix
                                                                                                                              assets/js/prototype.js on lines 6895..6902

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

                                                                                                                              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

                                                                                                                                          'right': function (element) {
                                                                                                                                              var offset = element.positionedOffset(),
                                                                                                                                                  parent = element.getOffsetParent(),
                                                                                                                                                  pWidth = parent.measure('width');
                                                                                                                              
                                                                                                                              
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 2 hrs to fix
                                                                                                                              assets/js/prototype.js on lines 3933..3941

                                                                                                                              Duplicated Code

                                                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                              Tuning

                                                                                                                              This issue has a mass of 80.

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

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

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

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

                                                                                                                              Refactorings

                                                                                                                              Further Reading

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

                                                                                                                                          'bottom': function (element) {
                                                                                                                                              var offset = element.positionedOffset(),
                                                                                                                                                  parent = element.getOffsetParent(),
                                                                                                                                                  pHeight = parent.measure('height');
                                                                                                                              
                                                                                                                              
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 2 hrs to fix
                                                                                                                              assets/js/prototype.js on lines 3948..3956

                                                                                                                              Duplicated Code

                                                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                              Tuning

                                                                                                                              This issue has a mass of 80.

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

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

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

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

                                                                                                                              Refactorings

                                                                                                                              Further Reading

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

                                                                                                                                          'right': function (element) {
                                                                                                                                              var parent = hasLayout(element.getOffsetParent());
                                                                                                                                              var rect = element.getBoundingClientRect(),
                                                                                                                                                  pRect = parent.getBoundingClientRect();
                                                                                                                              
                                                                                                                              
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 2 hrs to fix
                                                                                                                              assets/js/prototype.js on lines 4018..4024

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

                                                                                                                              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

                                                                                                                                          'bottom': function (element) {
                                                                                                                                              var parent = hasLayout(element.getOffsetParent());
                                                                                                                                              var rect = element.getBoundingClientRect(),
                                                                                                                                                  pRect = parent.getBoundingClientRect();
                                                                                                                              
                                                                                                                              
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 2 hrs to fix
                                                                                                                              assets/js/prototype.js on lines 4010..4016

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

                                                                                                                              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 (isNaN(i)) {
                                                                                                                                          i = 0;
                                                                                                                                      } else if (i !== 0 && isFinite(i)) {
                                                                                                                                          i = (i > 0 ? 1 : -1) * Math.floor(Math.abs(i));
                                                                                                                                      }
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 2 hrs to fix
                                                                                                                              assets/js/prototype.js on lines 1243..1247

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

                                                                                                                              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 (isNaN(i)) {
                                                                                                                                              i = 0;
                                                                                                                                          } else if (i !== 0 && isFinite(i)) {
                                                                                                                                              i = (i > 0 ? 1 : -1) * Math.floor(Math.abs(i));
                                                                                                                                          }
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 2 hrs to fix
                                                                                                                              assets/js/prototype.js on lines 1220..1224

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

                                                                                                                              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

                                                                                                                                          'margin-box-height': function (element) {
                                                                                                                                              var bHeight = this.get('border-box-height'),
                                                                                                                                                  mTop = this.get('margin-top'),
                                                                                                                                                  mBottom = this.get('margin-bottom');
                                                                                                                              
                                                                                                                              
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 1 hr to fix
                                                                                                                              assets/js/prototype.js on lines 3918..3926

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

                                                                                                                              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

                                                                                                                                          'margin-box-width': function (element) {
                                                                                                                                              var bWidth = this.get('border-box-width'),
                                                                                                                                                  mLeft = this.get('margin-left'),
                                                                                                                                                  mRight = this.get('margin-right');
                                                                                                                              
                                                                                                                              
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 1 hr to fix
                                                                                                                              assets/js/prototype.js on lines 3908..3916

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

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

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

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

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

                                                                                                                              Refactorings

                                                                                                                              Further Reading

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

                                                                                                                                  function stopObservingStandardEvent(element, eventName, responder) {
                                                                                                                                      var actualEventName = getDOMEventName(eventName);
                                                                                                                                      if (element.removeEventListener) {
                                                                                                                                          element.removeEventListener(actualEventName, responder, false);
                                                                                                                                      } else {
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 1 hr to fix
                                                                                                                              assets/js/prototype.js on lines 7107..7114

                                                                                                                              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

                                                                                                                                  function observeStandardEvent(element, eventName, responder) {
                                                                                                                                      var actualEventName = getDOMEventName(eventName);
                                                                                                                                      if (element.addEventListener) {
                                                                                                                                          element.addEventListener(actualEventName, responder, false);
                                                                                                                                      } else {
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 1 hr to fix
                                                                                                                              assets/js/prototype.js on lines 7147..7154

                                                                                                                              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

                                                                                                                                          'border-box-height': function (element) {
                                                                                                                                              if (!this._preComputing) this._begin();
                                                                                                                                              var height = element.offsetHeight;
                                                                                                                                              if (!this._preComputing) this._end();
                                                                                                                                              return height;
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 1 hr to fix
                                                                                                                              assets/js/prototype.js on lines 3901..3906

                                                                                                                              Duplicated Code

                                                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                              Tuning

                                                                                                                              This issue has a mass of 65.

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

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

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

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

                                                                                                                              Refactorings

                                                                                                                              Further Reading

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

                                                                                                                                          'border-box-width': function (element) {
                                                                                                                                              if (!this._preComputing) this._begin();
                                                                                                                                              var width = element.offsetWidth;
                                                                                                                                              if (!this._preComputing) this._end();
                                                                                                                                              return width;
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 1 hr to fix
                                                                                                                              assets/js/prototype.js on lines 3894..3899

                                                                                                                              Duplicated Code

                                                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                              Tuning

                                                                                                                              This issue has a mass of 65.

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

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

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

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

                                                                                                                              Refactorings

                                                                                                                              Further Reading

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

                                                                                                                                          'padding-box-width': function (element) {
                                                                                                                                              var width = this.get('width'),
                                                                                                                                                  pLeft = this.get('padding-left'),
                                                                                                                                                  pRight = this.get('padding-right');
                                                                                                                              
                                                                                                                              
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 1 hr to fix
                                                                                                                              assets/js/prototype.js on lines 3878..3884

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

                                                                                                                              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

                                                                                                                                          'padding-box-height': function (element) {
                                                                                                                                              var height = this.get('height'),
                                                                                                                                                  pTop = this.get('padding-top'),
                                                                                                                                                  pBottom = this.get('padding-bottom');
                                                                                                                              
                                                                                                                              
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 1 hr to fix
                                                                                                                              assets/js/prototype.js on lines 3886..3892

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

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

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

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

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

                                                                                                                              Refactorings

                                                                                                                              Further Reading

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

                                                                                                                                  function observeCustomEvent(element, eventName, responder) {
                                                                                                                                      if (element.addEventListener) {
                                                                                                                                          element.addEventListener('dataavailable', responder, false);
                                                                                                                                      } else {
                                                                                                                                          element.attachEvent('ondataavailable', responder);
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 1 hr to fix
                                                                                                                              assets/js/prototype.js on lines 7156..7163

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

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

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

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

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

                                                                                                                              Refactorings

                                                                                                                              Further Reading

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

                                                                                                                                  function stopObservingCustomEvent(element, eventName, responder) {
                                                                                                                                      if (element.removeEventListener) {
                                                                                                                                          element.removeEventListener('dataavailable', responder, false);
                                                                                                                                      } else {
                                                                                                                                          element.detachEvent('ondataavailable', responder);
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 1 hr to fix
                                                                                                                              assets/js/prototype.js on lines 7116..7123

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

                                                                                                                              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

                                                                                                                                  function getUniqueElementID(element) {
                                                                                                                                      if (element === window) return 0;
                                                                                                                              
                                                                                                                                      if (typeof element._prototypeUID === 'undefined')
                                                                                                                                          element._prototypeUID = Element.Storage.UID++;
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 1 hr to fix
                                                                                                                              assets/js/prototype.js on lines 7007..7013

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

                                                                                                                              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

                                                                                                                                  function getUniqueElementID(element) {
                                                                                                                                      if (element === window) return 0;
                                                                                                                              
                                                                                                                                      if (typeof element._prototypeUID === 'undefined')
                                                                                                                                          element._prototypeUID = Element.Storage.UID++;
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 1 hr to fix
                                                                                                                              assets/js/prototype.js on lines 3258..3264

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

                                                                                                                              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

                                                                                                                              Form.Element.EventObserver = Class.create(Abstract.EventObserver, {
                                                                                                                                  getValue: function () {
                                                                                                                                      return Form.Element.getValue(this.element);
                                                                                                                                  }
                                                                                                                              });
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 1 hr to fix
                                                                                                                              assets/js/prototype.js on lines 6696..6700

                                                                                                                              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

                                                                                                                              Form.Element.Observer = Class.create(Abstract.TimedObserver, {
                                                                                                                                  getValue: function () {
                                                                                                                                      return Form.Element.getValue(this.element);
                                                                                                                                  }
                                                                                                                              });
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 1 hr to fix
                                                                                                                              assets/js/prototype.js on lines 6749..6753

                                                                                                                              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

                                                                                                                                      if (!value || value === 'auto') {
                                                                                                                                          var css = document.defaultView.getComputedStyle(element, null);
                                                                                                                                          value = css ? css[style] : null;
                                                                                                                                      }
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 55 mins to fix
                                                                                                                              assets/js/prototype.js on lines 3555..3558

                                                                                                                              Duplicated Code

                                                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                              Tuning

                                                                                                                              This issue has a mass of 54.

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

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

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

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

                                                                                                                              Refactorings

                                                                                                                              Further Reading

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

                                                                                                                                      if (!value || value === 'auto') {
                                                                                                                                          var css = document.defaultView.getComputedStyle(element, null);
                                                                                                                                          value = css ? css[style] : null;
                                                                                                                                      }
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 55 mins to fix
                                                                                                                              assets/js/prototype.js on lines 3127..3130

                                                                                                                              Duplicated Code

                                                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                              Tuning

                                                                                                                              This issue has a mass of 54.

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

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

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

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

                                                                                                                              Refactorings

                                                                                                                              Further Reading

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

                                                                                                                                          "odd": createPositionalPseudo(function (matchIndexes, length) {
                                                                                                                                              var i = 1;
                                                                                                                                              for (; i < length; i += 2) {
                                                                                                                                                  matchIndexes.push(i);
                                                                                                                                              }
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 55 mins to fix
                                                                                                                              assets/js/prototype.js on lines 5765..5771

                                                                                                                              Duplicated Code

                                                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                              Tuning

                                                                                                                              This issue has a mass of 54.

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

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

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

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

                                                                                                                              Refactorings

                                                                                                                              Further Reading

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

                                                                                                                                          "even": createPositionalPseudo(function (matchIndexes, length) {
                                                                                                                                              var i = 0;
                                                                                                                                              for (; i < length; i += 2) {
                                                                                                                                                  matchIndexes.push(i);
                                                                                                                                              }
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 55 mins to fix
                                                                                                                              assets/js/prototype.js on lines 5773..5779

                                                                                                                              Duplicated Code

                                                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                              Tuning

                                                                                                                              This issue has a mass of 54.

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

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

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

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

                                                                                                                              Refactorings

                                                                                                                              Further Reading

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

                                                                                                                                      if (options.setLeft)
                                                                                                                                          styles.left = (p[0] + pageXY.x - delta[0] + options.offsetLeft) + 'px';
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 50 mins to fix
                                                                                                                              assets/js/prototype.js on lines 4372..4373

                                                                                                                              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 (options.setTop)
                                                                                                                                          styles.top = (p[1] + pageXY.y - delta[1] + options.offsetTop) + 'px';
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 50 mins to fix
                                                                                                                              assets/js/prototype.js on lines 4370..4371

                                                                                                                              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

                                                                                                                              Form.Observer = Class.create(Abstract.TimedObserver, {
                                                                                                                                  getValue: function () {
                                                                                                                                      return Form.serialize(this.element);
                                                                                                                                  }
                                                                                                                              });
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 40 mins to fix
                                                                                                                              assets/js/prototype.js on lines 6755..6759

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

                                                                                                                              Form.EventObserver = Class.create(Abstract.EventObserver, {
                                                                                                                                  getValue: function () {
                                                                                                                                      return Form.serialize(this.element);
                                                                                                                                  }
                                                                                                                              });
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 40 mins to fix
                                                                                                                              assets/js/prototype.js on lines 6702..6706

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

                                                                                                                                  var IS_DONTENUM_BUGGY = (function () {
                                                                                                                                      for (var p in {toString: 1}) {
                                                                                                                                          if (p === 'toString') return false;
                                                                                                                                      }
                                                                                                                                      return true;
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 40 mins to fix
                                                                                                                              assets/js/prototype.js on lines 69..74

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

                                                                                                                                  var IS_DONTENUM_BUGGY = (function () {
                                                                                                                                      for (var p in {toString: 1}) {
                                                                                                                                          if (p === 'toString') return false;
                                                                                                                                      }
                                                                                                                                      return true;
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 40 mins to fix
                                                                                                                              assets/js/prototype.js on lines 180..185

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

                                                                                                                                  Event.Methods = {
                                                                                                                                      isLeftClick: isLeftClick,
                                                                                                                                      isMiddleClick: isMiddleClick,
                                                                                                                                      isRightClick: isRightClick,
                                                                                                                              
                                                                                                                              
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 35 mins to fix
                                                                                                                              assets/js/prototype.js on lines 2564..2574

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

                                                                                                                              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

                                                                                                                                  Object.extend(methods, {
                                                                                                                                      remove: remove,
                                                                                                                                      update: update,
                                                                                                                                      replace: replace,
                                                                                                                                      insert: insert,
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 35 mins to fix
                                                                                                                              assets/js/prototype.js on lines 6914..6927

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

                                                                                                                              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 (DIV.className !== 'x') {
                                                                                                                                      DIV.setAttribute('class', 'x');
                                                                                                                                      if (DIV.className === 'x')
                                                                                                                                          classProp = 'class';
                                                                                                                                  }
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 35 mins to fix
                                                                                                                              assets/js/prototype.js on lines 2940..2944

                                                                                                                              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

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

                                                                                                                                  if (LABEL.htmlFor !== 'x') {
                                                                                                                                      LABEL.setAttribute('htmlFor', 'x');
                                                                                                                                      if (LABEL.htmlFor === 'x')
                                                                                                                                          forProp = 'htmlFor';
                                                                                                                                  }
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 35 mins to fix
                                                                                                                              assets/js/prototype.js on lines 2932..2936

                                                                                                                              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

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

                                                                                                                                          var keys = (args.length === 0) ? Element.Layout.PROPERTIES :
                                                                                                                                              args.join(' ').split(' ');
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 30 mins to fix
                                                                                                                              assets/js/prototype.js on lines 3814..3815

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

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

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

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

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

                                                                                                                              Refactorings

                                                                                                                              Further Reading

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

                                                                                                                                          var keys = (args.length === 0) ? Element.Layout.PROPERTIES :
                                                                                                                                              args.join(' ').split(' ');
                                                                                                                              Severity: Minor
                                                                                                                              Found in assets/js/prototype.js and 1 other location - About 30 mins to fix
                                                                                                                              assets/js/prototype.js on lines 3796..3797

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

                                                                                                                              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