talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

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

            b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight};
Severity: Major
Found in app/assets/javascripts/ext/src/ext-core/src/core/Fx.js and 1 other location - About 1 hr to fix
app/assets/javascripts/ext/src/ext-core/src/core/Fx.js on lines 191..191

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

            _queue.push({
                url: url,
                script: script,
                callback: o.callback || function(){},
                scope: o.scope || window,
app/assets/javascripts/ext_extensions/jsonp.js on lines 53..62

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

      _queue.push({
        url : url,
        script : script,
        callback : o.callback ||
        function() {
Severity: Major
Found in app/assets/javascripts/ext_extensions/jsonp.js and 1 other location - About 1 hr to fix
app/assets/javascripts/ext/src/ext-core/examples/jsonp/jsonp.js on lines 58..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 62.

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

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

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

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

Refactorings

Further Reading

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

jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
    jQuery.fn[o] = function(f){
        return this.bind(o, f);
    };
});
Severity: Major
Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js and 1 other location - About 1 hr to fix
app/assets/javascripts/jquery.js on lines 3312..3316

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
    jQuery.fn[o] = function(f){
        return this.bind(o, f);
    };
});
Severity: Major
Found in app/assets/javascripts/jquery.js and 1 other location - About 1 hr to fix
app/assets/javascripts/jquery-tooltip/lib/jquery.js on lines 2458..2462

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

    css: function( key, value ) {
        // ignore negative width and height values
        if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 )
            value = undefined;
        return this.attr( key, value, "curCSS" );
Severity: Major
Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js and 1 other location - About 1 hr to fix
app/assets/javascripts/jquery.js on lines 194..199

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

            'up' : function(e){
                if(e.ctrlKey){
                    this.showNextYear();
                }else{
                    this.update(this.activeDate.add('d', -7));
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/DatePicker.js and 1 other location - About 1 hr to fix
app/assets/javascripts/ext/src/widgets/DatePicker.js on lines 356..362

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

            'left' : function(e){
                if(e.ctrlKey){
                    this.showPrevMonth();
                }else{
                    this.update(this.activeDate.add('d', -1));
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/DatePicker.js and 1 other location - About 1 hr to fix
app/assets/javascripts/ext/src/widgets/DatePicker.js on lines 372..378

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

  disableEditCurrent: function(){
    var btns = ['save', 'delete', 'preview_button', 'editview_button', 'column_button', 'add_portlet', 'permissions'];
    Ext.each(btns, function(btn){
      this.getComponent(btn).disable();
    }, this);
Severity: Major
Found in app/assets/javascripts/dashboard/cms/views/admin_toolbar.js and 1 other location - About 1 hr to fix
app/assets/javascripts/dashboard/cms/views/admin_toolbar.js on lines 80..85

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

  enableEditCurrent: function(){
    var btns = ['save', 'delete', 'preview_button', 'editview_button', 'column_button', 'add_portlet', 'permissions'];
    Ext.each(btns, function(btn){
      this.getComponent(btn).enable();
    }, this);
Severity: Major
Found in app/assets/javascripts/dashboard/cms/views/admin_toolbar.js and 1 other location - About 1 hr to fix
app/assets/javascripts/dashboard/cms/views/admin_toolbar.js on lines 73..78

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

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

    css: function( key, value ) {
        // ignore negative width and height values
        if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 )
            value = undefined;
        return this.attr( key, value, "curCSS" );
Severity: Major
Found in app/assets/javascripts/jquery.js and 1 other location - About 1 hr to fix
app/assets/javascripts/jquery-tooltip/lib/jquery.js on lines 198..203

Duplicated Code

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

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

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

Tuning

This issue has a mass of 62.

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

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

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

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

Refactorings

Further Reading

Consider simplifying this complex logical expression.
Open

            if ( match[1] == "nth" ) {
                // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
                var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
                    match[2] == "even" && "2n" || match[2] == "odd" && "2n+1" ||
                    !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
Severity: Critical
Found in app/assets/javascripts/jquery.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

                if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
                    setVisibility(replaceElemIdStr, false);
                    addDomLoadEvent(function() {
                        widthStr += ""; // auto-convert to string
                        heightStr += "";
    Severity: Critical
    Found in app/assets/javascripts/ext/src/widgets/chart/swfobject.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

                  if(me.fireEvent(BEFOREREQUEST, me, o)){
                      if (o.el) {
                          if(!Ext.isEmpty(o.indicatorText)){
                              me.indicatorText = '<div class="loading-indicator">'+o.indicatorText+"</div>";
                          }
      Severity: Critical
      Found in app/assets/javascripts/ext/src/ext-core/src/data/Connection.js - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

                        if((Ext.isString(item.hideField) && record.get(item.hideField)) || (Ext.isString(item.showField) && !record.get(item.showField)) )
                            v += '<img src="' + Ext.BLANK_IMAGE_URL + '" class="x-action-col-icon"' +
                                ' width="' + ((item.width) ?  item.width : me.widthScope) + '"' +
                                ' height="0"' + ' />';
                        else{
        Severity: Critical
        Found in app/assets/javascripts/ext_extensions/xActionColumn.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                              if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) {
                                  // Optimization for HTML document case
                                  var oid = elem.getElementById(m[2]);
                                  
                                  // Do a quick check for the existence of the actual ID attribute
          Severity: Critical
          Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js - About 1 hr to fix

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

                                        'beforeaction': function(form, action){
                                            if(action.type == 'submit')
                                            {
                                                action.options.params = action.options.params || {};
            
            
            Severity: Minor
            Found in app/assets/javascripts/documents/AddEditFolderWindow.js - About 1 hr to fix

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

                updateVersionDisplay: function(versionData){
                  this.selectionStore.loadData(versionData.diff_list);
                  var version_rowid = this.resultsStore.indexOfId(this.selectedVersionId);
                  var sel_model = this.resultsPanel.getSelectionModel();
                  sel_model.clearSelections();
              Severity: Minor
              Found in app/assets/javascripts/admin/AuditLog.js - About 1 hr to fix

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

                    step: function(gotoEnd){
                        var t = now();
                
                        if ( gotoEnd || t >= this.options.duration + this.startTime ) {
                            this.now = this.end;
                Severity: Minor
                Found in app/assets/javascripts/jquery.js - About 1 hr to fix

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

                    initComponent : function() {
                      this.setTitle('Move Topic');
                      
                      this.items = [];
                      
                  Severity: Minor
                  Found in app/assets/javascripts/forums/view/topics/Edit.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language