YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/resources/libraries/jstree.checkbox.js

Summary

Maintainability
F
3 wks
Test Coverage

Function checkbox has 823 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $.jstree.plugins.checkbox = function (options, parent) {
        this.bind = function () {
            parent.bind.call(this);
            this._data.checkbox.uto = false;
            this._data.checkbox.selected = [];
Severity: Major
Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 4 days to fix

    File jstree.checkbox.js has 848 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* {[The file is published on the basis of YetiForce Public License 6.5 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */
    /*globals jQuery, define, exports, require, document */
    (function (factory) {
        'use strict';
        if (typeof define === 'function' && define.amd) {
    Severity: Major
    Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 2 days to fix

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

              this.bind = function () {
                  parent.bind.call(this);
                  this._data.checkbox.uto = false;
                  this._data.checkbox.selected = [];
                  this.element
      Severity: Major
      Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 1 day to fix

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

                this._undetermined = function () {
                    if (this.element === null) {
                        return;
                    }
                    var i,
        Severity: Major
        Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 3 hrs to fix

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

                  this.redraw_node = function (obj, deep, is_callback, force_render) {
                      obj = parent.redraw_node.apply(this, arguments);
                      if (this.get_node(obj).original.type == 'category') {
                          return obj;
                      }
          Severity: Minor
          Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 1 hr to fix

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

                    this.get_top_checked = function (full) {
                        if (this.settings.checkbox.tie_selection) {
                            return this.get_top_selected(full);
                        }
                        var tmp = this.get_checked(true),
            Severity: Minor
            Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 1 hr to fix

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

                      this.uncheck_node = function (obj, e) {
                          if (this.settings.checkbox.tie_selection) {
                              return this.deselect_node(obj, false, e);
                          }
                          var t1, t2, dom;
              Severity: Minor
              Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 1 hr to fix

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

                        this.is_undetermined = function (obj) {
                            obj = this.get_node(obj);
                            var s = this.settings.checkbox.cascade,
                                i,
                                j,
                Severity: Minor
                Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 1 hr to fix

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

                          this.activate_node = function (obj, e) {
                              if ($(e.target).hasClass('jstree-checkbox-disabled')) {
                                  return false;
                              }
                              if (this.get_node(obj).original.type == 'category') {
                  Severity: Minor
                  Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 1 hr to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                            if (tmp && tmp.length) {
                                                                tmp
                                                                    .attr('aria-selected', false)
                                                                    .children('.jstree-anchor')
                                                                    .removeClass(t ? 'jstree-clicked' : 'jstree-checked');
                    Severity: Major
                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                              if (m[dpc[i]].state[t ? 'selected' : 'checked']) {
                                                                  for (k = 0, l = m[dpc[i]].children_d.length; k < l; k++) {
                                                                      m[m[dpc[i]].children_d[k]].state[t ? 'selected' : 'checked'] = true;
                                                                  }
                                                                  this._data[t ? 'core' : 'checkbox'].selected = this._data[
                      Severity: Major
                      Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                                for (i = 0, j = p.children.length; i < j; i++) {
                                                                    c += m[p.children[i]].state[t ? 'selected' : 'checked'];
                                                                }
                        Severity: Major
                        Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                                  if (tmp && tmp.length) {
                                                                      tmp
                                                                          .attr('aria-selected', true)
                                                                          .children('.jstree-anchor')
                                                                          .addClass(t ? 'jstree-clicked' : 'jstree-checked');
                          Severity: Major
                          Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                                    if (c === j) {
                                                                        p.state[t ? 'selected' : 'checked'] = true;
                                                                        this._data[t ? 'core' : 'checkbox'].selected.push(p.id);
                                                                        tmp = this.get_node(p, true);
                                                                        if (tmp && tmp.length) {
                            Severity: Major
                            Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                                      if (tmp && tmp.length) {
                                                                          tmp
                                                                              .attr('aria-selected', true)
                                                                              .children('.jstree-anchor')
                                                                              .addClass(t ? 'jstree-clicked' : 'jstree-checked');
                              Severity: Major
                              Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                        if (tmp && tmp.length) {
                                                                            tmp
                                                                                .attr('aria-selected', true)
                                                                                .children('.jstree-anchor')
                                                                                .addClass(t ? 'jstree-clicked' : 'jstree-checked');
                                Severity: Major
                                Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                                      if (o[tmp2.parents[k]] === undefined && tmp2.parents[k] !== $.jstree.root) {
                                                                          o[tmp2.parents[k]] = true;
                                                                          p.push(tmp2.parents[k]);
                                                                      }
                                  Severity: Major
                                  Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 45 mins to fix

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

                                                                    while (p && p.id !== $.jstree.root && !p.state[t ? 'selected' : 'checked']) {
                                                                        c = 0;
                                                                        for (i = 0, j = p.children.length; i < j; i++) {
                                                                            c += m[p.children[i]].state[t ? 'selected' : 'checked'];
                                                                        }
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 1 day to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 320..339

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 285.

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

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

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

                                                                while (p && p.id !== $.jstree.root && !p.state[t ? 'selected' : 'checked']) {
                                                                    c = 0;
                                                                    for (i = 0, j = p.children.length; i < j; i++) {
                                                                        c += m[p.children[i]].state[t ? 'selected' : 'checked'];
                                                                    }
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 1 day to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 358..377

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 285.

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

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

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

                                                                    while (par && par.id !== $.jstree.root) {
                                                                        c = 0;
                                                                        for (i = 0, j = par.children.length; i < j; i++) {
                                                                            c += m[par.children[i]].state[t ? 'selected' : 'checked'];
                                                                        }
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 1 day to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 134..153

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 257.

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

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

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

                                                                        while (p && p.id !== $.jstree.root) {
                                                                            c = 0;
                                                                            for (i = 0, j = p.children.length; i < j; i++) {
                                                                                c += m[p.children[i]].state[t ? 'selected' : 'checked'];
                                                                            }
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 1 day to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 192..211

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 257.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                                if (
                                                                    !tmp2.state.loaded &&
                                                                    tmp2.original &&
                                                                    tmp2.original.state &&
                                                                    tmp2.original.state.undetermined &&
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 7 hrs to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 459..475

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 194.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                            if (
                                                                tmp.original &&
                                                                tmp.original.state &&
                                                                tmp.original.state.undetermined &&
                                                                tmp.original.state.undetermined === true
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 7 hrs to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 479..496

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 194.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                for (i = 0, j = this._data.checkbox.selected.length; i < j; i++) {
                                                    if (this._model.data[this._data.checkbox.selected[i]]) {
                                                        this._model.data[this._data.checkbox.selected[i]].state.checked = true;
                                                    }
                                                }
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 4 hrs to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 847..851

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 122.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                for (i = 0, j = this._data.checkbox.selected.length; i < j; i++) {
                                                    if (this._model.data[this._data.checkbox.selected[i]]) {
                                                        this._model.data[this._data.checkbox.selected[i]].state.checked = false;
                                                    }
                                                }
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 4 hrs to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 819..823

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 122.

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

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

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

                                                    for (i = 0, j = obj.childNodes.length; i < j; i++) {
                                                        if (
                                                            obj.childNodes[i] &&
                                                            obj.childNodes[i].className &&
                                                            obj.childNodes[i].className.indexOf('jstree-anchor') !== -1
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 2 other locations - About 3 hrs to fix
                                    public_html/layouts/resources/libraries/jstree.category.js on lines 58..67
                                    public_html/layouts/resources/libraries/jstree.edit.js on lines 82..91

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 113.

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

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

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

                                    (function (factory) {
                                        'use strict';
                                        if (typeof define === 'function' && define.amd) {
                                            define('jstree.category', ['jquery', 'jstree'], factory);
                                        } else if (typeof exports === 'object') {
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 2 other locations - About 2 hrs to fix
                                    public_html/layouts/resources/libraries/jstree.category.js on lines 3..298
                                    public_html/layouts/resources/libraries/jstree.edit.js on lines 3..105

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 86.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                if (!obj.state.checkbox_disabled) {
                                                    obj.state.checkbox_disabled = true;
                                                    if (dom && dom.length) {
                                                        dom.children('.jstree-anchor').children('.jstree-checkbox').addClass('jstree-checkbox-disabled');
                                                    }
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 2 hrs to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 673..686

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 83.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                if (obj.state.checkbox_disabled) {
                                                    obj.state.checkbox_disabled = false;
                                                    if (dom && dom.length) {
                                                        dom.children('.jstree-anchor').children('.jstree-checkbox').removeClass('jstree-checkbox-disabled');
                                                    }
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 2 hrs to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 637..650

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 83.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                if ($.isArray(obj)) {
                                                    obj = obj.slice();
                                                    for (t1 = 0, t2 = obj.length; t1 < t2; t1++) {
                                                        this.uncheck_node(obj[t1], e);
                                                    }
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 2 hrs to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 732..738

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 80.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                if ($.isArray(obj)) {
                                                    obj = obj.slice();
                                                    for (t1 = 0, t2 = obj.length; t1 < t2; t1++) {
                                                        this.check_node(obj[t1], e);
                                                    }
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 2 hrs to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 774..780

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 80.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                if ($.isArray(obj)) {
                                                    obj = obj.slice();
                                                    for (t1 = 0, t2 = obj.length; t1 < t2; t1++) {
                                                        this.enable_checkbox(obj[t1]);
                                                    }
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 2 hrs to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 625..631

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 79.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                if ($.isArray(obj)) {
                                                    obj = obj.slice();
                                                    for (t1 = 0, t2 = obj.length; t1 < t2; t1++) {
                                                        this.disable_checkbox(obj[t1]);
                                                    }
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 2 hrs to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 661..667

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 79.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                                if (s.indexOf('down') !== -1 && dom.length) {
                                                                    dom
                                                                        .find('.jstree-anchor')
                                                                        .removeClass(t ? 'jstree-clicked' : 'jstree-checked')
                                                                        .parent()
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 1 hr to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 215..221

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 72.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                                if (s.indexOf('down') !== -1 && dom.length) {
                                                                    dom
                                                                        .find('.jstree-anchor')
                                                                        .addClass(t ? 'jstree-clicked' : 'jstree-checked')
                                                                        .parent()
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 1 hr to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 297..303

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 72.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                                        if (tmp && tmp.original && tmp.original.state && tmp.original.state.undetermined) {
                                                                            tmp.original.state.undetermined = false;
                                                                        }
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 3 other locations - About 1 hr to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 184..186
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 234..236
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 270..272

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 62.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                                        if (tmp && tmp.original && tmp.original.state && tmp.original.state.undetermined) {
                                                                            tmp.original.state.undetermined = false;
                                                                        }
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 3 other locations - About 1 hr to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 184..186
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 234..236
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 259..261

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 62.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                                        if (tmp && tmp.original && tmp.original.state && tmp.original.state.undetermined) {
                                                                            tmp.original.state.undetermined = false;
                                                                        }
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 3 other locations - About 1 hr to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 234..236
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 259..261
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 270..272

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 62.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                                    if (tmp && tmp.original && tmp.original.state && tmp.original.state.undetermined) {
                                                                        tmp.original.state.undetermined = false;
                                                                    }
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 3 other locations - About 1 hr to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 184..186
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 259..261
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 270..272

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 62.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                            this.hide_checkboxes = function () {
                                                this._data.core.themes.checkboxes = false;
                                                this.get_container_ul().addClass('jstree-no-checkboxes');
                                            };
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 1 hr to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 556..559

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 61.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                            this.show_checkboxes = function () {
                                                this._data.core.themes.checkboxes = true;
                                                this.get_container_ul().removeClass('jstree-no-checkboxes');
                                            };
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 1 hr to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 565..568

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 61.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                                        (s.indexOf('down') === -1 ||
                                                                            $.inArray(this._data[t ? 'core' : 'checkbox'].selected[i], obj.children_d) === -1) &&
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 1 hr to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 288..289

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 60.

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

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

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

                                                                        (s.indexOf('up') === -1 ||
                                                                            $.inArray(this._data[t ? 'core' : 'checkbox'].selected[i], obj.parents) === -1)
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 1 hr to fix
                                    public_html/layouts/resources/libraries/jstree.checkbox.js on lines 286..287

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 60.

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

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

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

                                                                    m[dpc[i]].state.checked ||
                                                                    (m[dpc[i]].original && m[dpc[i]].original.state && m[dpc[i]].original.state.checked);
                                    Severity: Major
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 1 hr to fix
                                    public_html/layouts/resources/libraries/jstree.category.js on lines 41..42

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 58.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                                if (m[dpc[i]].state.checked) {
                                                                    this._data.checkbox.selected.push(dpc[i]);
                                                                }
                                    Severity: Minor
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 1 other location - About 45 mins to fix
                                    public_html/layouts/resources/libraries/jstree.category.js on lines 43..45

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 50.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    this._data.checkbox.selected = $.vakata.array_remove_item(this._data.checkbox.selected, obj.id);
                                    Severity: Minor
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js and 2 other locations - About 40 mins to fix
                                    public_html/layouts/resources/libraries/jstree.category.js on lines 157..157
                                    public_html/layouts/resources/libraries/jstree.category.js on lines 258..258

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 48.

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

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

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

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

                                    Refactorings

                                    Further Reading

                                    There are no issues that match your filters.

                                    Category
                                    Status