airbug/bugcore

View on GitHub

Showing 357 of 357 total issues

Avoid too many return statements within this function.
Open

            return -1;
Severity: Major
Found in lintbug.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return -1;
    Severity: Major
    Found in lintbug.js - About 30 mins to fix

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

                      if (!TypeUtil.isFunction(value)) {
                          if (deep) {
                              cloneObject[key] = Obj.clone(value, deep);
                          } else {
                              cloneObject[key] = value;
      Severity: Minor
      Found in libraries/bugcore/js/src/core/Obj.js and 1 other location - About 30 mins to fix
      libraries/bugcore/js/src/core/Obj.js on lines 222..228

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

      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

      Avoid too many return statements within this function.
      Open

              return true;
      Severity: Major
      Found in libraries/bugcore/js/src/util/ObjectUtil.js - About 30 mins to fix

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

                doResolveProps: function(objects) {
                    this.resolver   = Resolvers.resolveProps([this], objects);
                    this.doResolve();
                },
        Severity: Major
        Found in libraries/bugcore/js/src/promise/Promise.js and 3 other locations - About 30 mins to fix
        libraries/bugcore/js/src/promise/Promise.js on lines 433..436
        libraries/bugcore/js/src/promise/Promise.js on lines 451..454
        libraries/bugcore/js/src/promise/Promise.js on lines 460..463

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

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

                doResolveRace: function(iterables) {
                    this.resolver   = Resolvers.resolveRace([this], iterables);
                    this.doResolve();
                },
        Severity: Major
        Found in libraries/bugcore/js/src/promise/Promise.js and 3 other locations - About 30 mins to fix
        libraries/bugcore/js/src/promise/Promise.js on lines 433..436
        libraries/bugcore/js/src/promise/Promise.js on lines 442..445
        libraries/bugcore/js/src/promise/Promise.js on lines 460..463

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

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

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

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

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

        Refactorings

        Further Reading

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

                    for (var i = 0, size = this.getItemReflectArray().getLength(); i < size; i++) {
                        if (Obj.equals(this.getItemReflectArray().getAt(i).getValue(), value)) {
                            return i;
                        }
                    }
        Severity: Minor
        Found in libraries/bugcore/js/src/data/WeightedList.js and 1 other location - About 30 mins to fix
        libraries/bugcore/js/src/data/WeightedList.js on lines 288..292

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

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

                doResolveValues: function(values) {
                    this.resolver   = Resolvers.resolveValues([this], values);
                    this.doResolve();
                },
        Severity: Major
        Found in libraries/bugcore/js/src/promise/Promise.js and 3 other locations - About 30 mins to fix
        libraries/bugcore/js/src/promise/Promise.js on lines 433..436
        libraries/bugcore/js/src/promise/Promise.js on lines 442..445
        libraries/bugcore/js/src/promise/Promise.js on lines 451..454

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

        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

                add: function(value) {
                    this._super(value);
                    this.itemReflectArray.push(value);
                    return true;
                },
        Severity: Minor
        Found in libraries/bugcore/js/src/data/Stack.js and 1 other location - About 30 mins to fix
        libraries/bugcore/js/src/data/List.js on lines 133..137

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

        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

                add: function(item) {
                    this._super(item);
                    this.itemReflectArray.push(item);
                    return true;
                },
        Severity: Minor
        Found in libraries/bugcore/js/src/data/List.js and 1 other location - About 30 mins to fix
        libraries/bugcore/js/src/data/Stack.js on lines 121..125

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

        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.forIn(value, function(propertyName, propertyValue) {
                            if (deep) {
                                clone[propertyName] = Obj.clone(propertyValue, deep);
                            } else {
                                clone[propertyName] = propertyValue;
        Severity: Minor
        Found in libraries/bugcore/js/src/core/Obj.js and 1 other location - About 30 mins to fix
        libraries/bugcore/js/src/core/Obj.js on lines 134..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 45.

        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 (!TypeUtil.isArray(changeTypes) && !TypeUtil.isString(changeTypes)) {
                        throw new ArgumentBug(ArgumentBug.ILLEGAL, "changeTypes", changeTypes, "parameter must either be an Array or a string");
                    }
        Severity: Minor
        Found in libraries/bugcore/js/src/observable/Observable.js and 1 other location - About 30 mins to fix
        libraries/bugcore/js/src/observable/Observable.js on lines 110..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 45.

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

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

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

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

        Refactorings

        Further Reading

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

                    for (var size = this.getItemReflectArray().getLength(), i = size - 1; i >= 0; i--) {
                        if (Obj.equals(this.getItemReflectArray().getAt(i).getValue(), value)) {
                            return i;
                        }
                    }
        Severity: Minor
        Found in libraries/bugcore/js/src/data/WeightedList.js and 1 other location - About 30 mins to fix
        libraries/bugcore/js/src/data/WeightedList.js on lines 275..279

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

        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

        Avoid too many return statements within this function.
        Open

                return 1;
        Severity: Major
        Found in lintbug.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return 1;
          Severity: Major
          Found in lintbug.js - About 30 mins to fix

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

                    doResolveAll: function(iterables) {
                        this.resolver   = Resolvers.resolveAll([this], iterables);
                        this.doResolve();
                    },
            Severity: Major
            Found in libraries/bugcore/js/src/promise/Promise.js and 3 other locations - About 30 mins to fix
            libraries/bugcore/js/src/promise/Promise.js on lines 442..445
            libraries/bugcore/js/src/promise/Promise.js on lines 451..454
            libraries/bugcore/js/src/promise/Promise.js on lines 460..463

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

            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 (!TypeUtil.isArray(pathPatterns) && !TypeUtil.isString(pathPatterns)) {
                            throw new ArgumentBug(ArgumentBug.ILLEGAL, "observationPathPatterns", pathPatterns, "parameter must either be an Array or a string");
                        }
            Severity: Minor
            Found in libraries/bugcore/js/src/observable/Observable.js and 1 other location - About 30 mins to fix
            libraries/bugcore/js/src/observable/Observable.js on lines 107..109

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

            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