talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

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

Ext.apply(Function.prototype, {
     /**
     * Creates an interceptor function. The passed function is called before the original one. If it returns false,
     * the original one is not called. The resulting function returns the results of the original function.
     * The passed function is called with the parameters of the original function. Example usage:
app/assets/javascripts/ext/adapter/ext/ext-base-debug.js on lines 832..988
app/assets/javascripts/ext/adapter/prototype/ext-prototype-adapter-debug.js on lines 832..988
app/assets/javascripts/ext/adapter/yui/ext-yui-adapter-debug.js on lines 832..988
app/assets/javascripts/ext/src/ext-core/src/core/Ext.js on lines 832..988

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

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

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

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

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

Refactorings

Further Reading

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

Ext.apply(Function.prototype, {
     /**
     * Creates an interceptor function. The passed function is called before the original one. If it returns false,
     * the original one is not called. The resulting function returns the results of the original function.
     * The passed function is called with the parameters of the original function. Example usage:
Severity: Major
Found in app/assets/javascripts/ext/adapter/ext/ext-base-debug.js and 4 other locations - About 2 days to fix
app/assets/javascripts/ext/adapter/jquery/ext-jquery-adapter-debug.js on lines 832..988
app/assets/javascripts/ext/adapter/prototype/ext-prototype-adapter-debug.js on lines 832..988
app/assets/javascripts/ext/adapter/yui/ext-yui-adapter-debug.js on lines 832..988
app/assets/javascripts/ext/src/ext-core/src/core/Ext.js on lines 832..988

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

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

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

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

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

Refactorings

Further Reading

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

Ext.apply(Function.prototype, {
     /**
     * Creates an interceptor function. The passed function is called before the original one. If it returns false,
     * the original one is not called. The resulting function returns the results of the original function.
     * The passed function is called with the parameters of the original function. Example usage:
app/assets/javascripts/ext/adapter/ext/ext-base-debug.js on lines 832..988
app/assets/javascripts/ext/adapter/jquery/ext-jquery-adapter-debug.js on lines 832..988
app/assets/javascripts/ext/adapter/yui/ext-yui-adapter-debug.js on lines 832..988
app/assets/javascripts/ext/src/ext-core/src/core/Ext.js on lines 832..988

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

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

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

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

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

Refactorings

Further Reading

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

Ext.apply(Function.prototype, {
     /**
     * Creates an interceptor function. The passed function is called before the original one. If it returns false,
     * the original one is not called. The resulting function returns the results of the original function.
     * The passed function is called with the parameters of the original function. Example usage:
Severity: Major
Found in app/assets/javascripts/ext/src/ext-core/src/core/Ext.js and 4 other locations - About 2 days to fix
app/assets/javascripts/ext/adapter/ext/ext-base-debug.js on lines 832..988
app/assets/javascripts/ext/adapter/jquery/ext-jquery-adapter-debug.js on lines 832..988
app/assets/javascripts/ext/adapter/prototype/ext-prototype-adapter-debug.js on lines 832..988
app/assets/javascripts/ext/adapter/yui/ext-yui-adapter-debug.js on lines 832..988

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

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

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

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

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

Refactorings

Further Reading

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

Ext.apply(Function.prototype, {
     /**
     * Creates an interceptor function. The passed function is called before the original one. If it returns false,
     * the original one is not called. The resulting function returns the results of the original function.
     * The passed function is called with the parameters of the original function. Example usage:
app/assets/javascripts/ext/adapter/ext/ext-base-debug.js on lines 832..988
app/assets/javascripts/ext/adapter/jquery/ext-jquery-adapter-debug.js on lines 832..988
app/assets/javascripts/ext/adapter/prototype/ext-prototype-adapter-debug.js on lines 832..988
app/assets/javascripts/ext/src/ext-core/src/core/Ext.js on lines 832..988

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

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

File ext-prototype-adapter-debug.js has 1000 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

    Function Ajax has a Cognitive Complexity of 123 (exceeds 5 allowed). Consider refactoring.
    Open

    Ext.lib.Ajax = function() {
        var activeX = ['Msxml2.XMLHTTP.6.0',
                       'Msxml2.XMLHTTP.3.0',
                       'Msxml2.XMLHTTP'],
            CONTENTTYPE = 'Content-Type';
    Severity: Minor
    Found in app/assets/javascripts/ext/src/ext-core/src/adapter/ext-base-ajax.js - About 2 days 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

            if(count == 0 || l <= tw){
                // ensure the width is set if there's no tabs
                wd.scrollLeft = 0;
                wrap.setWidth(tw);
                if(this.scrolling){
    Severity: Major
    Found in app/assets/javascripts/ext/src/widgets/TabPanel.js and 1 other location - About 2 days to fix
    app/assets/javascripts/ext_extensions/NavigableTabPanel.js on lines 85..126

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

    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(count == 0 || l <= tw){
                // ensure the width is set if there's no tabs
                wd.scrollLeft = 0;
                wrap.setWidth(tw);
                if(this.scrolling){
    Severity: Major
    Found in app/assets/javascripts/ext_extensions/NavigableTabPanel.js and 1 other location - About 2 days to fix
    app/assets/javascripts/ext/src/widgets/TabPanel.js on lines 869..910

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

    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

    Ext.ux.maximgb.tg.AdjacencyListStore = Ext.extend(Ext.ux.maximgb.tg.AbstractTreeStore,
    {
        /**
         * @cfg {String} parent_id_field_name Record parent id field name.
         */
    app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js on lines 942..1001

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

    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

    Ext.ux.maximgb.tg.AdjacencyListStore = Ext.extend(Ext.ux.maximgb.tg.AbstractTreeStore,
    {
        /**
         * @cfg {String} parent_id_field_name Record parent id field name.
         */
    Severity: Major
    Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js and 1 other location - About 2 days to fix
    app/assets/javascripts/ext_extensions/TreeGrid/src/AdjacencyListStore.js on lines 4..63

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

    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

    File ext-jquery-adapter-debug.js has 969 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/adapter/jquery/ext-jquery-adapter-debug.js - About 2 days to fix

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

              for (i = 0; i < visibleCount; i++) {
                  child       = visibleItems[i];
                  childHeight = child.height;
                  childWidth  = child.width;
                  canLayout   = !child.hasLayout && typeof child.doLayout == 'function';
      Severity: Major
      Found in app/assets/javascripts/ext/src/widgets/layout/HBoxLayout.js and 1 other location - About 2 days to fix
      app/assets/javascripts/ext/src/widgets/layout/VBoxLayout.js on lines 96..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 414.

      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; i < visibleCount; i++) {
                  child = visibleItems[i];
                  childHeight = child.height;
                  childWidth  = child.width;
                  canLayout   = !child.hasLayout && typeof child.doLayout == 'function';
      Severity: Major
      Found in app/assets/javascripts/ext/src/widgets/layout/VBoxLayout.js and 1 other location - About 2 days to fix
      app/assets/javascripts/ext/src/widgets/layout/HBoxLayout.js on lines 95..145

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

      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

      Talho.ManageOrganizations = Ext.extend(Talho.ProfileBase, {
        constructor: function(config){
          this.orgs_control = new Talho.ux.OrganizationsControl(config.url + ".json", this);
      
          this.infobox = new Ext.Container({
      Severity: Major
      Found in app/assets/javascripts/profile/ManageOrganizations.js and 1 other location - About 2 days to fix
      app/assets/javascripts/profile/ManageRoles.js on lines 6..46

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

      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

      Talho.ManageRoles = Ext.extend(Talho.ProfileBase, {
        constructor: function(config){
          this.roles_control = new Talho.ux.RolesControl(config.url + ".json", this);
      
          this.infobox = new Ext.Container({
      Severity: Major
      Found in app/assets/javascripts/profile/ManageRoles.js and 1 other location - About 2 days to fix
      app/assets/javascripts/profile/ManageOrganizations.js on lines 6..46

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

      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

      GridView has 111 functions (exceeds 20 allowed). Consider refactoring.
      Open

      Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
          /**
           * Override this function to apply custom CSS classes to rows during rendering.  You can also supply custom
           * parameters to the row template for the current row to customize how it is rendered using the <b>rowParams</b>
           * parameter.  This function should return the CSS class name (or empty string '' for none) that will be added
      Severity: Major
      Found in app/assets/javascripts/ext/src/widgets/grid/GridView.js - About 2 days to fix

        File Store.js has 872 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/data/Store.js - About 2 days to fix

          File fileuploader.js has 850 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * http://github.com/valums/file-uploader
           * 
           * Multiple file upload component with progress-bar, drag-and-drop. 
           * © 2010 Andrew Valums ( andrew(at)valums.com ) 
          Severity: Major
          Found in app/assets/javascripts/lib/fileuploader.js - About 2 days to fix

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

              showEditWindow: function(){
                var htmleditor = new Talho.ux.PhinHtmlEditor({
                  linksInNewWindow: true,
                  name: 'htmlportlet',
                  region: 'center',
            Severity: Major
            Found in app/assets/javascripts/dashboard/cms/portlets/phin.js and 1 other location - About 1 day to fix
            app/assets/javascripts/dashboard/cms/portlets/html.js on lines 21..58

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 353.

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

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

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

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

            Refactorings

            Further Reading

            Severity
            Category
            Status
            Source
            Language