XingFramework/xing-frontend-utils

View on GitHub

Showing 137 of 208 total issues

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

    this.$get = ['$injector', 'Inflector', function ($injector, Inflector) {
      defaultOptions.underscore = defaultOptions.underscore || Inflector.underscore;
      defaultOptions.camelize = defaultOptions.camelize || Inflector.camelize;
      defaultOptions.pluralize = defaultOptions.pluralize || Inflector.pluralize;

Severity: Major
Found in src/xing-frontend-utils/serializer.js and 1 other location - About 1 wk to fix
dist/xing-frontend-utils.js on lines 4081..4443

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

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

    this.$get = ['$injector', 'Inflector', function ($injector, Inflector) {
      defaultOptions.underscore = defaultOptions.underscore || Inflector.underscore;
      defaultOptions.camelize = defaultOptions.camelize || Inflector.camelize;
      defaultOptions.pluralize = defaultOptions.pluralize || Inflector.pluralize;

Severity: Major
Found in dist/xing-frontend-utils.js and 1 other location - About 1 wk to fix
src/xing-frontend-utils/serializer.js on lines 64..430

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

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 xngCompilerService($q, $http, $injector, $compile, $controller, $templateCache) {

  /**
   * @ngdoc service
   * @name $xngCompiler
Severity: Major
Found in dist/xing-frontend-utils.js and 1 other location - About 3 days to fix
src/xing-frontend-utils/components/toast/compiler.js on lines 1..132

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

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 xngCompilerService($q, $http, $injector, $compile, $controller, $templateCache) {

  /**
   * @ngdoc service
   * @name $xngCompiler
Severity: Major
Found in src/xing-frontend-utils/components/toast/compiler.js and 1 other location - About 3 days to fix
dist/xing-frontend-utils.js on lines 3012..3142

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

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

    return function SwipeService(scope, eventTypes) {
      if (!eventTypes) {
        eventTypes = "swipeleft swiperight";
      }

Severity: Major
Found in dist/xing-frontend-utils.js and 1 other location - About 2 days to fix
src/xing-frontend-utils/components/toast/swipe.js on lines 33..103

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

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

      return function SwipeService(scope, eventTypes) {
        if ( !eventTypes ) { eventTypes = "swipeleft swiperight"; }

        // publish configureFor() method for specific element instance
        return function configureFor(element, onSwipeCallback, attachLater ) {
Severity: Major
Found in src/xing-frontend-utils/components/toast/swipe.js and 1 other location - About 2 days to fix
dist/xing-frontend-utils.js on lines 3395..3468

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

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

    var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/xing-frontend-utils.js and 6 other locations - About 1 day to fix
dist/xing-frontend-utils.js on lines 238..238
dist/xing-frontend-utils.js on lines 566..566
dist/xing-frontend-utils.js on lines 932..932
dist/xing-frontend-utils.js on lines 2064..2064
dist/xing-frontend-utils.js on lines 2220..2220
dist/xing-frontend-utils.js on lines 2269..2269

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

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

    var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/xing-frontend-utils.js and 6 other locations - About 1 day to fix
dist/xing-frontend-utils.js on lines 238..238
dist/xing-frontend-utils.js on lines 566..566
dist/xing-frontend-utils.js on lines 932..932
dist/xing-frontend-utils.js on lines 1545..1545
dist/xing-frontend-utils.js on lines 2220..2220
dist/xing-frontend-utils.js on lines 2269..2269

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

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

    var _get = function get(_x2, _x3, _x4) { var _again = true; _function: while (_again) { var object = _x2, property = _x3, receiver = _x4; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x2 = parent; _x3 = property; _x4 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/xing-frontend-utils.js and 6 other locations - About 1 day to fix
dist/xing-frontend-utils.js on lines 238..238
dist/xing-frontend-utils.js on lines 932..932
dist/xing-frontend-utils.js on lines 1545..1545
dist/xing-frontend-utils.js on lines 2064..2064
dist/xing-frontend-utils.js on lines 2220..2220
dist/xing-frontend-utils.js on lines 2269..2269

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

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

    var _get = function get(_x2, _x3, _x4) { var _again = true; _function: while (_again) { var object = _x2, property = _x3, receiver = _x4; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x2 = parent; _x3 = property; _x4 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/xing-frontend-utils.js and 6 other locations - About 1 day to fix
dist/xing-frontend-utils.js on lines 238..238
dist/xing-frontend-utils.js on lines 566..566
dist/xing-frontend-utils.js on lines 932..932
dist/xing-frontend-utils.js on lines 1545..1545
dist/xing-frontend-utils.js on lines 2064..2064
dist/xing-frontend-utils.js on lines 2220..2220

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

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

    var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/xing-frontend-utils.js and 6 other locations - About 1 day to fix
dist/xing-frontend-utils.js on lines 566..566
dist/xing-frontend-utils.js on lines 932..932
dist/xing-frontend-utils.js on lines 1545..1545
dist/xing-frontend-utils.js on lines 2064..2064
dist/xing-frontend-utils.js on lines 2220..2220
dist/xing-frontend-utils.js on lines 2269..2269

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

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

    var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/xing-frontend-utils.js and 6 other locations - About 1 day to fix
dist/xing-frontend-utils.js on lines 238..238
dist/xing-frontend-utils.js on lines 566..566
dist/xing-frontend-utils.js on lines 1545..1545
dist/xing-frontend-utils.js on lines 2064..2064
dist/xing-frontend-utils.js on lines 2220..2220
dist/xing-frontend-utils.js on lines 2269..2269

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

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

    var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/xing-frontend-utils.js and 6 other locations - About 1 day to fix
dist/xing-frontend-utils.js on lines 238..238
dist/xing-frontend-utils.js on lines 566..566
dist/xing-frontend-utils.js on lines 932..932
dist/xing-frontend-utils.js on lines 1545..1545
dist/xing-frontend-utils.js on lines 2064..2064
dist/xing-frontend-utils.js on lines 2269..2269

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

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

var _createClass = (function () {
  function defineProperties(target, props) {
    for (var i = 0; i < props.length; i++) {
      var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ('value' in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);
    }
Severity: Major
Found in dist/xing-frontend-utils.js and 18 other locations - About 6 hrs to fix
dist/xing-frontend-utils.js on lines 236..236
dist/xing-frontend-utils.js on lines 338..338
dist/xing-frontend-utils.js on lines 880..880
dist/xing-frontend-utils.js on lines 934..934
dist/xing-frontend-utils.js on lines 1309..1309
dist/xing-frontend-utils.js on lines 1653..1653
dist/xing-frontend-utils.js on lines 1723..1723
dist/xing-frontend-utils.js on lines 1828..1828
dist/xing-frontend-utils.js on lines 1936..1936
dist/xing-frontend-utils.js on lines 2062..2062
dist/xing-frontend-utils.js on lines 2154..2154
dist/xing-frontend-utils.js on lines 2218..2218
dist/xing-frontend-utils.js on lines 2267..2267
dist/xing-frontend-utils.js on lines 2464..2464
dist/xing-frontend-utils.js on lines 2889..2897
dist/xing-frontend-utils.js on lines 3861..3869
dist/xing-frontend-utils.js on lines 3910..3918
dist/xing-frontend-utils.js on lines 4648..4656

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

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

var _createClass = (function () {
  function defineProperties(target, props) {
    for (var i = 0; i < props.length; i++) {
      var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ('value' in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);
    }
Severity: Major
Found in dist/xing-frontend-utils.js and 18 other locations - About 6 hrs to fix
dist/xing-frontend-utils.js on lines 236..236
dist/xing-frontend-utils.js on lines 338..338
dist/xing-frontend-utils.js on lines 880..880
dist/xing-frontend-utils.js on lines 934..934
dist/xing-frontend-utils.js on lines 1309..1309
dist/xing-frontend-utils.js on lines 1653..1653
dist/xing-frontend-utils.js on lines 1723..1723
dist/xing-frontend-utils.js on lines 1828..1828
dist/xing-frontend-utils.js on lines 1936..1936
dist/xing-frontend-utils.js on lines 2062..2062
dist/xing-frontend-utils.js on lines 2154..2154
dist/xing-frontend-utils.js on lines 2218..2218
dist/xing-frontend-utils.js on lines 2267..2267
dist/xing-frontend-utils.js on lines 2464..2464
dist/xing-frontend-utils.js on lines 2889..2897
dist/xing-frontend-utils.js on lines 2948..2956
dist/xing-frontend-utils.js on lines 3910..3918
dist/xing-frontend-utils.js on lines 4648..4656

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

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

    var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
Severity: Major
Found in dist/xing-frontend-utils.js and 18 other locations - About 6 hrs to fix
dist/xing-frontend-utils.js on lines 236..236
dist/xing-frontend-utils.js on lines 880..880
dist/xing-frontend-utils.js on lines 934..934
dist/xing-frontend-utils.js on lines 1309..1309
dist/xing-frontend-utils.js on lines 1653..1653
dist/xing-frontend-utils.js on lines 1723..1723
dist/xing-frontend-utils.js on lines 1828..1828
dist/xing-frontend-utils.js on lines 1936..1936
dist/xing-frontend-utils.js on lines 2062..2062
dist/xing-frontend-utils.js on lines 2154..2154
dist/xing-frontend-utils.js on lines 2218..2218
dist/xing-frontend-utils.js on lines 2267..2267
dist/xing-frontend-utils.js on lines 2464..2464
dist/xing-frontend-utils.js on lines 2889..2897
dist/xing-frontend-utils.js on lines 2948..2956
dist/xing-frontend-utils.js on lines 3861..3869
dist/xing-frontend-utils.js on lines 3910..3918
dist/xing-frontend-utils.js on lines 4648..4656

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

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

    var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
Severity: Major
Found in dist/xing-frontend-utils.js and 18 other locations - About 6 hrs to fix
dist/xing-frontend-utils.js on lines 236..236
dist/xing-frontend-utils.js on lines 338..338
dist/xing-frontend-utils.js on lines 880..880
dist/xing-frontend-utils.js on lines 934..934
dist/xing-frontend-utils.js on lines 1309..1309
dist/xing-frontend-utils.js on lines 1723..1723
dist/xing-frontend-utils.js on lines 1828..1828
dist/xing-frontend-utils.js on lines 1936..1936
dist/xing-frontend-utils.js on lines 2062..2062
dist/xing-frontend-utils.js on lines 2154..2154
dist/xing-frontend-utils.js on lines 2218..2218
dist/xing-frontend-utils.js on lines 2267..2267
dist/xing-frontend-utils.js on lines 2464..2464
dist/xing-frontend-utils.js on lines 2889..2897
dist/xing-frontend-utils.js on lines 2948..2956
dist/xing-frontend-utils.js on lines 3861..3869
dist/xing-frontend-utils.js on lines 3910..3918
dist/xing-frontend-utils.js on lines 4648..4656

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

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

    var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
Severity: Major
Found in dist/xing-frontend-utils.js and 18 other locations - About 6 hrs to fix
dist/xing-frontend-utils.js on lines 236..236
dist/xing-frontend-utils.js on lines 338..338
dist/xing-frontend-utils.js on lines 880..880
dist/xing-frontend-utils.js on lines 934..934
dist/xing-frontend-utils.js on lines 1309..1309
dist/xing-frontend-utils.js on lines 1653..1653
dist/xing-frontend-utils.js on lines 1723..1723
dist/xing-frontend-utils.js on lines 1936..1936
dist/xing-frontend-utils.js on lines 2062..2062
dist/xing-frontend-utils.js on lines 2154..2154
dist/xing-frontend-utils.js on lines 2218..2218
dist/xing-frontend-utils.js on lines 2267..2267
dist/xing-frontend-utils.js on lines 2464..2464
dist/xing-frontend-utils.js on lines 2889..2897
dist/xing-frontend-utils.js on lines 2948..2956
dist/xing-frontend-utils.js on lines 3861..3869
dist/xing-frontend-utils.js on lines 3910..3918
dist/xing-frontend-utils.js on lines 4648..4656

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

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

var _createClass = (function () {
  function defineProperties(target, props) {
    for (var i = 0; i < props.length; i++) {
      var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);
    }
Severity: Major
Found in dist/xing-frontend-utils.js and 18 other locations - About 6 hrs to fix
dist/xing-frontend-utils.js on lines 236..236
dist/xing-frontend-utils.js on lines 338..338
dist/xing-frontend-utils.js on lines 880..880
dist/xing-frontend-utils.js on lines 934..934
dist/xing-frontend-utils.js on lines 1309..1309
dist/xing-frontend-utils.js on lines 1653..1653
dist/xing-frontend-utils.js on lines 1723..1723
dist/xing-frontend-utils.js on lines 1828..1828
dist/xing-frontend-utils.js on lines 1936..1936
dist/xing-frontend-utils.js on lines 2062..2062
dist/xing-frontend-utils.js on lines 2154..2154
dist/xing-frontend-utils.js on lines 2218..2218
dist/xing-frontend-utils.js on lines 2267..2267
dist/xing-frontend-utils.js on lines 2464..2464
dist/xing-frontend-utils.js on lines 2889..2897
dist/xing-frontend-utils.js on lines 2948..2956
dist/xing-frontend-utils.js on lines 3861..3869
dist/xing-frontend-utils.js on lines 4648..4656

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

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

var _createClass = (function () {
  function defineProperties(target, props) {
    for (var i = 0; i < props.length; i++) {
      var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ('value' in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);
    }
Severity: Major
Found in dist/xing-frontend-utils.js and 18 other locations - About 6 hrs to fix
dist/xing-frontend-utils.js on lines 236..236
dist/xing-frontend-utils.js on lines 338..338
dist/xing-frontend-utils.js on lines 880..880
dist/xing-frontend-utils.js on lines 934..934
dist/xing-frontend-utils.js on lines 1309..1309
dist/xing-frontend-utils.js on lines 1653..1653
dist/xing-frontend-utils.js on lines 1723..1723
dist/xing-frontend-utils.js on lines 1828..1828
dist/xing-frontend-utils.js on lines 1936..1936
dist/xing-frontend-utils.js on lines 2062..2062
dist/xing-frontend-utils.js on lines 2154..2154
dist/xing-frontend-utils.js on lines 2218..2218
dist/xing-frontend-utils.js on lines 2267..2267
dist/xing-frontend-utils.js on lines 2464..2464
dist/xing-frontend-utils.js on lines 2889..2897
dist/xing-frontend-utils.js on lines 2948..2956
dist/xing-frontend-utils.js on lines 3861..3869
dist/xing-frontend-utils.js on lines 3910..3918

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

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