joegattnet/joegattnet_v3

View on GitHub

Showing 38 of 103 total issues

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

    Gmaps4RailsGoogle.prototype.updateBoundsWithPolygons = function() {
      var point, polygon, polygon_points, _i, _len, _ref, _results;
      _ref = this.polygons;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js and 1 other location - About 1 day to fix
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 330..348

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

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

    Gmaps4RailsGoogle.prototype.updateBoundsWithPolylines = function() {
      var point, polyline, polyline_points, _i, _len, _ref, _results;
      _ref = this.polylines;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js and 1 other location - About 1 day to fix
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 371..389

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

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

    Gmaps4RailsOpenlayers.prototype.clusterize = function() {
      var marker, markers_array, _i, _len, _ref;
      if (this.markers_conf.do_clustering === true) {
        if (this.markerClusterer !== null) this.clearClusterer();
        markers_array = new Array;
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.openlayers.js and 1 other location - About 7 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 237..249

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

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

    Gmaps4RailsGoogle.prototype.clusterize = function() {
      var marker, markers_array, _i, _len, _ref;
      if (this.markers_conf.do_clustering === true) {
        if (this.markerClusterer !== null) this.clearClusterer();
        markers_array = new Array;
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js and 1 other location - About 7 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.openlayers.js on lines 157..169

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

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

  var __hasProp = Object.prototype.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.bing.js and 3 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 2..3
public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 2..3
public/javascripts/gmaps4rails/gmaps4rails.openlayers.js on lines 2..3

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

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

  var __hasProp = Object.prototype.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js and 3 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 2..3
public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 2..3
public/javascripts/gmaps4rails/gmaps4rails.openlayers.js on lines 2..3

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

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

  var __hasProp = Object.prototype.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.openlayers.js and 3 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 2..3
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 2..3
public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 2..3

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

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

  var __hasProp = Object.prototype.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.mapquest.js and 3 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 2..3
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 2..3
public/javascripts/gmaps4rails/gmaps4rails.openlayers.js on lines 2..3

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

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

          if (element === polyline[0]) {
            strokeColor = element.strokeColor || this.polylines_conf.strokeColor;
            strokeOpacity = element.strokeOpacity || this.polylines_conf.strokeOpacity;
            strokeWeight = element.strokeWeight || this.polylines_conf.strokeWeight;
            clickable = element.clickable || this.polylines_conf.clickable;
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js and 1 other location - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.openlayers.js on lines 217..223

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

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

        if (element === polyline[0]) {
          strokeColor = element.strokeColor || this.polylines_conf.strokeColor;
          strokeOpacity = element.strokeOpacity || this.polylines_conf.strokeOpacity;
          strokeWeight = element.strokeWeight || this.polylines_conf.strokeWeight;
          clickable = element.clickable || this.polylines_conf.clickable;
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.openlayers.js and 1 other location - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 305..311

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

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

    Gmaps4RailsBing.prototype.showMarkers = function() {
      var marker, _i, _len, _ref, _results;
      _ref = this.markers;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.bing.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 151..160
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 198..207
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 243..252
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 410..419
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 89..98
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 121..130
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 191..200

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

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

    Gmaps4RailsBing.prototype.hideMarkers = function() {
      var marker, _i, _len, _ref, _results;
      _ref = this.markers;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.bing.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 151..160
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 198..207
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 243..252
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 410..419
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 89..98
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 104..113
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 191..200

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

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

    Gmaps4Rails.prototype.create_polylines = function() {
      var polyline, _i, _len, _ref, _results;
      _ref = this.polylines;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.base.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 151..160
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 198..207
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 243..252
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 89..98
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 104..113
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 121..130
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 191..200

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

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

    Gmaps4RailsBing.prototype.clearMarkers = function() {
      var marker, _i, _len, _ref, _results;
      _ref = this.markers;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.bing.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 151..160
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 198..207
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 243..252
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 410..419
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 104..113
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 121..130
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 191..200

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

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

    Gmaps4Rails.prototype.create_circles = function() {
      var circle, _i, _len, _ref, _results;
      _ref = this.circles;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.base.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 198..207
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 243..252
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 410..419
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 89..98
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 104..113
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 121..130
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 191..200

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

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

    Gmaps4RailsGoogle.prototype.hideMarkers = function() {
      var marker, _i, _len, _ref, _results;
      _ref = this.markers;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 151..160
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 198..207
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 243..252
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 410..419
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 89..98
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 104..113
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 121..130
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189

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

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

    Gmaps4RailsGoogle.prototype.clearMarkers = function() {
      var marker, _i, _len, _ref, _results;
      _ref = this.markers;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 151..160
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 198..207
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 243..252
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 410..419
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 89..98
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 104..113
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 121..130
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 191..200

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

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

    Gmaps4Rails.prototype.hide_circles = function() {
      var circle, _i, _len, _ref, _results;
      _ref = this.circles;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.base.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 151..160
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 198..207
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 243..252
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 410..419
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 89..98
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 104..113
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 121..130
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 191..200

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

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

    Gmaps4Rails.prototype.create_polygons = function() {
      var polygon, _i, _len, _ref, _results;
      _ref = this.polygons;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.base.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 151..160
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 198..207
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 410..419
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 89..98
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 104..113
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 121..130
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 191..200

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

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

    Gmaps4Rails.prototype.clear_circles = function() {
      var circle, _i, _len, _ref, _results;
      _ref = this.circles;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.base.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 151..160
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 243..252
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 410..419
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 89..98
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 104..113
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 121..130
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 191..200

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

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