railsfrance/railsfrance.org

View on GitHub
app/assets/javascripts/lib/jquery.bxSlider.js

Summary

Maintainability
F
2 wks
Test Coverage

Function bxSlider has 846 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $.fn.bxSlider = function(options){        
                
        var defaults = {
            mode: 'horizontal',                                    // 'horizontal', 'vertical', 'fade'
            infiniteLoop: true,                                    // true, false - display first slide after last
Severity: Major
Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 4 days to fix

    File jquery.bxSlider.js has 857 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * jQuery bxSlider v3.0
     * http://bxslider.com
     *
     * Copyright 2010, Steven Wanderski
    Severity: Major
    Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 2 days to fix

      Function initShow has 83 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              this.initShow = function(){
                  
                  // reinitialize all variables
                  // base = this;
                  $parent = $(this);
      Severity: Major
      Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 3 hrs to fix

        Function goToPreviousSlide has 67 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                this.goToPreviousSlide = function(stopAuto){
                    // check if stopAuto argument is supplied
                    if(typeof(stopAuto) == 'undefined'){
                        var stopAuto = true;
                    }
        Severity: Major
        Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 2 hrs to fix

          Function goToNextSlide has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  this.goToNextSlide = function(stopAuto){
                      // check if stopAuto argument is supplied
                      if(typeof(stopAuto) == 'undefined'){
                          var stopAuto = true;
                      }
          Severity: Major
          Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 2 hrs to fix

            Function setAutoInterval has 57 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    function setAutoInterval(){
                        if(options.auto){
                            // finite loop
                            if(!options.infiniteLoop){
                                if(options.autoDirection == 'next'){
            Severity: Major
            Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 2 hrs to fix

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

                      function initCss(){
                          // layout the children
                          setChildrenLayout(options.startingSlide);
                          // CSS for horizontal mode
                          if(options.mode == 'horizontal'){
              Severity: Minor
              Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 2 hrs to fix

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

                        function showPager(type){
                            // sets up logic for finite multi slide shows
                            var pagerQty = $children.length;
                            // if we are moving more than one at a time and we have a finite loop
                            if(options.moveSlideQty > 1){
                Severity: Minor
                Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 1 hr to fix

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

                          this.goToSlide = function(number, stopAuto){
                              if(!isWorking){
                                  isWorking = true;
                                  // set current slide to argument
                                  currentSlide = number;
                  Severity: Minor
                  Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 1 hr to fix

                    Function showAutoControls has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function showAutoControls(startType, startContent, stopType, stopContent){
                                // create pager html elements
                                $autoControls = $('<a href="" class="bx-start"></a>');
                                // check if start is 'text' or 'image'
                                if(startType == 'text'){
                    Severity: Minor
                    Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 1 hr to fix

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

                              function showControls(nextType, nextContent, prevType, prevContent){
                                  // create pager html elements
                                  var $nextHtml = $('<a href="" class="bx-next"></a>');
                                  var $prevHtml = $('<a href="" class="bx-prev"></a>');
                                  // check if next is 'text' or 'image'
                      Severity: Minor
                      Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 1 hr to fix

                        Function startTicker has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                this.startTicker = function(changeText){
                                    if(options.mode == 'horizontal'){
                                        if(options.tickerDirection == 'next'){
                                            // get the 'left' property where the ticker stopped
                                            var stoppedLeft = parseInt($parent.css('left'));
                        Severity: Minor
                        Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 1 hr to fix

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

                                  function getArraySample(array, start, length, direction){
                                      // initialize empty array
                                      var sample = [];
                                      // clone the length argument
                                      var loopLength = length;
                          Severity: Minor
                          Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 1 hr to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                }else if(options.mode == 'fade'){
                                                    setChildrenFade();
                                                }                    
                            Severity: Major
                            Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                          if(slideLoop){
                                                              $parent.css('top', '-'+getSlidePosition(currentSlide, 'top')+'px');
                                                          }
                              Severity: Major
                              Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                    }else if(options.mode == 'fade'){
                                                        setChildrenFade();
                                                    }                    
                                Severity: Major
                                Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                              if(slideLoop){
                                                                  $parent.css('top', '-'+getSlidePosition(currentSlide, 'top')+'px');
                                                              }
                                  Severity: Major
                                  Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                if(currentSlide < 0){
                                                                    negativeOffset = (currentSlide % $children.length);
                                                                    if(negativeOffset == 0){
                                                                        currentSlide = 0;
                                                                    }else{
                                    Severity: Major
                                    Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 45 mins to fix

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

                                                          if(options.mode == 'horizontal'){
                                                              // get the new 'left' property for $parent
                                                              var parentLeft = (options.moveSlideQty * childrenOuterWidth);
                                                              // animate to the new 'left'
                                                              $parent.animate({'left': '+='+parentLeft+'px'}, options.speed, options.easing, function(){
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 1 day to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 214..242

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

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                          if(options.mode == 'horizontal'){                        
                                                              // get the new 'left' property for $parent
                                                              var parentLeft = (options.moveSlideQty * childrenOuterWidth);
                                                              // animate to the new 'left'
                                                              $parent.animate({'left': '-='+parentLeft+'px'}, options.speed, options.easing, function(){
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 1 day to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 310..338

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 323.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                              function setControlsVars(){
                                                  // check if text or images should be used for controls
                                                  // check "next"
                                                  if(options.nextImage != ''){
                                                      nextContent = options.nextImage;
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 5 hrs to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 863..883

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

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                              function setAutoControlsVars(){
                                                  // check if text or images should be used for controls
                                                  // check "start"
                                                  if(options.startImage != ''){
                                                      startContent = options.startImage;
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 5 hrs to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 720..740

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

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                      if(options.tickerDirection == 'next'){
                                                          // get the 'top' property where the ticker stopped
                                                          var stoppedTop = parseInt($parent.css('top'));
                                                          // calculate the remaining distance the show must travel until the loop
                                                          var remainingDistance = (origShowHeight + stoppedTop) + $children.eq(0).height();            
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 5 hrs to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 437..447

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

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                      if(options.tickerDirection == 'next'){
                                                          // get the 'left' property where the ticker stopped
                                                          var stoppedLeft = parseInt($parent.css('left'));
                                                          // calculate the remaining distance the show must travel until the loop
                                                          var remainingDistance = (origShowWidth + stoppedLeft) + $children.eq(0).width();            
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 5 hrs to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 453..463

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

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                      }else if(options.mode == 'vertical'){
                                                          $parent.animate({'top': '-'+getSlidePosition(slide, 'top')+'px'}, options.speed, options.easing, function(){
                                                              isWorking = false;
                                                              // perform the callback function
                                                              options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 2 hrs to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 138..154

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

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                      if(options.mode == 'horizontal'){
                                                          $parent.animate({'left': '-'+getSlidePosition(slide, 'left')+'px'}, options.speed, options.easing, function(){
                                                              isWorking = false;
                                                              // perform the callback function
                                                              options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 2 hrs to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 145..154

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

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                              if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
                                                  return this.elem[ this.prop ];
                                              }
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 2 hrs to fix
                                      app/assets/javascripts/lib/jquery-1.6.4.js on lines 8440..8442

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

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                      if(options.tickerDirection == 'next'){
                                                          $parent.animate({'top': '-='+distance+'px'}, speed, 'linear', function(){
                                                              $parent.css('top', leftCss);
                                                              moveTheShow(leftCss, origShowHeight, options.tickerSpeed);
                                                          });
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 1 hr to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 830..841

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 74.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                      if(options.tickerDirection == 'next'){
                                                          $parent.animate({'left': '-='+distance+'px'}, speed, 'linear', function(){
                                                              $parent.css('left', leftCss);
                                                              moveTheShow(leftCss, origShowWidth, options.tickerSpeed);
                                                          });
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 1 hr to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 845..856

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 74.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                  if(options.moveSlideQty > 1){
                                                      makeSlideActive(Math.ceil(currentSlide / options.moveSlideQty));
                                                  }else{            
                                                      makeSlideActive(currentSlide);            
                                                  }
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 2 other locations - About 55 mins to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 244..248
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 340..344

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 53.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                      $parent
                                                      .wrap('<div class="'+options.wrapperClass+'" style="width:'+childrenMaxWidth+'px; position:relative;"></div>')
                                                      .wrap('<div class="bx-window" style="width:'+childrenMaxWidth+'px; height:'+wrapperHeight+'px; position:relative; overflow:hidden;"></div>')
                                      Severity: Minor
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 55 mins to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 664..666

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 53.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                      $parent
                                                      .wrap('<div class="'+options.wrapperClass+'" style="width:'+childrenMaxWidth+'px; position:relative;"></div>')
                                                      .wrap('<div class="bx-window" style="height:'+childrenMaxHeight+'px; width:'+childrenMaxWidth+'px; position:relative; overflow:hidden;"></div>');
                                      Severity: Minor
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 55 mins to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 647..649

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 53.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                          if(options.moveSlideQty > 1){
                                                              makeSlideActive(Math.ceil(currentSlide / options.moveSlideQty));
                                                          }else{
                                                              makeSlideActive(currentSlide);
                                                          }
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 2 other locations - About 55 mins to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 244..248
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 578..582

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 53.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                          if(options.moveSlideQty > 1){
                                                              makeSlideActive(Math.ceil(currentSlide / options.moveSlideQty));
                                                          }else{
                                                              makeSlideActive(currentSlide);
                                                          }
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 2 other locations - About 55 mins to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 340..344
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 578..582

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 53.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                  if(options.prevSelector){
                                                      $(options.prevSelector).append($prevHtml);
                                                  }else{
                                                      $outerWrapper.append($prevHtml);
                                                  }
                                      Severity: Minor
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 40 mins to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 980..984

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 49.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                  if(changeText && options.autoControls){
                                                      $autoControls.html($stopContent).removeClass('start').addClass('stop');
                                                      autoPlaying = true;
                                                  }
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 3 other locations - About 40 mins to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 396..399
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 426..429
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 472..475

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 49.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                  $outerWrapper.find('.bx-window').hover(function() {
                                                      if(autoPlaying){
                                                          base.stopShow(false);
                                                      }
                                                  }, function() {
                                      Severity: Minor
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 40 mins to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 906..914

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 49.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                      if(changeText && options.ticker){
                                                          $autoControls.html($stopContent).removeClass('start').addClass('stop');
                                                          autoPlaying = true;
                                                      }                        
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 3 other locations - About 40 mins to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 396..399
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 411..414
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 426..429

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 49.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                  if(options.nextSelector){
                                                      $(options.nextSelector).append($nextHtml);
                                                  }else{
                                                      $outerWrapper.append($nextHtml);
                                                  }
                                      Severity: Minor
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 40 mins to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 974..978

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 49.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                  if(changeText && options.ticker){
                                                      $autoControls.html($startContent).removeClass('stop').addClass('start');
                                                      autoPlaying = false;
                                                  }            
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 3 other locations - About 40 mins to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 396..399
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 411..414
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 472..475

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 49.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                  $parent.hover(function() {
                                                      if(autoPlaying){
                                                          base.stopTicker(false);
                                                      }
                                                  }, function() {
                                      Severity: Minor
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 40 mins to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 890..898

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 49.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                  if(prevType == 'text'){
                                                      $prevHtml.html(prevContent);
                                                  }else{
                                                      $prevHtml.html('<img src="'+prevContent+'" />');
                                                  }
                                      Severity: Minor
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 40 mins to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 962..966

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 49.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                  if(changeText && options.autoControls){
                                                      $autoControls.html($startContent).removeClass('stop').addClass('start');
                                                      autoPlaying = false;
                                                  }
                                      Severity: Major
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 3 other locations - About 40 mins to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 411..414
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 426..429
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 472..475

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 49.

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

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

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

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

                                      Refactorings

                                      Further Reading

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

                                                  if(nextType == 'text'){
                                                      $nextHtml.html(nextContent);
                                                  }else{
                                                      $nextHtml.html('<img src="'+nextContent+'" />');
                                                  }
                                      Severity: Minor
                                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 40 mins to fix
                                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 968..972

                                      Duplicated Code

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

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

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

                                      Tuning

                                      This issue has a mass of 49.

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

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

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

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

                                      Refactorings

                                      Further Reading

                                      There are no issues that match your filters.

                                      Category
                                      Status