sicambria/skilltree

View on GitHub
new design/draft_create_skill_modal_design/user/chartandtree.js

Summary

Maintainability
F
1 mo
Test Coverage

File chartandtree.js has 868 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var data = undefined;
initData();

// creates the pixi app
var app = new PIXI.Application({
Severity: Major
Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 2 days to fix

    Function editMySkill has 149 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function editMySkill () {
        var modal = document.getElementById("newSkillModal");
        modal.style.display = "block";
    
        var span = document.getElementById("closeSkillModal");
    Severity: Major
    Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 5 hrs to fix

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

      function editMyTree () {
          hideAll();
      
          var treeName = document.getElementById("treeName");
          treeName.setAttribute('list', 'TreeSearchResult');
      Severity: Minor
      Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 5 hrs to fix

      Cognitive Complexity

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

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

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

      Further reading

      Function editTree has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
      Open

      function editTree () {
          hideAll();
      
          var treeName = document.getElementById("treeName");
          treeName.setAttribute('list', 'TreeSearchResult');
      Severity: Minor
      Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 4 hrs to fix

      Cognitive Complexity

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

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

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

      Further reading

      Function editTree has 112 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function editTree () {
          hideAll();
      
          var treeName = document.getElementById("treeName");
          treeName.setAttribute('list', 'TreeSearchResult');
      Severity: Major
      Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 4 hrs to fix

        Function editMyTree has 109 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function editMyTree () {
            hideAll();
        
            var treeName = document.getElementById("treeName");
            treeName.setAttribute('list', 'TreeSearchResult');
        Severity: Major
        Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 4 hrs to fix

          Function createTree has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
          Open

          function createTree () {
              hideAll();
          
              var treeName = document.getElementById("treeName");
              treeName.setAttribute('list', '');
          Severity: Minor
          Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 4 hrs to fix

          Cognitive Complexity

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

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

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

          Further reading

          Function createTree has 95 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function createTree () {
              hideAll();
          
              var treeName = document.getElementById("treeName");
              treeName.setAttribute('list', '');
          Severity: Major
          Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 3 hrs to fix

            Function onclick has 75 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                loadSkill.onclick =function(){
                    //request for the skill to load data from
                    var skillname = document.getElementById('newSkillName').value;
            
                    skillData = {
            Severity: Major
            Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 3 hrs to fix

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

              function createSkill () {
                  var modal = document.getElementById("newSkillModal");
                  modal.style.display = "block";
              
                  var span = document.getElementById("closeSkillModal");
              Severity: Major
              Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 2 hrs to fix

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

                function addTraining () {
                    var modal = document.getElementById("addTrainingModal");
                    modal.style.display = "block";
                
                    var span = document.getElementById("closeTrainingModal");
                Severity: Major
                Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 2 hrs to fix

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

                      save.onclick = function () {
                          var pointsTable = document.getElementById('pointsTable');
                          var pointsNum = pointsTable.rows.length - 1;
                          var pointDescription = [];
                          for (i = 1; i < pointsNum + 1; ++i) pointDescription.push(pointsTable.rows[i].cells[1].children[0].value);
                  Severity: Minor
                  Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 1 hr to fix

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

                        save.onclick = function () {
                            var pointsTable = document.getElementById('pointsTable');
                            var pointsNum = pointsTable.rows.length - 1;
                            var pointDescription = [];
                            for (i = 1; i < pointsNum + 1; ++i) pointDescription.push(pointsTable.rows[i].cells[1].children[0].value);
                    Severity: Minor
                    Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 1 hr to fix

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

                          save.onclick = function () {
                              var trainingsTable = document.getElementById('addTrainingsTable');
                              var trainings = [];
                              for (i = 1; i < trainingsTable.rows.length; ++i) {
                                  trainings.push({
                      Severity: Minor
                      Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 1 hr to fix

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

                            addBtn.onclick = function () {
                                var skill = {value: document.getElementById('skillSearchTree').value};
                        
                                request('POST', '/protected/getskill', skill, function() {
                                    if(this.readyState == 4 && this.status == 200) {
                        Severity: Minor
                        Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 1 hr to fix

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

                              addBtn.onclick = function () {
                                  var skill = {value: document.getElementById('skillSearchTree').value};
                          
                                  request('POST', '/protected/getskill', skill, function() {
                                      if(this.readyState == 4 && this.status == 200) {
                          Severity: Minor
                          Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 1 hr to fix

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

                                addBtn.onclick = function () {
                                    var skill = {value: document.getElementById('skillSearchTree').value};
                            
                                    request('POST', '/protected/getskill', skill, function() {
                                        if(this.readyState == 4 && this.status == 200) {
                            Severity: Minor
                            Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 1 hr to fix

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

                              function approveSkills() {
                                  hideAll();
                              
                                  var approveSkills = document.getElementById("approveSkills");
                              
                              
                              Severity: Minor
                              Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 1 hr to fix

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

                                function approveTrainings () {
                                    hideAll();
                                
                                    var approveTrees = document.getElementById("approveTrainings");
                                    approveTrees.style.display = "block";
                                Severity: Minor
                                Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 1 hr to fix

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

                                  function createSkill () {
                                      var modal = document.getElementById("newSkillModal");
                                      modal.style.display = "block";
                                  
                                      var span = document.getElementById("closeSkillModal");
                                  Severity: Minor
                                  Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 55 mins to fix

                                  Cognitive Complexity

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

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

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

                                  Further reading

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

                                  function editMySkill () {
                                      var modal = document.getElementById("newSkillModal");
                                      modal.style.display = "block";
                                  
                                      var span = document.getElementById("closeSkillModal");
                                  Severity: Minor
                                  Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 55 mins to fix

                                  Cognitive Complexity

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

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

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

                                  Further reading

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

                                  function getChildren (skills, skill, children) {
                                      var temp = [];
                                      for (var i = 0; skill.children != undefined && i < skill.children.length; ++i) {
                                          var child = skills.find(obj => obj.name == skill.children[i].name);
                                  
                                  
                                  Severity: Minor
                                  Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

                                  Cognitive Complexity

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

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

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

                                  Further reading

                                  Avoid deeply nested control flow statements.
                                  Open

                                                              if(this.response!=null)
                                                              for(var i=0;i<this.response.length;i++)
                                                              {
                                                                  addRow("parentsTable");
                                  
                                  
                                  Severity: Major
                                  Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                if(this.response!=null)
                                                                for(var i=0;i<this.response.length;i++)
                                                                {
                                                                    addRow("trainingsTable");
                                    
                                    
                                    Severity: Major
                                    Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                  if (confirm(text)) {
                                                                      skillsToAdd.push(this.response.skill);
                                                                      var option = document.createElement("option");
                                                                      option.text = this.response.skill.name;
                                                                      skillList.add(option);
                                      Severity: Major
                                      Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                    for (var i = 0; i < this.response.dependency.length; ++i) {
                                                                        text += this.response.dependency[i].name + "\n";
                                                                    }
                                        Severity: Major
                                        Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                                      if (confirm(text)) {
                                                                          skillsToAdd.push(this.response.skill);
                                                                          var option = document.createElement("option");
                                                                          option.text = this.response.skill.name;
                                                                          skillList.add(option);
                                          Severity: Major
                                          Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                    if (skillList.options[j].text == children[i].name) skillList.remove(j);
                                            Severity: Major
                                            Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                      if (skillList.options[j].text == children[i].name) skillList.remove(j);
                                              Severity: Major
                                              Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                            for (var i = 0; i < this.response.dependency.length; ++i) {
                                                                                text += this.response.dependency[i].name + "\n";
                                                                            }
                                                Severity: Major
                                                Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                              for (var i = 0; i < this.response.dependency.length; ++i) {
                                                                                  text += this.response.dependency[i].name + "\n";
                                                                              }
                                                  Severity: Major
                                                  Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                                                if (confirm(text)) {
                                                                                    skillsToAdd.push(this.response.skill);
                                                                                    var option = document.createElement("option");
                                                                                    option.text = this.response.skill.name;
                                                                                    skillList.add(option);
                                                    Severity: Major
                                                    Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                              if (skillList.options[j].text == children[i].name) skillList.remove(j);
                                                      Severity: Major
                                                      Found in new design/draft_create_skill_modal_design/user/chartandtree.js - About 45 mins to fix

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

                                                            save.onclick = function () {
                                                                var pointsTable = document.getElementById('pointsTable');
                                                                var pointsNum = pointsTable.rows.length - 1;
                                                                var pointDescription = [];
                                                                for (i = 1; i < pointsNum + 1; ++i) pointDescription.push(pointsTable.rows[i].cells[1].children[0].value);
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 461..522

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 750.

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

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

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                            save.onclick = function () {
                                                                var pointsTable = document.getElementById('pointsTable');
                                                                var pointsNum = pointsTable.rows.length - 1;
                                                                var pointDescription = [];
                                                                for (i = 1; i < pointsNum + 1; ++i) pointDescription.push(pointsTable.rows[i].cells[1].children[0].value);
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 252..312

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 750.

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

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

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                            addBtn.onclick = function () {
                                                                var skill = {value: document.getElementById('skillSearchTree').value};
                                                        
                                                                request('POST', '/protected/getskill', skill, function() {
                                                                    if(this.readyState == 4 && this.status == 200) {
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 547..583
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 704..740

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 558.

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

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

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                            addBtn.onclick = function () {
                                                                var skill = {value: document.getElementById('skillSearchTree').value};
                                                        
                                                                request('POST', '/protected/getskill', skill, function() {
                                                                    if(this.readyState == 4 && this.status == 200) {
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 547..583
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 835..871

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 558.

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

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

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                            addBtn.onclick = function () {
                                                                var skill = {value: document.getElementById('skillSearchTree').value};
                                                        
                                                                request('POST', '/protected/getskill', skill, function() {
                                                                    if(this.readyState == 4 && this.status == 200) {
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 704..740
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 835..871

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 558.

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

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

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                            deleteBtn.onclick = function () {
                                                                var children = [];
                                                                getChildren(skillsToAdd, skillsToAdd.find(obj => obj.name == skillList.options[skillList.selectedIndex].text), children);
                                                        
                                                                if (children.length == 0) {
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 589..612
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 746..769

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 400.

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

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

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                            deleteBtn.onclick = function () {
                                                                var children = [];
                                                                getChildren(skillsToAdd, skillsToAdd.find(obj => obj.name == skillList.options[skillList.selectedIndex].text), children);
                                                        
                                                                if (children.length == 0) {
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 746..769
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 877..900

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 400.

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

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

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                            deleteBtn.onclick = function () {
                                                                var children = [];
                                                                getChildren(skillsToAdd, skillsToAdd.find(obj => obj.name == skillList.options[skillList.selectedIndex].text), children);
                                                        
                                                                if (children.length == 0) {
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 589..612
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 877..900

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 400.

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

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

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

                                                        See codeclimate-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

                                                        window.onresize = function () {
                                                            app.renderer.resize(window.innerWidth, window.innerHeight - 60);
                                                        
                                                            if (chartContainer != undefined) {
                                                                var ratio = chartContainer.width / chartContainer.height;
                                                        new design/draft_offers_modal_design/user/chartandtree.js on lines 111..132
                                                        public/user/chartandtree.js on lines 103..124

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 315.

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

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

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

                                                        See codeclimate-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

                                                            createBtn.onclick = function () {
                                                                if (document.getElementById('treeName').value.length > 0) {
                                                                    if (skillsToAdd.length > 0) {
                                                                        for (var i = 0; i < skillsToAdd.length; ++i) {
                                                                            delete skillsToAdd[i].itemcontainer;
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 903..923

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 227.

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

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

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

                                                        See codeclimate-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

                                                            createBtn.onclick = function () {
                                                                if (document.getElementById('treeName').value.length > 0) {
                                                                    if (skillsToAdd.length > 0) {
                                                                        for (var i = 0; i < skillsToAdd.length; ++i) {
                                                                            delete skillsToAdd[i].itemcontainer;
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 772..792

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 227.

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

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

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                        function getChildren (skills, skill, children) {
                                                            var temp = [];
                                                            for (var i = 0; skill.children != undefined && i < skill.children.length; ++i) {
                                                                var child = skills.find(obj => obj.name == skill.children[i].name);
                                                        
                                                        
                                                        new design/draft_offers_modal_design/user/chartandtree.js on lines 942..956

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 212.

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

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

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                        function addTreeToUser(treeToAdd){
                                                          request('POST', '/protected/addTreeToUser', treeToAdd, function() {
                                                              if (this.readyState == 4 && this.status == 200) {
                                                                if (this.response.success){
                                                                  var forest = document.getElementById("treeList");
                                                        new design/draft_offers_modal_design/user/chartandtree.js on lines 51..67

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 199.

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

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

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

                                                        See codeclimate-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 searchUserSkillsByName(element){
                                                            var skillToSearch = {value: element.value};
                                                            var skillSearchResult = document.getElementById('skillSearchResult');
                                                            request('POST', '/protected/searchUserSkillsByName', skillToSearch, function () {
                                                                if (this.readyState == 4 && this.status == 200) {
                                                        new design/draft_offers_modal_design/user/chartandtree.js on lines 35..48

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 179.

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

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

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                        function addCheckBox(id, boxText, parent){
                                                          var divToAdd = document.createElement('div');
                                                          divToAdd.className = "advSearchDetailsItem";
                                                          var spanToAdd = document.createElement('span');
                                                          var boxToAdd = document.createElement('input');
                                                        new design/draft_offers_modal_design/user/chartandtree.js on lines 1081..1092
                                                        public/user/chartandtree.js on lines 1082..1093

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 143.

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

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

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

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

                                                        Refactorings

                                                        Further Reading

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

                                                        function request (type, url, sendData, callback) {
                                                            var req = new XMLHttpRequest();
                                                            req.open(type, url, true);
                                                            req.setRequestHeader('Content-type', 'application/json');
                                                            req.setRequestHeader('x-access-token', localStorage.getItem("loginToken"));
                                                        new design/draft_offers_modal_design/user/chartandtree.js on lines 1145..1157

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 127.

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

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

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                        function parseJwt (token) {
                                                            var base64Url = token.split('.')[1];
                                                            var base64 = base64Url.replace('-', '+').replace('_', '/');
                                                            return JSON.parse(window.atob(base64));
                                                        }
                                                        new design/draft_offers_modal_design/user/chartandtree.js on lines 1124..1128

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 74.

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

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

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

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

                                                        Refactorings

                                                        Further Reading

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

                                                        Array.prototype.sum = function (prop) {
                                                            var total = 0;
                                                        
                                                            for (var i = 0; i < this.length; ++i) {
                                                                total += this[i][prop];
                                                        new design/draft_offers_modal_design/user/chartandtree.js on lines 1130..1138

                                                        Duplicated Code

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

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

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

                                                        Tuning

                                                        This issue has a mass of 73.

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

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

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

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

                                                        Refactorings

                                                        Further Reading

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

                                                        var app = new PIXI.Application({
                                                                view: pixiCanvas,
                                                                width: window.innerWidth,
                                                                height: window.innerHeight - 60,
                                                                //backgroundColor: 0x000000,
                                                        new design/draft_offers_modal_design/user/chartandtree.js on lines 6..15
                                                        public/user/chartandtree.js on lines 5..14

                                                        Duplicated Code

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

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

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 3 locations. Consider refactoring.
                                                        Open

                                                        function dropoffers() {
                                                            request('POST', '/admin/dropoffers', {} , function () {
                                                                if (this.readyState == 4 && this.status == 200) {
                                                                    window.open("/user/", "_self");
                                                                }
                                                        new design/draft_offers_modal_design/user/chartandtree.js on lines 1095..1101
                                                        public/user/chartandtree.js on lines 1096..1102

                                                        Duplicated Code

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

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

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 3 locations. Consider refactoring.
                                                        Open

                                                        function deleteRow(table, row) {
                                                          var i = row.parentNode.parentNode.rowIndex;
                                                          document.getElementById(table).deleteRow(i);
                                                        }
                                                        new design/draft_offers_modal_design/user/chartandtree.js on lines 686..689
                                                        public/user/chartandtree.js on lines 678..681

                                                        Duplicated Code

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

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

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 9 locations. Consider refactoring.
                                                        Open

                                                                                        parentsTable.rows[i+1].cells[0].children[0].value = this.response[i].name;
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 401..401
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 419..419
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 420..420
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 421..421
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 422..422
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 423..423
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 424..424
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 425..425

                                                        Duplicated Code

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

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

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 9 locations. Consider refactoring.
                                                        Open

                                                                                        trainingsTable.rows[i+1].cells[6].children[0].value = this.response[i].language;
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 400..400
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 401..401
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 419..419
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 420..420
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 421..421
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 422..422
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 423..423
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 424..424

                                                        Duplicated Code

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

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

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 9 locations. Consider refactoring.
                                                        Open

                                                                                        trainingsTable.rows[i+1].cells[5].children[0].value = this.response[i].length;
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 400..400
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 401..401
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 419..419
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 420..420
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 421..421
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 422..422
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 423..423
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 425..425

                                                        Duplicated Code

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

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

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 9 locations. Consider refactoring.
                                                        Open

                                                                                        trainingsTable.rows[i+1].cells[3].children[0].value = this.response[i].URL;
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 400..400
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 401..401
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 419..419
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 420..420
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 421..421
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 423..423
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 424..424
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 425..425

                                                        Duplicated Code

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

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

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 9 locations. Consider refactoring.
                                                        Open

                                                                                        trainingsTable.rows[i+1].cells[4].children[0].value = this.response[i].goal;
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 400..400
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 401..401
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 419..419
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 420..420
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 421..421
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 422..422
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 424..424
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 425..425

                                                        Duplicated Code

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

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

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 9 locations. Consider refactoring.
                                                        Open

                                                                                        trainingsTable.rows[i+1].cells[2].children[0].value = this.response[i].shortDescription;
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 400..400
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 401..401
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 419..419
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 420..420
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 422..422
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 423..423
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 424..424
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 425..425

                                                        Duplicated Code

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

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

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 9 locations. Consider refactoring.
                                                        Open

                                                                                        parentsTable.rows[i+1].cells[1].children[0].value = this.response[i].minPoint;
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 400..400
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 419..419
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 420..420
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 421..421
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 422..422
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 423..423
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 424..424
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 425..425

                                                        Duplicated Code

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

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

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 9 locations. Consider refactoring.
                                                        Open

                                                                                        trainingsTable.rows[i+1].cells[0].children[0].value = this.response[i].name;
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 400..400
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 401..401
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 420..420
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 421..421
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 422..422
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 423..423
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 424..424
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 425..425

                                                        Duplicated Code

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

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

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 9 locations. Consider refactoring.
                                                        Open

                                                                                        trainingsTable.rows[i+1].cells[1].children[0].value = this.response[i].level;
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 400..400
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 401..401
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 419..419
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 421..421
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 422..422
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 423..423
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 424..424
                                                        new design/draft_create_skill_modal_design/user/chartandtree.js on lines 425..425

                                                        Duplicated Code

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

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

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                                                        There are no issues that match your filters.

                                                        Category
                                                        Status