mohayonao/SCScript

View on GitHub

Showing 1,467 of 1,712 total issues

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

    it("#detectIndexMsg", sinon.test(function() {
      var instance, test;
      var $elem1 = $$(-2);
      var $elem2 = $$(-1);
      var $elem3 = $$( 0);
Severity: Major
Found in src/sc/classlib/Collections/Collection_test.js and 1 other location - About 1 day to fix
src/sc/classlib/Collections/Collection_test.js on lines 595..616

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

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

    it("#detectMsg", sinon.test(function() {
      var instance, test;
      var $elem1 = $$(-2);
      var $elem2 = $$(-1);
      var $elem3 = $$( 0);
Severity: Major
Found in src/sc/classlib/Collections/Collection_test.js and 1 other location - About 1 day to fix
src/sc/classlib/Collections/Collection_test.js on lines 618..639

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

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

    it("array$do", function() {
      var iter = sc.lang.iterator.array$do($$([ 1, 2, 3, 4 ]));

      testTwice(iter, function(iter) {
        expect(iter.hasNext, 1).to.be.true;
Severity: Major
Found in src/sc/lang/iterator_test.js and 1 other location - About 1 day to fix
src/sc/lang/iterator_test.js on lines 601..613

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

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

    it("array$reverseDo", function() {
      var iter = sc.lang.iterator.array$reverseDo($$([ 1, 2, 3, 4 ]));

      testTwice(iter, function(iter) {
        expect(iter.hasNext, 1).to.be.true;
Severity: Major
Found in src/sc/lang/iterator_test.js and 1 other location - About 1 day to fix
src/sc/lang/iterator_test.js on lines 578..590

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

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

      "1 +.f 2": {
        type: Syntax.BinaryExpression,
        operator: "+",
        left: {
          type: Syntax.Literal,
Severity: Major
Found in src/sc/lang/compiler/parser/binop-expr_test.js and 1 other location - About 1 day to fix
src/sc/lang/compiler/parser/binop-expr_test.js on lines 150..188

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

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

      "1 +.0 2": {
        type: Syntax.BinaryExpression,
        operator: "+",
        left: {
          type: Syntax.Literal,
Severity: Major
Found in src/sc/lang/compiler/parser/binop-expr_test.js and 1 other location - About 1 day to fix
src/sc/lang/compiler/parser/binop-expr_test.js on lines 189..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 291.

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

      "var a = 0;": [
        {
          type: Syntax.VariableDeclaration,
          kind: "var",
          declarations: [
Severity: Major
Found in src/sc/lang/compiler/parser/function-expr_test.js and 1 other location - About 1 day to fix
src/sc/lang/compiler/parser/block-expr_test.js on lines 18..57

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

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

        body: [
          {
            type: Syntax.VariableDeclaration,
            kind: "var",
            declarations: [
Severity: Major
Found in src/sc/lang/compiler/parser/block-expr_test.js and 1 other location - About 1 day to fix
src/sc/lang/compiler/parser/function-expr_test.js on lines 501..540

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

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

    it("integer$forBy downto", function() {
      var iter = sc.lang.iterator.integer$forBy($$(5), $$(1), $$(-2));

      testTwice(iter, function(iter) {
        expect(iter.hasNext, 1).to.be.true;
Severity: Major
Found in src/sc/lang/iterator_test.js and 1 other location - About 1 day to fix
src/sc/lang/iterator_test.js on lines 179..190

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

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

    it("number$forBy downto", function() {
      var iter = sc.lang.iterator.number$forBy($$(5), $$(1), $$(-2));

      testTwice(iter, function(iter) {
        expect(iter.hasNext, 1).to.be.true;
Severity: Major
Found in src/sc/lang/iterator_test.js and 1 other location - About 1 day to fix
src/sc/lang/iterator_test.js on lines 338..349

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

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

    it("number$forSeries downto", function() {
      var iter = sc.lang.iterator.number$forSeries($$(5), $$(3), $$(1));

      testTwice(iter, function(iter) {
        expect(iter.hasNext, 1).to.be.true;
Severity: Major
Found in src/sc/lang/iterator_test.js and 7 other locations - About 1 day to fix
src/sc/lang/iterator_test.js on lines 166..177
src/sc/lang/iterator_test.js on lines 212..223
src/sc/lang/iterator_test.js on lines 325..336
src/sc/lang/iterator_test.js on lines 370..381
src/sc/lang/iterator_test.js on lines 383..394
src/sc/lang/iterator_test.js on lines 543..554
src/sc/lang/iterator_test.js on lines 556..567

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

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

    it("integer$forSeries", function() {
      var iter = sc.lang.iterator.integer$forSeries($$(5), $$(3), $$(1));

      testTwice(iter, function(iter) {
        expect(iter.hasNext, 1).to.be.true;
Severity: Major
Found in src/sc/lang/iterator_test.js and 7 other locations - About 1 day to fix
src/sc/lang/iterator_test.js on lines 166..177
src/sc/lang/iterator_test.js on lines 212..223
src/sc/lang/iterator_test.js on lines 225..236
src/sc/lang/iterator_test.js on lines 325..336
src/sc/lang/iterator_test.js on lines 370..381
src/sc/lang/iterator_test.js on lines 543..554
src/sc/lang/iterator_test.js on lines 556..567

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

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

    it("float$forSeries upto", function() {
      var iter = sc.lang.iterator.float$forSeries($$(1.5), $$(3.5), $$(5.5));

      testTwice(iter, function(iter) {
        expect(iter.hasNext, 1).to.be.true;
Severity: Major
Found in src/sc/lang/iterator_test.js and 7 other locations - About 1 day to fix
src/sc/lang/iterator_test.js on lines 166..177
src/sc/lang/iterator_test.js on lines 212..223
src/sc/lang/iterator_test.js on lines 225..236
src/sc/lang/iterator_test.js on lines 325..336
src/sc/lang/iterator_test.js on lines 370..381
src/sc/lang/iterator_test.js on lines 383..394
src/sc/lang/iterator_test.js on lines 556..567

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

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

    it("integer$forSeries", function() {
      var iter = sc.lang.iterator.integer$forSeries($$(1), $$(3), $$(5));

      testTwice(iter, function(iter) {
        expect(iter.hasNext, 1).to.be.true;
Severity: Major
Found in src/sc/lang/iterator_test.js and 7 other locations - About 1 day to fix
src/sc/lang/iterator_test.js on lines 166..177
src/sc/lang/iterator_test.js on lines 212..223
src/sc/lang/iterator_test.js on lines 225..236
src/sc/lang/iterator_test.js on lines 325..336
src/sc/lang/iterator_test.js on lines 383..394
src/sc/lang/iterator_test.js on lines 543..554
src/sc/lang/iterator_test.js on lines 556..567

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

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

    it("float$forSeries downto", function() {
      var iter = sc.lang.iterator.float$forSeries($$(5.5), $$(3.5), $$(1.5));

      testTwice(iter, function(iter) {
        expect(iter.hasNext, 1).to.be.true;
Severity: Major
Found in src/sc/lang/iterator_test.js and 7 other locations - About 1 day to fix
src/sc/lang/iterator_test.js on lines 166..177
src/sc/lang/iterator_test.js on lines 212..223
src/sc/lang/iterator_test.js on lines 225..236
src/sc/lang/iterator_test.js on lines 325..336
src/sc/lang/iterator_test.js on lines 370..381
src/sc/lang/iterator_test.js on lines 383..394
src/sc/lang/iterator_test.js on lines 543..554

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

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

    it("integer$forBy upto", function() {
      var iter = sc.lang.iterator.integer$forBy($$(1), $$(5), $$(2));

      testTwice(iter, function(iter) {
        expect(iter.hasNext, 1).to.be.true;
Severity: Major
Found in src/sc/lang/iterator_test.js and 7 other locations - About 1 day to fix
src/sc/lang/iterator_test.js on lines 166..177
src/sc/lang/iterator_test.js on lines 212..223
src/sc/lang/iterator_test.js on lines 225..236
src/sc/lang/iterator_test.js on lines 370..381
src/sc/lang/iterator_test.js on lines 383..394
src/sc/lang/iterator_test.js on lines 543..554
src/sc/lang/iterator_test.js on lines 556..567

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

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

    it("number$forBy upto", function() {
      var iter = sc.lang.iterator.number$forBy($$(1), $$(5), $$(2));

      testTwice(iter, function(iter) {
        expect(iter.hasNext, 1).to.be.true;
Severity: Major
Found in src/sc/lang/iterator_test.js and 7 other locations - About 1 day to fix
src/sc/lang/iterator_test.js on lines 212..223
src/sc/lang/iterator_test.js on lines 225..236
src/sc/lang/iterator_test.js on lines 325..336
src/sc/lang/iterator_test.js on lines 370..381
src/sc/lang/iterator_test.js on lines 383..394
src/sc/lang/iterator_test.js on lines 543..554
src/sc/lang/iterator_test.js on lines 556..567

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

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

    it("number$forSeries upto", function() {
      var iter = sc.lang.iterator.number$forSeries($$(1), $$(3), $$(5));

      testTwice(iter, function(iter) {
        expect(iter.hasNext, 1).to.be.true;
Severity: Major
Found in src/sc/lang/iterator_test.js and 7 other locations - About 1 day to fix
src/sc/lang/iterator_test.js on lines 166..177
src/sc/lang/iterator_test.js on lines 225..236
src/sc/lang/iterator_test.js on lines 325..336
src/sc/lang/iterator_test.js on lines 370..381
src/sc/lang/iterator_test.js on lines 383..394
src/sc/lang/iterator_test.js on lines 543..554
src/sc/lang/iterator_test.js on lines 556..567

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

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

    it("#keyToDegree", sinon.test(function() {
      var instance, test;
      var $scale = $$();
      var $stepsPerOctave = $$();
      var $item1 = sc.test.object({ keyToDegree: this.spy(function() {
Severity: Major
Found in src/sc/classlib/Collections/SequenceableCollection_test.js and 1 other location - About 1 day to fix
src/sc/classlib/Collections/SequenceableCollection_test.js on lines 1010..1027

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

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

    it("#degreeToKey", sinon.test(function() {
      var instance, test;
      var $scale = $$();
      var $stepsPerOctave = $$();
      var $item1 = sc.test.object({ degreeToKey: this.spy(function() {
Severity: Major
Found in src/sc/classlib/Collections/SequenceableCollection_test.js and 1 other location - About 1 day to fix
src/sc/classlib/Collections/SequenceableCollection_test.js on lines 1029..1046

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

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