airbug/bugcore

View on GitHub

Showing 357 of 357 total issues

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

        clone: function(deep) {
            var cloneMap = new Map();
            if (deep) {
                this.forEach(function(value, key) {
                    cloneMap.put(Obj.clone(key, deep), Obj.clone(value, deep));
Severity: Major
Found in libraries/bugcore/js/src/data/Map.js and 2 other locations - About 3 hrs to fix
libraries/bugcore/js/src/concurrent/LockMap.js on lines 59..69
libraries/bugcore/js/src/observable/data/ObservableMap.js on lines 112..122

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

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

        clone: function(deep) {
            var cloneMap = new ObservableMap();
            if (deep) {
                this.forEach(function(value, key) {
                    cloneMap.put(Obj.clone(key, deep), Obj.clone(value, deep));
Severity: Major
Found in libraries/bugcore/js/src/observable/data/ObservableMap.js and 2 other locations - About 3 hrs to fix
libraries/bugcore/js/src/concurrent/LockMap.js on lines 59..69
libraries/bugcore/js/src/data/Map.js on lines 116..126

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

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

        clone: function(deep) {
            var cloneMap = new LockMap();
            if (deep) {
                this.forEach(function(value, key) {
                    cloneMap.put(Obj.clone(key, deep), Obj.clone(value, deep));
Severity: Major
Found in libraries/bugcore/js/src/concurrent/LockMap.js and 2 other locations - About 3 hrs to fix
libraries/bugcore/js/src/data/Map.js on lines 116..126
libraries/bugcore/js/src/observable/data/ObservableMap.js on lines 112..122

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

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

File Promise.js has 297 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright (c) 2016 airbug Inc. http://airbug.com
 *
 * bugcore may be freely distributed under the MIT license.
 */
Severity: Minor
Found in libraries/bugcore/js/src/promise/Promise.js - About 3 hrs to fix

    Function _constructor has 77 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _constructor: function() {
    
                this._super();
    
    
    
    Severity: Major
    Found in libraries/bugcore/js/src/BugCore.js - About 3 hrs to fix

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

              removeAll: function(items) {
                  if (Class.doesImplement(items, ICollection) || TypeUtil.isArray(items)) {
                      var _this = this;
                      items.forEach(function(value) {
                          _this.remove(value);
      libraries/bugcore/js/src/observable/data/ObservableCollection.js on lines 138..147

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

      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

              addAll: function(items) {
                  if (Class.doesImplement(items, ICollection) || TypeUtil.isArray(items)) {
                      var _this = this;
                      items.forEach(function(value) {
                          _this.add(value);
      libraries/bugcore/js/src/observable/data/ObservableCollection.js on lines 218..227

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

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

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

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

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

      Refactorings

      Further Reading

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

                  if (Class.doesImplement(collection, ICollection) || Class.doesImplement(values, IIterable) || TypeUtil.isArray(collection)) {
                      var _this = this;
                      collection.forEach(function(value) {
                          _this.remove(value);
                      });
      Severity: Major
      Found in libraries/bugcore/js/src/data/Collection.js and 1 other location - About 2 hrs to fix
      libraries/bugcore/js/src/data/Collection.js on lines 159..166

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

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

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

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

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

      Refactorings

      Further Reading

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

                  if (Class.doesImplement(items, ICollection) || Class.doesImplement(items, IIterable) || TypeUtil.isArray(items)) {
                      var _this = this;
                      items.forEach(function(item) {
                          _this.add(item);
                      });
      Severity: Major
      Found in libraries/bugcore/js/src/data/Collection.js and 1 other location - About 2 hrs to fix
      libraries/bugcore/js/src/data/Collection.js on lines 284..291

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

      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

              contains: function(item) {
                  for (var i = 0, size = this.itemReflectArray.getLength(); i < size; i++) {
                      var itemArrayValue = this.itemReflectArray.getAt(i);
                      if (Obj.equals(item, itemArrayValue)) {
                          return true;
      Severity: Major
      Found in libraries/bugcore/js/src/data/HashStoreNode.js and 1 other location - About 2 hrs to fix
      libraries/bugcore/js/src/data/HashTableNode.js on lines 157..165

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

      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

              containsValue: function(value) {
                  for (var i = 0, size = this.valueReflectArray.getLength(); i < size; i++) {
                      var hashTableValue = this.valueReflectArray.getAt(i);
                      if (Obj.equals(value, hashTableValue)) {
                          return true;
      Severity: Major
      Found in libraries/bugcore/js/src/data/HashTableNode.js and 1 other location - About 2 hrs to fix
      libraries/bugcore/js/src/data/HashStoreNode.js on lines 151..159

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

      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

          Constructor.allocWithArray = function(args) {
              var constructor = this;
              function F(args) {
                  return Function.prototype.apply.call(constructor, this, args);
              }
      Severity: Major
      Found in libraries/bugcore/js/src/core/Constructor.js and 1 other location - About 2 hrs to fix
      libraries/bugcore/js/src/core/Constructor.js on lines 94..104

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

      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

          Constructor.alloc = function() {
              var constructor = this;
              function F(args) {
                  return Function.prototype.apply.call(constructor, this, args);
              }
      Severity: Major
      Found in libraries/bugcore/js/src/core/Constructor.js and 1 other location - About 2 hrs to fix
      libraries/bugcore/js/src/core/Constructor.js on lines 111..121

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

      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

              args.forEach(function(arg) {
                  if (TypeUtil.isArray(arg)) {
                      pickProperties = pickProperties.concat(arg);
                  } else if (TypeUtil.isString(arg)) {
                      pickProperties = pickProperties.concat([arg]);
      Severity: Major
      Found in libraries/bugcore/js/src/util/ObjectUtil.js and 1 other location - About 2 hrs to fix
      libraries/bugcore/js/src/util/ObjectUtil.js on lines 481..489

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

      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

              args.forEach(function(arg) {
                  if (TypeUtil.isArray(arg)) {
                      omitProperties = omitProperties.concat(arg);
                  } else if (TypeUtil.isString(arg)) {
                      omitProperties = omitProperties.concat([arg]);
      Severity: Major
      Found in libraries/bugcore/js/src/util/ObjectUtil.js and 1 other location - About 2 hrs to fix
      libraries/bugcore/js/src/util/ObjectUtil.js on lines 511..519

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

      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

              attachEventListener: function(eventType, eventListener) {
                  var eventTypeListenerList = this.eventTypeListenerMap.get(eventType);
                  if (!eventTypeListenerList) {
                      this.eventTypeListenerMap.put(eventType, eventListener);
                  } else if (!eventTypeListenerList.contains(eventListener)) {
      Severity: Major
      Found in libraries/bugcore/js/src/event/EventReceiver.js and 1 other location - About 2 hrs to fix
      libraries/bugcore/js/src/observable/Observable.js on lines 211..218

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

      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

              attachObserver: function(changeType, observer) {
                  var changeTypeObserverList = this.changeTypeObserverMap.get(changeType);
                  if (!changeTypeObserverList) {
                      this.changeTypeObserverMap.put(changeType, observer);
                  } else if (!changeTypeObserverList.contains(observer)) {
      Severity: Major
      Found in libraries/bugcore/js/src/observable/Observable.js and 1 other location - About 2 hrs to fix
      libraries/bugcore/js/src/event/EventReceiver.js on lines 198..205

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

      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

              indexOfFirst: function(value) {
                  for (var i = 0, size = this.itemReflectArray.getLength(); i < size; i++) {
                      if (Obj.equals(this.itemReflectArray.getAt(i), value)) {
                          return i;
                      }
      Severity: Major
      Found in libraries/bugcore/js/src/data/Queue.js and 1 other location - About 2 hrs to fix
      libraries/bugcore/js/src/data/List.js on lines 262..269

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

      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

              clone: function(deep) {
                  var cloneSet = new Set();
                  if (deep) {
                      this.forEach(function(item){
                          cloneSet.add(Obj.clone(item, true));
      Severity: Major
      Found in libraries/bugcore/js/src/data/Set.js and 6 other locations - About 2 hrs to fix
      libraries/bugcore/js/src/core/Arr.js on lines 212..222
      libraries/bugcore/js/src/data/Collection.js on lines 365..375
      libraries/bugcore/js/src/data/List.js on lines 112..122
      libraries/bugcore/js/src/data/Stack.js on lines 100..110
      libraries/bugcore/js/src/observable/data/ObservableList.js on lines 69..79
      libraries/bugcore/js/src/observable/data/ObservableSet.js on lines 60..70

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

      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

              clone: function(deep) {
                  var cloneStack = new Stack();
                  if (deep) {
                      this.forEach(function(item){
                          cloneStack.add(Obj.clone(item, true));
      Severity: Major
      Found in libraries/bugcore/js/src/data/Stack.js and 6 other locations - About 2 hrs to fix
      libraries/bugcore/js/src/core/Arr.js on lines 212..222
      libraries/bugcore/js/src/data/Collection.js on lines 365..375
      libraries/bugcore/js/src/data/List.js on lines 112..122
      libraries/bugcore/js/src/data/Set.js on lines 63..73
      libraries/bugcore/js/src/observable/data/ObservableList.js on lines 69..79
      libraries/bugcore/js/src/observable/data/ObservableSet.js on lines 60..70

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

      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