shadowproject/shadow

View on GitHub
src/qt/res/assets/plugins/iscroll/iscroll.js

Summary

Maintainability
F
2 wks
Test Coverage

File iscroll.js has 1656 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*! iScroll v5.2.0 ~ (c) 2008-2016 Matteo Spinelli ~ http://cubiq.org/license */
(function (window, document, Math) {
var rAF = window.requestAnimationFrame    ||
    window.webkitRequestAnimationFrame    ||
    window.mozRequestAnimationFrame        ||
Severity: Major
Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 4 days to fix

    Function utils has 213 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var utils = (function () {
        var me = {};
    
        var _elementStyle = document.createElement('div').style;
        var _vendor = (function () {
    Severity: Major
    Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 1 day to fix

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

          _initSnap: function () {
              this.currentPage = {};
      
              if ( typeof this.options.snap == 'string' ) {
                  this.options.snap = this.scroller.querySelectorAll(this.options.snap);
      Severity: Major
      Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 3 hrs to fix

        Function _initIndicators has 82 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _initIndicators: function () {
                var interactive = this.options.interactiveScrollbars,
                    customStyle = typeof this.options.scrollbars != 'string',
                    indicators = [],
                    indicator;
        Severity: Major
        Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 3 hrs to fix

          Function _key has 74 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _key: function (e) {
                  if ( !this.enabled ) {
                      return;
                  }
          
          
          Severity: Major
          Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 2 hrs to fix

            Function _wheel has 72 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                _wheel: function (e) {
                    if ( !this.enabled ) {
                        return;
                    }
            
            
            Severity: Major
            Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 2 hrs to fix

              Function _move has 69 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _move: function (e) {
                      if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) {
                          return;
                      }
              
              
              Severity: Major
              Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 2 hrs to fix

                Function refresh has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    refresh: function () {
                        this.transitionTime();
                
                        if ( this.options.listenX && !this.options.listenY ) {
                            this.indicatorStyle.display = this.scroller.hasHorizontalScroll ? 'block' : 'none';
                Severity: Major
                Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 2 hrs to fix

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

                      _end: function (e) {
                          if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) {
                              return;
                          }
                  
                  
                  Severity: Major
                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 2 hrs to fix

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

                    function IScroll (el, options) {
                        this.wrapper = typeof el == 'string' ? document.querySelector(el) : el;
                        this.scroller = this.wrapper.children[0];
                        this.scrollerStyle = this.scroller.style;        // cache style for better performance
                    
                    
                    Severity: Major
                    Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 2 hrs to fix

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

                          _nearestSnap: function (x, y) {
                              if ( !this.pages.length ) {
                                  return { x: 0, y: 0, pageX: 0, pageY: 0 };
                              }
                      
                      
                      Severity: Major
                      Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 2 hrs to fix

                        Function Indicator has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function Indicator (scroller, options) {
                            this.wrapper = typeof options.el == 'string' ? document.querySelector(options.el) : options.el;
                            this.wrapperStyle = this.wrapper.style;
                            this.indicator = this.wrapper.children[0];
                            this.indicatorStyle = this.indicator.style;
                        Severity: Major
                        Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 2 hrs to fix

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

                              updatePosition: function () {
                                  var x = this.options.listenX && Math.round(this.sizeRatioX * this.scroller.x) || 0,
                                      y = this.options.listenY && Math.round(this.sizeRatioY * this.scroller.y) || 0;
                          
                                  if ( !this.options.ignoreBoundaries ) {
                          Severity: Minor
                          Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 1 hr to fix

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

                                handleEvent: function (e) {
                                    switch ( e.type ) {
                                        case 'touchstart':
                                        case 'pointerdown':
                                        case 'MSPointerDown':
                            Severity: Minor
                            Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 1 hr to fix

                              Function _start has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  _start: function (e) {
                                      // React to left mouse button only
                                      if ( utils.eventType[e.type] != 1 ) {
                                        // for button property
                                        // http://unixpapa.com/js/mouse.html
                              Severity: Minor
                              Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 1 hr to fix

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

                                    _initEvents: function (remove) {
                                        var eventType = remove ? utils.removeEvent : utils.addEvent,
                                            target = this.options.bindToWrapper ? this.wrapper : window;
                                
                                        eventType(window, 'orientationchange', this);
                                Severity: Minor
                                Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 1 hr to fix

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

                                      _animate: function (destX, destY, duration, easingFn) {
                                          var that = this,
                                              startX = this.x,
                                              startY = this.y,
                                              startTime = utils.getTime(),
                                  Severity: Minor
                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 1 hr to fix

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

                                        _initKeys: function (e) {
                                            // default key bindings
                                            var keys = {
                                                pageUp: 33,
                                                pageDown: 34,
                                    Severity: Minor
                                    Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 1 hr to fix

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

                                          _end: function (e) {
                                              if ( !this.initiated ) {
                                                  return;
                                              }
                                      
                                      
                                      Severity: Minor
                                      Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 1 hr to fix

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

                                        function createDefaultScrollbar (direction, interactive, type) {
                                            var scrollbar = document.createElement('div'),
                                                indicator = document.createElement('div');
                                        
                                            if ( type === true ) {
                                        Severity: Minor
                                        Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 1 hr to fix

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

                                              me.momentum = function (current, start, time, lowerMargin, wrapperSize, deceleration) {
                                          Severity: Minor
                                          Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 45 mins to fix

                                            Consider simplifying this complex logical expression.
                                            Open

                                                    if ( !(/(SELECT|INPUT|TEXTAREA)/i).test(target.tagName) ) {
                                                        // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
                                                        // initMouseEvent is deprecated.
                                                        ev = document.createEvent(window.MouseEvent ? 'MouseEvents' : 'Event');
                                                        ev.initEvent('click', true, true);
                                            Severity: Major
                                            Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 40 mins to fix

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

                                                  scrollToElement: function (el, time, offsetX, offsetY, easing) {
                                              Severity: Minor
                                              Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 35 mins to fix

                                                Avoid too many return statements within this function.
                                                Open

                                                            return;
                                                Severity: Major
                                                Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 30 mins to fix

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

                                                              if ( this.options.resize ) {
                                                                  this.indicatorWidth = Math.max(Math.round(this.wrapperWidth * this.wrapperWidth / (this.scroller.scrollerWidth || this.wrapperWidth || 1)), 8);
                                                                  this.indicatorStyle.width = this.indicatorWidth + 'px';
                                                              } else {
                                                                  this.indicatorWidth = this.indicator.clientWidth;
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 4 hrs to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1991..1996

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

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                              if ( this.options.resize ) {
                                                                  this.indicatorHeight = Math.max(Math.round(this.wrapperHeight * this.wrapperHeight / (this.scroller.scrollerHeight || this.wrapperHeight || 1)), 8);
                                                                  this.indicatorStyle.height = this.indicatorHeight + 'px';
                                                              } else {
                                                                  this.indicatorHeight = this.indicator.clientHeight;
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 4 hrs to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1969..1974

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

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                              if ( this.options.scrollY ) {
                                                                  indicator = {
                                                                      el: createDefaultScrollbar('v', interactive, this.options.scrollbars),
                                                                      interactive: interactive,
                                                                      defaultScrollbars: true,
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 4 hrs to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1017..1031

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 120.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                              if ( this.options.scrollX ) {
                                                                  indicator = {
                                                                      el: createDefaultScrollbar('h', interactive, this.options.scrollbars),
                                                                      interactive: interactive,
                                                                      defaultScrollbars: true,
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 4 hrs to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1000..1014

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 120.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          if ( this.scroller.hasHorizontalScroll && this.scroller.hasVerticalScroll ) {
                                                              utils.addClass(this.wrapper, 'iScrollBothScrollbars');
                                                              utils.removeClass(this.wrapper, 'iScrollLoneScrollbar');
                                                  
                                                              if ( this.options.defaultScrollbars && this.options.customStyle ) {
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 4 hrs to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1952..1963

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

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          } else {
                                                              utils.removeClass(this.wrapper, 'iScrollBothScrollbars');
                                                              utils.addClass(this.wrapper, 'iScrollLoneScrollbar');
                                                  
                                                              if ( this.options.defaultScrollbars && this.options.customStyle ) {
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 4 hrs to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1941..1952

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

                                                  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 ( !time && utils.isBadAndroid ) {
                                                              this.indicatorStyle[durationProp] = '0.0001ms';
                                                              // remove 0.0001ms
                                                              var self = this;
                                                              rAF(function() {
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 2 hrs to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 866..875

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 89.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                              if ( this.options.shrink == 'clip' ) {
                                                                  this.minBoundaryY = -this.indicatorHeight + 8;
                                                                  this.maxBoundaryY = this.wrapperHeight - 8;
                                                              } else {
                                                                  this.minBoundaryY = 0;
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 2 hrs to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1978..1984

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 89.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          if ( !time && utils.isBadAndroid ) {
                                                              this.scrollerStyle[durationProp] = '0.0001ms';
                                                              // remove 0.0001ms
                                                              var self = this;
                                                              rAF(function() {
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 2 hrs to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1914..1923

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 89.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                              if ( this.options.shrink == 'clip' ) {
                                                                  this.minBoundaryX = -this.indicatorWidth + 8;
                                                                  this.maxBoundaryX = this.wrapperWidth - 8;
                                                              } else {
                                                                  this.minBoundaryX = 0;
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 2 hrs to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2000..2006

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 89.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                              momentumY = this.hasVerticalScroll ? utils.momentum(this.y, this.startY, duration, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, this.options.deceleration) : { destination: newY, duration: 0 };
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 2 hrs to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 634..634

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 79.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                              momentumX = this.hasHorizontalScroll ? utils.momentum(this.x, this.startX, duration, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, this.options.deceleration) : { destination: newX, duration: 0 };
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 2 hrs to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 635..635

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 79.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                              case this.options.keyBindings.pageDown:
                                                                  if ( this.hasHorizontalScroll && !this.hasVerticalScroll ) {
                                                                      newX -= snap ? 1 : this.wrapperWidth;
                                                                  } else {
                                                                      newY -= snap ? 1 : this.wrapperHeight;
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 2 hrs to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1509..1515

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 76.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                              case this.options.keyBindings.pageUp:
                                                                  if ( this.hasHorizontalScroll && !this.hasVerticalScroll ) {
                                                                      newX += snap ? 1 : this.wrapperWidth;
                                                                  } else {
                                                                      newY += snap ? 1 : this.wrapperHeight;
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 2 hrs to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1516..1522

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 76.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                              } else if ( y > this.maxBoundaryY ) {
                                                                  if ( this.options.shrink == 'scale' ) {
                                                                      this.height = Math.max(this.indicatorHeight - (y - this.maxPosY) * 3, 8);
                                                                      this.indicatorStyle.height = this.height + 'px';
                                                                      y = this.maxPosY + this.indicatorHeight - this.height;
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2026..2037

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 74.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                              } else if ( x > this.maxBoundaryX ) {
                                                                  if ( this.options.shrink == 'scale' ) {
                                                                      this.width = Math.max(this.indicatorWidth - (x - this.maxPosX), 8);
                                                                      this.indicatorStyle.width = this.width + 'px';
                                                                      x = this.maxPosX + this.indicatorWidth - this.width;
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2045..2056

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 74.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          if ( this.directionLocked == 'h' ) {
                                                              if ( this.options.eventPassthrough == 'vertical' ) {
                                                                  e.preventDefault();
                                                              } else if ( this.options.eventPassthrough == 'horizontal' ) {
                                                                  this.initiated = false;
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 534..543

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

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          } else if ( this.directionLocked == 'v' ) {
                                                              if ( this.options.eventPassthrough == 'horizontal' ) {
                                                                  e.preventDefault();
                                                              } else if ( this.options.eventPassthrough == 'vertical' ) {
                                                                  this.initiated = false;
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 525..543

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

                                                  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 ( newY > 0 ) {
                                                              newY = 0;
                                                              this.keyAcceleration = 0;
                                                          } else if ( newY < this.maxScrollY ) {
                                                              newY = this.maxScrollY;
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1552..1558

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 67.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          if ( newX > 0 ) {
                                                              newX = 0;
                                                              this.keyAcceleration = 0;
                                                          } else if ( newX < this.maxScrollX ) {
                                                              newX = this.maxScrollX;
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1560..1566

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 67.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          if ( !this.hasVerticalScroll || this.y > 0 ) {
                                                              y = 0;
                                                          } else if ( this.y < this.maxScrollY ) {
                                                              y = this.maxScrollY;
                                                          }
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 690..694

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 63.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                                  this.snapThresholdX = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width * this.options.snapThreshold);
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1294..1294

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 63.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                                  this.snapThresholdY = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height * this.options.snapThreshold);
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1293..1293

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 63.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          if ( !this.hasHorizontalScroll || this.x > 0 ) {
                                                              x = 0;
                                                          } else if ( this.x < this.maxScrollX ) {
                                                              x = this.maxScrollX;
                                                          }
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 696..700

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 63.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          if ( this.indicators ) {
                                                              for ( var i = this.indicators.length; i--; ) {
                                                                  this.indicators[i].transitionTime(time);
                                                              }
                                                          }
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 893..897

                                                  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

                                                          if ( this.indicators ) {
                                                              for ( var i = this.indicators.length; i--; ) {
                                                                  this.indicators[i].transitionTimingFunction(easing);
                                                              }
                                                          }
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 878..882

                                                  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

                                                      if ( direction == 'h' ) {
                                                          if ( type === true ) {
                                                              scrollbar.style.cssText += ';height:7px;left:2px;right:2px;bottom:0';
                                                              indicator.style.height = '100%';
                                                          }
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1678..1684

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

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                      } else {
                                                          if ( type === true ) {
                                                              scrollbar.style.cssText += ';width:7px;bottom:2px;top:2px;right:1px';
                                                              indicator.style.width = '100%';
                                                          }
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1672..1678

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

                                                  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 ( newY > 0 || newY < this.maxScrollY ) {
                                                              newY = this.options.bounce ? this.y + deltaY / 3 : newY > 0 ? 0 : this.maxScrollY;
                                                          }
                                                  Severity: Minor
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 50 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 552..554

                                                  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

                                                          pos.top  = pos.top  > 0 ? 0 : pos.top  < this.maxScrollY ? this.maxScrollY : pos.top;
                                                  Severity: Minor
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 50 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 846..846

                                                  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

                                                          pos.left = pos.left > 0 ? 0 : pos.left < this.maxScrollX ? this.maxScrollX : pos.left;
                                                  Severity: Minor
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 50 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 847..847

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 51.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          if ( newX > 0 || newX < this.maxScrollX ) {
                                                              newX = this.options.bounce ? this.x + deltaX / 3 : newX > 0 ? 0 : this.maxScrollX;
                                                          }
                                                  Severity: Minor
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 50 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 555..557

                                                  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.sizeRatioX = this.options.speedRatioX || (this.scroller.maxScrollX && (this.maxPosX / this.scroller.maxScrollX));
                                                  Severity: Minor
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 50 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2009..2009

                                                  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.sizeRatioY = this.options.speedRatioY || (this.scroller.maxScrollY && (this.maxPosY / this.scroller.maxScrollY));
                                                  Severity: Minor
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 50 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1986..1986

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 51.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          if ( !this.options.disableTouch ) {
                                                              utils.addEvent(this.indicator, 'touchstart', this);
                                                              utils.addEvent(window, 'touchend', this);
                                                          }
                                                  Severity: Minor
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 35 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1734..1737

                                                  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 ( !this.options.disableMouse ) {
                                                              utils.addEvent(this.indicator, 'mousedown', this);
                                                              utils.addEvent(window, 'mouseup', this);
                                                          }
                                                  Severity: Minor
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 35 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1726..1729

                                                  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

                                                          y = this.options.listenY ? Math.round(y / this.sizeRatioY) : this.scroller.y;
                                                  Severity: Minor
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 30 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2083..2083

                                                  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

                                                              y = this.options.listenY && Math.round(this.sizeRatioY * this.scroller.y) || 0;
                                                  Severity: Minor
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 30 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2016..2016

                                                  Duplicated Code

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

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

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

                                                  Tuning

                                                  This issue has a mass of 45.

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

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

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

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

                                                  Refactorings

                                                  Further Reading

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

                                                          var x = this.options.listenX && Math.round(this.sizeRatioX * this.scroller.x) || 0,
                                                  Severity: Minor
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 30 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2017..2017

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

                                                          if ( newY > 0 ) {
                                                              newY = 0;
                                                          } else if ( newY < this.maxScrollY ) {
                                                              newY = this.maxScrollY;
                                                          }
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 5 other locations - About 30 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1186..1190
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1328..1332
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1334..1338
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2071..2075
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2077..2081

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

                                                          if ( y > 0 ) {
                                                              y = 0;
                                                          } else if ( y < this.maxScrollY ) {
                                                              y = this.maxScrollY;
                                                          }
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 5 other locations - About 30 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1186..1190
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1192..1196
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1328..1332
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2071..2075
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2077..2081

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

                                                          if ( y < 0 ) {
                                                              y = 0;
                                                          } else if ( y > this.maxPosY ) {
                                                              y = this.maxPosY;
                                                          }
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 5 other locations - About 30 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1186..1190
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1192..1196
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1328..1332
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1334..1338
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2071..2075

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

                                                          if ( x > 0 ) {
                                                              x = 0;
                                                          } else if ( x < this.maxScrollX ) {
                                                              x = this.maxScrollX;
                                                          }
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 5 other locations - About 30 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1186..1190
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1192..1196
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1334..1338
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2071..2075
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2077..2081

                                                  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

                                                          x = this.options.listenX ? Math.round(x / this.sizeRatioX) : this.scroller.x;
                                                  Severity: Minor
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 30 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2084..2084

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

                                                          if ( newX > 0 ) {
                                                              newX = 0;
                                                          } else if ( newX < this.maxScrollX ) {
                                                              newX = this.maxScrollX;
                                                          }
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 5 other locations - About 30 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1192..1196
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1328..1332
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1334..1338
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2071..2075
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2077..2081

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

                                                          if ( x < 0 ) {
                                                              x = 0;
                                                          } else if ( x > this.maxPosX ) {
                                                              x = this.maxPosX;
                                                          }
                                                  Severity: Major
                                                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 5 other locations - About 30 mins to fix
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1186..1190
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1192..1196
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1328..1332
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1334..1338
                                                  src/qt/res/assets/plugins/iscroll/iscroll.js on lines 2077..2081

                                                  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