airbug/bugcore

View on GitHub

Showing 357 of 357 total issues

Function processDescriptions has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    ArgUtil.processDescriptions = function(args, descriptions) {
        ArgUtil.validateDescriptions(descriptions, args.length);

        var argsCopy                = ([]).concat(args);
        var descriptionsCopy        = ([]).concat(descriptions);
Severity: Minor
Found in libraries/bugcore/js/src/util/ArgUtil.js - About 1 hr to fix

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

                        _this.resolveValue(value, function(values) {
                            if (values.length === 1) {
                                values = values[0];
                            }
                            _this.getResolvedValueList().set(index, values);
    libraries/bugcore/js/src/promise/resolvers/PropsResolver.js on lines 88..95
    libraries/bugcore/js/src/promise/resolvers/ValuesResolver.js on lines 91..98

    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

            toValueArray: function() {
                var valuesArray = [];
                this.hashTableNodeReflectObject.forIn(function(keyHashCode, hashTableNode) {
                    valuesArray = valuesArray.concat(hashTableNode.getValueReflectArray().getArray());
                });
    Severity: Major
    Found in libraries/bugcore/js/src/data/HashTable.js and 1 other location - About 1 hr to fix
    libraries/bugcore/js/src/data/HashTable.js on lines 264..270

    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

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

            forEach: function(func) {
                var iterator = this.iterator();
                while (iterator.hasNext()) {
                    var indexValuePair = iterator.nextIndexValuePair();
                    func(indexValuePair.value, indexValuePair.index);
    Severity: Major
    Found in libraries/bugcore/js/src/data/Queue.js and 2 other locations - About 1 hr to fix
    libraries/bugcore/js/src/data/List.js on lines 170..176
    libraries/bugcore/js/src/data/Stack.js on lines 158..164

    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

                        }, function(reasons) {
                            if (reasons.length === 1) {
                                reasons = reasons[0];
                            }
                            _this.getResolvedReasonList().set(index, reasons);
    libraries/bugcore/js/src/promise/resolvers/PropsResolver.js on lines 88..95
    libraries/bugcore/js/src/promise/resolvers/ValuesResolver.js on lines 84..91

    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

            equals: function(value) {
                if (Class.doesExtend(value, Pair)) {
                    return Obj.equals(value.getA(), this.a) && Obj.equals(value.getB(), this.b);
                }
                return false;
    Severity: Major
    Found in libraries/bugcore/js/src/data/Pair.js and 1 other location - About 1 hr to fix
    libraries/bugcore/js/src/event/EventListener.js on lines 131..136

    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

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

            forEach: function(func) {
                var iterator = this.iterator();
                while (iterator.hasNext()) {
                    var indexValuePair = iterator.nextIndexValuePair();
                    func(indexValuePair.value, indexValuePair.index);
    Severity: Major
    Found in libraries/bugcore/js/src/data/Stack.js and 2 other locations - About 1 hr to fix
    libraries/bugcore/js/src/data/List.js on lines 170..176
    libraries/bugcore/js/src/data/Queue.js on lines 151..157

    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

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

            forEach: function(func) {
                var iterator = this.iterator();
                while (iterator.hasNext()) {
                    var indexValuePair = iterator.nextIndexValuePair();
                    func(indexValuePair.value, indexValuePair.index);
    Severity: Major
    Found in libraries/bugcore/js/src/data/List.js and 2 other locations - About 1 hr to fix
    libraries/bugcore/js/src/data/Queue.js on lines 151..157
    libraries/bugcore/js/src/data/Stack.js on lines 158..164

    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

                        }, function(reasons) {
                            if (reasons.length === 1) {
                                reasons = reasons[0];
                            }
                            _this.getResolvedReasonList().set(index, reasons);
    libraries/bugcore/js/src/promise/resolvers/ValuesResolver.js on lines 84..91
    libraries/bugcore/js/src/promise/resolvers/ValuesResolver.js on lines 91..98

    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

            toKeyArray: function() {
                var keysArray = [];
                this.hashTableNodeReflectObject.forIn(function(keyHashCode, hashTableNode) {
                    keysArray = keysArray.concat(hashTableNode.getKeyReflectArray().getArray());
                });
    Severity: Major
    Found in libraries/bugcore/js/src/data/HashTable.js and 1 other location - About 1 hr to fix
    libraries/bugcore/js/src/data/HashTable.js on lines 275..281

    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

            equals: function(value) {
                if (Class.doesExtend(value, EventListener)) {
                    return (Obj.equals(value.getListenerFunction(), this.listenerFunction) && Obj.equals(value.getListenerContext(), this.listenerContext));
                }
                return false;
    Severity: Major
    Found in libraries/bugcore/js/src/event/EventListener.js and 1 other location - About 1 hr to fix
    libraries/bugcore/js/src/data/Pair.js on lines 167..172

    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

    Function setPath has 48 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            setPath: function(path, value) {
                if (path === "") {
                    this.data = value;
                } else {
                    if (!TypeUtil.isObject(this.data) && !TypeUtil.isArray(this.data)) {
    Severity: Minor
    Found in libraries/bugcore/js/src/data/Document.js - About 1 hr to fix

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

              forIn: function(func) {
                  var iterator = this.iterator();
                  while (iterator.hasNext()) {
                      var nextKey = iterator.nextKey();
                      var nextValue = this.get(nextKey);
      Severity: Major
      Found in libraries/bugcore/js/src/data/HashTable.js and 1 other location - About 1 hr to fix
      libraries/bugcore/js/src/data/HashTable.js on lines 117..124

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

      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

              forEach: function(func) {
                  var iterator = this.iterator();
                  while (iterator.hasNext()) {
                      var nextKey = iterator.nextKey();
                      var nextValue = this.get(nextKey);
      Severity: Major
      Found in libraries/bugcore/js/src/data/HashTable.js and 1 other location - About 1 hr to fix
      libraries/bugcore/js/src/data/HashTable.js on lines 133..140

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

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

              forIn: function(func) {
                  var iterator = this.iterator();
                  while (iterator.hasNext()) {
                      var indexValuePair = iterator.nextIndexValuePair();
                      func(indexValuePair.index, indexValuePair.value);
      Severity: Major
      Found in libraries/bugcore/js/src/data/Queue.js and 2 other locations - About 1 hr to fix
      libraries/bugcore/js/src/data/List.js on lines 181..187
      libraries/bugcore/js/src/data/Stack.js on lines 169..175

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

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

              forIn: function(func) {
                  var iterator = this.iterator();
                  while (iterator.hasNext()) {
                      var indexValuePair = iterator.nextIndexValuePair();
                      func(indexValuePair.index, indexValuePair.value);
      Severity: Major
      Found in libraries/bugcore/js/src/data/List.js and 2 other locations - About 1 hr to fix
      libraries/bugcore/js/src/data/Queue.js on lines 162..168
      libraries/bugcore/js/src/data/Stack.js on lines 169..175

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

      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

              doHandleRejected: function(reasons) {
                  if (TypeUtil.isFunction(this.getRejectedFunction())) {
                      this.fireHandleMethod(this.getRejectedFunction(), reasons);
                  } else {
                      this.getForwardPromise().reject(reasons);
      Severity: Major
      Found in libraries/bugcore/js/src/promise/handlers/ThenHandler.js and 1 other location - About 1 hr to fix
      libraries/bugcore/js/src/promise/handlers/ThenHandler.js on lines 106..112

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

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

              forIn: function(func) {
                  var iterator = this.iterator();
                  while (iterator.hasNext()) {
                      var indexValuePair = iterator.nextIndexValuePair();
                      func(indexValuePair.index, indexValuePair.value);
      Severity: Major
      Found in libraries/bugcore/js/src/data/Stack.js and 2 other locations - About 1 hr to fix
      libraries/bugcore/js/src/data/List.js on lines 181..187
      libraries/bugcore/js/src/data/Queue.js on lines 162..168

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

      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

              doHandleFulfilled: function(values) {
                  if (TypeUtil.isFunction(this.getFulfilledFunction())) {
                      this.fireHandleMethod(this.getFulfilledFunction(), values);
                  } else {
                      this.getForwardPromise().resolve(values);
      Severity: Major
      Found in libraries/bugcore/js/src/promise/handlers/ThenHandler.js and 1 other location - About 1 hr to fix
      libraries/bugcore/js/src/promise/handlers/ThenHandler.js on lines 117..123

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

      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

          ObjectUtil.options = function(options, overrides) {
              options = options || {};
              for (var key in overrides) {
                  options[key] = overrides[key];
              }
      Severity: Major
      Found in libraries/bugcore/js/src/util/ObjectUtil.js and 1 other location - About 1 hr to fix
      libraries/bugcore/js/src/util/ArrayUtil.js on lines 237..243

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

      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