linguisticexplorer/Linguistic-Explorer

View on GitHub

Showing 417 of 417 total issues

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

      if (args.marker_picture !== "") {
        icon = new MQA.Icon(args.marker_picture, args.marker_height, args.marker_width);
        marker.setIcon(icon);
        if (args.marker_anchor !== null) {
          marker.setBias({
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.mapquest.js and 1 other location - About 3 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 65..74

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

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

    Gmaps4RailsMapquest.prototype.clearMarkers = function() {
      var marker, _i, _len, _results;
      _results = [];
      for (_i = 0, _len = markers.length; _i < _len; _i++) {
        marker = markers[_i];
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.mapquest.js and 2 other locations - About 3 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 89..97
public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 99..107

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

    Gmaps4RailsMapquest.prototype.showMarkers = function() {
      var marker, _i, _len, _results;
      _results = [];
      for (_i = 0, _len = markers.length; _i < _len; _i++) {
        marker = markers[_i];
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.mapquest.js and 2 other locations - About 3 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 79..87
public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 99..107

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

    Gmaps4RailsMapquest.prototype.hideMarkers = function() {
      var marker, _i, _len, _results;
      _results = [];
      for (_i = 0, _len = markers.length; _i < _len; _i++) {
        marker = markers[_i];
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.mapquest.js and 2 other locations - About 3 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 79..87
public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 89..97

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 (x != null) {
                    if (isNaN(this.x1) || isNaN(this.x2)) {
                        this.x1 = x;
                        this.x2 = x;
                    }
Severity: Major
Found in public/javascripts/canvg.js and 1 other location - About 3 hrs to fix
public/javascripts/canvg.js on lines 365..372

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

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

                if (y != null) {
                    if (isNaN(this.y1) || isNaN(this.y2)) {
                        this.y1 = y;
                        this.y2 = y;
                    }
Severity: Major
Found in public/javascripts/canvg.js and 1 other location - About 3 hrs to fix
public/javascripts/canvg.js on lines 356..363

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

Class QueryAdapter has 29 methods (exceeds 20 allowed). Consider refactoring.
Open

  class QueryAdapter

    include SpecialSearchQueryAdapter

    attr_reader :group
Severity: Minor
Found in app/models/search_results/query_adapter.rb - About 3 hrs to fix

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

                    send: function( headers, complete ) {
    
                        // Get a new xhr
                        var xhr = s.xhr(),
                            handle,
    Severity: Major
    Found in public/javascripts/jquery.js - About 3 hrs to fix

      Function clean has 83 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          clean: function( elems, context, fragment, scripts ) {
              var checkScriptType;
      
              context = context || document;
      
      
      Severity: Major
      Found in public/javascripts/jquery.js - About 3 hrs to fix

        Function animate has 83 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            animate: function( prop, speed, easing, callback ) {
                var optall = jQuery.speed( speed, easing, callback );
        
                if ( jQuery.isEmptyObject( prop ) ) {
                    return this.each( optall.complete, [ false ] );
        Severity: Major
        Found in public/javascripts/jquery.js - About 3 hrs to fix

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

                          ctx.canvas.onclick = function(e) {
                              var p = mapXY(new svg.Point(e != null ? e.clientX : event.clientX, e != null ? e.clientY : event.clientY));
                              svg.Mouse.onclick(p.x, p.y);
                          };
          Severity: Major
          Found in public/javascripts/canvg.js and 1 other location - About 3 hrs to fix
          public/javascripts/canvg.js on lines 2525..2528

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

          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

                          ctx.canvas.onmousemove = function(e) {
                              var p = mapXY(new svg.Point(e != null ? e.clientX : event.clientX, e != null ? e.clientY : event.clientY));
                              svg.Mouse.onmousemove(p.x, p.y);
                          };
          Severity: Major
          Found in public/javascripts/canvg.js and 1 other location - About 3 hrs to fix
          public/javascripts/canvg.js on lines 2521..2524

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

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

                  svg.Transform = function(v) {    
                      var that = this;
                      this.Type = {}
                  
                      // translate
          Severity: Major
          Found in public/javascripts/canvg.js - About 3 hrs to fix

            Method convert! has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
            Open

                def convert!
            
                  reset = "\r\e[0K"
                  start = Time.now
            
            
            Severity: Minor
            Found in lib/sswl_data/converter.rb - 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 BoundingBox has 81 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    svg.BoundingBox = function(x1, y1, x2, y2) { // pass in initial points if you want
                        this.x1 = Number.NaN;
                        this.y1 = Number.NaN;
                        this.x2 = Number.NaN;
                        this.y2 = Number.NaN;
            Severity: Major
            Found in public/javascripts/canvg.js - About 3 hrs to fix

              Function TextElementBase has 79 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      svg.Element.TextElementBase = function(node) {
                          this.base = svg.Element.RenderedElementBase;
                          this.base(node);
                          
                          this.getGlyph = function(font, text, i) {
              Severity: Major
              Found in public/javascripts/canvg.js - About 3 hrs to fix

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

                        "": function(checkSet, part, isXML){
                            var nodeCheck,
                                doneName = done++,
                                checkFn = dirCheck;
                
                
                Severity: Major
                Found in public/javascripts/jquery.js and 1 other location - About 3 hrs to fix
                public/javascripts/jquery.js on lines 4325..4337

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

                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

                        "~": function( checkSet, part, isXML ) {
                            var nodeCheck,
                                doneName = done++,
                                checkFn = dirCheck;
                
                
                Severity: Major
                Found in public/javascripts/jquery.js and 1 other location - About 3 hrs to fix
                public/javascripts/jquery.js on lines 4311..4323

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

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

                    Deferred: function( func ) {
                        var doneList = jQuery.Callbacks( "once memory" ),
                            failList = jQuery.Callbacks( "once memory" ),
                            progressList = jQuery.Callbacks( "memory" ),
                            state = "pending",
                Severity: Major
                Found in public/javascripts/jquery.js - About 3 hrs to fix

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

                                  if (this.attribute('fx').hasValue()) {
                                      fx = (this.gradientUnits == 'objectBoundingBox' 
                                      ? bb.x() + bb.width() * this.attribute('fx').numValue() 
                                      : this.attribute('fx').toPixels('x'));
                                  }
                  Severity: Major
                  Found in public/javascripts/canvg.js and 1 other location - About 3 hrs to fix
                  public/javascripts/canvg.js on lines 1616..1620

                  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

                  Severity
                  Category
                  Status
                  Source
                  Language