LearnPAd/learnpad

View on GitHub
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/ux/superbox/SuperBoxSelect.js

Summary

Maintainability
F
2 wks
Test Coverage

File SuperBoxSelect.js has 1483 lines of code (exceeds 250 allowed). Consider refactoring.
Open

Ext.namespace('Ext.ux.form');
/**
 * <p>SuperBoxSelect is an extension of the ComboBox component that displays selected items as labelled boxes within the form field. As seen on facebook, hotmail and other sites.</p>
 * 
 * @author <a href="mailto:dan.humphrey@technomedia.co.uk">Dan Humphrey</a>

    Function onKeyDownHandler has a Cognitive Complexity of 125 (exceeds 5 allowed). Consider refactoring.
    Open

        onKeyDownHandler : function(e,t) {
                    
            var toDestroy,nextFocus,idx;
            
            if(e.getKey() === e.ESC){

    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

    SuperBoxSelect has 63 functions (exceeds 20 allowed). Consider refactoring.
    Open

    Ext.ux.form.SuperBoxSelect = Ext.extend(Ext.ux.form.SuperBoxSelect,Ext.form.ComboBox,{
        /**
         * @cfg {Boolean} addNewDataOnBlur Allows adding new items when the user tabs from the input element.
         */
        addNewDataOnBlur : false,

      Function onKeyDownHandler has 183 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          onKeyDownHandler : function(e,t) {
                      
              var toDestroy,nextFocus,idx;
              
              if(e.getKey() === e.ESC){

        Function doQuery has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
        Open

            doQuery : function(q, forceAll,valuesQuery, forcedAdd){
                q = Ext.isEmpty(q) ? '' : q;
                if(this.queryFilterRe){
                    this.filteredQueryData = '';
                    var m = q.match(this.queryFilterRe);

        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 addItemBox has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
        Open

            addItemBox : function(itemVal,itemDisplay,itemCaption, itemClass, itemStyle) {
                var hConfig, parseStyle = function(s){
                    var ret = '';
                    switch(typeof s){
                        case 'function' :

        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 onStoreLoad has 68 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            onStoreLoad : function(store, records, options){
                //accomodating for bug in Ext 3.0.0 where options.params are empty
                var q = options.params[this.queryParam] || store.baseParams[this.queryParam] || "",
                    isValuesQuery = options.params[this.queryValuesIndicator] || store.baseParams[this.queryValuesIndicator];
                

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

              addItemBox : function(itemVal,itemDisplay,itemCaption, itemClass, itemStyle) {
                  var hConfig, parseStyle = function(s){
                      var ret = '';
                      switch(typeof s){
                          case 'function' :

            Function markInvalid has 62 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                markInvalid : function(msg) {
                    var elp, t;
            
                    if (!this.rendered || this.preventMark ) {
                        return;

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

                  setupKeyMap : function(){
                      this.keyMap = new Ext.KeyMap(this.lnk, [
                          {
                              key: [
                                  Ext.EventObject.BACKSPACE, 

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

                    doQuery : function(q, forceAll,valuesQuery, forcedAdd){
                        q = Ext.isEmpty(q) ? '' : q;
                        if(this.queryFilterRe){
                            this.filteredQueryData = '';
                            var m = q.match(this.queryFilterRe);

                  Function markInvalid has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                      markInvalid : function(msg) {
                          var elp, t;
                  
                          if (!this.rendered || this.preventMark ) {
                              return;

                  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 initEvents has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      initEvents : function() {
                          var el = this.el;
                          el.on({
                              click   : this.onClick,
                              focus   : this.clearCurrentFocus,

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

                        onRender : function(ct, position){
                            
                            Ext.ux.form.SuperBoxSelectItem.superclass.onRender.call(this, ct, position);
                            
                            var el = this.el;

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

                          clearInvalid : function(){
                              if(!this.rendered || this.preventMark){ // not rendered
                                  return;
                              }
                              this.outerWrapEl.removeClass(this.invalidClass);

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

                            initComponent:function() {
                               Ext.apply(this, {
                                    items            : new Ext.util.MixedCollection(false),
                                    usedRecords      : new Ext.util.MixedCollection(false),
                                    addedRecords     : [],

                          Function initEvents has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                          Open

                              initEvents : function() {
                                  var el = this.el;
                                  el.on({
                                      click   : this.onClick,
                                      focus   : this.clearCurrentFocus,

                          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 doTransform has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                          Open

                              doTransform : function() {
                                  var s = Ext.getDom(this.transform), transformValues = [];
                                      if(!this.store){
                                          this.mode = 'local';
                                          var d = [], opts = s.options;

                          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 doTransform has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              doTransform : function() {
                                  var s = Ext.getDom(this.transform), transformValues = [];
                                      if(!this.store){
                                          this.mode = 'local';
                                          var d = [], opts = s.options;

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

                                onRender : function(ct, position){
                                    
                                    Ext.ux.form.SuperBoxSelectItem.superclass.onRender.call(this, ct, position);
                                    
                                    var el = this.el;

                            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 initButtonEvents has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                            Open

                                initButtonEvents : function() {
                                    this.buttonClear.addClassOnOver('x-superboxselect-btn-over').on('click', function(e) {
                                        e.stopEvent();
                                        if (this.disabled) {
                                            return;

                            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 autoSize has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                autoSize : function(){
                                    if(!this.rendered){
                                        return this;
                                    }
                                    if(!this.metrics){

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

                                  onSelect : function(record, index) {
                                      if (this.fireEvent('beforeselect', this, record, index) !== false){
                                          var val = record.data[this.valueField];
                                          
                                          if(this.preventDuplicates && this.hasValue(val)){

                              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 onStoreLoad has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  onStoreLoad : function(store, records, options){
                                      //accomodating for bug in Ext 3.0.0 where options.params are empty
                                      var q = options.params[this.queryParam] || store.baseParams[this.queryParam] || "",
                                          isValuesQuery = options.params[this.queryValuesIndicator] || store.baseParams[this.queryValuesIndicator];
                                      

                              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 onResize has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  onResize : function(w, h, rw, rh) {
                                      var reduce = Ext.isIE6 ? 4 : Ext.isIE7 ? 1 : Ext.isIE8 ? 1 : 0;
                                      if(this.wrapEl){
                                          this._width = w;
                                          this.outerWrapEl.setWidth(w - reduce);

                              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.navigateItemsWithTab){
                                                          it.onElClick();
                                                      }else{
                                                          this.on('expand',function(){
                                                              this.collapse();

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

                                    setupFormInterception : function(){
                                        var form;
                                        this.findParentBy(function(p){ 
                                            if(p.getForm){
                                                form = p.getForm();

                                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.currentFocus){
                                                            this.currentFocus.onLnkFocus();
                                                        }

                                  Consider simplifying this complex logical expression.
                                  Open

                                          if (this.editable !== false && (!e.isSpecialKey() || e.getKey() === e.BACKSPACE) && this.itemDelimiterKey.indexOf !== e.getKey()  && (!e.hasModifier() || e.shiftKey)) {
                                              this.lastKey = e.getKey();
                                              this.dqTask.delay(this.queryDelay);
                                          }        

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

                                        addItemBox : function(itemVal,itemDisplay,itemCaption, itemClass, itemStyle) {

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

                                          initComponent:function() {
                                             Ext.apply(this, {
                                                  items            : new Ext.util.MixedCollection(false),
                                                  usedRecords      : new Ext.util.MixedCollection(false),
                                                  addedRecords     : [],

                                      Cognitive Complexity

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

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

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

                                      Further reading

                                      Avoid too many return statements within this function.
                                      Open

                                                  return;

                                        Avoid too many return statements within this function.
                                        Open

                                                        return true;

                                          Avoid too many return statements within this function.
                                          Open

                                                  return true;

                                            Avoid too many return statements within this function.
                                            Open

                                                        return true;

                                              Avoid too many return statements within this function.
                                              Open

                                                          return true;

                                                Avoid too many return statements within this function.
                                                Open

                                                            return;

                                                  Avoid too many return statements within this function.
                                                  Open

                                                                  return;

                                                    Avoid too many return statements within this function.
                                                    Open

                                                                    return true;

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

                                                          autoSize : function(){
                                                              if(!this.rendered){
                                                                  return this;
                                                              }
                                                              if(!this.metrics){

                                                      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 clearInvalid has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                          clearInvalid : function(){
                                                              if(!this.rendered || this.preventMark){ // not rendered
                                                                  return;
                                                              }
                                                              this.outerWrapEl.removeClass(this.invalidClass);

                                                      Cognitive Complexity

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

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

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

                                                      Further reading

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

                                                          onDisable: function(){
                                                              Ext.ux.form.SuperBoxSelect.superclass.onDisable.call(this);
                                                              this.items.each(function(item){
                                                                  item.disable();
                                                              });
                                                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/ux/superbox/SuperBoxSelect.js on lines 682..690

                                                      Duplicated Code

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

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

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

                                                      Tuning

                                                      This issue has a mass of 93.

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

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

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

                                                          onEnable: function(){
                                                              Ext.ux.form.SuperBoxSelect.superclass.onEnable.call(this);
                                                              this.items.each(function(item){
                                                                  item.enable();
                                                              });
                                                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/ux/superbox/SuperBoxSelect.js on lines 691..699

                                                      Duplicated Code

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

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

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

                                                      Tuning

                                                      This issue has a mass of 93.

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

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

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

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

                                                      Refactorings

                                                      Further Reading

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

                                                                      if(this.mode == 'local'){
                                                                          this.selectedIndex = -1;
                                                                          if(forceAll){
                                                                              this.store.clearFilter();
                                                                          }else{
                                                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/pkg-forms-debug.js on lines 3748..3762

                                                      Duplicated Code

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

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

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

                                                                  }, {
                                                                      key: [
                                                                          Ext.EventObject.RIGHT,
                                                                          Ext.EventObject.DOWN
                                                                      ],
                                                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/ux/superbox/SuperBoxSelect.js on lines 1800..1806

                                                      Duplicated Code

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

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

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

                                                      Tuning

                                                      This issue has a mass of 52.

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

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

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

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

                                                      Refactorings

                                                      Further Reading

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

                                                                  {
                                                                      key: [Ext.EventObject.LEFT,Ext.EventObject.UP],
                                                                      fn: function(){
                                                                          this.moveFocus('left');
                                                                      },
                                                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/ux/superbox/SuperBoxSelect.js on lines 1790..1799

                                                      Duplicated Code

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

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

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

                                                      Tuning

                                                      This issue has a mass of 52.

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

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

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

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

                                                      Refactorings

                                                      Further Reading

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

                                                              if(this.forceFormValue){
                                                                  this.items.on({
                                                                     add: this.manageNameAttribute,
                                                                     remove: this.manageNameAttribute,
                                                                     clear: this.manageNameAttribute,
                                                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/ux/superbox/SuperBoxSelect.js on lines 1705..1712

                                                      Duplicated Code

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

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

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

                                                      Tuning

                                                      This issue has a mass of 51.

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

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

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

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

                                                      Refactorings

                                                      Further Reading

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

                                                          enableLnkListeners : function() {
                                                              this.lnk.on({
                                                                  click: this.onLnkClick,
                                                                  focus: this.onLnkFocus,
                                                                  blur:  this.onLnkBlur,
                                                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/ux/superbox/SuperBoxSelect.js on lines 234..241

                                                      Duplicated Code

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

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

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

                                                      Tuning

                                                      This issue has a mass of 51.

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

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

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

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

                                                      Refactorings

                                                      Further Reading

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

                                                              this.items.each(function(item){
                                                                  if(item.el.dom === el){
                                                                      ret = item;
                                                                      return false;
                                                                  }
                                                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/pkgs/pkg-forms-debug.js on lines 3560..3565

                                                      Duplicated Code

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

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

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

                                                      Tuning

                                                      This issue has a mass of 50.

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

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

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

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

                                                      Refactorings

                                                      Further Reading

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

                                                                  if(idx < (this.items.getCount() -1)){
                                                                      nextFocus = this.items.itemAt(idx+1);
                                                                  }
                                                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/ux/superbox/SuperBoxSelect.js on lines 828..830

                                                      Duplicated Code

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

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

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

                                                      Tuning

                                                      This issue has a mass of 49.

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

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

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

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

                                                      Refactorings

                                                      Further Reading

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

                                                                      if(idx < (this.items.getCount() -1)){
                                                                          nextFocus = this.items.itemAt(idx+1);
                                                                      }
                                                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/ux/superbox/SuperBoxSelect.js on lines 756..758

                                                      Duplicated Code

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

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

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

                                                      Tuning

                                                      This issue has a mass of 49.

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

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

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

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

                                                      Refactorings

                                                      Further Reading

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

                                                                      if(nextFocus){
                                                                          (function(){
                                                                              nextFocus.onLnkFocus();
                                                                              this.currentFocus = nextFocus;
                                                                          }).defer(200,this);
                                                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/ux/superbox/SuperBoxSelect.js on lines 761..766

                                                      Duplicated Code

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

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

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

                                                      Tuning

                                                      This issue has a mass of 45.

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

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

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

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

                                                      Refactorings

                                                      Further Reading

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

                                                                  if(nextFocus){
                                                                      (function(){
                                                                          nextFocus.onLnkFocus();
                                                                          this.currentFocus = nextFocus;
                                                                      }).defer(200,this);
                                                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/ux/superbox/SuperBoxSelect.js on lines 834..839

                                                      Duplicated Code

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

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

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

                                                      Tuning

                                                      This issue has a mass of 45.

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

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

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

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

                                                      Refactorings

                                                      Further Reading

                                                      There are no issues that match your filters.

                                                      Category
                                                      Status