talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

File DatePicker.js has 518 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * Ext JS Library 3.3.0
 * Copyright(c) 2006-2010 Ext JS, Inc.
 * licensing@extjs.com
 * http://www.extjs.com/license
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/DatePicker.js - About 1 day to fix

    File AbstractTreeStore.js has 518 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * This class shouldn't be created directly use NestedSetStore or AdjacencyListStore instead.
     *
     * @abstract
     */

      Function WindowGroup has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
      Open

      Ext.WindowGroup = function(){
          var list = {};
          var accessList = [];
          var front = null;
      
      
      Severity: Minor
      Found in app/assets/javascripts/ext/src/widgets/WindowManager.js - About 1 day to fix

      Cognitive Complexity

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

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

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

      Further reading

      Function EventObject has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
      Open

      Ext.EventObject = function(){
          var E = Ext.lib.Event,
              clickRe = /(dbl)?click/,
              // safari keypress events for special keys return bad keycodes
              safariKeys = {
      Severity: Minor
      Found in app/assets/javascripts/ext/src/ext-core/src/core/EventManager.js - About 1 day to fix

      Cognitive Complexity

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

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

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

      Further reading

      File prototype-bridge.js has 514 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*!
       * Ext JS Library 3.3.0
       * Copyright(c) 2006-2010 Ext JS, Inc.
       * licensing@extjs.com
       * http://www.extjs.com/license
      Severity: Major
      Found in app/assets/javascripts/ext/src/adapter/prototype-bridge.js - About 1 day to fix

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

            createMenuConfig : function(component, hideOnClick){
                var config = Ext.apply({}, component.initialConfig),
                    group  = component.toggleGroup;
        
                Ext.copyTo(config, component, [
        app/assets/javascripts/ext/src/widgets/layout/ToolbarLayout.js on lines 284..314

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 201.

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

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

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

            createMenuConfig : function(component, hideOnClick){
                var config = Ext.apply({}, component.initialConfig),
                    group  = component.toggleGroup;
        
                Ext.copyTo(config, component, [
        app/assets/javascripts/ext/src/widgets/layout/box/MenuOverflow.js on lines 130..160

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 201.

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

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

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

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

        Refactorings

        Further Reading

        `` has 57 functions (exceeds 20 allowed). Consider refactoring.
        Open

        Ext.extend(Ext.Component, Ext.util.Observable, {
            // Configs below are used for all Components when rendered by FormLayout.
            /**
             * @cfg {String} fieldLabel <p>The label text to display next to this Component (defaults to '').</p>
             * <br><p><b>Note</b>: this config is only used when this Component is rendered by a Container which
        Severity: Major
        Found in app/assets/javascripts/ext/src/widgets/Component.js - About 1 day to fix

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

              removeData: function( elem, name ) {
                  elem = elem == window ?
                      windowData :
                      elem;
          
          Severity: Major
          Found in app/assets/javascripts/jquery.js and 1 other location - About 1 day to fix
          app/assets/javascripts/jquery-tooltip/lib/jquery.js on lines 668..706

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 198.

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

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

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

              removeData: function( elem, name ) {
                  elem = elem == window ?
                      windowData :
                      elem;
          
          
          Severity: Major
          Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js and 1 other location - About 1 day to fix
          app/assets/javascripts/jquery.js on lines 1300..1338

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 198.

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

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

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

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

          Refactorings

          Further Reading

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

              } else {
                var w = 300;
                var msg = '<b>Server Error:</b> ' + json.error + '<br>';
                if (json.exception != null) {
                  w = 900;
          Severity: Major
          Found in app/assets/javascripts/profile/ProfileBase.js and 1 other location - About 1 day to fix
          app/assets/javascripts/search/FindPeople.js on lines 353..365

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 197.

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

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

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

            show_err_message: function(json) {
              var w = 300;
              var msg = '<b>Server Error:</b> ' + json.error + '<br>';
              if (json.exception != null) {
                w = 900;
          Severity: Major
          Found in app/assets/javascripts/search/FindPeople.js and 1 other location - About 1 day to fix
          app/assets/javascripts/profile/ProfileBase.js on lines 134..146

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 197.

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

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

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

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

          Refactorings

          Further Reading

          Function onResize has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
          Open

              onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){
                  var w = adjWidth,
                      h = adjHeight;
          
                  if(Ext.isDefined(w) || Ext.isDefined(h)){
          Severity: Minor
          Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 1 day to fix

          Cognitive Complexity

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

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

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

          Further reading

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

            showEditWindow: function(){
              var win = new Ext.Window({
                title: 'Edit Alerts Portlet',
                layout: 'form',
                items: [
          Severity: Major
          Found in app/assets/javascripts/dashboard/cms/portlets/alerts.js and 1 other location - About 1 day to fix
          app/assets/javascripts/dashboard/cms/portlets/documents.js on lines 68..86

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 195.

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

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

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

            showEditWindow: function(){
              var win = new Ext.Window({
                title: 'Edit Documents Portlet',
                layout: 'form',
                items: [
          Severity: Major
          Found in app/assets/javascripts/dashboard/cms/portlets/documents.js and 1 other location - About 1 day to fix
          app/assets/javascripts/dashboard/cms/portlets/alerts.js on lines 72..90

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 195.

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

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

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

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

          Refactorings

          Further Reading

          Function DomHelper has 198 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Ext.DomHelper = function(){
              var tempTableEl = null,
                  emptyTags = /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,
                  tableRe = /^table|tbody|tr|td$/i,
                  confRe = /tag|children|cn|html$/i,
          Severity: Major
          Found in app/assets/javascripts/ext/src/ext-core/src/core/DomHelper.js - About 7 hrs to fix

            Function Lightbox has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
            Open

            Ext.ux.Lightbox = (function(){
                var els = {},
                    images = [],
                    activeImage,
                    initialized = false,
            Severity: Minor
            Found in app/assets/javascripts/ext/src/ext-core/examples/lightbox/lightbox.js - About 7 hrs to fix

            Cognitive Complexity

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

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

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

            Further reading

            TreeNodeUI has 55 functions (exceeds 20 allowed). Consider refactoring.
            Open

            Ext.tree.TreeNodeUI = Ext.extend(Object, {
                
                constructor : function(node){
                    Ext.apply(this, {
                        node: node,
            Severity: Major
            Found in app/assets/javascripts/ext/src/widgets/tree/TreeNodeUI.js - About 7 hrs to fix

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

                          switch (this.align) {
                              case 'stretch':
                                  stretchWidth = availWidth - horizMargins;
                                  calcs.width  = stretchWidth.constrain(child.minWidth || 0, child.maxWidth || 1000000);
                                  calcs.dirtySize = true;
              Severity: Major
              Found in app/assets/javascripts/ext/src/widgets/layout/VBoxLayout.js and 1 other location - About 7 hrs to fix
              app/assets/javascripts/ext/src/widgets/layout/HBoxLayout.js on lines 256..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 191.

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

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

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

                          switch (this.align) {
                              case 'stretch':
                                  stretchHeight = availHeight - vertMargins;
                                  calcs.height  = stretchHeight.constrain(child.minHeight || 0, child.maxHeight || 1000000);
                                  calcs.dirtySize = true;
              Severity: Major
              Found in app/assets/javascripts/ext/src/widgets/layout/HBoxLayout.js and 1 other location - About 7 hrs to fix
              app/assets/javascripts/ext/src/widgets/layout/VBoxLayout.js on lines 258..274

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 191.

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

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

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

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

              Refactorings

              Further Reading

              Severity
              Category
              Status
              Source
              Language