mohayonao/SCScript

View on GitHub
src/sc/classlib/Collections/ArrayedCollection.js

Summary

Maintainability
F
1 wk
Test Coverage

File ArrayedCollection.js has 741 lines of code (exceeds 250 allowed). Consider refactoring.
Open

SCScript.install(function(sc) {
  "use strict";

  require("./SequenceableCollection");

Severity: Major
Found in src/sc/classlib/Collections/ArrayedCollection.js - About 1 day to fix

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

        builder.addMethod("foldPut", {
          args: "index; item"
        }, function($index, $item) {
          throwIfImmutable(this);
    
    
    Severity: Major
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 2 other locations - About 7 hrs to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 176..190
    src/sc/classlib/Collections/ArrayedCollection.js on lines 192..206

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

    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

        builder.addMethod("clipPut", {
          args: "index; item"
        }, function($index, $item) {
          throwIfImmutable(this);
    
    
    Severity: Major
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 2 other locations - About 7 hrs to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 192..206
    src/sc/classlib/Collections/ArrayedCollection.js on lines 208..222

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

    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

        builder.addMethod("wrapPut", {
          args: "index; item"
        }, function($index, $item) {
          throwIfImmutable(this);
    
    
    Severity: Major
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 2 other locations - About 7 hrs to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 176..190
    src/sc/classlib/Collections/ArrayedCollection.js on lines 208..222

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

    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

        builder.addMethod("foldAt", {
          args: "index"
        }, function($index) {
          var i;
    
    
    Severity: Major
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 1 other location - About 6 hrs to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 116..131

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

    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

        builder.addMethod("wrapAt", {
          args: "index"
        }, function($index) {
          var i;
    
    
    Severity: Major
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 1 other location - About 6 hrs to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 133..148

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

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

      sc.lang.klass.define("DoubleArray : RawArray", function(builder) {
        var float64 = new Float64Array(1);
    
        builder.addMethod("valueOf", function() {
          return new Float64Array(this._.map(function($elem) {
    Severity: Major
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 4 other locations - About 5 hrs to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 872..885
    src/sc/classlib/Collections/ArrayedCollection.js on lines 887..900
    src/sc/classlib/Collections/ArrayedCollection.js on lines 902..915
    src/sc/classlib/Collections/ArrayedCollection.js on lines 917..930

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

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

      sc.lang.klass.define("Int16Array : RawArray", function(builder) {
        var int16 = new Int16Array(1);
    
        builder.addMethod("valueOf", function() {
          return new Int16Array(this._.map(function($elem) {
    Severity: Major
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 4 other locations - About 5 hrs to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 872..885
    src/sc/classlib/Collections/ArrayedCollection.js on lines 902..915
    src/sc/classlib/Collections/ArrayedCollection.js on lines 917..930
    src/sc/classlib/Collections/ArrayedCollection.js on lines 932..945

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

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

      sc.lang.klass.define("Int32Array : RawArray", function(builder) {
        var int32 = new Int32Array(1);
    
        builder.addMethod("valueOf", function() {
          return new Int32Array(this._.map(function($elem) {
    Severity: Major
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 4 other locations - About 5 hrs to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 872..885
    src/sc/classlib/Collections/ArrayedCollection.js on lines 887..900
    src/sc/classlib/Collections/ArrayedCollection.js on lines 917..930
    src/sc/classlib/Collections/ArrayedCollection.js on lines 932..945

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

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

      sc.lang.klass.define("Int8Array : RawArray", function(builder) {
        var int8 = new Int8Array(1);
    
        builder.addMethod("valueOf", function() {
          return new Int8Array(this._.map(function($elem) {
    Severity: Major
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 4 other locations - About 5 hrs to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 887..900
    src/sc/classlib/Collections/ArrayedCollection.js on lines 902..915
    src/sc/classlib/Collections/ArrayedCollection.js on lines 917..930
    src/sc/classlib/Collections/ArrayedCollection.js on lines 932..945

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

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

      sc.lang.klass.define("FloatArray : RawArray", function(builder) {
        var float32 = new Float32Array(1);
    
        builder.addMethod("valueOf", function() {
          return new Float32Array(this._.map(function($elem) {
    Severity: Major
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 4 other locations - About 5 hrs to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 872..885
    src/sc/classlib/Collections/ArrayedCollection.js on lines 887..900
    src/sc/classlib/Collections/ArrayedCollection.js on lines 902..915
    src/sc/classlib/Collections/ArrayedCollection.js on lines 932..945

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

    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

        builder.addMethod("atDec", {
          args: "index; dec=1"
        }, function($index, $dec) {
          this.put($index, this.at($index).$("-", [ $dec ]));
          return this;
    Severity: Major
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 1 other location - About 1 hr to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 360..365

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

        builder.addMethod("atInc", {
          args: "index; inc=1"
        }, function($index, $inc) {
          this.put($index, this.at($index).$("+", [ $inc ]));
          return this;
    Severity: Major
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 1 other location - About 1 hr to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 367..372

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

        builder.addMethod("do", function($function) {
          sc.lang.iterator.execute(
            sc.lang.iterator.array$do(this),
            $function
          );
    Severity: Major
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 6 other locations - About 1 hr to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 646..652
    src/sc/classlib/Collections/Set.js on lines 41..47
    src/sc/classlib/Core/Object.js on lines 97..103
    src/sc/classlib/Math/Float.js on lines 191..197
    src/sc/classlib/Math/Integer.js on lines 217..223
    src/sc/classlib/Math/Integer.js on lines 252..258

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

    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

        builder.addMethod("reverseDo", function($function) {
          sc.lang.iterator.execute(
            sc.lang.iterator.array$reverseDo(this),
            $function
          );
    Severity: Major
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 6 other locations - About 1 hr to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 638..644
    src/sc/classlib/Collections/Set.js on lines 41..47
    src/sc/classlib/Core/Object.js on lines 97..103
    src/sc/classlib/Math/Float.js on lines 191..197
    src/sc/classlib/Math/Integer.js on lines 217..223
    src/sc/classlib/Math/Integer.js on lines 252..258

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

    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

          for (i = 0, imax = shape.length; i < imax; ++i) {
            size *= shape[i].__int__();
          }
    Severity: Minor
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 1 other location - About 45 mins to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 817..819

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

    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

          for (i = 0, imax = args.length; i < imax; ++i) {
            product *= args[i].__int__();
          }
    Severity: Minor
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 1 other location - About 45 mins to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 719..721

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

    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

          } else if (step < 0) {
            for (i = first; i >= last; i += step) {
              raw.push(this._[i]);
            }
          }
    Severity: Minor
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 1 other location - About 35 mins to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 423..431

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 46.

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

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

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

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

    Refactorings

    Further Reading

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

          if (step > 0) {
            for (i = first; i <= last; i += step) {
              raw.push(this._[i]);
            }
          } else if (step < 0) {
    Severity: Minor
    Found in src/sc/classlib/Collections/ArrayedCollection.js and 1 other location - About 35 mins to fix
    src/sc/classlib/Collections/ArrayedCollection.js on lines 427..431

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 46.

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

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

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

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

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status