estimancy/projestimate

View on GitHub
app/assets/javascripts/jit-2.0.1.js

Summary

Maintainability
F
4 mos
Test Coverage

File jit-2.0.1.js has 9188 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
Copyright (c) 2011 Sencha Inc. - Author: Nicolas Garcia Belmonte (http://philogb.github.com/)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Severity: Major
Found in app/assets/javascripts/jit-2.0.1.js - About 3 wks to fix

    Function ST has 352 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    $jit.ST= (function() {
        // Define some private methods first...
        // Nodes in path
        var nodesInPath = [];
        // Nodes to contract
    Severity: Major
    Found in app/assets/javascripts/jit-2.0.1.js - About 1 day to fix

      Function Tree has 180 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Layouts.Tree = (function() {
        //Layout functions
        var slice = Array.prototype.slice;
      
        /*
      Severity: Major
      Found in app/assets/javascripts/jit-2.0.1.js - About 7 hrs to fix

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

          initializeViz: function() {
            var config = this.config, that = this;
            var nodeType = config.type.split(":")[0],
                horz = config.orientation == 'horizontal',
                nodeLabels = {};
        Severity: Major
        Found in app/assets/javascripts/jit-2.0.1.js - About 6 hrs to fix

          Function initializeViz has 147 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            initializeViz: function() {
              var config = this.config,
                  that = this,
                  nodeType = config.type.split(":")[0],
                  nodeLabels = {};
          Severity: Major
          Found in app/assets/javascripts/jit-2.0.1.js - About 5 hrs to fix

            Function morph has 119 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                morph: function(json, opt, extraModes) {
                    extraModes = extraModes || {};
                    var viz = this.viz;
                    var options = $.merge(this.options, viz.controller, opt), root = viz.root;
                    var graph;
            Severity: Major
            Found in app/assets/javascripts/jit-2.0.1.js - About 4 hrs to fix

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

                initializeViz: function() {
                  var config = this.config, that = this;
                  var nodeType = config.type.split(":")[0];
                  var delegate = new $jit.Sunburst({
                    injectInto: config.injectInto,
              Severity: Major
              Found in app/assets/javascripts/jit-2.0.1.js - About 3 hrs to fix

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

                    'render' : function(node, canvas) {
                      var pos = node.pos.getc(true), 
                          width = node.getData('width'),
                          height = node.getData('height'),
                          algnPos = this.getAlignedPos(pos, width, height),
                Severity: Major
                Found in app/assets/javascripts/jit-2.0.1.js - About 3 hrs to fix

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

                      'render' : function(node, canvas) {
                        var pos = node.pos.getc(true), 
                            width = node.getData('width'),
                            height = node.getData('height'),
                            algnPos = this.getAlignedPos(pos, width, height),
                  Severity: Major
                  Found in app/assets/javascripts/jit-2.0.1.js - About 3 hrs to fix

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

                        'render' : function(node, canvas) {
                          var pos = node.pos.getp(true),
                              dimArray = node.getData('dimArray'),
                              valueArray = node.getData('valueArray'),
                              colorArray = node.getData('colorArray'),
                    Severity: Major
                    Found in app/assets/javascripts/jit-2.0.1.js - About 3 hrs to fix

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

                          'render' : function(node, canvas) {
                            var pos = node.pos.getc(true), 
                                width = node.getData('width'),
                                height = node.getData('height'),
                                algnPos = this.getAlignedPos(pos, width, height),
                      Severity: Major
                      Found in app/assets/javascripts/jit-2.0.1.js - About 3 hrs to fix

                        Function plotElement has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          plotElement: function(elem, canvas, opt) {
                            var gl = canvas.getCtx(),
                                viewMatrix = new Matrix4,
                                lighting = canvas.config.Scene.Lighting,
                                wcanvas = canvas.canvases[0],
                        Severity: Major
                        Found in app/assets/javascripts/jit-2.0.1.js - About 3 hrs to fix

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

                            makeEventObject: function(e, win) {
                              var that = this,
                                  graph = this.viz.graph,
                                  fx = this.viz.fx,
                                  ntypes = fx.nodeTypes,
                          Severity: Major
                          Found in app/assets/javascripts/jit-2.0.1.js - About 2 hrs to fix

                            Function loadJSON has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              loadJSON: function(json) {
                                if(this.busy) return;
                                this.busy = true;
                                
                                var prefix = $.time(), 
                            Severity: Major
                            Found in app/assets/javascripts/jit-2.0.1.js - About 2 hrs to fix

                              Function out has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                out: function(){
                                  if(this.busy) return;
                                  this.busy = true;
                                  this.events.hoveredNode = false;
                                  var that = this,
                              Severity: Major
                              Found in app/assets/javascripts/jit-2.0.1.js - About 2 hrs to fix

                                Function setRoot has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                     setRoot: function(id, method, onComplete) {
                                            if(this.busy) return;
                                            this.busy = true;
                                          var that = this, canvas = this.canvas;
                                            var rootNode = this.graph.getNode(this.root);
                                Severity: Major
                                Found in app/assets/javascripts/jit-2.0.1.js - About 2 hrs to fix

                                  Function out has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    out: function(){
                                      if(this.busy)
                                        return;
                                  
                                      var that = this,
                                  Severity: Major
                                  Found in app/assets/javascripts/jit-2.0.1.js - About 2 hrs to fix

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

                                        removeEdge: function(vertex, opt) {
                                            var viz = this.viz;
                                            var options = $.merge(this.options, viz.controller, opt);
                                            var v = ($.type(vertex[0]) == 'string')? [vertex] : vertex;
                                            var i, that, adj;
                                    Severity: Major
                                    Found in app/assets/javascripts/jit-2.0.1.js - About 2 hrs to fix

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

                                        initialize: function(controller){
                                          var config = {
                                            orientation: "h",
                                            titleHeight: 13,
                                            offset: 2,
                                      Severity: Major
                                      Found in app/assets/javascripts/jit-2.0.1.js - About 2 hrs to fix

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

                                            removeNode: function(node, opt) {
                                                var viz = this.viz;
                                                var options = $.merge(this.options, viz.controller, opt);
                                                var n = $.splat(node);
                                                var i, that, nodeObj;
                                        Severity: Major
                                        Found in app/assets/javascripts/jit-2.0.1.js - About 2 hrs to fix

                                          Function prepare has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              prepare: function(modes) {
                                                var graph = this.viz.graph,
                                                    accessors = {
                                                      'node-property': {
                                                        'getter': 'getData',
                                          Severity: Major
                                          Found in app/assets/javascripts/jit-2.0.1.js - About 2 hrs to fix

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

                                                initialize: function(viz, opt) {
                                                  this.viz = viz;
                                                  this.opt = this.config = opt;
                                                  var id = $.type(opt.injectInto) == 'string'? 
                                                      opt.injectInto:opt.injectInto.id,
                                            Severity: Major
                                            Found in app/assets/javascripts/jit-2.0.1.js - About 2 hrs to fix

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

                                                  'render': function(from, to, r, canvas){
                                                    var ctx = canvas.getCtx();  
                                                    var centerOfCircle = computeArcThroughTwoPoints(from, to);
                                                    if (centerOfCircle.a > 1000 || centerOfCircle.b > 1000
                                                        || centerOfCircle.ratio < 0) {
                                              Severity: Major
                                              Found in app/assets/javascripts/jit-2.0.1.js - About 2 hrs to fix

                                                Function computePositions has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                  computePositions : function(property, getLength) {
                                                    var propArray = property;
                                                    var graph = this.graph;
                                                    var root = graph.getNode(this.root);
                                                    var parent = this.parent;
                                                Severity: Major
                                                Found in app/assets/javascripts/jit-2.0.1.js - About 2 hrs to fix

                                                  Function placeLabel has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                      placeLabel: function(tag, node, controller) {
                                                          var pos = node.pos.getc(true), 
                                                              config = this.viz.config, 
                                                              dim = config.Node, 
                                                              canvas = this.viz.canvas,
                                                  Severity: Major
                                                  Found in app/assets/javascripts/jit-2.0.1.js - About 2 hrs to fix

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

                                                        sum: function(json, opt) {
                                                            var viz = this.viz;
                                                            var options = $.merge(this.options, viz.controller, opt), root = viz.root;
                                                            var graph;
                                                            viz.root = opt.id || viz.root;
                                                    Severity: Minor
                                                    Found in app/assets/javascripts/jit-2.0.1.js - About 2 hrs to fix

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

                                                        initialize: function(controller) {
                                                          var $Sunburst = $jit.Sunburst;
                                                      
                                                          var config = {
                                                            interpolation: 'linear',
                                                      Severity: Minor
                                                      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                          computePositionStep: function(property, opt) {
                                                            var graph = this.graph;
                                                            var min = Math.min, max = Math.max;
                                                            var dpos = $C(0, 0);
                                                            //calculate repulsive forces
                                                        Severity: Minor
                                                        Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                            loadJSON: function(json) {
                                                              var prefix = $.time(), 
                                                                  ch = [], 
                                                                  delegate = this.delegate,
                                                                  name = $.splat(json.label), 
                                                          Severity: Minor
                                                          Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                              loadJSON: function(json) {
                                                                var prefix = $.time(), 
                                                                    ch = [], 
                                                                    delegate = this.delegate,
                                                                    name = $.splat(json.label),
                                                            Severity: Minor
                                                            Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                                                              Function contains has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                                  'contains': function(node, mpos) {
                                                                    var pos = node.pos.getc(true), 
                                                                        width = node.getData('width'),
                                                                        height = node.getData('height'),
                                                                        algnPos = this.getAlignedPos(pos, width, height),
                                                              Severity: Minor
                                                              Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                                                                Function contains has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                    'contains': function(node, mpos) {
                                                                      var pos = node.pos.getc(true), 
                                                                          width = node.getData('width'),
                                                                          height = node.getData('height'),
                                                                          algnPos = this.getAlignedPos(pos, width, height),
                                                                Severity: Minor
                                                                Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                    enter: function(n){
                                                                      if(this.busy) return;
                                                                      this.busy = true;
                                                                      
                                                                      var that = this,
                                                                  Severity: Minor
                                                                  Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                                                                    Function initialize has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                      initialize: function(controller) {
                                                                        var config = {
                                                                          animate: false,
                                                                          orientation: "h",
                                                                          offset: 2,
                                                                    Severity: Minor
                                                                    Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                                                                      Function updateJSON has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                        updateJSON: function(json, onComplete) {
                                                                          if(this.busy) return;
                                                                          this.busy = true;
                                                                          
                                                                          var delegate = this.delegate,
                                                                      Severity: Minor
                                                                      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                              onClick: function (id, options) {
                                                                                var canvas = this.canvas, that = this, Geom = this.geom, config = this.config;
                                                                                var innerController = {
                                                                                    Move: {
                                                                                        enable: true,
                                                                        Severity: Minor
                                                                        Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                      function $setRoot() {
                                                                                          if(this.config.multitree && clickedNode.data.$orn) {
                                                                                              var orn = clickedNode.data.$orn;
                                                                                              var opp = {
                                                                                                      'left': 'right',
                                                                          Severity: Minor
                                                                          Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                  onPlaceLabel: function(domElement, node) {
                                                                                    if(!nodeLabels[node.id]) return;
                                                                                    var labels = nodeLabels[node.id],
                                                                                        wrapperStyle = labels.wrapper.style,
                                                                                        labelStyle = labels.label.style,
                                                                            Severity: Minor
                                                                            Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                function design(graph, node, prop, config, orn) {
                                                                                  var multitree = config.multitree;
                                                                                  var auxp = [ 'x', 'y' ], auxs = [ 'width', 'height' ];
                                                                                  var ind = +(orn == "left" || orn == "right");
                                                                                  var p = auxp[ind], notp = auxp[1 - ind];
                                                                              Severity: Minor
                                                                              Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                   nodeFx: function(opt) {
                                                                                     var viz = this.viz,
                                                                                         graph  = viz.graph,
                                                                                         animation = this.nodeFxAnimation,
                                                                                         options = $.merge(this.viz.config, {
                                                                                Severity: Minor
                                                                                Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                    enter: function (node) {
                                                                                      if (this.busy)
                                                                                        return;
                                                                                      this.busy = true;
                                                                                  
                                                                                  
                                                                                  Severity: Minor
                                                                                  Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                      attachEvents: function() {
                                                                                        var htmlCanvas = this.canvas.getElement(), 
                                                                                            that = this;
                                                                                        htmlCanvas.oncontextmenu = $.lambda(false);
                                                                                        $.addEvents(htmlCanvas, {
                                                                                    Severity: Minor
                                                                                    Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                                                                                      Function initialize has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                      Open

                                                                                        initialize: function(controller) {
                                                                                          var $Hypertree = $jit.Hypertree;
                                                                                      
                                                                                          var config = {
                                                                                            radius: "auto",
                                                                                      Severity: Minor
                                                                                      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                                                                                        Function updateJSON has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                        Open

                                                                                          updateJSON: function(json, onComplete) {
                                                                                            if(this.busy) return;
                                                                                            this.busy = true;
                                                                                            this.select(false, false, false);
                                                                                            var delegate = this.delegate;
                                                                                        Severity: Minor
                                                                                        Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                                                                                          Function construct has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                          Open

                                                                                               construct: function(json) {
                                                                                                  var isGraph = ($.type(json) == 'array');
                                                                                                  var ans = new Graph(this.graphOptions, this.config.Node, this.config.Edge, this.config.Label);
                                                                                                  if(!isGraph) 
                                                                                                      //make tree
                                                                                          Severity: Minor
                                                                                          Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                                                                                            Function computePositions has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                            Open

                                                                                              computePositions: function(par, ch, orn, prop) {
                                                                                                //compute children areas
                                                                                                var totalArea = 0;
                                                                                                par.eachSubnode(function(n) {
                                                                                                  totalArea += n.getData('area', prop);
                                                                                            Severity: Minor
                                                                                            Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                                                                                              Function toJSON has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                              Open

                                                                                                  toJSON: function(type) {
                                                                                                    type = type || "tree";
                                                                                                    if(type == 'tree') {
                                                                                                      var ans = {};
                                                                                                      var rootNode = this.graph.getNode(this.root);
                                                                                              Severity: Minor
                                                                                              Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                    'render': function(node, canvas, animating){
                                                                                                      var leaf = this.viz.leaf(node),
                                                                                                          config = this.config,
                                                                                                          offst = config.offset,
                                                                                                          titleHeight = config.titleHeight,
                                                                                                Severity: Minor
                                                                                                Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                                                                                                  Function normalizeDims has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                    normalizeDims: function() {
                                                                                                      //number of elements
                                                                                                      var root = this.delegate.graph.getNode(this.delegate.root), l=0;
                                                                                                      root.eachAdjacency(function() {
                                                                                                        l++;
                                                                                                  Severity: Minor
                                                                                                  Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                          onPlaceLabel: function(domElement, node) {
                                                                                                            if(!node.getData('prev')) return;
                                                                                                            var labels = nodeLabels[node.id],
                                                                                                                wrapperStyle = labels.wrapper.style,
                                                                                                                labelStyle = labels.label.style,
                                                                                                    Severity: Minor
                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                              initialize: function(controller) {            
                                                                                                                var $ST = $jit.ST;
                                                                                                                
                                                                                                                var config= {
                                                                                                                      levelsToShow: 2,
                                                                                                      Severity: Minor
                                                                                                      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                          initialize: function(controller){
                                                                                                            var $RGraph = $jit.RGraph;
                                                                                                        
                                                                                                            var config = {
                                                                                                              interpolation: 'linear',
                                                                                                        Severity: Minor
                                                                                                        Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                            normalizeDims: function() {
                                                                                                              //number of elements
                                                                                                              var root = this.delegate.graph.getNode(this.delegate.root), l=0;
                                                                                                              root.eachAdjacency(function() {
                                                                                                                l++;
                                                                                                          Severity: Minor
                                                                                                          Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                                                                                                            Function onCreateLabel has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                            Open

                                                                                                                  onCreateLabel: function(domElement, node) {
                                                                                                                    var labelConf = config.Label,
                                                                                                                        valueArray = node.getData('valueArray'),
                                                                                                                        acumLeft = $.reduce(valueArray, function(x, y) { return x + y[0]; }, 0),
                                                                                                                        acumRight = $.reduce(valueArray, function(x, y) { return x + y[1]; }, 0);
                                                                                                            Severity: Minor
                                                                                                            Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                initialize: function(controller) {
                                                                                                                  var $ForceDirected = $jit.ForceDirected;
                                                                                                              
                                                                                                                  var config = {
                                                                                                                    iterations: 50,
                                                                                                              Severity: Minor
                                                                                                              Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                   plot: function(opt, animating) {
                                                                                                                     var viz = this.viz, 
                                                                                                                         aGraph = viz.graph, 
                                                                                                                         canvas = viz.canvas, 
                                                                                                                         id = viz.root, 
                                                                                                                Severity: Minor
                                                                                                                Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                      getAlignedPos: function(pos, width, height) {
                                                                                                                          var nconfig = this.node;
                                                                                                                          var square, orn;
                                                                                                                          if(nconfig.align == "center") {
                                                                                                                              square = {
                                                                                                                  Severity: Minor
                                                                                                                  Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                          onCreateLabel: function(domElement, node) {
                                                                                                                            var labelConf = config.Label,
                                                                                                                                valueArray = node.getData('valueArray'),
                                                                                                                                acum = $.reduce(valueArray, function(x, y) { return x + y; }, 0);
                                                                                                                            var nlbs = {
                                                                                                                    Severity: Minor
                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                        toggleStylesOn: function(type, node, set) {
                                                                                                                          var viz = this.viz;
                                                                                                                          var nStyles = this.nStyles;
                                                                                                                          if(set) {
                                                                                                                            var that = this;
                                                                                                                      Severity: Minor
                                                                                                                      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                          onMouseMove: function(e, win, event) {
                                                                                                                            //if mouse button is down and moving set move=true
                                                                                                                            if(this.down) this.move = true;
                                                                                                                            //already handled by mouseover/out
                                                                                                                            if(this.dom && this.isLabel(e, win)) return;
                                                                                                                        Severity: Minor
                                                                                                                        Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                              plotStep: function(delta, controller, animating) {
                                                                                                                                  var viz = this.viz,
                                                                                                                                  config = this.config,
                                                                                                                                  canvas = viz.canvas, 
                                                                                                                                  ctx = canvas.getCtx(),
                                                                                                                          Severity: Minor
                                                                                                                          Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                  'render': function(node, canvas) {
                                                                                                                                    var height = node.getData('height');
                                                                                                                                    var ldist = height? height : this.config.levelDistance;
                                                                                                                                    var span = node.getData('span') / 2, theta = node.pos.theta;
                                                                                                                                    var begin = theta - span, end = theta + span;
                                                                                                                            Severity: Minor
                                                                                                                            Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                              $.getPos = function(elem) {
                                                                                                                                var offset = getOffsets(elem);
                                                                                                                                var scroll = getScrolls(elem);
                                                                                                                                return {
                                                                                                                                  x: offset.x - scroll.x,
                                                                                                                              Severity: Minor
                                                                                                                              Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                    renderLabel: function(canvas, node, controller) {
                                                                                                                                      var span = node.getData('span');
                                                                                                                                      if(span < Math.PI /2 && Math.tan(span) * 
                                                                                                                                          this.config.levelDistance * node._depth < 10) {
                                                                                                                                        return;
                                                                                                                                Severity: Minor
                                                                                                                                Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                      function $design(node, maxsize, acum) {
                                                                                                                                        var sval = node.getData(s, prop);
                                                                                                                                        var notsval = maxsize
                                                                                                                                            || (node.getData(nots, prop));
                                                                                                                                  
                                                                                                                                  
                                                                                                                                  Severity: Minor
                                                                                                                                  Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                      updateJSON: function(json, onComplete) {
                                                                                                                                        if(this.busy) return;
                                                                                                                                        this.busy = true;
                                                                                                                                        
                                                                                                                                        var delegate = this.delegate;
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                            onComplete: function() {
                                                                                                                                              //ensure that nodes are shown for that level
                                                                                                                                              if(config.levelsToShow > 0) {
                                                                                                                                                that.geom.setRightLevelToShow(n);
                                                                                                                                              }
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                            getEdge: function(node, type, s) {
                                                                                                                                                var $C = function(a, b) { 
                                                                                                                                                  return function(){
                                                                                                                                                    return node.pos.add(new Complex(a, b));
                                                                                                                                                  }; 
                                                                                                                                        Severity: Minor
                                                                                                                                        Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                                onComplete: function() {
                                                                                                                                                  //compute positions of newly inserted nodes
                                                                                                                                                  if(config.request)
                                                                                                                                                    that.compute();
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          Severity: Minor
                                                                                                                                          Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                              normalizeDims: function() {
                                                                                                                                                //number of elements
                                                                                                                                                var root = this.delegate.graph.getNode(this.delegate.root), l=0;
                                                                                                                                                root.eachAdjacency(function() {
                                                                                                                                                  l++;
                                                                                                                                            Severity: Minor
                                                                                                                                            Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                                    onPlaceLabel: function(domElement, node) {
                                                                                                                                                      if(!config.showLabels) return;
                                                                                                                                                      var pos = node.pos.getp(true),
                                                                                                                                                          dimArray = node.getData('dimArray'),
                                                                                                                                                          span = node.getData('span') / 2,
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                                    contract: function(node, opt) {
                                                                                                                                                      var viz = this.viz;
                                                                                                                                                      if(node.collapsed || !node.anySubnode($.lambda(true))) return;
                                                                                                                                                      opt = $.merge(this.options, viz.config, opt || {}, {
                                                                                                                                                        'modes': ['node-property:alpha:span', 'linear']
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                                    onClick: function(id, opt){
                                                                                                                                                      if (this.root != id && !this.busy) {
                                                                                                                                                        this.busy = true;
                                                                                                                                                        this.root = id;
                                                                                                                                                        var that = this;
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                                        createLabelContainer: function(type, idLabel, dim) {
                                                                                                                                                          var NS = 'http://www.w3.org/2000/svg';
                                                                                                                                                          if(type == 'HTML' || type == 'Native') {
                                                                                                                                                            return $E('div', {
                                                                                                                                                              'id': idLabel,
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                                        onMouseMove: function(e, win, event) {
                                                                                                                                                         var label, evt = $.event.get(e, win);
                                                                                                                                                         if(this.pressed) {
                                                                                                                                                           this.moved = true;
                                                                                                                                                           this.config.onDragMove(this.pressed, event, evt);
                                                                                                                                                      Severity: Minor
                                                                                                                                                      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                                            function getNodesToHide(node) {
                                                                                                                                                              node = node || this.clickedNode;
                                                                                                                                                              if(!this.config.constrained) {
                                                                                                                                                                return [];
                                                                                                                                                              }
                                                                                                                                                        Severity: Minor
                                                                                                                                                        Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                                                function computeArcThroughTwoPoints(p1, p2){
                                                                                                                                                                  var aDen = (p1.x * p2.y - p1.y * p2.x), bDen = aDen;
                                                                                                                                                                  var sq1 = p1.squaredNorm(), sq2 = p2.squaredNorm();
                                                                                                                                                                  // Fall back to a straight line
                                                                                                                                                                  if (aDen == 0)
                                                                                                                                                          Severity: Minor
                                                                                                                                                          Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                                              compute: function(graph, prop, opt) {
                                                                                                                                                                this.initializeLabel(opt);
                                                                                                                                                                var label = this.label, style = label.style;
                                                                                                                                                                graph.eachNode(function(n) {
                                                                                                                                                                  var autoWidth  = n.getData('autoWidth'),
                                                                                                                                                            Severity: Minor
                                                                                                                                                            Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                                                  preprocessSum: function(graph) {
                                                                                                                                                                      var viz = this.viz;
                                                                                                                                                                      graph.eachNode(function(elem) {
                                                                                                                                                                          if(!viz.graph.hasNode(elem.id)) {
                                                                                                                                                                              viz.graph.addNode(elem);
                                                                                                                                                              Severity: Minor
                                                                                                                                                              Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                                                  select: function(id, name, index) {
                                                                                                                                                                    if(!this.config.selectOnHover) return;
                                                                                                                                                                    var s = this.selected;
                                                                                                                                                                    if(s.id != id || s.name != name 
                                                                                                                                                                        || s.index != index) {
                                                                                                                                                                Severity: Minor
                                                                                                                                                                Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                                                      placeLabel: function(tag, node, controller) {
                                                                                                                                                                        var pos = node.pos.getc(true), viz = this.viz, canvas = this.viz.canvas;
                                                                                                                                                                        var radius = canvas.getSize();
                                                                                                                                                                        var labelPos = {
                                                                                                                                                                          x: Math.round(pos.x + radius.width / 2),
                                                                                                                                                                  Severity: Minor
                                                                                                                                                                  Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                                                        interpolate: function(elem, delta) {
                                                                                                                                                                            var pi = Math.PI, pi2 = pi * 2;
                                                                                                                                                                            var ch = function(t) {
                                                                                                                                                                                var a =  (t < 0)? (t % pi2) + pi2 : t % pi2;
                                                                                                                                                                                return a;
                                                                                                                                                                    Severity: Minor
                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                                                          'contains': function(node, mpos) {
                                                                                                                                                                            var pos = node.pos.getc(true), 
                                                                                                                                                                                width = node.getData('width'),
                                                                                                                                                                                height = node.getData('height'),
                                                                                                                                                                                algnPos = this.getAlignedPos(pos, width, height),
                                                                                                                                                                      Severity: Minor
                                                                                                                                                                      Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                                                            'render': function(node, canvas, animating) {
                                                                                                                                                                              var config = this.viz.config;
                                                                                                                                                                              var offset = config.offset;
                                                                                                                                                                              var width = node.getData('width');
                                                                                                                                                                              var height = node.getData('height');
                                                                                                                                                                        Severity: Minor
                                                                                                                                                                        Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                                                                  select: function(id, onComplete) {
                                                                                                                                                                                      var group = this.group, geom = this.geom;
                                                                                                                                                                                      var node=  this.graph.getNode(id), canvas = this.canvas;
                                                                                                                                                                                      var root  = this.graph.getNode(this.root);
                                                                                                                                                                                      var complete = $.merge(this.controller, onComplete);
                                                                                                                                                                          Severity: Minor
                                                                                                                                                                          Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

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

                                                                                                                                                                               plotTree: function(node, opt, animating) {
                                                                                                                                                                                   var that = this, 
                                                                                                                                                                                   viz = this.viz, 
                                                                                                                                                                                   canvas = viz.canvas,
                                                                                                                                                                                   config = this.config,
                                                                                                                                                                            Severity: Minor
                                                                                                                                                                            Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                                                                                                                                                                              Consider simplifying this complex logical expression.
                                                                                                                                                                              Open

                                                                                                                                                                                  if(this.config.animate) {
                                                                                                                                                                                    this.compute('end');
                                                                                                                                                                                    this.config.levelsToShow > 0 && this.geom.setRightLevelToShow(this.graph.getNode(this.clickedNode 
                                                                                                                                                                                        && this.clickedNode.id || this.root));
                                                                                                                                                                                    this.fx.animate($.merge(this.config, {
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                                                                                                                                                                                Function computeSubtree has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                  computeSubtree: function (root, x, y, width, height, initialDepth, maxDepth, posType) {
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

                                                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                                                  Open

                                                                                                                                                                                                        if(typeof adj[j] != 'string') {
                                                                                                                                                                                                          data = $.merge(node.data, {});
                                                                                                                                                                                                          node = node.nodeTo;
                                                                                                                                                                                                        }
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in app/assets/javascripts/jit-2.0.1.js - About 45 mins to fix

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

                                                                                                                                                                                            'node': function(elem, props, delta, map, getter, setter) {
                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js - About 45 mins to fix

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

                                                                                                                                                                                       computeDim: function(tail, initElem, w, coord, comp, prop) {
                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                      Found in app/assets/javascripts/jit-2.0.1.js - About 45 mins to fix

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

                                                                                                                                                                                                'edge': function(elem, props, delta, mapKey, getter, setter) {
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in app/assets/javascripts/jit-2.0.1.js - About 45 mins to fix

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

                                                                                                                                                                                            initialize: function(nodeFrom, nodeTo, data, Edge, Label) {
                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                          Found in app/assets/javascripts/jit-2.0.1.js - About 35 mins to fix

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

                                                                                                                                                                                              function getBoundaries(graph, config, level, orn, prop) {
                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                            Found in app/assets/javascripts/jit-2.0.1.js - About 35 mins to fix

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

                                                                                                                                                                                               squarify: function(tail, initElem, w, coord, prop) {
                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                              Found in app/assets/javascripts/jit-2.0.1.js - About 35 mins to fix

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

                                                                                                                                                                                                  initialize: function(opt, klass, Node, Edge, Label) {
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in app/assets/javascripts/jit-2.0.1.js - About 35 mins to fix

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

                                                                                                                                                                                                          'number': function(elem, prop, delta, getter, setter) {
                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                  Found in app/assets/javascripts/jit-2.0.1.js - About 35 mins to fix

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

                                                                                                                                                                                                      function fit(ext1, ext2, subtreeOffset, siblingOffset, i) {
                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js - About 35 mins to fix

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

                                                                                                                                                                                                          'render': function(from, to, dim, swap, canvas){
                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                      Found in app/assets/javascripts/jit-2.0.1.js - About 35 mins to fix

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

                                                                                                                                                                                                            'render': function(type, pos, width, height, canvas){
                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                        Found in app/assets/javascripts/jit-2.0.1.js - About 35 mins to fix

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

                                                                                                                                                                                                              'render': function(type, pos, width, height, canvas){
                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                          Found in app/assets/javascripts/jit-2.0.1.js - About 35 mins to fix

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

                                                                                                                                                                                                                    'color': function(elem, prop, delta, getter, setter) {
                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                            Found in app/assets/javascripts/jit-2.0.1.js - About 35 mins to fix

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

                                                                                                                                                                                                                function design(graph, node, prop, config, orn) {
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in app/assets/javascripts/jit-2.0.1.js - About 35 mins to fix

                                                                                                                                                                                                                Function array-number has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                Open

                                                                                                                                                                                                                        'array-number': function(elem, prop, delta, getter, setter) {
                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                Found in app/assets/javascripts/jit-2.0.1.js - About 35 mins to fix

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

                                                                                                                                                                                                                    var getDataInternal = function(prefix, prop, type, force, prefixConfig) {
                                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                                  Found in app/assets/javascripts/jit-2.0.1.js - About 35 mins to fix

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

                                                                                                                                                                                                                        eachLevel: function(node, levelBegin, levelEnd, action, flags) {
                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js - About 35 mins to fix

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

                                                                                                                                                                                                                          stripify: function(tail, initElem, w, coord, prop) {
                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                      Found in app/assets/javascripts/jit-2.0.1.js - About 35 mins to fix

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

                                                                                                                                                                                                                        Graph.Util.moebiusTransformation = function(graph, pos, prop, startPos, flags) {
                                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                                        Found in app/assets/javascripts/jit-2.0.1.js - About 35 mins to fix

                                                                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                if(node.hovered) return;
                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                          Found in app/assets/javascripts/jit-2.0.1.js - About 30 mins to fix

                                                                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                            return this.dispatch(s, $C(0, 0), $C(w, 0),
                                                                                                                                                                                                                                                                 $C(0, h), $C(0, 0));
                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                            Found in app/assets/javascripts/jit-2.0.1.js - About 30 mins to fix

                                                                                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                    return false;
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in app/assets/javascripts/jit-2.0.1.js - About 30 mins to fix

                                                                                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                      return false;
                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                Found in app/assets/javascripts/jit-2.0.1.js - About 30 mins to fix

                                                                                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                  return this.dispatch(s, $C(0, -h),$C(0, 0),
                                                                                                                                                                                                                                                                       $C(0, 0), $C(-w, 0));
                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                  Found in app/assets/javascripts/jit-2.0.1.js - About 30 mins to fix

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

                                                                                                                                                                                                                                    (function(ForceDirected) {
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                      /*
                                                                                                                                                                                                                                         Class: ForceDirected.Op
                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 16070..16417

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

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                    (function(RGraph){
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                      /*
                                                                                                                                                                                                                                         Class: RGraph.Op
                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14652..14998

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        'quadratic:end': {
                                                                                                                                                                                                                                           'render': function(adj, canvas) {
                                                                                                                                                                                                                                              var orn = this.getOrientation(adj);
                                                                                                                                                                                                                                              var nodeFrom = adj.nodeFrom, 
                                                                                                                                                                                                                                                  nodeTo = adj.nodeTo,
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9939..9967

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        'quadratic:begin': {
                                                                                                                                                                                                                                           'render': function(adj, canvas) {
                                                                                                                                                                                                                                              var orn = this.getOrientation(adj);
                                                                                                                                                                                                                                              var nodeFrom = adj.nodeFrom, 
                                                                                                                                                                                                                                                  nodeTo = adj.nodeTo,
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9968..9996

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        requestNodes: function(nodes, controller) {
                                                                                                                                                                                                                                            var counter = 0, len = nodes.length, nodeSelected = {};
                                                                                                                                                                                                                                            var complete = function() { controller.onComplete(); };
                                                                                                                                                                                                                                            var viz = this.viz;
                                                                                                                                                                                                                                            if(len == 0) complete();
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15447..15472

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                      requestNodes: function(nodes, controller){
                                                                                                                                                                                                                                        var counter = 0, len = nodes.length, nodeSelected = {};
                                                                                                                                                                                                                                        var complete = function(){
                                                                                                                                                                                                                                          controller.onComplete();
                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9121..9141

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                      'rectangle': {
                                                                                                                                                                                                                                        'render': function(node, canvas) {
                                                                                                                                                                                                                                          var width = node.getData('width'),
                                                                                                                                                                                                                                              height = node.getData('height'),
                                                                                                                                                                                                                                              pos = this.getAlignedPos(node.pos.getc(true), width, height);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9840..9853

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                      'ellipse': {
                                                                                                                                                                                                                                        'render': function(node, canvas) {
                                                                                                                                                                                                                                          var width = node.getData('width'),
                                                                                                                                                                                                                                              height = node.getData('height'),
                                                                                                                                                                                                                                              pos = this.getAlignedPos(node.pos.getc(true), width, height);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9854..9867

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        'star': {
                                                                                                                                                                                                                                          'render': function(node, canvas) {
                                                                                                                                                                                                                                            var nconfig = this.node,
                                                                                                                                                                                                                                                dim = node.getData('dim'),
                                                                                                                                                                                                                                                p = node.pos.getc();
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 3 other locations - About 1 day to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 16985..17001
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 17016..17032
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 17053..17069

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        'triangle': {
                                                                                                                                                                                                                                          'render': function(node, canvas) {
                                                                                                                                                                                                                                            var nconfig = this.node,
                                                                                                                                                                                                                                                dim = node.getData('dim'),
                                                                                                                                                                                                                                                p = node.pos.getc();
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 3 other locations - About 1 day to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 16985..17001
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 17016..17032
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 17070..17086

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        'circle': {
                                                                                                                                                                                                                                          'render': function(node, canvas) {
                                                                                                                                                                                                                                            var nconfig = this.node,
                                                                                                                                                                                                                                                dim = node.getData('dim'),
                                                                                                                                                                                                                                                p = node.pos.getc();
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 3 other locations - About 1 day to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 17016..17032
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 17053..17069
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 17070..17086

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        'square': {
                                                                                                                                                                                                                                          'render': function(node, canvas) {
                                                                                                                                                                                                                                            var nconfig = this.node,
                                                                                                                                                                                                                                                dim = node.getData('dim'),
                                                                                                                                                                                                                                                p = node.pos.getc();
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 3 other locations - About 1 day to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 16985..17001
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 17053..17069
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 17070..17086

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                      initialize: function(opt) {
                                                                                                                                                                                                                                        this.controller = this.config = 
                                                                                                                                                                                                                                          $.merge(Options("Canvas", "Margin", "Label", "BarChart"), {
                                                                                                                                                                                                                                            Label: { type: 'Native' }
                                                                                                                                                                                                                                          }, opt);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 7 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10178..10192

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                      initialize: function(opt) {
                                                                                                                                                                                                                                        this.controller = this.config = 
                                                                                                                                                                                                                                          $.merge(Options("Canvas", "Margin", "Label", "AreaChart"), {
                                                                                                                                                                                                                                            Label: { type: 'Native' }
                                                                                                                                                                                                                                          }, opt);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 7 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11117..11131

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                      select: function(id, name) {
                                                                                                                                                                                                                                        if(!this.config.hoveredColor) return;
                                                                                                                                                                                                                                        var s = this.selected;
                                                                                                                                                                                                                                        if(s.id != id || s.name != name) {
                                                                                                                                                                                                                                          s.id = id;
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 7 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12927..12943

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                      select: function(id, name) {
                                                                                                                                                                                                                                        if(!this.config.hoveredColor) return;
                                                                                                                                                                                                                                        var s = this.selected;
                                                                                                                                                                                                                                        if(s.id != id || s.name != name) {
                                                                                                                                                                                                                                          s.id = id;
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 7 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11449..11465

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

                                                                                                                                                                                                                                    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(showLabels(node.name, valAcum, node)) {
                                                                                                                                                                                                                                                if(horz) {
                                                                                                                                                                                                                                                  ctx.textAlign = 'center';
                                                                                                                                                                                                                                                  ctx.translate(x - config.labelOffset - label.size/2, y + height/2);
                                                                                                                                                                                                                                                  ctx.rotate(Math.PI / 2);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 6 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10882..10892

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

                                                                                                                                                                                                                                    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(showLabels(node.name, valAcum, node)) {
                                                                                                                                                                                                                                                if(horz) {
                                                                                                                                                                                                                                                  ctx.textAlign = 'center';
                                                                                                                                                                                                                                                  ctx.translate(x - config.labelOffset - label.size/2, y + height/2);
                                                                                                                                                                                                                                                  ctx.rotate(Math.PI / 2);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 6 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11032..11042

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                          Events: {
                                                                                                                                                                                                                                            enable: true,
                                                                                                                                                                                                                                            type: 'Native',
                                                                                                                                                                                                                                            onClick: function(node, eventInfo, evt) {
                                                                                                                                                                                                                                              if(!config.Events.enable) return;
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 6 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11171..11188

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                          Events: {
                                                                                                                                                                                                                                            enable: true,
                                                                                                                                                                                                                                            type: 'Native',
                                                                                                                                                                                                                                            onClick: function(node, eventInfo, evt) {
                                                                                                                                                                                                                                              if(!config.Events.enable) return;
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 6 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12728..12745

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

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                                if(canvasConfig.useCanvas) {
                                                                                                                                                                                                                                                  this.canvas = canvasConfig.useCanvas;
                                                                                                                                                                                                                                                  this.config.labelContainer = this.canvas.id + '-label';
                                                                                                                                                                                                                                                } else {
                                                                                                                                                                                                                                                  if(canvasConfig.background) {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 5 other locations - About 6 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11901..11912
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14507..14518
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15113..15124
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15891..15902
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 16544..16555

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

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                        if(canvasConfig.useCanvas) {
                                                                                                                                                                                                                                          this.canvas = canvasConfig.useCanvas;
                                                                                                                                                                                                                                          this.config.labelContainer = this.canvas.id + '-label';
                                                                                                                                                                                                                                        } else {
                                                                                                                                                                                                                                          if(canvasConfig.background) {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 5 other locations - About 6 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 8569..8580
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11901..11912
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14507..14518
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15113..15124
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 16544..16555

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

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                        if(canvasConfig.useCanvas) {
                                                                                                                                                                                                                                          this.canvas = canvasConfig.useCanvas;
                                                                                                                                                                                                                                          this.config.labelContainer = this.canvas.id + '-label';
                                                                                                                                                                                                                                        } else {
                                                                                                                                                                                                                                          if(canvasConfig.background) {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 5 other locations - About 6 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 8569..8580
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11901..11912
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15113..15124
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15891..15902
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 16544..16555

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

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                        if(canvasConfig.useCanvas) {
                                                                                                                                                                                                                                          this.canvas = canvasConfig.useCanvas;
                                                                                                                                                                                                                                          this.config.labelContainer = this.canvas.id + '-label';
                                                                                                                                                                                                                                        } else {
                                                                                                                                                                                                                                          if(canvasConfig.background) {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 5 other locations - About 6 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 8569..8580
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11901..11912
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14507..14518
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15113..15124
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15891..15902

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

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                        if(canvasConfig.useCanvas) {
                                                                                                                                                                                                                                          this.canvas = canvasConfig.useCanvas;
                                                                                                                                                                                                                                          this.config.labelContainer = this.canvas.id + '-label';
                                                                                                                                                                                                                                        } else {
                                                                                                                                                                                                                                          if(canvasConfig.background) {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 5 other locations - About 6 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 8569..8580
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14507..14518
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15113..15124
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15891..15902
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 16544..16555

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

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                        if (canvasConfig.useCanvas) {
                                                                                                                                                                                                                                          this.canvas = canvasConfig.useCanvas;
                                                                                                                                                                                                                                          this.config.labelContainer = this.canvas.id + '-label';
                                                                                                                                                                                                                                        } else {
                                                                                                                                                                                                                                          if(canvasConfig.background) {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 5 other locations - About 6 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 8569..8580
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11901..11912
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14507..14518
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15891..15902
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 16544..16555

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                          'contains': function(adj, pos) {
                                                                                                                                                                                                                                            var from = adj.nodeFrom.pos.getc(true),
                                                                                                                                                                                                                                                to = adj.nodeTo.pos.getc(true),
                                                                                                                                                                                                                                                r = adj.nodeFrom.scale;
                                                                                                                                                                                                                                            this.edgeHelper.arrow.contains({x:from.x*r, y:from.y*r}, {x:to.x*r, y:to.y*r}, pos, this.edge.epsilon);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 17123..17128

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                          'contains': function(adj, pos) {
                                                                                                                                                                                                                                            var from = adj.nodeFrom.pos.getc(true),
                                                                                                                                                                                                                                                to = adj.nodeTo.pos.getc(true),
                                                                                                                                                                                                                                                r = adj.nodeFrom.scale;
                                                                                                                                                                                                                                                this.edgeHelper.line.contains({x:from.x*r, y:from.y*r}, {x:to.x*r, y:to.y*r}, pos, this.edge.epsilon);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 17140..17145

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                      getLegend: function() {
                                                                                                                                                                                                                                        var legend = {};
                                                                                                                                                                                                                                        var n;
                                                                                                                                                                                                                                        this.delegate.graph.getNode(this.delegate.root).eachAdjacency(function(adj) {
                                                                                                                                                                                                                                          n = adj.nodeTo;
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 5 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10620..10632
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11478..11490

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                      getLegend: function() {
                                                                                                                                                                                                                                        var legend = {};
                                                                                                                                                                                                                                        var n;
                                                                                                                                                                                                                                        this.delegate.graph.getNode(this.delegate.root).eachAdjacency(function(adj) {
                                                                                                                                                                                                                                          n = adj.nodeTo;
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 5 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10620..10632
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12956..12968

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                      getLegend: function() {
                                                                                                                                                                                                                                        var legend = {};
                                                                                                                                                                                                                                        var n;
                                                                                                                                                                                                                                        this.delegate.graph.getNode(this.delegate.root).eachAdjacency(function(adj) {
                                                                                                                                                                                                                                          n = adj.nodeTo;
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 5 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11478..11490
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12956..12968

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                          'contains': function(adj, pos) {
                                                                                                                                                                                                                                            var orn = this.getOrientation(adj),
                                                                                                                                                                                                                                                nodeFrom = adj.nodeFrom, 
                                                                                                                                                                                                                                                nodeTo = adj.nodeTo,
                                                                                                                                                                                                                                                rel = nodeFrom._depth < nodeTo._depth,
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9929..9937

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                           'contains': function(adj, pos) {
                                                                                                                                                                                                                                             var orn = this.getOrientation(adj),
                                                                                                                                                                                                                                                 nodeFrom = adj.nodeFrom, 
                                                                                                                                                                                                                                                 nodeTo = adj.nodeTo,
                                                                                                                                                                                                                                                 rel = nodeFrom._depth < nodeTo._depth,
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9907..9915

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

                                                                                                                                                                                                                                    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(horz) {
                                                                                                                                                                                                                                            if(mpos.x < x || mpos.x > x + width
                                                                                                                                                                                                                                                || mpos.y > y + height || mpos.y < y) {
                                                                                                                                                                                                                                                return false;
                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10908..10918

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

                                                                                                                                                                                                                                    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(horz) {
                                                                                                                                                                                                                                            if(mpos.x < x || mpos.x > x + width
                                                                                                                                                                                                                                                || mpos.y > y + height || mpos.y < y) {
                                                                                                                                                                                                                                                return false;
                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11060..11070

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        callback = {
                                                                                                                                                                                                                                          onComplete: function() {
                                                                                                                                                                                                                                            that.clickedNode = parent;
                                                                                                                                                                                                                                            if(config.request) {
                                                                                                                                                                                                                                              that.requestNodes(parent, {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 4 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 13903..13920

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        callback = {
                                                                                                                                                                                                                                          onComplete: function() {
                                                                                                                                                                                                                                            that.clickedNode = parent;
                                                                                                                                                                                                                                            if(config.request) {
                                                                                                                                                                                                                                              that.requestNodes(parent, {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 4 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15300..15317

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        setDataset: function(types, obj) {
                                                                                                                                                                                                                                          types = $.splat(types);
                                                                                                                                                                                                                                          for(var attr in obj) {
                                                                                                                                                                                                                                            for(var i=0, val = $.splat(obj[attr]), l=types.length; i<l; i++) {
                                                                                                                                                                                                                                              this.setData(attr, val[i], types[i]);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 3 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 4439..4446
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 4542..4549

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        setCanvasStyles: function(types, obj) {
                                                                                                                                                                                                                                          types = $.splat(types);
                                                                                                                                                                                                                                          for(var attr in obj) {
                                                                                                                                                                                                                                            for(var i=0, val = $.splat(obj[attr]), l=types.length; i<l; i++) {
                                                                                                                                                                                                                                              this.setCanvasStyle(attr, val[i], types[i]);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 3 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 4330..4337
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 4542..4549

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        setLabelDataset: function(types, obj) {
                                                                                                                                                                                                                                          types = $.splat(types);
                                                                                                                                                                                                                                          for(var attr in obj) {
                                                                                                                                                                                                                                            for(var i=0, val = $.splat(obj[attr]), l=types.length; i<l; i++) {
                                                                                                                                                                                                                                              this.setLabelData(attr, val[i], types[i]);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 3 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 4330..4337
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 4439..4446

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        'contains': function(node, pos) {
                                                                                                                                                                                                                                          var dim  = node.getData('dim'),
                                                                                                                                                                                                                                              npos = this.getAlignedPos(node.pos.getc(true), dim, dim),
                                                                                                                                                                                                                                              dim2 = dim/2;
                                                                                                                                                                                                                                          this.nodeHelper.circle.contains({x:npos.x+dim2, y:npos.y+dim2}, pos, dim2);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9833..9838

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        'contains': function(node, pos) {
                                                                                                                                                                                                                                          var dim  = node.getData('dim'),
                                                                                                                                                                                                                                              npos = this.getAlignedPos(node.pos.getc(true), dim, dim),
                                                                                                                                                                                                                                              dim2 = dim/2;
                                                                                                                                                                                                                                          this.nodeHelper.square.contains({x:npos.x+dim2, y:npos.y+dim2}, pos, dim2);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9819..9824

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                          var pos = node.pos.getc(true), 
                                                                                                                                                                                                                                              canvas = this.viz.canvas,
                                                                                                                                                                                                                                              ox = canvas.translateOffsetX,
                                                                                                                                                                                                                                              oy = canvas.translateOffsetY,
                                                                                                                                                                                                                                              sx = canvas.scaleOffsetX,
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 16934..16941

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                          var pos = node.pos.getc(true), 
                                                                                                                                                                                                                                              canvas = this.viz.canvas,
                                                                                                                                                                                                                                              ox = canvas.translateOffsetX,
                                                                                                                                                                                                                                              oy = canvas.translateOffsetY,
                                                                                                                                                                                                                                              sx = canvas.scaleOffsetX,
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 16883..16890

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

                                                                                                                                                                                                                                    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 {
                                                                                                                                                                                                                                              acum -= dimi;
                                                                                                                                                                                                                                              var intersec = acum;
                                                                                                                                                                                                                                              if(mpos.y >= intersec) {
                                                                                                                                                                                                                                                return {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10922..10933

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

                                                                                                                                                                                                                                    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(horz) {
                                                                                                                                                                                                                                              acum += dimi;
                                                                                                                                                                                                                                              var intersec = acum;
                                                                                                                                                                                                                                              if(mpos.x <= intersec) {
                                                                                                                                                                                                                                                return {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10933..10944

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

                                                                                                                                                                                                                                    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(method == 'replot') {
                                                                                                                                                                                                                                                    this.op.sum(subtree, $.extend({ type: 'replot' }, onComplete || {}));
                                                                                                                                                                                                                                                } else if (method == 'animate') {
                                                                                                                                                                                                                                                    this.op.sum(subtree, $.extend({ type: 'fade:seq' }, onComplete || {}));
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 8942..8946

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

                                                                                                                                                                                                                                    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(method == 'replot') {
                                                                                                                                                                                                                                                    this.op.removeNode(subids, $.extend({ type: 'replot' }, onComplete || {}));
                                                                                                                                                                                                                                                } else if (method == 'animate') {
                                                                                                                                                                                                                                                    this.op.removeNode(subids, $.extend({ type: 'fade:seq'}, onComplete || {}));
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 8908..8912

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

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                          var labelPos = {
                                                                                                                                                                                                                                            x: Math.round((pos.x * sx) * r + ox + radius.width / 2),
                                                                                                                                                                                                                                            y: Math.round((pos.y * sy) * r + oy + radius.height / 2)
                                                                                                                                                                                                                                          };
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 16942..16945

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                          'contains': function(node, pos) {
                                                                                                                                                                                                                                            var width = node.getData('width'),
                                                                                                                                                                                                                                                height = node.getData('height'),
                                                                                                                                                                                                                                                npos = node.pos.getc().$scale(node.scale);
                                                                                                                                                                                                                                            return this.nodeHelper.circle.contains(npos, pos, width, height);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 17046..17051

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

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                          var labelPos = {
                                                                                                                                                                                                                                            x: Math.round((pos.x * sx) * r + ox + radius.width / 2),
                                                                                                                                                                                                                                            y: Math.round((pos.y * sy) * r + oy + radius.height / 2)
                                                                                                                                                                                                                                          };
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 16891..16894

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                          'contains': function(node, pos) {
                                                                                                                                                                                                                                            var width = node.getData('width'),
                                                                                                                                                                                                                                                height = node.getData('height'),
                                                                                                                                                                                                                                                npos = node.pos.getc().$scale(node.scale);
                                                                                                                                                                                                                                            return this.nodeHelper.rectangle.contains(npos, pos, width, height);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 17009..17014

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

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                      function getScrolls(elem) {
                                                                                                                                                                                                                                        var position = {
                                                                                                                                                                                                                                          x: 0,
                                                                                                                                                                                                                                          y: 0
                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 407..418

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 88.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                      function getOffsets(elem) {
                                                                                                                                                                                                                                        var position = {
                                                                                                                                                                                                                                          x: 0,
                                                                                                                                                                                                                                          y: 0
                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 420..431

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 88.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                      layout: {
                                                                                                                                                                                                                                        orientation: "h",
                                                                                                                                                                                                                                        vertical: function(){
                                                                                                                                                                                                                                          return this.orientation == "v";
                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 13716..13727

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 87.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                      layout: {
                                                                                                                                                                                                                                        orientation: "h",
                                                                                                                                                                                                                                        vertical: function(){
                                                                                                                                                                                                                                          return this.orientation == "v";
                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15067..15078

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 87.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                        if(this.touched) {
                                                                                                                                                                                                                                          if(this.touchMoved) {
                                                                                                                                                                                                                                            this.config.onTouchEnd(this.touched, event, evt);
                                                                                                                                                                                                                                          } else {
                                                                                                                                                                                                                                            this.config.onTouchCancel(this.touched, event, evt);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 2171..2178

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 87.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                        if(this.pressed) {
                                                                                                                                                                                                                                          if(this.moved) {
                                                                                                                                                                                                                                            this.config.onDragEnd(this.pressed, event, evt);
                                                                                                                                                                                                                                          } else {
                                                                                                                                                                                                                                            this.config.onDragCancel(this.pressed, event, evt);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 2282..2289

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 87.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                                    viz.fx.animate($.merge(options, {
                                                                                                                                                                                                                                                        modes: ['node-property:alpha', 'linear'],
                                                                                                                                                                                                                                                        onComplete: function() {
                                                                                                                                                                                                                                                            that.removeNode(n, { type: 'nothing' });
                                                                                                                                                                                                                                                            options.onComplete && options.onComplete();
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 5491..5497

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 79.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                                    viz.fx.animate($.merge(options, {
                                                                                                                                                                                                                                                        modes: ['edge-property:alpha', 'linear'],
                                                                                                                                                                                                                                                        onComplete: function() {
                                                                                                                                                                                                                                                            that.removeEdge(v, { type: 'nothing' });
                                                                                                                                                                                                                                                            options.onComplete && options.onComplete();
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 5388..5394

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 79.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                    $jit.ST.Label.SVG = new Class({
                                                                                                                                                                                                                                      Implements: [$jit.ST.Label.DOM, Graph.Label.SVG],
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                      initialize: function(viz) {
                                                                                                                                                                                                                                        this.viz = viz;
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9773..9779

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                            var lg = ctx.createRadialGradient(posx + (width - offset)/2, 
                                                                                                                                                                                                                                                                              posy + (height - offset)/2, 1, 
                                                                                                                                                                                                                                                                              posx + (width-offset)/2, posy + (height-offset)/2, 
                                                                                                                                                                                                                                                                              width < height? height : width);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15734..15735

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                    $jit.ST.Label.HTML = new Class({
                                                                                                                                                                                                                                      Implements: [$jit.ST.Label.DOM, Graph.Label.HTML],
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                      initialize: function(viz) {
                                                                                                                                                                                                                                        this.viz = viz;
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9751..9757

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                              var lg = ctx.createRadialGradient(posx + (width-offst)/2, posy + (height-offst)/2, 1, 
                                                                                                                                                                                                                                                  posx + (width-offst)/2, posy + (height-offst)/2, width < height? height : width);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14265..14268

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                                  for(var i=0, l=prop.length; i < l; i++) {
                                                                                                                                                                                                                                                    adj[accessors[p].setter](prop[i], adj[accessors[p].getter](prop[i]), 'start');
                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 6888..6890

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                                for(var i=0, l=prop.length; i < l; i++) {
                                                                                                                                                                                                                                                  node[accessors[p].setter](prop[i], node[accessors[p].getter](prop[i]), 'start');
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 6897..6899

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

                                                                                                                                                                                                                                        if(type == 'current') {
                                                                                                                                                                                                                                          data = this.data;
                                                                                                                                                                                                                                        } else if(type == 'start') {
                                                                                                                                                                                                                                          data = this.startData;
                                                                                                                                                                                                                                        } else if(type == 'end') {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 4210..4216
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 4698..4704

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

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                          if(type == "current") {
                                                                                                                                                                                                                                            pos = this.pos;
                                                                                                                                                                                                                                          } else if(type == "end") {
                                                                                                                                                                                                                                            pos = this.endPos;
                                                                                                                                                                                                                                          } else if(type == "start") {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 4183..4189
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 4210..4216

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

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                        if(type == 'current') {
                                                                                                                                                                                                                                          data = this.data;
                                                                                                                                                                                                                                        } else if(type == 'start') {
                                                                                                                                                                                                                                          data = this.startData;
                                                                                                                                                                                                                                        } else if(type == 'end') {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 4183..4189
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 4698..4704

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                          'mouseup': function(e, win) {
                                                                                                                                                                                                                                            var event = $.event.get(e, win);
                                                                                                                                                                                                                                            that.handleEvent('MouseUp', e, win, 
                                                                                                                                                                                                                                                that.makeEventObject(e, win), 
                                                                                                                                                                                                                                                $.event.isRightClick(event));
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 1992..1996

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 68.

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                          'mousedown': function(e, win) {
                                                                                                                                                                                                                                            var event = $.event.get(e, win);
                                                                                                                                                                                                                                            that.handleEvent('MouseDown', e, win, that.makeEventObject(e, win), 
                                                                                                                                                                                                                                                $.event.isRightClick(event));
                                                                                                                                                                                                                                          },
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 1986..1991

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

                                                                                                                                                                                                                                    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.delegate.fx.animate({
                                                                                                                                                                                                                                          modes: ['node-property:height:dimArray'],
                                                                                                                                                                                                                                          duration:1500,
                                                                                                                                                                                                                                          onComplete: function() {
                                                                                                                                                                                                                                            that.busy = false;
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10537..10544

                                                                                                                                                                                                                                    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

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

                                                                                                                                                                                                                                          this.config.levelsToShow > 0 && this.geom.setRightLevelToShow(this.graph.getNode(this.clickedNode 
                                                                                                                                                                                                                                              && this.clickedNode.id || this.root));
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15174..15175

                                                                                                                                                                                                                                    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

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

                                                                                                                                                                                                                                          this.config.levelsToShow > 0 && this.geom.setRightLevelToShow(this.graph.getNode(this.clickedNode 
                                                                                                                                                                                                                                              && this.clickedNode.id || this.root));
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15158..15159

                                                                                                                                                                                                                                    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(animate) {
                                                                                                                                                                                                                                          delegate.fx.animate({
                                                                                                                                                                                                                                            modes: ['node-property:height:dimArray'],
                                                                                                                                                                                                                                            duration:1500,
                                                                                                                                                                                                                                            onComplete: function() {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11426..11444

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        this.delegate.fx.animate({
                                                                                                                                                                                                                                          modes: ['node-property:dimArray'],
                                                                                                                                                                                                                                          duration:1500,
                                                                                                                                                                                                                                          onComplete: function() {
                                                                                                                                                                                                                                            that.busy = false;
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10569..10576

                                                                                                                                                                                                                                    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(horz) {
                                                                                                                                                                                                                                            delegate.fx.animate({
                                                                                                                                                                                                                                              modes: ['node-property:width:dimArray'],
                                                                                                                                                                                                                                              duration:1500,
                                                                                                                                                                                                                                              onComplete: function() {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10484..10493

                                                                                                                                                                                                                                    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

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

                                                                                                                                                                                                                                          var labelPos = {
                                                                                                                                                                                                                                            x: Math.round(pos.x + radius.width / 2),
                                                                                                                                                                                                                                            y: Math.round(pos.y + radius.height / 2)
                                                                                                                                                                                                                                          };
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 4 other locations - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12282..12285
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12783..12786
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14160..14163
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14206..14209

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 66.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                        var labelPos = {
                                                                                                                                                                                                                                          x: Math.round(pos.x + radius.width / 2),
                                                                                                                                                                                                                                          y: Math.round(pos.y + radius.height / 2)
                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 4 other locations - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12207..12210
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12282..12285
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12783..12786
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14160..14163

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 66.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                              var labelPos = {
                                                                                                                                                                                                                                                x: Math.round(pos.x + radius.width / 2),
                                                                                                                                                                                                                                                y: Math.round(pos.y + radius.height / 2)
                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 4 other locations - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12207..12210
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12282..12285
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14160..14163
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14206..14209

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 66.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                          Tips: {
                                                                                                                                                                                                                                            enable: config.Tips.enable,
                                                                                                                                                                                                                                            type: 'Native',
                                                                                                                                                                                                                                            force: true,
                                                                                                                                                                                                                                            onShow: function(tip, node, contains) {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11162..11170
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12719..12727

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 66.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                          Tips: {
                                                                                                                                                                                                                                            enable: config.Tips.enable,
                                                                                                                                                                                                                                            type: 'Native',
                                                                                                                                                                                                                                            force: true,
                                                                                                                                                                                                                                            onShow: function(tip, node, contains) {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10223..10231
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12719..12727

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 66.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                          Tips: {
                                                                                                                                                                                                                                            enable: config.Tips.enable,
                                                                                                                                                                                                                                            type: 'Native',
                                                                                                                                                                                                                                            force: true,
                                                                                                                                                                                                                                            onShow: function(tip, node, contains) {
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10223..10231
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11162..11170

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 66.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                        var labelPos = {
                                                                                                                                                                                                                                          x: Math.round(pos.x + radius.width / 2),
                                                                                                                                                                                                                                          y: Math.round(pos.y + radius.height / 2)
                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 4 other locations - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12207..12210
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12282..12285
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12783..12786
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14206..14209

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 66.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                          var labelPos = {
                                                                                                                                                                                                                                            x: Math.round(pos.x + radius.width / 2),
                                                                                                                                                                                                                                            y: Math.round(pos.y + radius.height / 2)
                                                                                                                                                                                                                                          };
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 4 other locations - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12207..12210
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12783..12786
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14160..14163
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14206..14209

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 66.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                     layoutRow: function(ch, w, coord, prop) {
                                                                                                                                                                                                                                       if(this.layout.horizontal()) {
                                                                                                                                                                                                                                         return this.layoutV(ch, w, coord, prop);
                                                                                                                                                                                                                                       } else {
                                                                                                                                                                                                                                         return this.layoutH(ch, w, coord, prop);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 13526..13532

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 66.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                        layoutRow: function(ch, w, coord, prop) {
                                                                                                                                                                                                                                         if(this.layout.horizontal()) {
                                                                                                                                                                                                                                           return this.layoutH(ch, w, coord, prop);
                                                                                                                                                                                                                                         } else {
                                                                                                                                                                                                                                           return this.layoutV(ch, w, coord, prop);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 13375..13381

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 66.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                                var color = $.rgbToHex($.map($.hexToRgb(colorArray[i % colorLength].slice(1)), 
                                                                                                                                                                                                                                                    function(v) { return (v * 0.5) >> 0; }));
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10071..10072
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10836..10837

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 65.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                                var color = $.rgbToHex($.map($.hexToRgb(colorArray[i % colorLength].slice(1)), 
                                                                                                                                                                                                                                                    function(v) { return (v * 0.85) >> 0; }));
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10836..10837
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10986..10987

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 65.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                                var color = $.rgbToHex($.map($.hexToRgb(colorArray[i % colorLength].slice(1)), 
                                                                                                                                                                                                                                                    function(v) { return (v * 0.5) >> 0; }));
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10071..10072
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10986..10987

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 65.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                          delegate.config.offsetY = -size.height/2 + margin.bottom 
                                                                                                                                                                                                                                            + (config.showLabels && (config.labelOffset + config.Label.size));
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10344..10345

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

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        delegate.config.offsetY = -size.height/2 + margin.bottom 
                                                                                                                                                                                                                                          + (config.showLabels && (config.labelOffset + config.Label.size));
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11289..11290

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

                                                                                                                                                                                                                                    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(dim.align == "center") {
                                                                                                                                                                                                                                                    return this.dispatch(s, $C(0, h/2), $C(-w/2, 0),
                                                                                                                                                                                                                                                                         $C(0, -h/2),$C(w/2, 0));
                                                                                                                                                                                                                                                } else if(dim.align == "left") {
                                                                                                                                                                                                                                                    return this.dispatch(s, $C(0, h), $C(0, 0),
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9478..9484

                                                                                                                                                                                                                                    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

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

                                                                                                                                                                                                                                                } else if(dim.align == "left") {
                                                                                                                                                                                                                                                    return this.dispatch(s, $C(0, h), $C(0, 0),
                                                                                                                                                                                                                                                                         $C(0, 0), $C(w, 0));
                                                                                                                                                                                                                                                } else if(dim.align == "right") {
                                                                                                                                                                                                                                                    return this.dispatch(s, $C(0, 0), $C(-w, 0),
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9478..9484

                                                                                                                                                                                                                                    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

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

                                                                                                                                                                                                                                            } else if(dim.align == "center") {
                                                                                                                                                                                                                                                return this.dispatch(s, $C(0, h / 2), $C(-w / 2, 0),
                                                                                                                                                                                                                                                                     $C(0, -h / 2),$C(w / 2, 0));
                                                                                                                                                                                                                                            } else if(dim.align == "right") {
                                                                                                                                                                                                                                                return this.dispatch(s, $C(0, 0), $C(-w, 0),
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9433..9442

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        isZero: function () {
                                                                                                                                                                                                                                          var almostZero = 0.0001, abs = Math.abs;
                                                                                                                                                                                                                                          return abs(this.x) < almostZero && abs(this.y) < almostZero;
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 3451..3454

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        isZero: function () {
                                                                                                                                                                                                                                          var almostZero = 0.0001, abs = Math.abs;
                                                                                                                                                                                                                                          return abs(this.theta) < almostZero && abs(this.rho) < almostZero;
                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 3888..3891

                                                                                                                                                                                                                                    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

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

                                                                                                                                                                                                                                            var wrapper = nlbs.wrapper,
                                                                                                                                                                                                                                                label = nlbs.label,
                                                                                                                                                                                                                                                aggregate = nlbs.aggregate,
                                                                                                                                                                                                                                                wrapperStyle = wrapper.style,
                                                                                                                                                                                                                                                labelStyle = label.style,
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10266..10271

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 58.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                              var wrapper = nlbs.wrapper,
                                                                                                                                                                                                                                                  label = nlbs.label,
                                                                                                                                                                                                                                                  aggregate = nlbs.aggregate,
                                                                                                                                                                                                                                                  wrapperStyle = wrapper.style,
                                                                                                                                                                                                                                                  labelStyle = label.style,
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11198..11203

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 58.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                      Graph.Node.prototype[m] = function() {
                                                                                                                                                                                                                                        return Graph.Util[m].apply(Graph.Util, [this].concat(Array.prototype.slice.call(arguments)));
                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 5273..5275

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 57.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                          return this.nodeHelper.rectangle.contains({x: npos.x + width/2, y: npos.y + height/2}, pos, width, height);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15768..15768

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 57.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                          return this.nodeHelper.rectangle.contains({x: npos.x + width/2, y: npos.y + height/2}, pos, width, height);
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14290..14290

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 57.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                      Graph.prototype[m] = function() {
                                                                                                                                                                                                                                        return Graph.Util[m].apply(Graph.Util, [this].concat(Array.prototype.slice.call(arguments)));
                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 5280..5282

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 57.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                          if(labelType != 'Native') {
                                                                                                                                                                                                                                            var that = this;
                                                                                                                                                                                                                                            this.graph.eachNode(function(n) { that.labels.hideLabel(n, false); });
                                                                                                                                                                                                                                          }
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 13792..13795

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 55.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                        if(labelType != 'Native') {
                                                                                                                                                                                                                                          var that = this;
                                                                                                                                                                                                                                          this.graph.eachNode(function(n) { that.labels.hideLabel(n, false); });
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15168..15171

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 55.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                            n.setData('dimArray', $.map(n.getData('valueArray'), function(n) { 
                                                                                                                                                                                                                                              return [n[0] * height / maxValue, n[1] * height / maxValue]; 
                                                                                                                                                                                                                                            }), 'end');
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10710..10712

                                                                                                                                                                                                                                    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

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

                                                                                                                                                                                                                                            n.setData('dimArray', $.map(n.getData('valueArray'), function(n) { 
                                                                                                                                                                                                                                              return [n[0] * height / maxValue, n[1] * height / maxValue]; 
                                                                                                                                                                                                                                            }));
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10701..10703

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                               case "top":
                                                                                                                                                                                                                                                 ctx.bezierCurveTo(begin.x, begin.y + dim, end.x, end.y - dim, end.x, end.y);
                                                                                                                                                                                                                                                 break;
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10019..10021

                                                                                                                                                                                                                                    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 "left":
                                                                                                                                                                                                                                                 ctx.bezierCurveTo(begin.x + dim, begin.y, end.x - dim, end.y, end.x, end.y);
                                                                                                                                                                                                                                                 break;
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10013..10015

                                                                                                                                                                                                                                    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 "right":
                                                                                                                                                                                                                                                 ctx.bezierCurveTo(begin.x - dim, begin.y, end.x + dim, end.y, end.x, end.y);
                                                                                                                                                                                                                                                 break;
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10010..10012

                                                                                                                                                                                                                                    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 "bottom":
                                                                                                                                                                                                                                                 ctx.bezierCurveTo(begin.x, begin.y - dim, end.x, end.y + dim, end.x, end.y);
                                                                                                                                                                                                                                                 break;
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10016..10018

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

                                                                                                                                                                                                                                      initialize: function(viz){
                                                                                                                                                                                                                                        this.viz = viz;
                                                                                                                                                                                                                                        this.canvas = viz.canvas;
                                                                                                                                                                                                                                        this.config = viz.config;
                                                                                                                                                                                                                                      },
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 3 other locations - About 50 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14001..14005
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15585..15589
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15642..15646

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 52.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                      initialize: function(viz){
                                                                                                                                                                                                                                        this.viz = viz;
                                                                                                                                                                                                                                        this.leaf = viz.leaf;
                                                                                                                                                                                                                                        this.config = viz.config;
                                                                                                                                                                                                                                      },
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 3 other locations - About 50 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14001..14005
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15437..15441
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15585..15589

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 52.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                      initialize: function(viz){
                                                                                                                                                                                                                                        this.viz = viz;
                                                                                                                                                                                                                                        this.canvas = viz.canvas;
                                                                                                                                                                                                                                        this.config = viz.config;
                                                                                                                                                                                                                                      },
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 3 other locations - About 50 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15437..15441
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15585..15589
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15642..15646

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 52.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                      initialize: function(viz){
                                                                                                                                                                                                                                        this.viz = viz;
                                                                                                                                                                                                                                        this.leaf = viz.leaf;
                                                                                                                                                                                                                                        this.config = viz.config;
                                                                                                                                                                                                                                      },
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 3 other locations - About 50 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14001..14005
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15437..15441
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15642..15646

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 52.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                          if(horz) {
                                                                                                                                                                                                                                            delegate.fx.animate({
                                                                                                                                                                                                                                              modes: ['node-property:width:dimArray'],
                                                                                                                                                                                                                                              duration:1500,
                                                                                                                                                                                                                                              onComplete: function() {
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11369..11377

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 52.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                          } else {
                                                                                                                                                                                                                                            delegate.fx.animate({
                                                                                                                                                                                                                                              modes: ['node-property:height:dimArray'],
                                                                                                                                                                                                                                              duration:1500,
                                                                                                                                                                                                                                              onComplete: function() {
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11361..11369

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 52.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                      createLevelDistanceFunc: function(){
                                                                                                                                                                                                                                        var ld = this.config.levelDistance;
                                                                                                                                                                                                                                        return function(elem){
                                                                                                                                                                                                                                          return (elem._depth + 1) * ld;
                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11946..11951

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 51.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                           if(node.drawn) {
                                                                                                                                                                                                                                             !animating && opt.onBeforePlotNode(node);
                                                                                                                                                                                                                                             that.plotNode(node, canvas, animating);
                                                                                                                                                                                                                                             !animating && opt.onAfterPlotNode(node);
                                                                                                                                                                                                                                           }
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 7126..7130

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                            var s = (this.config.multitree 
                                                                                                                                                                                                                                                    && ('$orn' in node.data) 
                                                                                                                                                                                                                                                    && node.data.$orn) || this.config.orientation;
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9466..9468

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 51.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                              if(n.hovered && !n.selected) {
                                                                                                                                                                                                                                                for(var s in nStyles) {
                                                                                                                                                                                                                                                  n.setData(s, n.styles['$' + s], 'end');
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                delete n.hovered;
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 2548..2553

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 51.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                             if(!!nodeTo.visited === T && node.drawn && nodeTo.drawn) {
                                                                                                                                                                                                                                               !animating && opt.onBeforePlotLine(adj);
                                                                                                                                                                                                                                               that.plotLine(adj, canvas, animating);
                                                                                                                                                                                                                                               !animating && opt.onAfterPlotLine(adj);
                                                                                                                                                                                                                                             }
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 7132..7136

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                            var s = (this.config.multitree 
                                                                                                                                                                                                                                                    && ('$orn' in node.data) 
                                                                                                                                                                                                                                                    && node.data.$orn) || this.config.orientation;
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9500..9502

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 51.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                            if(n.selected) {
                                                                                                                                                                                                                                              for(var s in nStyles) {
                                                                                                                                                                                                                                                n.setData(s, n.styles['$' + s], 'end');
                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                              delete n.selected;
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 2589..2594

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                      createLevelDistanceFunc: function() {
                                                                                                                                                                                                                                        var ld = this.config.levelDistance;
                                                                                                                                                                                                                                        return function(elem) {
                                                                                                                                                                                                                                          return (elem._depth + 1) * ld;
                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15936..15941

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                              var colorGrad = $.rgbToHex($.map($.hexToRgb(color), 
                                                                                                                                                                                                                                                  function(r) { return r * 0.2 >> 0; }));
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 14269..14270

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 49.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                            subnodes.sort(function(a, b) {
                                                                                                                                                                                                                                              return (a.dist >= b.dist) - (a.dist <= b.dist);
                                                                                                                                                                                                                                            });
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9250..9250

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 49.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                                        step: function() { that.removeNode(n.shift(), { type: 'nothing' });  viz.labels.clearLabels(); },
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 5504..5504

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 49.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                                        step: function() { that.removeEdge(v.shift(), { type: 'nothing' }); viz.labels.clearLabels(); },
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 5401..5401

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 49.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                            var colorGrad = $.rgbToHex($.map($.hexToRgb(color), 
                                                                                                                                                                                                                                                function(r) { return r * 0.3 >> 0; }));
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15737..15738

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 49.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                          this.nodeHelper.circle.render('fill', {x:pos.x+dim2, y:pos.y+dim2}, dim2, canvas);
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9831..9831

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 49.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                          this.nodeHelper.square.render('fill', {x:pos.x+dim2, y:pos.y+dim2}, dim2, canvas);
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 9817..9817

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 49.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                            nodes.sort(function(a, b) { return (a._depth <= b._depth) - (a._depth >= b._depth); });
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11740..11742

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 49.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                        var root = {
                                                                                                                                                                                                                                          'id': prefix + '$root',
                                                                                                                                                                                                                                          'name': '',
                                                                                                                                                                                                                                          'data': {
                                                                                                                                                                                                                                            '$type': 'none',
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 40 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10397..10406
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11345..11354

                                                                                                                                                                                                                                    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

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

                                                                                                                                                                                                                                        var root = {
                                                                                                                                                                                                                                          'id': prefix + '$root',
                                                                                                                                                                                                                                          'name': '',
                                                                                                                                                                                                                                          'data': {
                                                                                                                                                                                                                                            '$type': 'none',
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 40 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10397..10406
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12848..12857

                                                                                                                                                                                                                                    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

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

                                                                                                                                                                                                                                        var root = {
                                                                                                                                                                                                                                          'id': prefix + '$root',
                                                                                                                                                                                                                                          'name': '',
                                                                                                                                                                                                                                          'data': {
                                                                                                                                                                                                                                            '$type': 'none',
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 40 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11345..11354
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 12848..12857

                                                                                                                                                                                                                                    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

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

                                                                                                                                                                                                                                       for(i=0; i<l; i++) {
                                                                                                                                                                                                                                         ch[i]._area = parentArea * chArea[i] / totalChArea;
                                                                                                                                                                                                                                       }
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 13489..13491

                                                                                                                                                                                                                                    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

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

                                                                                                                                                                                                                                          for(i=0; i<l; i++) {
                                                                                                                                                                                                                                            ch[i]._area = parentArea * chArea[i] / totalChArea;
                                                                                                                                                                                                                                          }
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 13335..13337

                                                                                                                                                                                                                                    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

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

                                                                                                                                                                                                                                              that.fx.animate({
                                                                                                                                                                                                                                                duration: 500,
                                                                                                                                                                                                                                                modes:['node-property:alpha'],
                                                                                                                                                                                                                                                onComplete: function() {
                                                                                                                                                                                                                                                  callback.onComplete();
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 13941..13947

                                                                                                                                                                                                                                    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

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

                                                                                                                                                                                                                                              that.fx.animate({
                                                                                                                                                                                                                                                duration: 500,
                                                                                                                                                                                                                                                modes:['node-property:alpha'],
                                                                                                                                                                                                                                                onComplete: function() {
                                                                                                                                                                                                                                                  callback.onComplete();
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15342..15348

                                                                                                                                                                                                                                    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

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

                                                                                                                                                                                                                                            var nlbs = {
                                                                                                                                                                                                                                              wrapper: document.createElement('div'),
                                                                                                                                                                                                                                              aggregate: document.createElement('div'),
                                                                                                                                                                                                                                              label: document.createElement('div')
                                                                                                                                                                                                                                            };
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 10261..10265

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                              var nlbs = {
                                                                                                                                                                                                                                                wrapper: document.createElement('div'),
                                                                                                                                                                                                                                                aggregate: document.createElement('div'),
                                                                                                                                                                                                                                                label: document.createElement('div')
                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11193..11197

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 47.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                        if(this.config.panning == 'avoid nodes' && (this.dom? this.isLabel(e, win) : eventInfo.getNode())) return;
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 2647..2647

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                            var b = (p2.x * sq1 - p1.x * sq2 + p2.x - p1.x) / bDen;
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 6543..6543

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                    var Complex = function(x, y) {
                                                                                                                                                                                                                                      this.x = x || 0;
                                                                                                                                                                                                                                      this.y = y || 0;
                                                                                                                                                                                                                                    };
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 3217..3220

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                    var Polar = function(theta, rho) {
                                                                                                                                                                                                                                      this.theta = theta || 0;
                                                                                                                                                                                                                                      this.rho = rho || 0;
                                                                                                                                                                                                                                    };
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 3543..3546

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                            var a = (p1.y * sq2 - p2.y * sq1 + p1.y - p2.y) / aDen;
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 6544..6544

                                                                                                                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                    This issue has a mass of 47.

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

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

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

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

                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                    Further Reading

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

                                                                                                                                                                                                                                        if(this.config.panning == 'avoid nodes' && (this.dom? this.isLabel(e, win) : eventInfo.getNode())) return;
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 2630..2630

                                                                                                                                                                                                                                    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(!this.leaf(node) && !this.config.titleHeight) {
                                                                                                                                                                                                                                          tag.style.display = 'none';
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15681..15683

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        if(!this.leaf(node) && !this.config.titleHeight) {
                                                                                                                                                                                                                                          tag.style.display = 'none';
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15618..15620

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                          $.each(n.getData('valueArray'), function(v) {
                                                                                                                                                                                                                                            acum += +v;
                                                                                                                                                                                                                                            animateValue.push(1);
                                                                                                                                                                                                                                          });
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 11563..11566

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                            ctx.fillRect(pos.x + offst / 2, pos.y + offst / 2, width - offst,
                                                                                                                                                                                                                                                titleHeight - offst);
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15756..15757

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                          $.each(n.getData('valueArray'), function(v) {
                                                                                                                                                                                                                                            acum += +v;
                                                                                                                                                                                                                                            animateValue.push(0);
                                                                                                                                                                                                                                          });
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 13021..13024

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                              ctx.strokeRect(pos.x + offst / 2, pos.y + offst / 2, width - offst,
                                                                                                                                                                                                                                                  height - offst);
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 15751..15752

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                                          for(var prop in (adj.data || {})) {
                                                                                                                                                                                                                                                            addedAdj.data[prop] = adj.data[prop];
                                                                                                                                                                                                                                                          }
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 5684..5686

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        if(this.dom) {
                                                                                                                                                                                                                                          if(label = this.isLabel(e, win)) {
                                                                                                                                                                                                                                            this.pressed = this.viz.graph.getNode(label.id);
                                                                                                                                                                                                                                          }
                                                                                                                                                                                                                                        } else {
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 2264..2268

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        if(this.dom && (label = this.isLabel(e, win))) {
                                                                                                                                                                                                                                          this.touched = this.viz.graph.getNode(label.id);
                                                                                                                                                                                                                                        } else {
                                                                                                                                                                                                                                          this.touched = event.getNode() || (this.config.enableForEdges && event.getEdge());
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 2252..2258

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        add: function(polar) {
                                                                                                                                                                                                                                            return new Polar(this.theta + polar.theta, this.rho + polar.rho);
                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 3705..3707

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                                        for(var prop in (elem.data || {})) {
                                                                                                                                                                                                                                                          addedNode.data[prop] = elem.data[prop];
                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 5676..5678

                                                                                                                                                                                                                                    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

                                                                                                                                                                                                                                        add: function(pos) {
                                                                                                                                                                                                                                            return new Complex(this.x + pos.x, this.y + pos.y);
                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                    app/assets/javascripts/jit-2.0.1.js on lines 3350..3352

                                                                                                                                                                                                                                    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