mambax7/smartobject

View on GitHub
include/projax/js/effects.js

Summary

Maintainability
F
2 mos
Test Coverage

File effects.js has 969 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// script.aculo.us effects.js v1.6.4, Wed Sep 06 11:30:58 CEST 2006

// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// Contributors:
//  Justin Palmer (http://encytemedia.com/)
Severity: Major
Found in include/projax/js/effects.js - About 2 days to fix

    Function Grow has 88 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Effect.Grow = function (element) {
        element = $(element);
        var options = Object.extend({
            direction: 'center',
            moveTransition: Effect.Transitions.sinoidal,
    Severity: Major
    Found in include/projax/js/effects.js - About 3 hrs to fix

      Function setDimensions has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

          setDimensions: function (height, width) {
              var d = {};
              if (this.options.scaleX) d.width = Math.round(width) + 'px';
              if (this.options.scaleY) d.height = Math.round(height) + 'px';
              if (this.options.scaleFromCenter) {
      Severity: Minor
      Found in include/projax/js/effects.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 parseColor has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

      String.prototype.parseColor = function () {
          var color = '#';
          if (this.slice(0, 4) == 'rgb(') {
              var cols = this.slice(4, this.length - 1).split(',');
              var i = 0;
      Severity: Minor
      Found in include/projax/js/effects.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 Shrink has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Effect.Shrink = function (element) {
          element = $(element);
          var options = Object.extend({
              direction: 'center',
              moveTransition: Effect.Transitions.sinoidal,
      Severity: Major
      Found in include/projax/js/effects.js - About 2 hrs to fix

        Function Shake has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Effect.Shake = function (element) {
            element = $(element);
            var oldStyle = {
                top: element.getStyle('top'),
                left: element.getStyle('left')
        Severity: Minor
        Found in include/projax/js/effects.js - About 1 hr to fix

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

          Effect.SlideDown = function (element) {
              element = $(element);
              element.cleanWhitespace();
              // SlideDown need to have the content of the element wrapped in a container element with fixed height!
              var oldInnerBottom = $(element.firstChild).getStyle('bottom');
          Severity: Minor
          Found in include/projax/js/effects.js - About 1 hr to fix

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

                    afterFinishInternal: function (effect) {
                        new Effect.Parallel(
                            [new Effect.Opacity(effect.element, {
                                sync: true,
                                to: 1.0,
            Severity: Minor
            Found in include/projax/js/effects.js - About 1 hr to fix

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

              Element.setOpacity = function (element, value) {
                  element = $(element);
                  if (value == 1) {
                      Element.setStyle(element, {
                          opacity: (/Gecko/.test(navigator.userAgent) && !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ?
              Severity: Minor
              Found in include/projax/js/effects.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 SlideUp has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

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

                Function afterFinishInternal has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                            x: 20, y: 0, duration: 0.05, afterFinishInternal: function (effect) {
                            new Effect.Move(effect.element,
                                {
                                    x: -40, y: 0, duration: 0.1, afterFinishInternal: function (effect) {
                                    new Effect.Move(effect.element,
                Severity: Minor
                Found in include/projax/js/effects.js - About 1 hr to fix

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

                      loop: function (timePos) {
                          if (timePos >= this.startOn) {
                              if (timePos >= this.finishOn) {
                                  this.render(1.0);
                                  this.cancel();
                  Severity: Minor
                  Found in include/projax/js/effects.js - About 45 mins to fix

                  Cognitive Complexity

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

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

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

                  Further reading

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

                  Effect.SlideDown = function (element) {
                      element = $(element);
                      element.cleanWhitespace();
                      // SlideDown need to have the content of the element wrapped in a container element with fixed height!
                      var oldInnerBottom = $(element.firstChild).getStyle('bottom');
                  Severity: Minor
                  Found in include/projax/js/effects.js - About 45 mins to fix

                  Cognitive Complexity

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

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

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

                  Further reading

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

                      render: function (pos) {
                          if (this.state == 'idle') {
                              this.state = 'running';
                              this.event('beforeSetup');
                              if (this.setup) this.setup();
                  Severity: Minor
                  Found in include/projax/js/effects.js - About 45 mins to fix

                  Cognitive Complexity

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

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

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

                  Further reading

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

                  Element.collectTextNodesIgnoreClass = function (element, className) {
                      return $A($(element).childNodes).collect(function (node) {
                          return (node.nodeType == 3 ? node.nodeValue :
                              ((node.hasChildNodes() && !Element.hasClassName(node, className)) ?
                                  Element.collectTextNodesIgnoreClass(node, className) : ''));
                  Severity: Minor
                  Found in include/projax/js/effects.js - About 25 mins to fix

                  Cognitive Complexity

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

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

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

                  Further reading

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

                  Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype), {
                      initialize: function (element, percent) {
                          this.element = $(element);
                          if (!this.element) throw(Effect._elementDoesNotExistError);
                          var options = Object.extend({
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 6 days to fix
                  include/projax_/js/effects.js on lines 433..505
                  include/scriptaculous/src/effects.js on lines 433..505

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

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

                  Effect.Base.prototype = {
                      position: null,
                      start: function (options) {
                          this.options = Object.extend(Object.extend({}, Effect.DefaultOptions), options || {});
                          this.currentFrame = 0;
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 5 days to fix
                  include/projax_/js/effects.js on lines 290..351
                  include/scriptaculous/src/effects.js on lines 290..351

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

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

                  Effect.Grow = function (element) {
                      element = $(element);
                      var options = Object.extend({
                          direction: 'center',
                          moveTransition: Effect.Transitions.sinoidal,
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 5 days to fix
                  include/projax_/js/effects.js on lines 857..949
                  include/scriptaculous/src/effects.js on lines 857..949

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

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

                  Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototype), {
                      initialize: function (element) {
                          this.element = $(element);
                          if (!this.element) throw(Effect._elementDoesNotExistError);
                          var options = Object.extend({startcolor: '#ffff99'}, arguments[1] || {});
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 3 days to fix
                  include/projax_/js/effects.js on lines 508..550
                  include/scriptaculous/src/effects.js on lines 508..550

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

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

                  Effect.Shrink = function (element) {
                      element = $(element);
                      var options = Object.extend({
                          direction: 'center',
                          moveTransition: Effect.Transitions.sinoidal,
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 3 days to fix
                  include/projax_/js/effects.js on lines 951..1013
                  include/scriptaculous/src/effects.js on lines 951..1013

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

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

                  var Effect = {
                      _elementDoesNotExistError: {
                          name: 'ElementDoesNotExistError',
                          message: 'The specified DOM element does not exist, but is required for this effect to operate'
                      },
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 3 days to fix
                  include/projax_/js/effects.js on lines 117..174
                  include/scriptaculous/src/effects.js on lines 117..174

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

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

                  Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), {
                      initialize: function () {
                          this.effects = [];
                          this.interval = null;
                      },
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 3 days to fix
                  include/projax_/js/effects.js on lines 210..262
                  include/scriptaculous/src/effects.js on lines 210..262

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

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

                  Effect.SlideDown = function (element) {
                      element = $(element);
                      element.cleanWhitespace();
                      // SlideDown need to have the content of the element wrapped in a container element with fixed height!
                      var oldInnerBottom = $(element.firstChild).getStyle('bottom');
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 2 days to fix
                  include/projax_/js/effects.js on lines 767..806
                  include/scriptaculous/src/effects.js on lines 767..806

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

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

                  Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), {
                      initialize: function (element) {
                          this.element = $(element);
                          if (!this.element) throw(Effect._elementDoesNotExistError);
                          var options = Object.extend({
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 2 days to fix
                  include/projax_/js/effects.js on lines 393..424
                  include/scriptaculous/src/effects.js on lines 393..424

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

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

                  Effect.SlideUp = function (element) {
                      element = $(element);
                      element.cleanWhitespace();
                      var oldInnerBottom = $(element.firstChild).getStyle('bottom');
                      return new Effect.Scale(element, window.opera ? 0 : 1,
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 2 days to fix
                  include/projax_/js/effects.js on lines 808..840
                  include/scriptaculous/src/effects.js on lines 808..840

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

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

                  Effect.Shake = function (element) {
                      element = $(element);
                      var oldStyle = {
                          top: element.getStyle('top'),
                          left: element.getStyle('left')
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 1 day to fix
                  include/projax_/js/effects.js on lines 724..765
                  include/scriptaculous/src/effects.js on lines 724..765

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

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

                  Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototype), {
                      initialize: function (element) {
                          this.element = $(element);
                          this.start(arguments[1] || {});
                      },
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 1 day to fix
                  include/projax_/js/effects.js on lines 553..575
                  include/scriptaculous/src/effects.js on lines 553..575

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

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

                  Effect.Puff = function (element) {
                      element = $(element);
                      var oldStyle = {
                          opacity: element.getInlineOpacity(),
                          position: element.getStyle('position'),
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 1 day to fix
                  include/projax_/js/effects.js on lines 611..636
                  include/scriptaculous/src/effects.js on lines 611..636

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

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

                  String.prototype.parseColor = function () {
                      var color = '#';
                      if (this.slice(0, 4) == 'rgb(') {
                          var cols = this.slice(4, this.length - 1).split(',');
                          var i = 0;
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 1 day to fix
                  include/projax_/js/effects.js on lines 13..28
                  include/scriptaculous/src/effects.js on lines 13..28

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

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

                  Element.setOpacity = function (element, value) {
                      element = $(element);
                      if (value == 1) {
                          Element.setStyle(element, {
                              opacity: (/Gecko/.test(navigator.userAgent) && !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ?
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 1 day to fix
                  include/projax_/js/effects.js on lines 62..81
                  include/scriptaculous/src/effects.js on lines 62..81

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

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

                  Effect.DropOut = function (element) {
                      element = $(element);
                      var oldStyle = {
                          top: element.getStyle('top'),
                          left: element.getStyle('left'),
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 1 day to fix
                  include/projax_/js/effects.js on lines 700..722
                  include/scriptaculous/src/effects.js on lines 700..722

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

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

                  Effect.SwitchOff = function (element) {
                      element = $(element);
                      var oldOpacity = element.getInlineOpacity();
                      return new Effect.Appear(element, Object.extend({
                          duration: 0.4,
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 1 day to fix
                  include/projax_/js/effects.js on lines 674..698
                  include/scriptaculous/src/effects.js on lines 674..698

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

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

                  Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype), {
                      initialize: function (element) {
                          this.element = $(element);
                          if (!this.element) throw(Effect._elementDoesNotExistError);
                          // make this work on IE on elements without 'layout'
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 1 day to fix
                  include/projax_/js/effects.js on lines 374..390
                  include/scriptaculous/src/effects.js on lines 374..390

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

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

                  Effect.Fold = function (element) {
                      element = $(element);
                      var oldStyle = {
                          top: element.style.top,
                          left: element.style.left,
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 1 day to fix
                  include/projax_/js/effects.js on lines 1033..1057
                  include/scriptaculous/src/effects.js on lines 1033..1057

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

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

                  Effect.Pulsate = function (element) {
                      element = $(element);
                      var options = arguments[1] || {};
                      var oldOpacity = element.getInlineOpacity();
                      var transition = options.transition || Effect.Transitions.sinoidal;
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 1 day to fix
                  include/projax_/js/effects.js on lines 1015..1031
                  include/scriptaculous/src/effects.js on lines 1015..1031

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

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

                  Effect.BlindDown = function (element) {
                      element = $(element);
                      var elementDimensions = element.getDimensions();
                      return new Effect.Scale(element, 100, Object.extend({
                          scaleContent: false,
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 1 day to fix
                  include/projax_/js/effects.js on lines 654..672
                  include/scriptaculous/src/effects.js on lines 654..672

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

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

                  Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototype), {
                      initialize: function (effects) {
                          this.effects = effects || [];
                          this.start(arguments[1]);
                      },
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 1 day to fix
                  include/projax_/js/effects.js on lines 354..371
                  include/scriptaculous/src/effects.js on lines 354..371

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

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

                  Effect.Appear = function (element) {
                      element = $(element);
                      var options = Object.extend({
                          from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0),
                          to: 1.0,
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 7 hrs to fix
                  include/projax_/js/effects.js on lines 594..609
                  include/scriptaculous/src/effects.js on lines 594..609

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 180.

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

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

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

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

                  Refactorings

                  Further Reading

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

                  Effect.Fade = function (element) {
                      element = $(element);
                      var oldOpacity = element.getInlineOpacity();
                      var options = Object.extend({
                          from: element.getOpacity() || 1.0,
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 6 hrs to fix
                  include/projax_/js/effects.js on lines 579..592
                  include/scriptaculous/src/effects.js on lines 579..592

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

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

                  Effect.Squish = function (element) {
                      return new Effect.Scale(element, window.opera ? 1 : 0,
                          {
                              restoreAfterFinish: true,
                              beforeSetup: function (effect) {
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 4 hrs to fix
                  include/projax_/js/effects.js on lines 843..855
                  include/scriptaculous/src/effects.js on lines 843..855

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 127.

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

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

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

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

                  Refactorings

                  Further Reading

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

                  Effect.BlindUp = function (element) {
                      element = $(element);
                      element.makeClipping();
                      return new Effect.Scale(element, 0,
                          Object.extend({
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 4 hrs to fix
                  include/projax_/js/effects.js on lines 638..652
                  include/scriptaculous/src/effects.js on lines 638..652

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

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

                  Element.childrenWithClassName = function (element, className, findFirst) {
                      var classNameRegExp = new RegExp("(^|\\s)" + className + "(\\s|$)");
                      var results = $A($(element).getElementsByTagName('*'))[findFirst ? 'detect' : 'select'](function (c) {
                          return (c.className && c.className.match(classNameRegExp));
                      });
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 4 hrs to fix
                  include/projax_/js/effects.js on lines 87..94
                  include/scriptaculous/src/effects.js on lines 87..94

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

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

                  Element.collectTextNodesIgnoreClass = function (element, className) {
                      return $A($(element).childNodes).collect(function (node) {
                          return (node.nodeType == 3 ? node.nodeValue :
                              ((node.hasChildNodes() && !Element.hasClassName(node, className)) ?
                                  Element.collectTextNodesIgnoreClass(node, className) : ''));
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 4 hrs to fix
                  include/projax_/js/effects.js on lines 39..45
                  include/scriptaculous/src/effects.js on lines 39..45

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

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

                  Element.collectTextNodes = function (element) {
                      return $A($(element).childNodes).collect(function (node) {
                          return (node.nodeType == 3 ? node.nodeValue :
                              (node.hasChildNodes() ? Element.collectTextNodes(node) : ''));
                      }).flatten().join('');
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 3 hrs to fix
                  include/projax_/js/effects.js on lines 32..37
                  include/scriptaculous/src/effects.js on lines 32..37

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

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

                  Element.getOpacity = function (element) {
                      var opacity;
                      if (opacity = Element.getStyle(element, 'opacity'))
                          return parseFloat(opacity);
                      if (opacity = (Element.getStyle(element, 'filter') || '').match(/alpha\(opacity=(.*)\)/))
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 3 hrs to fix
                  include/projax_/js/effects.js on lines 53..60
                  include/scriptaculous/src/effects.js on lines 53..60

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

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

                  Element.Methods.visualEffect = function (element, effect, options) {
                      s = effect.gsub(/_/, '-').camelize();
                      effect_class = s.charAt(0).toUpperCase() + s.substring(1);
                      new Effect[effect_class](element, options);
                      return $(element);
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 3 hrs to fix
                  include/projax_/js/effects.js on lines 1066..1071
                  include/scriptaculous/src/effects.js on lines 1066..1071

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

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

                  Effect.Transitions.pulse = function (pos) {
                      return (Math.floor(pos * 10) % 2 == 0 ?
                          (pos * 10 - Math.floor(pos * 10)) : 1 - (pos * 10 - Math.floor(pos * 10)));
                  }
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 2 hrs to fix
                  include/projax_/js/effects.js on lines 196..199
                  include/scriptaculous/src/effects.js on lines 196..199

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

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

                  Effect.Queues = {
                      instances: $H(),
                      get: function (queueName) {
                          if (typeof queueName != 'string') return queueName;
                  
                  
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 2 hrs to fix
                  include/projax_/js/effects.js on lines 264..274
                  include/scriptaculous/src/effects.js on lines 264..274

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 91.

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

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

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

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

                  Refactorings

                  Further Reading

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

                  Element.setContentZoom = function (element, percent) {
                      element = $(element);
                      Element.setStyle(element, {fontSize: (percent / 100) + 'em'});
                      if (navigator.appVersion.indexOf('AppleWebKit') > 0) window.scrollBy(0, 0);
                  }
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 2 hrs to fix
                  include/projax_/js/effects.js on lines 47..51
                  include/scriptaculous/src/effects.js on lines 47..51

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

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

                  Element.forceRerendering = function (element) {
                      try {
                          element = $(element);
                          var n = document.createTextNode(' ');
                          element.appendChild(n);
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 2 hrs to fix
                  include/projax_/js/effects.js on lines 96..104
                  include/scriptaculous/src/effects.js on lines 96..104

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 81.

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

                  Effect.DefaultOptions = {
                      transition: Effect.Transitions.sinoidal,
                      duration: 1.0,   // seconds
                      fps: 25.0,  // max. 25fps due to Effect.Queue implementation
                      sync: false, // true for combining
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 1 hr to fix
                  include/projax_/js/effects.js on lines 277..286
                  include/scriptaculous/src/effects.js on lines 277..286

                  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

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

                  Effect.Transitions.flicker = function (pos) {
                      return ((-Math.cos(pos * Math.PI) / 4) + 0.75) + Math.random() / 4;
                  }
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 1 hr to fix
                  include/projax_/js/effects.js on lines 190..192
                  include/scriptaculous/src/effects.js on lines 190..192

                  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

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

                  Effect.MoveBy = function (element, toTop, toLeft) {
                      return new Effect.Move(element,
                          Object.extend({x: toLeft, y: toTop}, arguments[3] || {}));
                  };
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 1 hr to fix
                  include/projax_/js/effects.js on lines 427..430
                  include/scriptaculous/src/effects.js on lines 427..430

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

                  Array.prototype.call = function () {
                      var args = arguments;
                      this.each(function (f) {
                          f.apply(this, args)
                      });
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 1 hr to fix
                  include/projax_/js/effects.js on lines 108..113
                  include/scriptaculous/src/effects.js on lines 108..113

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 60.

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

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

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

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

                  Refactorings

                  Further Reading

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

                  Effect.Transitions.wobble = function (pos) {
                      return (-Math.cos(pos * Math.PI * (9 * pos)) / 2) + 0.5;
                  }
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 1 hr to fix
                  include/projax_/js/effects.js on lines 193..195
                  include/scriptaculous/src/effects.js on lines 193..195

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

                  Effect.Transitions.sinoidal = function (pos) {
                      return (-Math.cos(pos * Math.PI) / 2) + 0.5;
                  }
                  Severity: Major
                  Found in include/projax/js/effects.js and 2 other locations - About 45 mins to fix
                  include/projax_/js/effects.js on lines 184..186
                  include/scriptaculous/src/effects.js on lines 184..186

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

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

                  ['setOpacity', 'getOpacity', 'getInlineOpacity', 'forceRerendering', 'setContentZoom',
                      'collectTextNodes', 'collectTextNodesIgnoreClass', 'childrenWithClassName'].each(
                      function (f) {
                          Element.Methods[f] = Element[f];
                      }
                  Severity: Minor
                  Found in include/projax/js/effects.js and 2 other locations - About 30 mins to fix
                  include/projax_/js/effects.js on lines 1059..1064
                  include/scriptaculous/src/effects.js on lines 1059..1064

                  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