talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

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

Talho.AuditLog.initialize = function(config){
    var audit_log_panel = new Talho.AuditLog(config);
    return audit_log_panel.getPanel();
};
Severity: Major
Found in app/assets/javascripts/admin/AuditLog.js and 14 other locations - About 35 mins to fix
app/assets/javascripts/admin/AddUser.js on lines 83..86
app/assets/javascripts/admin/BatchUsers.js on lines 213..216
app/assets/javascripts/admin/EditUsers.js on lines 182..185
app/assets/javascripts/admin/PendingRoleRequests.js on lines 40..43
app/assets/javascripts/dashboard/tutorials.js on lines 35..39
app/assets/javascripts/documents/Documents.js on lines 491..494
app/assets/javascripts/invitations/Invitations.js on lines 413..416
app/assets/javascripts/invitations/NewInvitation.js on lines 305..308
app/assets/javascripts/profile/EditDevices.js on lines 47..50
app/assets/javascripts/profile/EditPassword.js on lines 24..27
app/assets/javascripts/profile/EditProfile.js on lines 139..142
app/assets/javascripts/profile/ManageOrganizations.js on lines 48..51
app/assets/javascripts/profile/ManageRoles.js on lines 48..51
app/assets/javascripts/searches/AdvancedSearch.js on lines 98..102

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

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 15 locations. Consider refactoring.
Open

Talho.EditProfile.initialize = function(config){
  var o = new Talho.EditProfile(config);
  return o.getPanel();
};
Severity: Major
Found in app/assets/javascripts/profile/EditProfile.js and 14 other locations - About 35 mins to fix
app/assets/javascripts/admin/AddUser.js on lines 83..86
app/assets/javascripts/admin/AuditLog.js on lines 236..239
app/assets/javascripts/admin/BatchUsers.js on lines 213..216
app/assets/javascripts/admin/EditUsers.js on lines 182..185
app/assets/javascripts/admin/PendingRoleRequests.js on lines 40..43
app/assets/javascripts/dashboard/tutorials.js on lines 35..39
app/assets/javascripts/documents/Documents.js on lines 491..494
app/assets/javascripts/invitations/Invitations.js on lines 413..416
app/assets/javascripts/invitations/NewInvitation.js on lines 305..308
app/assets/javascripts/profile/EditDevices.js on lines 47..50
app/assets/javascripts/profile/EditPassword.js on lines 24..27
app/assets/javascripts/profile/ManageOrganizations.js on lines 48..51
app/assets/javascripts/profile/ManageRoles.js on lines 48..51
app/assets/javascripts/searches/AdvancedSearch.js on lines 98..102

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

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 15 locations. Consider refactoring.
Open

Talho.AddUser.initialize = function(config){
  var o = new Talho.AddUser(config);
  return o.getPanel();
};
Severity: Major
Found in app/assets/javascripts/admin/AddUser.js and 14 other locations - About 35 mins to fix
app/assets/javascripts/admin/AuditLog.js on lines 236..239
app/assets/javascripts/admin/BatchUsers.js on lines 213..216
app/assets/javascripts/admin/EditUsers.js on lines 182..185
app/assets/javascripts/admin/PendingRoleRequests.js on lines 40..43
app/assets/javascripts/dashboard/tutorials.js on lines 35..39
app/assets/javascripts/documents/Documents.js on lines 491..494
app/assets/javascripts/invitations/Invitations.js on lines 413..416
app/assets/javascripts/invitations/NewInvitation.js on lines 305..308
app/assets/javascripts/profile/EditDevices.js on lines 47..50
app/assets/javascripts/profile/EditPassword.js on lines 24..27
app/assets/javascripts/profile/EditProfile.js on lines 139..142
app/assets/javascripts/profile/ManageOrganizations.js on lines 48..51
app/assets/javascripts/profile/ManageRoles.js on lines 48..51
app/assets/javascripts/searches/AdvancedSearch.js on lines 98..102

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

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 15 locations. Consider refactoring.
Open

Talho.EditDevices.initialize = function(config){
  var o = new Talho.EditDevices(config);
  return o.getPanel();
};
Severity: Major
Found in app/assets/javascripts/profile/EditDevices.js and 14 other locations - About 35 mins to fix
app/assets/javascripts/admin/AddUser.js on lines 83..86
app/assets/javascripts/admin/AuditLog.js on lines 236..239
app/assets/javascripts/admin/BatchUsers.js on lines 213..216
app/assets/javascripts/admin/EditUsers.js on lines 182..185
app/assets/javascripts/admin/PendingRoleRequests.js on lines 40..43
app/assets/javascripts/dashboard/tutorials.js on lines 35..39
app/assets/javascripts/documents/Documents.js on lines 491..494
app/assets/javascripts/invitations/Invitations.js on lines 413..416
app/assets/javascripts/invitations/NewInvitation.js on lines 305..308
app/assets/javascripts/profile/EditPassword.js on lines 24..27
app/assets/javascripts/profile/EditProfile.js on lines 139..142
app/assets/javascripts/profile/ManageOrganizations.js on lines 48..51
app/assets/javascripts/profile/ManageRoles.js on lines 48..51
app/assets/javascripts/searches/AdvancedSearch.js on lines 98..102

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

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 4 locations. Consider refactoring.
Open

  constructor: function(){
    Talho.Admin.Apps.view.Details.superclass.constructor.apply(this, arguments);
  },
Severity: Major
Found in app/assets/javascripts/admin/apps/view/Details.js and 3 other locations - About 35 mins to fix
app/assets/javascripts/admin/apps/view/About.js on lines 9..11
app/assets/javascripts/admin/apps/view/Assets.js on lines 8..10
app/assets/javascripts/admin/apps/view/Roles.js on lines 10..12

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

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.EventManager.on(this._downloadFrame, 'load', function(){
                                      // in a very strange bit of convenience, the frame load event will only fire here IF there is an error
                                      // need to test the convenience on IE.
                                      Ext.Msg.alert('Could Not Load File', 'There was an error downloading the file you have requested. Please contact an administrator');
                                  }, this);
Severity: Minor
Found in app/assets/javascripts/documents/Documents.js and 1 other location - About 35 mins to fix
app/assets/javascripts/documents/DocumentViews.js on lines 252..256

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

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 15 locations. Consider refactoring.
Open

Talho.BatchUsers.initialize = function(config){
  var o = new Talho.BatchUsers(config);
  return o.getPanel();
};
Severity: Major
Found in app/assets/javascripts/admin/BatchUsers.js and 14 other locations - About 35 mins to fix
app/assets/javascripts/admin/AddUser.js on lines 83..86
app/assets/javascripts/admin/AuditLog.js on lines 236..239
app/assets/javascripts/admin/EditUsers.js on lines 182..185
app/assets/javascripts/admin/PendingRoleRequests.js on lines 40..43
app/assets/javascripts/dashboard/tutorials.js on lines 35..39
app/assets/javascripts/documents/Documents.js on lines 491..494
app/assets/javascripts/invitations/Invitations.js on lines 413..416
app/assets/javascripts/invitations/NewInvitation.js on lines 305..308
app/assets/javascripts/profile/EditDevices.js on lines 47..50
app/assets/javascripts/profile/EditPassword.js on lines 24..27
app/assets/javascripts/profile/EditProfile.js on lines 139..142
app/assets/javascripts/profile/ManageOrganizations.js on lines 48..51
app/assets/javascripts/profile/ManageRoles.js on lines 48..51
app/assets/javascripts/searches/AdvancedSearch.js on lines 98..102

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

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 15 locations. Consider refactoring.
Open

Talho.EditUsers.initialize = function(config){
  var o = new Talho.EditUsers(config);
  return o.getPanel();
};
Severity: Major
Found in app/assets/javascripts/admin/EditUsers.js and 14 other locations - About 35 mins to fix
app/assets/javascripts/admin/AddUser.js on lines 83..86
app/assets/javascripts/admin/AuditLog.js on lines 236..239
app/assets/javascripts/admin/BatchUsers.js on lines 213..216
app/assets/javascripts/admin/PendingRoleRequests.js on lines 40..43
app/assets/javascripts/dashboard/tutorials.js on lines 35..39
app/assets/javascripts/documents/Documents.js on lines 491..494
app/assets/javascripts/invitations/Invitations.js on lines 413..416
app/assets/javascripts/invitations/NewInvitation.js on lines 305..308
app/assets/javascripts/profile/EditDevices.js on lines 47..50
app/assets/javascripts/profile/EditPassword.js on lines 24..27
app/assets/javascripts/profile/EditProfile.js on lines 139..142
app/assets/javascripts/profile/ManageOrganizations.js on lines 48..51
app/assets/javascripts/profile/ManageRoles.js on lines 48..51
app/assets/javascripts/searches/AdvancedSearch.js on lines 98..102

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

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

                    panel = this.tabPanel.add({title: config.title, listeners:{'render':{fn: function(panel){new Ext.LoadMask(panel.getEl());}, delay: 10 }} }).show();
Severity: Minor
Found in app/assets/javascripts/dashboard/index.js and 1 other location - About 35 mins to fix
app/assets/javascripts/dashboard/index.js on lines 209..209

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

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.EventManager.on(this._downloadFrame, 'load', function(){
                        // in a very strange bit of convenience, the frame load event will only fire here IF there is an error
                        // need to test the convenience on IE.
                        Ext.Msg.alert('Could Not Load File', 'There was an error downloading the file you have requested. Please contact an administrator');
                    }, this);
Severity: Minor
Found in app/assets/javascripts/documents/DocumentViews.js and 1 other location - About 35 mins to fix
app/assets/javascripts/documents/Documents.js on lines 296..300

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

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 4 locations. Consider refactoring.
Open

  constructor: function(){
    Talho.Admin.Apps.view.About.superclass.constructor.apply(this, arguments);
  },
Severity: Major
Found in app/assets/javascripts/admin/apps/view/About.js and 3 other locations - About 35 mins to fix
app/assets/javascripts/admin/apps/view/Assets.js on lines 8..10
app/assets/javascripts/admin/apps/view/Details.js on lines 8..10
app/assets/javascripts/admin/apps/view/Roles.js on lines 10..12

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

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

                panel = this.tabPanel.add({title: config.title, tab_config: config, listeners:{'render':{fn: function(panel){new Ext.LoadMask(panel.getEl());}, delay: 10 }} }).show();
Severity: Minor
Found in app/assets/javascripts/dashboard/index.js and 1 other location - About 35 mins to fix
app/assets/javascripts/dashboard/index.js on lines 239..239

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

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 4 locations. Consider refactoring.
Open

  constructor: function(){
    Talho.Admin.Apps.view.Assets.superclass.constructor.apply(this, arguments);
  },
Severity: Major
Found in app/assets/javascripts/admin/apps/view/Assets.js and 3 other locations - About 35 mins to fix
app/assets/javascripts/admin/apps/view/About.js on lines 9..11
app/assets/javascripts/admin/apps/view/Details.js on lines 8..10
app/assets/javascripts/admin/apps/view/Roles.js on lines 10..12

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

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

                    this.store.loadData(Ext.decode(action.response.responseText), !Ext.getCmp('chk-overwrite').checked);
Severity: Minor
Found in app/assets/javascripts/invitations/NewInvitation.js and 1 other location - About 35 mins to fix
app/assets/javascripts/admin/BatchUsers.js on lines 34..34

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

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.mons.push({
                        item: item, ename: e, fn: o[e], scope: o.scope
                    });
Severity: Minor
Found in app/assets/javascripts/ext/src/widgets/Component.js and 1 other location - About 35 mins to fix
app/assets/javascripts/ext/src/widgets/Component.js on lines 1725..1727

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

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

    var topic_list = ic.add(new Talho.Forums.view.Topics.Index({forumId: forumId, forumName: forumName}));
Severity: Minor
Found in app/assets/javascripts/forums/Controller.js and 1 other location - About 35 mins to fix
app/assets/javascripts/forums/Controller.js on lines 47..47

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

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.talhoEmailButton = new Ext.Button({
      text: 'Email TALHO Support',
      handler: function(){
        window.location = 'mailto:phin@talho.org?body=\'OpenPHIN help request\'';
      }
Severity: Minor
Found in app/assets/javascripts/dashboard/help_window.js and 1 other location - About 35 mins to fix
app/assets/javascripts/dashboard/help_window.js on lines 9..14

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

                        new file_control_button({itemId: 'copy_file', text: 'Copy to My Folders', iconCls: 'documents-move-icon', handler: this.file_actions.moveItem.createDelegate(this.file_actions, ['copy'])})
Severity: Minor
Found in app/assets/javascripts/documents/DocumentViews.js and 1 other location - About 35 mins to fix
app/assets/javascripts/documents/Documents.js on lines 353..353

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

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

    disable: function() {
        this.disabled = true;
        this.el.addClass(this.slider.disabledClass);
    },
Severity: Minor
Found in app/assets/javascripts/ext/src/widgets/Slider.js and 1 other location - About 35 mins to fix
app/assets/javascripts/ext/src/widgets/Slider.js on lines 61..64

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

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

          {xtype: 'grid', width: 400, height: 337, title: 'New Apps', itemId: 'allapps', cls: 'new-apps-grid', loadMask: true, store: new Ext.data.JsonStore({
            fields: ['name', 'id'],
            url: '/apps/available.json',
            restful: true,
            autoDestroy: true,
Severity: Minor
Found in app/assets/javascripts/dashboard/apps/views/Index.js and 1 other location - About 35 mins to fix
app/assets/javascripts/dashboard/apps/views/Index.js on lines 21..27

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

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