prey/prey-node-client

View on GitHub
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js

Summary

Maintainability
D
2 days
Test Coverage

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

  var cls = function Geocircle() {
    this.center = new BasicGeoposition();
    this.radius = new Number();
    this.altitudeReferenceSystem = new AltitudeReferenceSystem();
    this.geoshapeType = new GeoshapeType();
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 132..138
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 177..183

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

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

  var cls = function CivicAddress() {
    this.city = new String();
    this.country = new String();
    this.postalCode = new String();
    this.state = new String();
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 177..183
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 210..216

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

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

  var cls = function Geolocator() {
    this.desiredAccuracyInMeters = new Number();
    this.reportInterval = new Number();
    this.movementThreshold = new Number();
    this.desiredAccuracy = new PositionAccuracy();
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 132..138
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 210..216

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

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

IGeoshape = (function () {
  var cls = function IGeoshape() {
    this.altitudeReferenceSystem = new AltitudeReferenceSystem();
    this.geoshapeType = new GeoshapeType();
    this.spatialReferenceId = new Number();
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 2..9
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 99..108

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

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

BasicGeoposition = (function () {
  var cls = function BasicGeoposition() {
      this.latitude = new Number();
      this.longitude = new Number();
      this.altitude = new Number();
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 53..62
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 99..108

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

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

GeocoordinateSatelliteData = (function () {
  var cls = function GeocoordinateSatelliteData() {
    this.horizontalDilutionOfPrecision = new Number();
    this.positionDilutionOfPrecision = new Number();
    this.verticalDilutionOfPrecision = new Number();
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 2..9
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 53..62

Duplicated Code

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

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

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

Tuning

This issue has a mass of 74.

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

_PositionSource = function () {
  this.cellular = 0;
  this.satellite = 1;
  this.wiFi = 2;
  this.iPAddress = 3;
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 44..50

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

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

_AltitudeReferenceSystem = function () {
  this.unspecified = 0;
  this.terrain = 1;
  this.ellipsoid = 2;
  this.geoid = 3;
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 29..35

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

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 cls = function Geopoint() {
    this.altitudeReferenceSystem = new AltitudeReferenceSystem();
    this.geoshapeType = new GeoshapeType();
    this.spatialReferenceId = new Number();
    this.position = new BasicGeoposition();
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 73..78
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 80..85
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 87..92

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

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 cls = function Geopoint(position, altitudeReferenceSystem) {
      this.altitudeReferenceSystem = new AltitudeReferenceSystem();
      this.geoshapeType = new GeoshapeType();
      this.spatialReferenceId = new Number();
      this.position = new BasicGeoposition();
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 66..71
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 73..78
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 87..92

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

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 cls = function Geopoint(position) {
      this.altitudeReferenceSystem = new AltitudeReferenceSystem();
      this.geoshapeType = new GeoshapeType();
      this.spatialReferenceId = new Number();
      this.position = new BasicGeoposition();
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 66..71
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 80..85
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 87..92

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

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 cls = function Geopoint(position, altitudeReferenceSystem, spatialReferenceId) {
      this.altitudeReferenceSystem = new AltitudeReferenceSystem();
      this.geoshapeType = new GeoshapeType();
      this.spatialReferenceId = new Number();
      this.position = new BasicGeoposition();
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 66..71
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 73..78
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 80..85

Duplicated Code

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

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

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

Tuning

This issue has a mass of 60.

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

StatusChangedEventArgs = (function () {
  var cls = function StatusChangedEventArgs() {
    this.status = new PositionStatus();
  };
  
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 156..163

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

PositionChangedEventArgs = (function () {
  var cls = function PositionChangedEventArgs() {
    this.position = new Geoposition();
  };
  
lib/agent/providers/geo/win32/windows.devices.geolocation/lib/NodeRT_Windows_Devices_Geolocation.d.js on lines 166..173

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

There are no issues that match your filters.

Category
Status