sfstanley/citydogshare

View on GitHub
app/assets/javascripts/galleria-1.4.2.js

Summary

Maintainability
F
1 mo
Test Coverage

File galleria-1.4.2.js has 4395 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Galleria v 1.4.2 2014-08-07
 * http://galleria.io
 *
 * Licensed under the MIT license
Severity: Major
Found in app/assets/javascripts/galleria-1.4.2.js - About 1 wk to fix

    Function Utils has 401 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        Utils = (function() {
    
            return {
    
                // legacy support for clearTimer
    Severity: Major
    Found in app/assets/javascripts/galleria-1.4.2.js - About 2 days to fix

      Function _init has 341 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _init: function() {
      
              var self = this,
                  options = this._options;
      
      
      Severity: Major
      Found in app/assets/javascripts/galleria-1.4.2.js - About 1 day to fix

        Function Finger has 195 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Galleria.Finger = (function() {
        
            var abs = M.abs;
        
            // test for translate3d support
        Severity: Major
        Found in app/assets/javascripts/galleria-1.4.2.js - About 7 hrs to fix

          Function _show has 182 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _show : function() {
          
                  // shortcuts
                  var self = this,
                      queue = this._queue[ 0 ],
          Severity: Major
          Found in app/assets/javascripts/galleria-1.4.2.js - About 7 hrs to fix

            Function _createThumbnails has 177 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                _createThumbnails : function( push ) {
            
                    this.get( 'total' ).innerHTML = this.getDataLength();
            
                    var src,
            Severity: Major
            Found in app/assets/javascripts/galleria-1.4.2.js - About 7 hrs to fix

              Function scale has 152 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  scale: function( options ) {
              
                      var self = this;
              
                      // extend some defaults
              Severity: Major
              Found in app/assets/javascripts/galleria-1.4.2.js - About 6 hrs to fix

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

                    init: function( target, options ) {
                
                        options = _legacyOptions( options );
                
                        // save the original ingredients
                Severity: Major
                Found in app/assets/javascripts/galleria-1.4.2.js - About 5 hrs to fix

                  Function _enter has 136 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          _enter: function( callback ) {
                  
                              fullscreen.active = true;
                  
                              if ( IFRAME ) {
                  Severity: Major
                  Found in app/assets/javascripts/galleria-1.4.2.js - About 5 hrs to fix

                    Function _transitions has 128 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _transitions = (function() {
                    
                            var _slide = function(params, complete, fade, door) {
                    
                                var easing = this.getOptions('easing'),
                    Severity: Major
                    Found in app/assets/javascripts/galleria-1.4.2.js - About 5 hrs to fix

                      Function animate has 118 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  animate : (function() {
                      
                                      // detect transition
                                      var transition = (function( style ) {
                                          var props = 'transition WebkitTransition MozTransition OTransition'.split(' '),
                      Severity: Major
                      Found in app/assets/javascripts/galleria-1.4.2.js - About 4 hrs to fix

                        Function load has 110 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            load: function(src, size, callback) {
                        
                                if ( typeof size == 'function' ) {
                                    callback = size;
                                    size = null;
                        Severity: Major
                        Found in app/assets/javascripts/galleria-1.4.2.js - About 4 hrs to fix

                          Function _run has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              _run : function() {
                          
                                  var self = this;
                          
                                  self._createThumbnails();
                          Severity: Major
                          Found in app/assets/javascripts/galleria-1.4.2.js - About 3 hrs to fix

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

                                    init : function() {
                            
                                        if ( lightbox.initialized ) {
                                            return;
                                        }
                            Severity: Major
                            Found in app/assets/javascripts/galleria-1.4.2.js - About 3 hrs to fix

                              Function complete has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      var complete = (function( data, next, active, queue, thumb ) {
                              
                                          return function() {
                              
                                              var win;
                              Severity: Major
                              Found in app/assets/javascripts/galleria-1.4.2.js - About 3 hrs to fix

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

                                            success: function() {
                                
                                                // calculate some cropping
                                                var newWidth = ( width - options.margin * 2 ) / self.original.width,
                                                    newHeight = ( height - options.margin * 2 ) / self.original.height,
                                Severity: Major
                                Found in app/assets/javascripts/galleria-1.4.2.js - About 3 hrs to fix

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

                                          show: function(index) {
                                  
                                              lightbox.active = index = typeof index === 'number' ? index : self.getIndex() || 0;
                                  
                                              if ( !lightbox.initialized ) {
                                  Severity: Major
                                  Found in app/assets/javascripts/galleria-1.4.2.js - About 3 hrs to fix

                                    Function success has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                                success: function() {
                                    
                                                    // save the instance
                                                    _galleries.push( self );
                                    
                                    
                                    Severity: Major
                                    Found in app/assets/javascripts/galleria-1.4.2.js - About 3 hrs to fix

                                      Function show has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          show : function( index, rewind, _history ) {
                                      
                                              var swipe = this._options.swipe;
                                      
                                              // do nothing queue is long || index is false || queue is false and transition is in progress
                                      Severity: Major
                                      Found in app/assets/javascripts/galleria-1.4.2.js - About 3 hrs to fix

                                        Function load has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            load : function( source, selector, config ) {
                                        
                                                var self = this,
                                                    o = this._options;
                                        
                                        
                                        Severity: Major
                                        Found in app/assets/javascripts/galleria-1.4.2.js - About 2 hrs to fix

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

                                              _parseData : function( callback ) {
                                          
                                                  var self = this,
                                                      current,
                                                      ready = false,
                                          Severity: Major
                                          Found in app/assets/javascripts/galleria-1.4.2.js - About 2 hrs to fix

                                            Function addPan has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                addPan : function( img ) {
                                            
                                                    if ( this._options.imageCrop === false ) {
                                                        return;
                                                    }
                                            Severity: Major
                                            Found in app/assets/javascripts/galleria-1.4.2.js - About 2 hrs to fix

                                              Function loadCSS has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                          loadCSS : function( href, id, callback ) {
                                              
                                                              var link,
                                                                  length;
                                              
                                              
                                              Severity: Major
                                              Found in app/assets/javascripts/galleria-1.4.2.js - About 2 hrs to fix

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

                                                    add: function(handleObj) {
                                                
                                                        var getCoords = function(e) {
                                                            if ( e.touches && e.touches.length ) {
                                                                var touch = e.touches[0];
                                                Severity: Major
                                                Found in app/assets/javascripts/galleria-1.4.2.js - About 2 hrs to fix

                                                  Function Finger has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                      var Finger = function(elem, options) {
                                                  
                                                          // default options
                                                          this.config = {
                                                              start: 0,
                                                  Severity: Major
                                                  Found in app/assets/javascripts/galleria-1.4.2.js - About 2 hrs to fix

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

                                                            _exit: function( callback ) {
                                                    
                                                                fullscreen.active = false;
                                                    
                                                                var inBrowser = !self._options.trueFullscreen || !_nativeFullscreen.support,
                                                    Severity: Minor
                                                    Found in app/assets/javascripts/galleria-1.4.2.js - About 2 hrs to fix

                                                      Function addTheme has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                      Galleria.addTheme = function( theme ) {
                                                      
                                                          // make sure we have a name
                                                          if ( !theme.name ) {
                                                              Galleria.raise('No theme name specified');
                                                      Severity: Minor
                                                      Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

                                                        Function complete has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                                        complete: function( next ) {
                                                        
                                                                            // toggle low quality for IE
                                                                            if ( 'image' in active ) {
                                                                                Utils.toggleQuality( active.image, false );
                                                        Severity: Minor
                                                        Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                  var _slide = function(params, complete, fade, door) {
                                                          
                                                                      var easing = this.getOptions('easing'),
                                                                          distance = this.getStageWidth(),
                                                                          from = { left: distance * ( params.rewind ? -1 : 1 ) },
                                                          Severity: Minor
                                                          Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                        onload = (function( self, callback, src ) {
                                                            
                                                                            return function() {
                                                            
                                                                                var complete = function() {
                                                            Severity: Minor
                                                            Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                          onThumbLoad = function( thumb, callback ) {
                                                              
                                                                              // scale when ready
                                                                              thumb.scale({
                                                                                  width:    thumb.data.width,
                                                              Severity: Minor
                                                              Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                Galleria.raise = function( msg, fatal ) {
                                                                
                                                                    var type = fatal ? 'Fatal error' : 'Error',
                                                                
                                                                        css = {
                                                                Severity: Minor
                                                                Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                          bind: function( elem, value ) {
                                                                  
                                                                              // todo: revise if alternative tooltip is needed for mobile devices
                                                                              if (Galleria.TOUCH) {
                                                                                  return;
                                                                  Severity: Minor
                                                                  Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

                                                                    Function _scaleImage has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                        _scaleImage : function( image, options ) {
                                                                    
                                                                            image = image || this._controls.getActive();
                                                                    
                                                                            // janpub (JH) fix:
                                                                    Severity: Minor
                                                                    Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                              enter: function( callback ) {
                                                                      
                                                                                  fullscreen.beforeEnter(function() {
                                                                      
                                                                                      callback = fullscreen.parseCallback( callback, true );
                                                                      Severity: Minor
                                                                      Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

                                                                        Function rescale has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                            rescale : function( width, height, complete ) {
                                                                        
                                                                                var self = this;
                                                                        
                                                                                // allow rescale(fn)
                                                                        Severity: Minor
                                                                        Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                              Video = function( type, id ) {
                                                                          
                                                                                  for( var i=0; i<_video._inst.length; i++ ) {
                                                                                      if ( _video._inst[i].id === id && _video._inst[i].type == type ) {
                                                                                          return _video._inst[i];
                                                                          Severity: Minor
                                                                          Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                                                complete: function( thumb ) {
                                                                            
                                                                                                    // shrink thumbnails to fit
                                                                                                    var top = ['left', 'top'],
                                                                                                        arr = ['Width', 'Height'],
                                                                            Severity: Minor
                                                                            Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                                      loop: function() {
                                                                              
                                                                                          var distance = this.to - this.pos,
                                                                                              factor = 1;
                                                                              
                                                                              
                                                                              Severity: Minor
                                                                              Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

                                                                                Function add has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                        add: function(elem, to, from, hide) {
                                                                                            if ( !elem || Galleria.TOUCH ) {
                                                                                                return;
                                                                                            }
                                                                                            if (!idle.bound) {
                                                                                Severity: Minor
                                                                                Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                                          rescale: function(event) {
                                                                                  
                                                                                              // calculate
                                                                                               var width = M.min( $win.width()-40, lightbox.width ),
                                                                                                  height = M.min( $win.height()-60, lightbox.height ),
                                                                                  Severity: Minor
                                                                                  Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                                            bindControls: function() {
                                                                                    
                                                                                                var i;
                                                                                    
                                                                                                carousel.next.on( 'click:fast', function(e) {
                                                                                    Severity: Minor
                                                                                    Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                                      $.fn.galleria = function( options ) {
                                                                                      
                                                                                          var selector = this.selector;
                                                                                      
                                                                                          // try domReady if element not found
                                                                                      Severity: Minor
                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                                                    show : function( elem, speed, callback ) {
                                                                                        
                                                                                                        callback = callback || F;
                                                                                        
                                                                                                        var $elem = $(elem);
                                                                                        Severity: Minor
                                                                                        Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                                              _getWH : function() {
                                                                                          
                                                                                                  var $container = this.$( 'container' ),
                                                                                                      $target = this.$( 'target' ),
                                                                                                      self = this,
                                                                                          Severity: Minor
                                                                                          Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

                                                                                            Function lazyLoadChunks has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                            Open

                                                                                                lazyLoadChunks: function( size, delay ) {
                                                                                            
                                                                                                    var len = this.getDataLength(),
                                                                                                        i = 0,
                                                                                                        n = 0,
                                                                                            Severity: Minor
                                                                                            Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                                                  _playCheck : function() {
                                                                                                      var self = this,
                                                                                                          played = 0,
                                                                                                          interval = 20,
                                                                                                          now = Utils.timestamp(),
                                                                                              Severity: Minor
                                                                                              Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                                                            wait : function(options) {
                                                                                                
                                                                                                                Galleria._waiters = Galleria._waiters || [];
                                                                                                
                                                                                                                options = $.extend({
                                                                                                Severity: Minor
                                                                                                Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                                                                  flash: function(params, complete) {
                                                                                                                      $(params.next).css({
                                                                                                                          opacity: 0,
                                                                                                                          left: 0
                                                                                                                      });
                                                                                                  Severity: Minor
                                                                                                  Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                                                            var scale = function() {
                                                                                                    
                                                                                                                // set stagewidth
                                                                                                                self._stageWidth = width || self.$( 'stage' ).width();
                                                                                                                self._stageHeight = height || self.$( 'stage' ).height();
                                                                                                    Severity: Minor
                                                                                                    Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

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

                                                                                                                  hide : function( elem, speed, callback ) {
                                                                                                      
                                                                                                                      callback = callback || F;
                                                                                                      
                                                                                                                      var $elem = $(elem);
                                                                                                      Severity: Minor
                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js - About 1 hr to fix

                                                                                                        Avoid deeply nested control flow statements.
                                                                                                        Open

                                                                                                                                                if ( type == 'image' && !current.big ) {
                                                                                                                                                    current.big = current.image;
                                                                                                                                                }
                                                                                                        Severity: Major
                                                                                                        Found in app/assets/javascripts/galleria-1.4.2.js - About 45 mins to fix

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

                                                                                                                      easing: function(x,t,b,c,d) {
                                                                                                          Severity: Minor
                                                                                                          Found in app/assets/javascripts/galleria-1.4.2.js - About 35 mins to fix

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

                                                                                                                galleriaIn: function (_, t, b, c, d) {
                                                                                                            Severity: Minor
                                                                                                            Found in app/assets/javascripts/galleria-1.4.2.js - About 35 mins to fix

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

                                                                                                                  galleriaOut: function (_, t, b, c, d) {
                                                                                                              Severity: Minor
                                                                                                              Found in app/assets/javascripts/galleria-1.4.2.js - About 35 mins to fix

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

                                                                                                                        this.easeout = function (x, t, b, c, d) {
                                                                                                                Severity: Minor
                                                                                                                Found in app/assets/javascripts/galleria-1.4.2.js - About 35 mins to fix

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

                                                                                                                      galleria: function (_, t, b, c, d) {
                                                                                                                  Severity: Minor
                                                                                                                  Found in app/assets/javascripts/galleria-1.4.2.js - About 35 mins to fix

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

                                                                                                                            var complete = (function( data, next, active, queue, thumb ) {
                                                                                                                    Severity: Minor
                                                                                                                    Found in app/assets/javascripts/galleria-1.4.2.js - About 35 mins to fix

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

                                                                                                                                          window.setTimeout(function() {
                                                                                                                                              frame.load( data.iframe + ( data.video ? '&autoplay=1' : '' ), {
                                                                                                                                                  width: w,
                                                                                                                                                  height: h
                                                                                                                                              }, function( frame ) {
                                                                                                                      Severity: Major
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 5 hrs to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 5042..5054

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

                                                                                                                      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

                                                                                                                                                  window.setTimeout(function() {
                                                                                                                                                      frame.load( data.iframe + ( data.video ? '&autoplay=1' : '' ), {
                                                                                                                                                          width: w,
                                                                                                                                                          height: h
                                                                                                                                                      }, function( frame ) {
                                                                                                                      Severity: Major
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 5 hrs to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 3011..3023

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

                                                                                                                      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

                                                                                                                              removeEvent : function() {
                                                                                                                                  idle.bound = false;
                                                                                                                                  self.$('container').on( 'mousemove click', idle.showAll );
                                                                                                                                  if ( self._options.idleMode == 'hover' ) {
                                                                                                                                      self.$('container').off( 'mouseleave', idle.hide );
                                                                                                                      Severity: Major
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 2 hrs to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 2072..2078

                                                                                                                      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

                                                                                                                              addEvent : function() {
                                                                                                                                  idle.bound = true;
                                                                                                                                  self.$('container').on( 'mousemove click', idle.showAll );
                                                                                                                                  if ( self._options.idleMode == 'hover' ) {
                                                                                                                                      self.$('container').on( 'mouseleave', idle.hide );
                                                                                                                      Severity: Major
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 2 hrs to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 2080..2086

                                                                                                                      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 ( elem.requestFullscreen ) {
                                                                                                                                      elem.requestFullscreen();
                                                                                                                                  }
                                                                                                                                  else if ( elem.msRequestFullscreen ) {
                                                                                                                                      elem.msRequestFullscreen();
                                                                                                                      Severity: Major
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 2 hrs to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 261..272

                                                                                                                      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

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

                                                                                                                                  if ( doc.exitFullscreen ) {
                                                                                                                                      doc.exitFullscreen();
                                                                                                                                  }
                                                                                                                                  else if ( doc.msExitFullscreen ) {
                                                                                                                                      doc.msExitFullscreen();
                                                                                                                      Severity: Major
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 2 hrs to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 243..254

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

                                                                                                                                      $( frame.container ).attr('class', 'galleria-frame').css({
                                                                                                                                          position: 'absolute',
                                                                                                                                          top: 0,
                                                                                                                                          left: 0,
                                                                                                                                          zIndex: 4,
                                                                                                                      Severity: Major
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 1 hr to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 3692..3699

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

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                              $( frame.container ).attr('class', 'galleria-frame').css({
                                                                                                                                                  position: 'absolute',
                                                                                                                                                  top: 0,
                                                                                                                                                  left: 0,
                                                                                                                                                  zIndex: 4,
                                                                                                                      Severity: Major
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 1 hr to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 2925..2932

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

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                              $( image.container ).css({
                                                                                                                                                  position: 'absolute',
                                                                                                                                                  top: 0,
                                                                                                                                                  left: self._stageWidth*i
                                                                                                                                              }).prepend( self._layers[i] = $( Utils.create('galleria-layer') ).css({
                                                                                                                      Severity: Major
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 1 hr to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 2905..2913

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

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                      $( image.container ).css({
                                                                                                                                          position: 'absolute',
                                                                                                                                          top: 0,
                                                                                                                                          left: 0
                                                                                                                                      }).prepend( self._layers[i] = $( Utils.create('galleria-layer') ).css({
                                                                                                                      Severity: Major
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 1 hr to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 3673..3681

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

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                          $( frame.container ).css({
                                                                                                                                              width: w,
                                                                                                                                              height: h,
                                                                                                                                              opacity: 0
                                                                                                                                          }).show().animate({
                                                                                                                      Severity: Major
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 1 hr to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 5034..5040

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 57.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                                  $( frame.container ).css({
                                                                                                                                                      width: w,
                                                                                                                                                      height: h,
                                                                                                                                                      opacity: 0
                                                                                                                                                  }).show().animate({
                                                                                                                      Severity: Major
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 1 hr to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 3003..3009

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 57.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                          prev : function() {
                                                                                                                              if ( this.getDataLength() > 1 ) {
                                                                                                                                  this.show( this.getPrev(), true );
                                                                                                                              }
                                                                                                                              return this;
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 50 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 5261..5266

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

                                                                                                                      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

                                                                                                                          next : function() {
                                                                                                                              if ( this.getDataLength() > 1 ) {
                                                                                                                                  this.show( this.getNext(), false );
                                                                                                                              }
                                                                                                                              return this;
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 50 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 5274..5279

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

                                                                                                                      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

                                                                                                                                      isPastBounds = !this.index && this.deltaX > 0 ||
                                                                                                                                          this.index == this.length - 1 && this.deltaX < 0;
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 50 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 6766..6766

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 51.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                      this.deltaX /= ( (!this.index && this.deltaX > 0 || this.index == this.length - 1 && this.deltaX < 0 ) ?
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 50 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 6782..6783

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 51.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                          defineTooltip: function( elem, value ) {
                                                                                                                              this._tooltip.define.apply( this._tooltip, Utils.array(arguments) );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 40 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 4256..4259

                                                                                                                      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

                                                                                                                          bindTooltip: function( elem, value ) {
                                                                                                                              this._tooltip.bind.apply( this._tooltip, Utils.array(arguments) );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 40 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 4273..4276

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

                                                                                                                          refreshTooltip: function( elem ) {
                                                                                                                              this._tooltip.show.apply( this._tooltip, Utils.array(arguments) );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 2 other locations - About 40 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 4176..4179
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 4557..4560

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 48.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                          attachKeyboard : function( map ) {
                                                                                                                              this._keyboard.attach.apply( this._keyboard, Utils.array( arguments ) );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 2 other locations - About 40 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 4176..4179
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 4287..4290

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 48.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                          removeIdleState: function( elem ) {
                                                                                                                              this._idle.remove.apply( this._idle, Utils.array( arguments ) );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 2 other locations - About 40 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 4287..4290
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 4557..4560

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 48.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                          prependChild : function( parentID, childID ) {
                                                                                                                              this.$( parentID ).prepend( this.get( childID ) || childID );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 40 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 4585..4588

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 48.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                          appendChild : function( parentID, childID ) {
                                                                                                                              this.$( parentID ).append( this.get( childID ) || childID );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 40 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 4604..4607

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 48.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                  clearTimer: function( id ) {
                                                                                                                                      $.each( Galleria.get(), function() {
                                                                                                                                          this.clearTimer( id );
                                                                                                                                      });
                                                                                                                                  },
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 40 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 347..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 48.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                  addTimer: function( id ) {
                                                                                                                                      $.each( Galleria.get(), function() {
                                                                                                                                          this.addTimer( id );
                                                                                                                                      });
                                                                                                                                  },
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 40 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.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 48.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                          detachKeyboard : function() {
                                                                                                                              this._keyboard.detach.apply( this._keyboard, Utils.array( arguments ) );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 2 other locations - About 35 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 4299..4302
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 4310..4313

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 47.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                          openLightbox: function() {
                                                                                                                              this._lightbox.show.apply( this._lightbox, Utils.array( arguments ) );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 2 other locations - About 35 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 4310..4313
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 4568..4571

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 47.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                                  window.setTimeout(function() {
                                                                                                                                                      fullscreen.scale();
                                                                                                                                                      self.$('stage').css('opacity', 1);
                                                                                                                                                  },4);
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 35 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 1689..1692

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 47.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                          closeLightbox: function() {
                                                                                                                              this._lightbox.hide.apply( this._lightbox, Utils.array( arguments ) );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 2 other locations - About 35 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 4299..4302
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 4568..4571

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 47.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                                  window.setTimeout(function() {
                                                                                                                                                      fullscreen.scale();
                                                                                                                                                      self.$('container').css('opacity', 1);
                                                                                                                                                  }, 50);
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 35 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 1695..1698

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 47.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                              if ( ( data.iframe && data.image ) || data.link || self._options.lightbox || self._options.clicknext ) {
                                                                                                                                                  layer.css( 'cursor', 'pointer' ).off( 'mouseup' ).mouseup( mousetrigger );
                                                                                                                                              }
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 35 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 5013..5083

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 46.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                      if ( ( data.iframe && data.image ) || data.link || self._options.lightbox || self._options.clicknext ) {
                                                                                                                      
                                                                                                                                          $( next.image ).css({
                                                                                                                                              cursor: 'pointer'
                                                                                                                                          }).on( 'mouseup', function( e ) {
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 35 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 5172..5174

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 46.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                          clearTimer : function() {
                                                                                                                              this._timer.clear.apply( this._timer, Utils.array( arguments ) );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 30 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 3202..3205

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 45.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                          addTimer : function() {
                                                                                                                              this._timer.add.apply( this._timer, Utils.array( arguments ) );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/galleria-1.4.2.js and 1 other location - About 30 mins to fix
                                                                                                                      app/assets/javascripts/galleria-1.4.2.js on lines 3207..3210

                                                                                                                      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