cjtterabytesoft/yii2-jvectormap

View on GitHub
assets/js/jquery-jvectormap.min.js

Summary

Maintainability
F
1 mo
Test Coverage

File jquery-jvectormap.min.js has 2562 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * jVectorMap version 2.0.4
 *
 * Copyright 2011-2014, Kirill Lebedev
 *
Severity: Major
Found in assets/js/jquery-jvectormap.min.js - About 1 wk to fix

    Function setValues has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
    Open

      setValues: function(values) {
        var max = -Number.MAX_VALUE,
            min = Number.MAX_VALUE,
            val,
            cc,
    Severity: Minor
    Found in assets/js/jquery-jvectormap.min.js - About 5 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    prototype has 38 functions (exceeds 20 allowed). Consider refactoring.
    Open

    jvm.Map.prototype = {
      transX: 0,
      transY: 0,
      scale: 1,
      baseTransX: 0,
    Severity: Minor
    Found in assets/js/jquery-jvectormap.min.js - About 5 hrs to fix

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

        bindContainerTouchEvents: function(){
          var touchStartScale,
              touchStartDistance,
              map = this,
              touchX,
      Severity: Minor
      Found in assets/js/jquery-jvectormap.min.js - About 3 hrs to fix

      Cognitive Complexity

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

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

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

      Further reading

      Function setFocus has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
      Open

        setFocus: function(config){
          var bbox,
              itemBbox,
              newBbox,
              codes,
      Severity: Minor
      Found in assets/js/jquery-jvectormap.min.js - About 3 hrs to fix

      Cognitive Complexity

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

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

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

      Further reading

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

      jvm.VMLPathElement.pathSvgToVml = function(path) {
        var cx = 0, cy = 0, ctrlx, ctrly;
      
        path = path.replace(/(-?\d+)e(-?\d+)/g, '0');
        return path.replace(/([MmLlHhVvCcSs])\s*((?:-?\d*(?:\.\d+)?\s*,?\s*)+)/g, function(segment, letter, coords, index){
      Severity: Major
      Found in assets/js/jquery-jvectormap.min.js - About 2 hrs to fix

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

          bindContainerTouchEvents: function(){
            var touchStartScale,
                touchStartDistance,
                map = this,
                touchX,
        Severity: Major
        Found in assets/js/jquery-jvectormap.min.js - About 2 hrs to fix

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

          jvm.Map = function(params) {
            var map = this,
                e;
          
            this.params = jvm.$.extend(true, {}, jvm.Map.defaultParams, params);
          Severity: Major
          Found in assets/js/jquery-jvectormap.min.js - About 2 hrs to fix

            Function Map has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
            Open

            jvm.Map = function(params) {
              var map = this,
                  e;
            
              this.params = jvm.$.extend(true, {}, jvm.Map.defaultParams, params);
            Severity: Minor
            Found in assets/js/jquery-jvectormap.min.js - About 2 hrs to fix

            Cognitive Complexity

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

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

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

            Further reading

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

                function handler(event) {
                    var orgEvent   = event || window.event,
                        args       = slice.call(arguments, 1),
                        delta      = 0,
                        deltaX     = 0,
            Severity: Major
            Found in assets/js/jquery-jvectormap.min.js - About 2 hrs to fix

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

                bindElementEvents: function(){
                  var map = this,
                      pageX,
                      pageY,
                      mouseMoved;
              Severity: Major
              Found in assets/js/jquery-jvectormap.min.js - About 2 hrs to fix

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

                  setScale: function(scale, anchorX, anchorY, isCentered, animate) {
                    var viewportChangeEvent = jvm.$.Event('zoom.jvectormap'),
                        interval,
                        that = this,
                        i = 0,
                Severity: Major
                Found in assets/js/jquery-jvectormap.min.js - About 2 hrs to fix

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

                          handleTouchEvent = function(e){
                            var touches = e.originalEvent.touches,
                                offset,
                                scale,
                                transXOld,
                  Severity: Major
                  Found in assets/js/jquery-jvectormap.min.js - About 2 hrs to fix

                    Function indexOf has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                    Open

                      Array.prototype.indexOf = function (searchElement, fromIndex) {
                    
                        var k;
                    
                        // 1. Let O be the result of calling ToObject passing
                    Severity: Minor
                    Found in assets/js/jquery-jvectormap.min.js - About 2 hrs to fix

                    Cognitive Complexity

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

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

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

                    Further reading

                    Function createMarkers has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                    Open

                      createMarkers: function(markers) {
                        var i,
                            marker,
                            point,
                            markerConfig,
                    Severity: Minor
                    Found in assets/js/jquery-jvectormap.min.js - About 2 hrs to fix

                    Cognitive Complexity

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

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

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

                    Further reading

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

                    jvm.Legend.prototype.render = function(){
                      var ticks = this.series.scale.getTicks(),
                          i,
                          inner = jvm.$('<div/>').addClass('jvectormap-legend-inner'),
                          tick,
                    Severity: Minor
                    Found in assets/js/jquery-jvectormap.min.js - About 2 hrs to fix

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

                        setFocus: function(config){
                          var bbox,
                              itemBbox,
                              newBbox,
                              codes,
                      Severity: Minor
                      Found in assets/js/jquery-jvectormap.min.js - About 1 hr to fix

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

                          setValues: function(values) {
                            var max = -Number.MAX_VALUE,
                                min = Number.MAX_VALUE,
                                val,
                                cc,
                        Severity: Minor
                        Found in assets/js/jquery-jvectormap.min.js - About 1 hr to fix

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

                            createMarkers: function(markers) {
                              var i,
                                  marker,
                                  point,
                                  markerConfig,
                          Severity: Minor
                          Found in assets/js/jquery-jvectormap.min.js - About 1 hr to fix

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

                              getValue: function(value) {
                                var lengthes = [],
                                    fullLength = 0,
                                    l,
                                    i = 0,
                            Severity: Minor
                            Found in assets/js/jquery-jvectormap.min.js - About 1 hr to fix

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

                                bindContainerEvents: function(){
                                  var mouseDown = false,
                                      oldPageX,
                                      oldPageY,
                                      map = this;
                              Severity: Minor
                              Found in assets/js/jquery-jvectormap.min.js - About 1 hr to fix

                                Function min has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  min: function(values){
                                    var min = Number.MAX_VALUE,
                                        i;
                                
                                    if (values instanceof Array) {
                                Severity: Minor
                                Found in assets/js/jquery-jvectormap.min.js - About 1 hr to fix

                                Cognitive Complexity

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

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

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

                                Further reading

                                Function max has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  max: function(values){
                                    var max = Number.MIN_VALUE,
                                        i;
                                
                                    if (values instanceof Array) {
                                Severity: Minor
                                Found in assets/js/jquery-jvectormap.min.js - About 1 hr to fix

                                Cognitive Complexity

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

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

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

                                Further reading

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

                                  bindContainerPointerEvents: function(){
                                    var map = this,
                                        gesture = new MSGesture(),
                                        element = this.container[0],
                                        handlePointerDownEvent = function(e){
                                Severity: Minor
                                Found in assets/js/jquery-jvectormap.min.js - About 1 hr to fix

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

                                    applyTransform: function() {
                                      var maxTransX,
                                          maxTransY,
                                          minTransX,
                                          minTransY;
                                  Severity: Minor
                                  Found in assets/js/jquery-jvectormap.min.js - About 1 hr to fix

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

                                    jvm.VMLShapeElement.prototype.applyAttr = function(attr, value){
                                      switch (attr) {
                                        case 'fill':
                                          this.node.fillcolor = value;
                                          break;
                                    Severity: Minor
                                    Found in assets/js/jquery-jvectormap.min.js - About 1 hr to fix

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

                                      jvm.SVGShapeElement.prototype.applyAttr = function(attr, value){
                                        var patternEl,
                                            imageEl,
                                            that = this;
                                      
                                      
                                      Severity: Minor
                                      Found in assets/js/jquery-jvectormap.min.js - About 1 hr to fix

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

                                          getTicks: function(){
                                            var m = 5,
                                                extent = [this.clearMinValue, this.clearMaxValue],
                                                span = extent[1] - extent[0],
                                                step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)),
                                        Severity: Minor
                                        Found in assets/js/jquery-jvectormap.min.js - About 1 hr to fix

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

                                          };jvm.Region = function(config){
                                            var bbox,
                                                text,
                                                offsets,
                                                labelDx,
                                          Severity: Minor
                                          Found in assets/js/jquery-jvectormap.min.js - About 1 hr to fix

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

                                            jvm.Legend.prototype.render = function(){
                                              var ticks = this.series.scale.getTicks(),
                                                  i,
                                                  inner = jvm.$('<div/>').addClass('jvectormap-legend-inner'),
                                                  tick,
                                            Severity: Minor
                                            Found in assets/js/jquery-jvectormap.min.js - About 1 hr to fix

                                            Cognitive Complexity

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

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

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

                                            Further reading

                                            Function applyAttr has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                            jvm.SVGImageElement.prototype.applyAttr = function(attr, value){
                                              var that = this;
                                            
                                              if (attr == 'image') {
                                                jvm.whenImageLoaded(value).then(function(img){
                                            Severity: Minor
                                            Found in assets/js/jquery-jvectormap.min.js - About 1 hr to fix

                                            Cognitive Complexity

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

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

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

                                            Further reading

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

                                              setScale: function(scale, anchorX, anchorY, isCentered, animate) {
                                                var viewportChangeEvent = jvm.$.Event('zoom.jvectormap'),
                                                    interval,
                                                    that = this,
                                                    i = 0,
                                            Severity: Minor
                                            Found in assets/js/jquery-jvectormap.min.js - About 55 mins to fix

                                            Cognitive Complexity

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

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

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

                                            Further reading

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

                                              setAttributes: function(key, attr){
                                                var attrs = key,
                                                    code;
                                            
                                                if (typeof key == 'string') {
                                            Severity: Minor
                                            Found in assets/js/jquery-jvectormap.min.js - About 55 mins to fix

                                            Cognitive Complexity

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

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

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

                                            Further reading

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

                                              applyTransform: function() {
                                                var maxTransX,
                                                    maxTransY,
                                                    minTransX,
                                                    minTransY;
                                            Severity: Minor
                                            Found in assets/js/jquery-jvectormap.min.js - About 55 mins to fix

                                            Cognitive Complexity

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

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

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

                                            Further reading

                                            Avoid deeply nested control flow statements.
                                            Open

                                                        if (typeof bbox == 'undefined') {
                                                          bbox = itemBbox;
                                                        } else {
                                                          newBbox = {
                                                            x: Math.min(bbox.x, itemBbox.x),
                                            Severity: Major
                                            Found in assets/js/jquery-jvectormap.min.js - About 45 mins to fix

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

                                              jvm.VMLCircleElement.prototype.applyAttr = function(attr, value){
                                                switch (attr) {
                                                  case 'r':
                                                    this.node.style.width = value*2+'px';
                                                    this.node.style.height = value*2+'px';
                                              Severity: Minor
                                              Found in assets/js/jquery-jvectormap.min.js - About 45 mins to fix

                                              Cognitive Complexity

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

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

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

                                              Further reading

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

                                                getTicks: function(){
                                                  var m = 5,
                                                      extent = [this.clearMinValue, this.clearMaxValue],
                                                      span = extent[1] - extent[0],
                                                      step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)),
                                              Severity: Minor
                                              Found in assets/js/jquery-jvectormap.min.js - About 45 mins to fix

                                              Cognitive Complexity

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

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

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

                                              Further reading

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

                                                setScale: function(scale, anchorX, anchorY, isCentered, animate) {
                                              Severity: Minor
                                              Found in assets/js/jquery-jvectormap.min.js - About 35 mins to fix

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

                                                jvm.DataSeries = function(params, elements, map) {
                                                  var scaleConstructor;
                                                
                                                  params = params || {};
                                                  params.attribute = params.attribute || 'fill';
                                                Severity: Minor
                                                Found in assets/js/jquery-jvectormap.min.js - About 35 mins to fix

                                                Cognitive Complexity

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

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

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

                                                Further reading

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

                                                jvm.SVGShapeElement.prototype.applyAttr = function(attr, value){
                                                  var patternEl,
                                                      imageEl,
                                                      that = this;
                                                
                                                
                                                Severity: Minor
                                                Found in assets/js/jquery-jvectormap.min.js - About 35 mins to fix

                                                Cognitive Complexity

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

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

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

                                                Further reading

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

                                                  bindContainerPointerEvents: function(){
                                                    var map = this,
                                                        gesture = new MSGesture(),
                                                        element = this.container[0],
                                                        handlePointerDownEvent = function(e){
                                                Severity: Minor
                                                Found in assets/js/jquery-jvectormap.min.js - About 35 mins to fix

                                                Cognitive Complexity

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

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

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

                                                Further reading

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

                                                  setSelected: function(type, keys){
                                                    var i;
                                                
                                                    if (typeof keys != 'object') {
                                                      keys = [keys];
                                                Severity: Minor
                                                Found in assets/js/jquery-jvectormap.min.js - About 35 mins to fix

                                                Cognitive Complexity

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

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

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

                                                Further reading

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

                                                jvm.VMLShapeElement.prototype.applyAttr = function(attr, value){
                                                  switch (attr) {
                                                    case 'fill':
                                                      this.node.fillcolor = value;
                                                      break;
                                                Severity: Minor
                                                Found in assets/js/jquery-jvectormap.min.js - About 35 mins to fix

                                                Cognitive Complexity

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

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

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

                                                Further reading

                                                Avoid too many return statements within this function.
                                                Open

                                                        return 'l'+cx+','+cy;
                                                Severity: Major
                                                Found in assets/js/jquery-jvectormap.min.js - About 30 mins to fix

                                                  Avoid too many return statements within this function.
                                                  Open

                                                          return 'v'+coords.join(',');
                                                  Severity: Major
                                                  Found in assets/js/jquery-jvectormap.min.js - About 30 mins to fix

                                                    Avoid too many return statements within this function.
                                                    Open

                                                            return 'r0,'+coords[0];
                                                    Severity: Major
                                                    Found in assets/js/jquery-jvectormap.min.js - About 30 mins to fix

                                                      Avoid too many return statements within this function.
                                                      Open

                                                              return 'l'+cx+','+cy;
                                                      Severity: Major
                                                      Found in assets/js/jquery-jvectormap.min.js - About 30 mins to fix

                                                        Avoid too many return statements within this function.
                                                        Open

                                                                return 'v'+coords.join(',');
                                                        Severity: Major
                                                        Found in assets/js/jquery-jvectormap.min.js - About 30 mins to fix

                                                          Avoid too many return statements within this function.
                                                          Open

                                                                  return 'c'+coords.join(',');
                                                          Severity: Major
                                                          Found in assets/js/jquery-jvectormap.min.js - About 30 mins to fix

                                                            Avoid too many return statements within this function.
                                                            Open

                                                                    return 'r'+coords[0]+',0';
                                                            Severity: Major
                                                            Found in assets/js/jquery-jvectormap.min.js - About 30 mins to fix

                                                              Avoid too many return statements within this function.
                                                              Open

                                                                      return 'c'+coords.join(',');
                                                              Severity: Major
                                                              Found in assets/js/jquery-jvectormap.min.js - About 30 mins to fix

                                                                Avoid too many return statements within this function.
                                                                Open

                                                                    return '';
                                                                Severity: Major
                                                                Found in assets/js/jquery-jvectormap.min.js - About 30 mins to fix

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

                                                                    getValue: function(value) {
                                                                      var lengthes = [],
                                                                          fullLength = 0,
                                                                          l,
                                                                          i = 0,
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js - About 25 mins to fix

                                                                  Cognitive Complexity

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

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

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

                                                                  Further reading

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

                                                                      if (this.defaultHeight * this.scale <= this.height) {
                                                                        maxTransY = (this.height - this.defaultHeight * this.scale) / (2 * this.scale);
                                                                        minTransY = (this.height - this.defaultHeight * this.scale) / (2 * this.scale);
                                                                      } else {
                                                                        maxTransY = 0;
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 5 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2311..2317

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

                                                                  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.defaultWidth * this.scale <= this.width) {
                                                                        maxTransX = (this.width - this.defaultWidth * this.scale) / (2 * this.scale);
                                                                        minTransX = (this.width - this.defaultWidth * this.scale) / (2 * this.scale);
                                                                      } else {
                                                                        maxTransX = 0;
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 5 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2319..2325

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

                                                                  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

                                                                    min: function(values){
                                                                      var min = Number.MAX_VALUE,
                                                                          i;
                                                                  
                                                                      if (values instanceof Array) {
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 4 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 298..316

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

                                                                  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

                                                                    max: function(values){
                                                                      var max = Number.MIN_VALUE,
                                                                          i;
                                                                  
                                                                      if (values instanceof Array) {
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 4 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 278..296

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

                                                                  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 (touches[0].pageX > touches[1].pageX) {
                                                                                  centerTouchX = touches[1].pageX + (touches[0].pageX - touches[1].pageX) / 2;
                                                                                } else {
                                                                                  centerTouchX = touches[0].pageX + (touches[1].pageX - touches[0].pageX) / 2;
                                                                                }
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 4 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2449..2453

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

                                                                  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 (touches[0].pageY > touches[1].pageY) {
                                                                                  centerTouchY = touches[1].pageY + (touches[0].pageY - touches[1].pageY) / 2;
                                                                                } else {
                                                                                  centerTouchY = touches[0].pageY + (touches[1].pageY - touches[0].pageY) / 2;
                                                                                }
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 4 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2444..2448

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

                                                                  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

                                                                          n = Math.log( Math.cos(fi1) * (1 / Math.cos(fi2)) ) / Math.log( Math.tan( Math.PI / 4 + fi2 / 2) * (1 / Math.tan( Math.PI / 4 + fi1 / 2) ) ),
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 3 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1824..1824

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 105.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          n = Math.log( Math.cos(fi1) * (1 / Math.cos(fi2)) ) / Math.log( Math.tan( Math.PI / 4 + fi2 / 2) * (1 / Math.tan( Math.PI / 4 + fi1 / 2) ) ),
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 3 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1850..1850

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 105.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      for(i = 0, l = groups.length; i < l; i++) {
                                                                        groups[i].coordsize = width+' '+height;
                                                                        groups[i].style.width = width+'px';
                                                                        groups[i].style.height = height+'px';
                                                                      }
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 3 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 980..984

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 101.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      for(i = 0, l = paths.length; i < l; i++) {
                                                                        paths[i].coordsize = width+' '+height;
                                                                        paths[i].style.width = width+'px';
                                                                        paths[i].style.height = height+'px';
                                                                      }
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 3 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 986..990

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 101.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      this.container.find('.jvectormap-zoomin').click(function(){
                                                                        map.setScale(map.scale * map.params.zoomStep, map.width / 2, map.height / 2, false, map.params.zoomAnimate);
                                                                      });
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 2 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2594..2596

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

                                                                  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.container.find('.jvectormap-zoomout').click(function(){
                                                                        map.setScale(map.scale / map.params.zoomStep, map.width / 2, map.height / 2, false, map.params.zoomAnimate);
                                                                      });
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 2 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2591..2593

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

                                                                  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 (typeof this.params.min === 'undefined') {
                                                                          this.scale.setMin(min);
                                                                          this.params.min = min;
                                                                        } else {
                                                                          this.scale.setMin(this.params.min);
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 2 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1615..1620

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

                                                                  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

                                                                        jvm.$(region.shape).bind('selected', function(e, isSelected){
                                                                          map.container.trigger('regionSelected.jvectormap', [jvm.$(this.node).attr('data-code'), isSelected, map.getSelectedRegions()]);
                                                                        });
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 2 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2923..2925

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

                                                                  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 (typeof this.params.max === 'undefined') {
                                                                          this.scale.setMax(max);
                                                                          this.params.max = max;
                                                                        } else {
                                                                          this.scale.setMax(this.params.max);
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 2 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1608..1613

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

                                                                  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

                                                                          jvm.$(marker.shape).bind('selected', function(e, isSelected){
                                                                            map.container.trigger('markerSelected.jvectormap', [jvm.$(this.node).attr('data-index'), isSelected, map.getSelectedMarkers()]);
                                                                          });
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 2 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2876..2878

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

                                                                  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 {
                                                                        this.baseScale = this.width / this.defaultWidth;
                                                                        this.baseTransY = Math.abs(this.height - this.defaultHeight * this.baseScale) / (2 * this.baseScale);
                                                                      }
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 2 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2264..2267

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 77.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      if (this.width / this.height > this.defaultWidth / this.defaultHeight) {
                                                                        this.baseScale = this.height / this.defaultHeight;
                                                                        this.baseTransX = Math.abs(this.width - this.defaultWidth * this.baseScale) / (2 * this.baseScale);
                                                                      } else {
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 2 hrs to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2267..2270

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 77.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                    vectorSubtract: function(vector1, vector2) {
                                                                      var vector = [],
                                                                          i;
                                                                  
                                                                      for (i = 0; i < vector1.length; i++) {
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1332..1340

                                                                  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

                                                                    vectorAdd: function(vector1, vector2) {
                                                                      var vector = [],
                                                                          i;
                                                                  
                                                                      for (i = 0; i < vector1.length; i++) {
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1322..1330

                                                                  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

                                                                    setMax: function(max) {
                                                                      this.clearMaxValue = max;
                                                                      if (typeof this.normalize === 'function') {
                                                                        this.maxValue = this.normalize(max);
                                                                      } else {
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1225..1232

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

                                                                  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

                                                                    setMin: function(min) {
                                                                      this.clearMinValue = min;
                                                                      if (typeof this.normalize === 'function') {
                                                                        this.minValue = this.normalize(min);
                                                                      } else {
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1234..1241

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                                scale = Math.sqrt(
                                                                                  Math.pow(touches[0].pageX - touches[1].pageX, 2) +
                                                                                  Math.pow(touches[0].pageY - touches[1].pageY, 2)
                                                                                ) / touchStartDistance;
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2457..2460

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 71.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                                touchStartDistance = Math.sqrt(
                                                                                  Math.pow(touches[0].pageX - touches[1].pageX, 2) +
                                                                                  Math.pow(touches[0].pageY - touches[1].pageY, 2)
                                                                                );
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2431..2434

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 71.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                  jvm.AbstractCanvasElement.prototype.addText = function(config, style, group){
                                                                    var el = new jvm[this.classPrefix+'TextElement'](config, style);
                                                                  
                                                                    this.add(el, group);
                                                                    return el;
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 3 other locations - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 533..538
                                                                  assets/js/jquery-jvectormap.min.js on lines 546..551
                                                                  assets/js/jquery-jvectormap.min.js on lines 559..564

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                  jvm.AbstractCanvasElement.prototype.addImage = function(config, style, group){
                                                                    var el = new jvm[this.classPrefix+'ImageElement'](config, style);
                                                                  
                                                                    this.add(el, group);
                                                                    return el;
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 3 other locations - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 533..538
                                                                  assets/js/jquery-jvectormap.min.js on lines 546..551
                                                                  assets/js/jquery-jvectormap.min.js on lines 572..577

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                  jvm.AbstractCanvasElement.prototype.addCircle = function(config, style, group){
                                                                    var el = new jvm[this.classPrefix+'CircleElement'](config, style);
                                                                  
                                                                    this.add(el, group);
                                                                    return el;
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 3 other locations - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 533..538
                                                                  assets/js/jquery-jvectormap.min.js on lines 559..564
                                                                  assets/js/jquery-jvectormap.min.js on lines 572..577

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                  jvm.AbstractCanvasElement.prototype.addPath = function(config, style, group){
                                                                    var el = new jvm[this.classPrefix+'PathElement'](config, style);
                                                                  
                                                                    this.add(el, group);
                                                                    return el;
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 3 other locations - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 546..551
                                                                  assets/js/jquery-jvectormap.min.js on lines 559..564
                                                                  assets/js/jquery-jvectormap.min.js on lines 572..577

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

                                                                  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

                                                                        point.x = (point.x - bbox[0].x) / (bbox[1].x - bbox[0].x) * inset.width * this.scale;
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 3059..3059

                                                                  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

                                                                        point.y = (point.y - bbox[0].y) / (bbox[1].y - bbox[0].y) * inset.height * this.scale;
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 3058..3058

                                                                  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 (nx > bbox[0].x && nx < bbox[1].x && ny > bbox[0].y && ny < bbox[1].y) {
                                                                          return jvm.Proj[proj.type + '_inv'](nx, -ny, centralMeridian);
                                                                        }
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 3110..3112

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 62.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                        if (x > bbox[0].x && x < bbox[1].x && y > bbox[0].y && y < bbox[1].y) {
                                                                          return insets[i];
                                                                        }
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 3095..3097

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 62.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                                  width: Math.max(bbox.x + bbox.width, itemBbox.x + itemBbox.width) - Math.min(bbox.x, itemBbox.x),
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2726..2726

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

                                                                  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

                                                                        ny = (ny / (inset.height * this.scale)) * (bbox[1].y - bbox[0].y) + bbox[0].y;
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 3092..3092

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

                                                                  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

                                                                        nx = (nx / (inset.width * this.scale)) * (bbox[1].x - bbox[0].x) + bbox[0].x;
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 3093..3093

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                                  height: Math.max(bbox.y + bbox.height, itemBbox.y + itemBbox.height) - Math.min(bbox.y, itemBbox.y)
                                                                  Severity: Major
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 1 hr to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2725..2725

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

                                                                  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

                                                                          F = ( Math.cos(fi1) * Math.pow( Math.tan( Math.PI / 4 + fi1 / 2 ), n ) ) / n,
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 55 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1825..1825

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 54.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                    setScale: function(scale) {
                                                                      this.scale.setScale(scale);
                                                                      if (this.values) {
                                                                        this.setValues(this.values);
                                                                      }
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 55 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1674..1679

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 54.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                    setNormalizeFunction: function(f) {
                                                                      this.scale.setNormalizeFunction(f);
                                                                      if (this.values) {
                                                                        this.setValues(this.values);
                                                                      }
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 55 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1663..1668

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 54.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          F = ( Math.cos(fi1) * Math.pow( Math.tan( Math.PI / 4 + fi1 / 2 ), n ) ) / n,
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 55 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1851..1851

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 54.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      if (this.transY > maxTransY) {
                                                                        this.transY = maxTransY;
                                                                      } else if (this.transY < minTransY) {
                                                                        this.transY = minTransY;
                                                                      }
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 55 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2332..2336

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 53.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      if (this.transX > maxTransX) {
                                                                        this.transX = maxTransX;
                                                                      } else if (this.transX < minTransX) {
                                                                        this.transX = minTransX;
                                                                      }
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 55 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2327..2331

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 53.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      case 'cy':
                                                                        if (!value) return;
                                                                        this.node.style.top = value - (this.get('r') || 0) + 'px';
                                                                        break;
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 50 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1159..1162

                                                                  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

                                                                      case 'cx':
                                                                        if (!value) return;
                                                                        this.node.style.left = value - (this.get('r') || 0) + 'px';
                                                                        break;
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 50 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1163..1166

                                                                  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

                                                                    } else if(attr == 'cx') {
                                                                      this.cx = value;
                                                                      if (this.width) {
                                                                        this.applyAttr('x', value - this.width / 2);
                                                                      }
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 45 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 818..825

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 50.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                    } else if(attr == 'cy') {
                                                                      this.cy = value;
                                                                      if (this.height) {
                                                                        this.applyAttr('y', value - this.height / 2);
                                                                      }
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 45 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 813..825

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 50.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                    regionLabelStyle: {
                                                                      initial: {
                                                                        'font-family': 'Verdana',
                                                                        'font-size': '12',
                                                                        'font-weight': 'bold',
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 40 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 3212..3223

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 48.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                    markerLabelStyle: {
                                                                      initial: {
                                                                        'font-family': 'Verdana',
                                                                        'font-size': '12',
                                                                        'font-weight': 'bold',
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 40 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 3180..3191

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 48.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                            label: this.canvas.mode != 'vml' ? (this.params.labels && this.params.labels.markers) : null
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 35 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2873..2873

                                                                  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

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

                                                                          if (values[cc]) {
                                                                            attrs[cc] = this.scale.getValue(values[cc]);
                                                                          } else {
                                                                            attrs[cc] = this.elements[cc].element.style.initial[this.params.attribute];
                                                                          }
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 35 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1625..1629

                                                                  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

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

                                                                            code = type == 'region' ? jvm.$(this).attr('data-code') : jvm.$(this).attr('data-index'),
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 35 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2528..2528

                                                                  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

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

                                                                            code = type == 'region' ? jvm.$(this).attr('data-code') : jvm.$(this).attr('data-index'),
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 35 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2567..2567

                                                                  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

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

                                                                            if (!isNaN(val)) {
                                                                              attrs[cc] = this.scale.getValue(val);
                                                                            } else {
                                                                              attrs[cc] = this.elements[cc].element.style.initial[this.params.attribute];
                                                                            }
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 35 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1634..1638

                                                                  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

                                                                          label: this.canvas.mode != 'vml' ? (this.params.labels && this.params.labels.regions) : null
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 35 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 2920..2920

                                                                  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

                                                                      jvm.VMLElement.prototype.createElement = function (tagName) {
                                                                        return document.createElement('<rvml:' + tagName + ' class="rvml">');
                                                                      };
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 35 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 893..895

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 46.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          ro0 = F * Math.pow( 1 / Math.tan( Math.PI / 4 + fi0 / 2 ), n );
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 2 other locations - About 35 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1826..1826
                                                                  assets/js/jquery-jvectormap.min.js on lines 1852..1852

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 46.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          ro0 = F * Math.pow( 1 / Math.tan( Math.PI / 4 + fi0 / 2 ), n ),
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 2 other locations - About 35 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1826..1826
                                                                  assets/js/jquery-jvectormap.min.js on lines 1827..1827

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 46.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          ro = F * Math.pow( 1 / Math.tan( Math.PI / 4 + fi / 2 ), n ),
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 2 other locations - About 35 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1827..1827
                                                                  assets/js/jquery-jvectormap.min.js on lines 1852..1852

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 46.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      jvm.VMLElement.prototype.createElement = function (tagName) {
                                                                        return document.createElement('<' + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');
                                                                      };
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 35 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 886..888

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 46.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                          C = Math.cos(fi1)*Math.cos(fi1)+2*n*Math.sin(fi1),
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 30 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1771..1771

                                                                  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.labelX * this.map.scale + this.map.transX * this.map.scale,
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 30 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1974..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 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

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

                                                                          C = Math.cos(fi1)*Math.cos(fi1)+2*n*Math.sin(fi1),
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 30 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1798..1798

                                                                  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.labelY * this.map.scale + this.map.transY * this.map.scale
                                                                  Severity: Minor
                                                                  Found in assets/js/jquery-jvectormap.min.js and 1 other location - About 30 mins to fix
                                                                  assets/js/jquery-jvectormap.min.js on lines 1973..1973

                                                                  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