fiuba/alfred

View on GitHub

Showing 654 of 654 total issues

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

    _focusable: function( element ) {
        this.focusable = this.focusable.add( element );
        this._on( element, {
            focusin: function( event ) {
                $( event.currentTarget ).addClass( "ui-state-focus" );
Severity: Major
Found in public/javascripts/jquery-ui/jquery-ui.js and 1 other location - About 3 hrs to fix
public/javascripts/jquery-ui/jquery-ui.js on lines 773..783

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

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 ( factor.from.x !== factor.to.x ) {
                child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );
                child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );
            }
Severity: Major
Found in public/javascripts/jquery-ui/jquery-ui.js and 1 other location - About 3 hrs to fix
public/javascripts/jquery-ui/jquery-ui.js on lines 10667..10670

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

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

EditableGrid.prototype._insert = function(rowIndex, offset, rowId, cellValues, rowAttributes, dontSort)
{
    var originalRowId = null;
    var originalIndex = 0;
    var _data = this.dataUnfiltered == null ? this.data : this.dataUnfiltered;
Severity: Minor
Found in public/javascripts/editablegrid-2.0.1.js - About 3 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

Function send has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

                send: function( headers, complete ) {

                    // Get a new xhr
                    var handle, i,
                        xhr = s.xhr();
Severity: Major
Found in public/javascripts/jquery-1.9.0.js - About 3 hrs to fix

    Function _rendergrid has 89 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    EditableGrid.prototype._rendergrid = function(containerid, className, tableid)
    {
        with (this) {
    
            // if we are already attached to an existing table, just update the cell contents
    Severity: Major
    Found in public/javascripts/editablegrid-2.0.1.js - About 3 hrs to fix

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

          el.animate( animation, {
              queue: false,
              duration: o.duration,
              easing: o.easing,
              complete: function() {
      Severity: Major
      Found in public/javascripts/jquery-ui/jquery-ui.js and 1 other location - About 3 hrs to fix
      public/javascripts/jquery-ui/jquery-ui.js on lines 10835..10847

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

      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

          el.animate( animation, {
              queue: false,
              duration: o.duration,
              easing: o.easing,
              complete: function() {
      Severity: Major
      Found in public/javascripts/jquery-ui/jquery-ui.js and 1 other location - About 3 hrs to fix
      public/javascripts/jquery-ui/jquery-ui.js on lines 10159..10171

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

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

          trigger: function( event, data, elem, onlyHandlers ) {
      
              var i, cur, tmp, bubbleType, ontype, handle, special,
                  eventPath = [ elem || document ],
                  type = event.type || event,
      Severity: Major
      Found in public/javascripts/jquery-1.9.0.js - About 3 hrs to fix

        Function Animation has 84 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function Animation( elem, properties, options ) {
            var result,
                stopped,
                index = 0,
                length = animationPrefilters.length,
        Severity: Major
        Found in public/javascripts/jquery-1.9.0.js - About 3 hrs to fix

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

              for (var c = 0; c < this.columns.length; c++) {
                  var cellValue = this.columns[c].name in cellValues ? cellValues[this.columns[c].name] : "";
                  rowData.columns.push(this.getTypedValue(c, cellValue));
              }
          Severity: Major
          Found in public/javascripts/editablegrid-2.0.1.js and 1 other location - About 3 hrs to fix
          public/javascripts/editablegrid-2.0.1.js on lines 490..493

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

          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 (var c = 0; c < this.columns.length; c++) {
                      var cellValue = this.columns[c].name in cellValues ? cellValues[this.columns[c].name] : "";
                      rowData.columns.push(this.getTypedValue(c, cellValue));
                  }
          Severity: Major
          Found in public/javascripts/editablegrid-2.0.1.js and 1 other location - About 3 hrs to fix
          public/javascripts/editablegrid-2.0.1.js on lines 1117..1120

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

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

          EditableGrid.prototype._createCellRenderer = function(column)
          {
              column.cellRenderer = 
                  column.enumProvider ? new EnumCellRenderer() :
                      column.datatype == "integer" || column.datatype == "double" ? new NumberCellRenderer() :
          Severity: Minor
          Found in public/javascripts/editablegrid-2.0.1.js - About 3 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

          Function mouseClicked has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
          Open

          EditableGrid.prototype.mouseClicked = function(e) 
          {
              e = e || window.event;
              with (this) {
          
          
          Severity: Minor
          Found in public/javascripts/editablegrid-2.0.1.js - About 3 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

          Function _keydown has 81 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _keydown: function( event ) {
                  var match, prev, character, skip, regex,
                      preventDefault = true;
          
                  function escape( value ) {
          Severity: Major
          Found in public/javascripts/jquery-ui/jquery-ui.js - About 3 hrs to fix

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

            EditableGrid.prototype.getCellX = function(oElement)
            {
                var iReturnValue = 0;
                while (oElement != null && this.isStatic(oElement)) try {
                    iReturnValue += oElement.offsetLeft;
            Severity: Major
            Found in public/javascripts/editablegrid-2.0.1.js and 1 other location - About 3 hrs to fix
            public/javascripts/editablegrid-2.0.1.js on lines 1357..1365

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

            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

            EditableGrid.prototype.getCellY = function(oElement)
            {
                var iReturnValue = 0;
                while (oElement != null && this.isStatic(oElement)) try {
                    iReturnValue += oElement.offsetTop;
            Severity: Major
            Found in public/javascripts/editablegrid-2.0.1.js and 1 other location - About 3 hrs to fix
            public/javascripts/editablegrid-2.0.1.js on lines 1343..1351

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

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

            function Sizzle( selector, context, results, seed ) {
                var match, elem, m, nodeType,
                    // QSA vars
                    i, groups, old, nid, newContext, newSelector;
            
            
            Severity: Major
            Found in public/javascripts/jquery-1.9.0.js - About 3 hrs to fix

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

                      var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
                          '<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click"' +
                          ' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
                          (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
              Severity: Major
              Found in public/javascripts/jquery-ui/jquery-ui.js and 1 other location - About 3 hrs to fix
              public/javascripts/jquery-ui/jquery-ui.js on lines 8696..8699

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

              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 prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
                          '<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click"' +
                          ' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
                          (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
              Severity: Major
              Found in public/javascripts/jquery-ui/jquery-ui.js and 1 other location - About 3 hrs to fix
              public/javascripts/jquery-ui/jquery-ui.js on lines 8704..8707

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

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

              function Datepicker() {
                  this.debug = false; // Change this to true to start debugging
                  this._curInst = null; // The current instance in use
                  this._keyEvent = false; // If the last event was a key event
                  this._disabledInputs = []; // List of date picker inputs that have been disabled
              Severity: Major
              Found in public/javascripts/jquery-ui/jquery-ui.js - About 3 hrs to fix
                Severity
                Category
                Status
                Source
                Language