mohayonao/SCScript

View on GitHub
src/sc/classlib/Core/Thread_test.js

Summary

Maintainability
D
1 day
Test Coverage

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

    it("#__tag", function() {
      var instance, test;

      instance = this.createInstance();

Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 8 other locations - About 2 hrs to fix
src/sc/classlib/Collections/String_test.js on lines 16..23
src/sc/classlib/Core/Char_test.js on lines 17..24
src/sc/classlib/Core/Function_test.js on lines 19..26
src/sc/classlib/Core/Nil_test.js on lines 15..22
src/sc/classlib/Core/Object_test.js on lines 17..24
src/sc/classlib/Core/Symbol_test.js on lines 16..23
src/sc/classlib/Math/Float_test.js on lines 16..23
src/sc/classlib/Math/Integer_test.js on lines 16..23

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

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

    it("#valueArray", function() {
      var instance;

      instance = this.createInstance();
      expect(instance.valueArray).to.equal(instance.value);
Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 3 other locations - About 1 hr to fix
src/sc/classlib/Core/Thread_test.js on lines 214..219
src/sc/classlib/Core/Thread_test.js on lines 221..226
src/sc/classlib/Core/Thread_test.js on lines 228..233

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

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

    it("#resume", function() {
      var instance;

      instance = this.createInstance();
      expect(instance.resume).to.equal(instance.next);
Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 3 other locations - About 1 hr to fix
src/sc/classlib/Core/Thread_test.js on lines 214..219
src/sc/classlib/Core/Thread_test.js on lines 228..233
src/sc/classlib/Core/Thread_test.js on lines 235..240

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

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

    it("#value", function() {
      var instance;

      instance = this.createInstance();
      expect(instance.value).to.equal(instance.next);
Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 3 other locations - About 1 hr to fix
src/sc/classlib/Core/Thread_test.js on lines 221..226
src/sc/classlib/Core/Thread_test.js on lines 228..233
src/sc/classlib/Core/Thread_test.js on lines 235..240

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

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

    it("#run", function() {
      var instance;

      instance = this.createInstance();
      expect(instance.run).to.equal(instance.next);
Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 3 other locations - About 1 hr to fix
src/sc/classlib/Core/Thread_test.js on lines 214..219
src/sc/classlib/Core/Thread_test.js on lines 221..226
src/sc/classlib/Core/Thread_test.js on lines 235..240

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

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

    it("#next", function() {
      var instance;

      instance = this.createInstance();
      expect(instance.next).to.doNothing;
Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 89 other locations - About 50 mins to fix
src/sc/classlib/Collections/ArrayedCollection_test.js on lines 622..627
src/sc/classlib/Collections/Collection_test.js on lines 215..220
src/sc/classlib/Collections/SequenceableCollection_test.js on lines 192..197
src/sc/classlib/Collections/SequenceableCollection_test.js on lines 1621..1626
src/sc/classlib/Collections/Set_test.js on lines 306..311
src/sc/classlib/Collections/String_test.js on lines 234..239
src/sc/classlib/Core/AbstractFunction_test.js on lines 325..330
src/sc/classlib/Core/Boolean_test.js on lines 146..151
src/sc/classlib/Core/Boolean_test.js on lines 238..243
src/sc/classlib/Core/Char_test.js on lines 120..125
src/sc/classlib/Core/Nil_test.js on lines 141..146
src/sc/classlib/Core/Nil_test.js on lines 148..153
src/sc/classlib/Core/Nil_test.js on lines 155..160
src/sc/classlib/Core/Nil_test.js on lines 162..167
src/sc/classlib/Core/Nil_test.js on lines 169..174
src/sc/classlib/Core/Nil_test.js on lines 185..190
src/sc/classlib/Core/Nil_test.js on lines 192..197
src/sc/classlib/Core/Nil_test.js on lines 199..204
src/sc/classlib/Core/Nil_test.js on lines 206..211
src/sc/classlib/Core/Nil_test.js on lines 213..218
src/sc/classlib/Core/Nil_test.js on lines 220..225
src/sc/classlib/Core/Nil_test.js on lines 227..232
src/sc/classlib/Core/Nil_test.js on lines 234..239
src/sc/classlib/Core/Nil_test.js on lines 241..246
src/sc/classlib/Core/Nil_test.js on lines 248..253
src/sc/classlib/Core/Nil_test.js on lines 268..273
src/sc/classlib/Core/Nil_test.js on lines 275..280
src/sc/classlib/Core/Nil_test.js on lines 282..287
src/sc/classlib/Core/Nil_test.js on lines 289..294
src/sc/classlib/Core/Nil_test.js on lines 296..301
src/sc/classlib/Core/Nil_test.js on lines 322..327
src/sc/classlib/Core/Nil_test.js on lines 362..367
src/sc/classlib/Core/Nil_test.js on lines 369..374
src/sc/classlib/Core/Nil_test.js on lines 449..454
src/sc/classlib/Core/Nil_test.js on lines 456..461
src/sc/classlib/Core/Nil_test.js on lines 497..502
src/sc/classlib/Core/Nil_test.js on lines 504..509
src/sc/classlib/Core/Nil_test.js on lines 511..516
src/sc/classlib/Core/Nil_test.js on lines 518..523
src/sc/classlib/Core/Nil_test.js on lines 548..553
src/sc/classlib/Core/Nil_test.js on lines 555..560
src/sc/classlib/Core/Object_test.js on lines 343..348
src/sc/classlib/Core/Object_test.js on lines 469..474
src/sc/classlib/Core/Object_test.js on lines 476..481
src/sc/classlib/Core/Object_test.js on lines 483..488
src/sc/classlib/Core/Object_test.js on lines 490..495
src/sc/classlib/Core/Object_test.js on lines 600..605
src/sc/classlib/Core/Object_test.js on lines 607..612
src/sc/classlib/Core/Object_test.js on lines 642..647
src/sc/classlib/Core/Object_test.js on lines 649..654
src/sc/classlib/Core/Object_test.js on lines 656..661
src/sc/classlib/Core/Object_test.js on lines 663..668
src/sc/classlib/Core/Object_test.js on lines 804..809
src/sc/classlib/Core/Object_test.js on lines 829..834
src/sc/classlib/Core/Object_test.js on lines 836..841
src/sc/classlib/Core/Object_test.js on lines 1080..1085
src/sc/classlib/Core/Object_test.js on lines 1168..1173
src/sc/classlib/Core/Object_test.js on lines 1184..1189
src/sc/classlib/Core/Object_test.js on lines 1624..1629
src/sc/classlib/Core/Object_test.js on lines 1631..1636
src/sc/classlib/Core/Object_test.js on lines 1757..1762
src/sc/classlib/Core/Object_test.js on lines 1764..1769
src/sc/classlib/Core/Object_test.js on lines 1771..1776
src/sc/classlib/Core/Object_test.js on lines 1863..1868
src/sc/classlib/Core/Ref_test.js on lines 119..124
src/sc/classlib/Core/Symbol_test.js on lines 47..52
src/sc/classlib/Core/Symbol_test.js on lines 268..273
src/sc/classlib/Core/Symbol_test.js on lines 299..304
src/sc/classlib/Core/Symbol_test.js on lines 422..427
src/sc/classlib/Core/Symbol_test.js on lines 429..434
src/sc/classlib/Core/Symbol_test.js on lines 436..441
src/sc/classlib/Core/Symbol_test.js on lines 443..448
src/sc/classlib/Core/Symbol_test.js on lines 450..455
src/sc/classlib/Core/Symbol_test.js on lines 457..462
src/sc/classlib/Core/Symbol_test.js on lines 516..521
src/sc/classlib/Core/Symbol_test.js on lines 523..528
src/sc/classlib/Core/Thread_test.js on lines 53..58
src/sc/classlib/Core/Thread_test.js on lines 109..114
src/sc/classlib/Core/Thread_test.js on lines 116..121
src/sc/classlib/Math/Number_test.js on lines 79..84
src/sc/classlib/Math/Number_test.js on lines 95..100
src/sc/classlib/Math/SimpleNumber_test.js on lines 987..992
src/sc/classlib/Math/SimpleNumber_test.js on lines 994..999
src/sc/classlib/Math/SimpleNumber_test.js on lines 1001..1006
src/sc/classlib/Math/SimpleNumber_test.js on lines 1008..1013
src/sc/classlib/Math/SimpleNumber_test.js on lines 1015..1020
src/sc/classlib/Math/SimpleNumber_test.js on lines 1022..1027
src/sc/classlib/Math/SimpleNumber_test.js on lines 1205..1210
src/sc/classlib/Streams/Stream_test.js on lines 43..48

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

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

    it("#value", function() {
      var instance;

      instance = this.createInstance();
      expect(instance.value).to.doNothing;
Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 89 other locations - About 50 mins to fix
src/sc/classlib/Collections/ArrayedCollection_test.js on lines 622..627
src/sc/classlib/Collections/Collection_test.js on lines 215..220
src/sc/classlib/Collections/SequenceableCollection_test.js on lines 192..197
src/sc/classlib/Collections/SequenceableCollection_test.js on lines 1621..1626
src/sc/classlib/Collections/Set_test.js on lines 306..311
src/sc/classlib/Collections/String_test.js on lines 234..239
src/sc/classlib/Core/AbstractFunction_test.js on lines 325..330
src/sc/classlib/Core/Boolean_test.js on lines 146..151
src/sc/classlib/Core/Boolean_test.js on lines 238..243
src/sc/classlib/Core/Char_test.js on lines 120..125
src/sc/classlib/Core/Nil_test.js on lines 141..146
src/sc/classlib/Core/Nil_test.js on lines 148..153
src/sc/classlib/Core/Nil_test.js on lines 155..160
src/sc/classlib/Core/Nil_test.js on lines 162..167
src/sc/classlib/Core/Nil_test.js on lines 169..174
src/sc/classlib/Core/Nil_test.js on lines 185..190
src/sc/classlib/Core/Nil_test.js on lines 192..197
src/sc/classlib/Core/Nil_test.js on lines 199..204
src/sc/classlib/Core/Nil_test.js on lines 206..211
src/sc/classlib/Core/Nil_test.js on lines 213..218
src/sc/classlib/Core/Nil_test.js on lines 220..225
src/sc/classlib/Core/Nil_test.js on lines 227..232
src/sc/classlib/Core/Nil_test.js on lines 234..239
src/sc/classlib/Core/Nil_test.js on lines 241..246
src/sc/classlib/Core/Nil_test.js on lines 248..253
src/sc/classlib/Core/Nil_test.js on lines 268..273
src/sc/classlib/Core/Nil_test.js on lines 275..280
src/sc/classlib/Core/Nil_test.js on lines 282..287
src/sc/classlib/Core/Nil_test.js on lines 289..294
src/sc/classlib/Core/Nil_test.js on lines 296..301
src/sc/classlib/Core/Nil_test.js on lines 322..327
src/sc/classlib/Core/Nil_test.js on lines 362..367
src/sc/classlib/Core/Nil_test.js on lines 369..374
src/sc/classlib/Core/Nil_test.js on lines 449..454
src/sc/classlib/Core/Nil_test.js on lines 456..461
src/sc/classlib/Core/Nil_test.js on lines 497..502
src/sc/classlib/Core/Nil_test.js on lines 504..509
src/sc/classlib/Core/Nil_test.js on lines 511..516
src/sc/classlib/Core/Nil_test.js on lines 518..523
src/sc/classlib/Core/Nil_test.js on lines 548..553
src/sc/classlib/Core/Nil_test.js on lines 555..560
src/sc/classlib/Core/Object_test.js on lines 343..348
src/sc/classlib/Core/Object_test.js on lines 469..474
src/sc/classlib/Core/Object_test.js on lines 476..481
src/sc/classlib/Core/Object_test.js on lines 483..488
src/sc/classlib/Core/Object_test.js on lines 490..495
src/sc/classlib/Core/Object_test.js on lines 600..605
src/sc/classlib/Core/Object_test.js on lines 607..612
src/sc/classlib/Core/Object_test.js on lines 642..647
src/sc/classlib/Core/Object_test.js on lines 649..654
src/sc/classlib/Core/Object_test.js on lines 656..661
src/sc/classlib/Core/Object_test.js on lines 663..668
src/sc/classlib/Core/Object_test.js on lines 804..809
src/sc/classlib/Core/Object_test.js on lines 829..834
src/sc/classlib/Core/Object_test.js on lines 836..841
src/sc/classlib/Core/Object_test.js on lines 1080..1085
src/sc/classlib/Core/Object_test.js on lines 1168..1173
src/sc/classlib/Core/Object_test.js on lines 1184..1189
src/sc/classlib/Core/Object_test.js on lines 1624..1629
src/sc/classlib/Core/Object_test.js on lines 1631..1636
src/sc/classlib/Core/Object_test.js on lines 1757..1762
src/sc/classlib/Core/Object_test.js on lines 1764..1769
src/sc/classlib/Core/Object_test.js on lines 1771..1776
src/sc/classlib/Core/Object_test.js on lines 1863..1868
src/sc/classlib/Core/Ref_test.js on lines 119..124
src/sc/classlib/Core/Symbol_test.js on lines 47..52
src/sc/classlib/Core/Symbol_test.js on lines 268..273
src/sc/classlib/Core/Symbol_test.js on lines 299..304
src/sc/classlib/Core/Symbol_test.js on lines 422..427
src/sc/classlib/Core/Symbol_test.js on lines 429..434
src/sc/classlib/Core/Symbol_test.js on lines 436..441
src/sc/classlib/Core/Symbol_test.js on lines 443..448
src/sc/classlib/Core/Symbol_test.js on lines 450..455
src/sc/classlib/Core/Symbol_test.js on lines 457..462
src/sc/classlib/Core/Symbol_test.js on lines 516..521
src/sc/classlib/Core/Symbol_test.js on lines 523..528
src/sc/classlib/Core/Thread_test.js on lines 53..58
src/sc/classlib/Core/Thread_test.js on lines 102..107
src/sc/classlib/Core/Thread_test.js on lines 116..121
src/sc/classlib/Math/Number_test.js on lines 79..84
src/sc/classlib/Math/Number_test.js on lines 95..100
src/sc/classlib/Math/SimpleNumber_test.js on lines 987..992
src/sc/classlib/Math/SimpleNumber_test.js on lines 994..999
src/sc/classlib/Math/SimpleNumber_test.js on lines 1001..1006
src/sc/classlib/Math/SimpleNumber_test.js on lines 1008..1013
src/sc/classlib/Math/SimpleNumber_test.js on lines 1015..1020
src/sc/classlib/Math/SimpleNumber_test.js on lines 1022..1027
src/sc/classlib/Math/SimpleNumber_test.js on lines 1205..1210
src/sc/classlib/Streams/Stream_test.js on lines 43..48

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

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

    it("#valueArray", function() {
      var instance;

      instance = this.createInstance();
      expect(instance.valueArray).to.doNothing;
Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 89 other locations - About 50 mins to fix
src/sc/classlib/Collections/ArrayedCollection_test.js on lines 622..627
src/sc/classlib/Collections/Collection_test.js on lines 215..220
src/sc/classlib/Collections/SequenceableCollection_test.js on lines 192..197
src/sc/classlib/Collections/SequenceableCollection_test.js on lines 1621..1626
src/sc/classlib/Collections/Set_test.js on lines 306..311
src/sc/classlib/Collections/String_test.js on lines 234..239
src/sc/classlib/Core/AbstractFunction_test.js on lines 325..330
src/sc/classlib/Core/Boolean_test.js on lines 146..151
src/sc/classlib/Core/Boolean_test.js on lines 238..243
src/sc/classlib/Core/Char_test.js on lines 120..125
src/sc/classlib/Core/Nil_test.js on lines 141..146
src/sc/classlib/Core/Nil_test.js on lines 148..153
src/sc/classlib/Core/Nil_test.js on lines 155..160
src/sc/classlib/Core/Nil_test.js on lines 162..167
src/sc/classlib/Core/Nil_test.js on lines 169..174
src/sc/classlib/Core/Nil_test.js on lines 185..190
src/sc/classlib/Core/Nil_test.js on lines 192..197
src/sc/classlib/Core/Nil_test.js on lines 199..204
src/sc/classlib/Core/Nil_test.js on lines 206..211
src/sc/classlib/Core/Nil_test.js on lines 213..218
src/sc/classlib/Core/Nil_test.js on lines 220..225
src/sc/classlib/Core/Nil_test.js on lines 227..232
src/sc/classlib/Core/Nil_test.js on lines 234..239
src/sc/classlib/Core/Nil_test.js on lines 241..246
src/sc/classlib/Core/Nil_test.js on lines 248..253
src/sc/classlib/Core/Nil_test.js on lines 268..273
src/sc/classlib/Core/Nil_test.js on lines 275..280
src/sc/classlib/Core/Nil_test.js on lines 282..287
src/sc/classlib/Core/Nil_test.js on lines 289..294
src/sc/classlib/Core/Nil_test.js on lines 296..301
src/sc/classlib/Core/Nil_test.js on lines 322..327
src/sc/classlib/Core/Nil_test.js on lines 362..367
src/sc/classlib/Core/Nil_test.js on lines 369..374
src/sc/classlib/Core/Nil_test.js on lines 449..454
src/sc/classlib/Core/Nil_test.js on lines 456..461
src/sc/classlib/Core/Nil_test.js on lines 497..502
src/sc/classlib/Core/Nil_test.js on lines 504..509
src/sc/classlib/Core/Nil_test.js on lines 511..516
src/sc/classlib/Core/Nil_test.js on lines 518..523
src/sc/classlib/Core/Nil_test.js on lines 548..553
src/sc/classlib/Core/Nil_test.js on lines 555..560
src/sc/classlib/Core/Object_test.js on lines 343..348
src/sc/classlib/Core/Object_test.js on lines 469..474
src/sc/classlib/Core/Object_test.js on lines 476..481
src/sc/classlib/Core/Object_test.js on lines 483..488
src/sc/classlib/Core/Object_test.js on lines 490..495
src/sc/classlib/Core/Object_test.js on lines 600..605
src/sc/classlib/Core/Object_test.js on lines 607..612
src/sc/classlib/Core/Object_test.js on lines 642..647
src/sc/classlib/Core/Object_test.js on lines 649..654
src/sc/classlib/Core/Object_test.js on lines 656..661
src/sc/classlib/Core/Object_test.js on lines 663..668
src/sc/classlib/Core/Object_test.js on lines 804..809
src/sc/classlib/Core/Object_test.js on lines 829..834
src/sc/classlib/Core/Object_test.js on lines 836..841
src/sc/classlib/Core/Object_test.js on lines 1080..1085
src/sc/classlib/Core/Object_test.js on lines 1168..1173
src/sc/classlib/Core/Object_test.js on lines 1184..1189
src/sc/classlib/Core/Object_test.js on lines 1624..1629
src/sc/classlib/Core/Object_test.js on lines 1631..1636
src/sc/classlib/Core/Object_test.js on lines 1757..1762
src/sc/classlib/Core/Object_test.js on lines 1764..1769
src/sc/classlib/Core/Object_test.js on lines 1771..1776
src/sc/classlib/Core/Object_test.js on lines 1863..1868
src/sc/classlib/Core/Ref_test.js on lines 119..124
src/sc/classlib/Core/Symbol_test.js on lines 47..52
src/sc/classlib/Core/Symbol_test.js on lines 268..273
src/sc/classlib/Core/Symbol_test.js on lines 299..304
src/sc/classlib/Core/Symbol_test.js on lines 422..427
src/sc/classlib/Core/Symbol_test.js on lines 429..434
src/sc/classlib/Core/Symbol_test.js on lines 436..441
src/sc/classlib/Core/Symbol_test.js on lines 443..448
src/sc/classlib/Core/Symbol_test.js on lines 450..455
src/sc/classlib/Core/Symbol_test.js on lines 457..462
src/sc/classlib/Core/Symbol_test.js on lines 516..521
src/sc/classlib/Core/Symbol_test.js on lines 523..528
src/sc/classlib/Core/Thread_test.js on lines 53..58
src/sc/classlib/Core/Thread_test.js on lines 102..107
src/sc/classlib/Core/Thread_test.js on lines 109..114
src/sc/classlib/Math/Number_test.js on lines 79..84
src/sc/classlib/Math/Number_test.js on lines 95..100
src/sc/classlib/Math/SimpleNumber_test.js on lines 987..992
src/sc/classlib/Math/SimpleNumber_test.js on lines 994..999
src/sc/classlib/Math/SimpleNumber_test.js on lines 1001..1006
src/sc/classlib/Math/SimpleNumber_test.js on lines 1008..1013
src/sc/classlib/Math/SimpleNumber_test.js on lines 1015..1020
src/sc/classlib/Math/SimpleNumber_test.js on lines 1022..1027
src/sc/classlib/Math/SimpleNumber_test.js on lines 1205..1210
src/sc/classlib/Streams/Stream_test.js on lines 43..48

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

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

    it("#copy", function() {
      var instance;

      instance = this.createInstance();
      expect(instance.copy).to.doNothing;
Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 89 other locations - About 50 mins to fix
src/sc/classlib/Collections/ArrayedCollection_test.js on lines 622..627
src/sc/classlib/Collections/Collection_test.js on lines 215..220
src/sc/classlib/Collections/SequenceableCollection_test.js on lines 192..197
src/sc/classlib/Collections/SequenceableCollection_test.js on lines 1621..1626
src/sc/classlib/Collections/Set_test.js on lines 306..311
src/sc/classlib/Collections/String_test.js on lines 234..239
src/sc/classlib/Core/AbstractFunction_test.js on lines 325..330
src/sc/classlib/Core/Boolean_test.js on lines 146..151
src/sc/classlib/Core/Boolean_test.js on lines 238..243
src/sc/classlib/Core/Char_test.js on lines 120..125
src/sc/classlib/Core/Nil_test.js on lines 141..146
src/sc/classlib/Core/Nil_test.js on lines 148..153
src/sc/classlib/Core/Nil_test.js on lines 155..160
src/sc/classlib/Core/Nil_test.js on lines 162..167
src/sc/classlib/Core/Nil_test.js on lines 169..174
src/sc/classlib/Core/Nil_test.js on lines 185..190
src/sc/classlib/Core/Nil_test.js on lines 192..197
src/sc/classlib/Core/Nil_test.js on lines 199..204
src/sc/classlib/Core/Nil_test.js on lines 206..211
src/sc/classlib/Core/Nil_test.js on lines 213..218
src/sc/classlib/Core/Nil_test.js on lines 220..225
src/sc/classlib/Core/Nil_test.js on lines 227..232
src/sc/classlib/Core/Nil_test.js on lines 234..239
src/sc/classlib/Core/Nil_test.js on lines 241..246
src/sc/classlib/Core/Nil_test.js on lines 248..253
src/sc/classlib/Core/Nil_test.js on lines 268..273
src/sc/classlib/Core/Nil_test.js on lines 275..280
src/sc/classlib/Core/Nil_test.js on lines 282..287
src/sc/classlib/Core/Nil_test.js on lines 289..294
src/sc/classlib/Core/Nil_test.js on lines 296..301
src/sc/classlib/Core/Nil_test.js on lines 322..327
src/sc/classlib/Core/Nil_test.js on lines 362..367
src/sc/classlib/Core/Nil_test.js on lines 369..374
src/sc/classlib/Core/Nil_test.js on lines 449..454
src/sc/classlib/Core/Nil_test.js on lines 456..461
src/sc/classlib/Core/Nil_test.js on lines 497..502
src/sc/classlib/Core/Nil_test.js on lines 504..509
src/sc/classlib/Core/Nil_test.js on lines 511..516
src/sc/classlib/Core/Nil_test.js on lines 518..523
src/sc/classlib/Core/Nil_test.js on lines 548..553
src/sc/classlib/Core/Nil_test.js on lines 555..560
src/sc/classlib/Core/Object_test.js on lines 343..348
src/sc/classlib/Core/Object_test.js on lines 469..474
src/sc/classlib/Core/Object_test.js on lines 476..481
src/sc/classlib/Core/Object_test.js on lines 483..488
src/sc/classlib/Core/Object_test.js on lines 490..495
src/sc/classlib/Core/Object_test.js on lines 600..605
src/sc/classlib/Core/Object_test.js on lines 607..612
src/sc/classlib/Core/Object_test.js on lines 642..647
src/sc/classlib/Core/Object_test.js on lines 649..654
src/sc/classlib/Core/Object_test.js on lines 656..661
src/sc/classlib/Core/Object_test.js on lines 663..668
src/sc/classlib/Core/Object_test.js on lines 804..809
src/sc/classlib/Core/Object_test.js on lines 829..834
src/sc/classlib/Core/Object_test.js on lines 836..841
src/sc/classlib/Core/Object_test.js on lines 1080..1085
src/sc/classlib/Core/Object_test.js on lines 1168..1173
src/sc/classlib/Core/Object_test.js on lines 1184..1189
src/sc/classlib/Core/Object_test.js on lines 1624..1629
src/sc/classlib/Core/Object_test.js on lines 1631..1636
src/sc/classlib/Core/Object_test.js on lines 1757..1762
src/sc/classlib/Core/Object_test.js on lines 1764..1769
src/sc/classlib/Core/Object_test.js on lines 1771..1776
src/sc/classlib/Core/Object_test.js on lines 1863..1868
src/sc/classlib/Core/Ref_test.js on lines 119..124
src/sc/classlib/Core/Symbol_test.js on lines 47..52
src/sc/classlib/Core/Symbol_test.js on lines 268..273
src/sc/classlib/Core/Symbol_test.js on lines 299..304
src/sc/classlib/Core/Symbol_test.js on lines 422..427
src/sc/classlib/Core/Symbol_test.js on lines 429..434
src/sc/classlib/Core/Symbol_test.js on lines 436..441
src/sc/classlib/Core/Symbol_test.js on lines 443..448
src/sc/classlib/Core/Symbol_test.js on lines 450..455
src/sc/classlib/Core/Symbol_test.js on lines 457..462
src/sc/classlib/Core/Symbol_test.js on lines 516..521
src/sc/classlib/Core/Symbol_test.js on lines 523..528
src/sc/classlib/Core/Thread_test.js on lines 102..107
src/sc/classlib/Core/Thread_test.js on lines 109..114
src/sc/classlib/Core/Thread_test.js on lines 116..121
src/sc/classlib/Math/Number_test.js on lines 79..84
src/sc/classlib/Math/Number_test.js on lines 95..100
src/sc/classlib/Math/SimpleNumber_test.js on lines 987..992
src/sc/classlib/Math/SimpleNumber_test.js on lines 994..999
src/sc/classlib/Math/SimpleNumber_test.js on lines 1001..1006
src/sc/classlib/Math/SimpleNumber_test.js on lines 1008..1013
src/sc/classlib/Math/SimpleNumber_test.js on lines 1015..1020
src/sc/classlib/Math/SimpleNumber_test.js on lines 1022..1027
src/sc/classlib/Math/SimpleNumber_test.js on lines 1205..1210
src/sc/classlib/Streams/Stream_test.js on lines 43..48

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

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

      expect(instance.state(), 0).to.be.a("SCInteger").that.equals(sc.STATE_INIT);
Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 77 other locations - About 35 mins to fix
src/sc/classlib/Core/Thread_test.js on lines 257..257
src/sc/classlib/Core/Thread_test.js on lines 259..259
src/sc/classlib/Core/Thread_test.js on lines 261..261
src/sc/classlib/Core/Thread_test.js on lines 263..263
src/sc/classlib/Core/Thread_test.js on lines 265..265
src/sc/classlib/Core/Thread_test.js on lines 267..267
src/sc/classlib/Core/Thread_test.js on lines 269..269
src/sc/classlib/Core/Thread_test.js on lines 272..272
src/sc/lang/bytecode_test.js on lines 261..261
src/sc/lang/bytecode_test.js on lines 263..263
src/sc/lang/bytecode_test.js on lines 276..276
src/sc/lang/bytecode_test.js on lines 278..278
src/sc/lang/bytecode_test.js on lines 291..291
src/sc/lang/bytecode_test.js on lines 293..293
src/sc/lang/bytecode_test.js on lines 295..295
src/sc/lang/bytecode_test.js on lines 328..328
src/sc/lang/bytecode_test.js on lines 330..330
src/sc/lang/bytecode_test.js on lines 334..334
src/sc/lang/bytecode_test.js on lines 371..371
src/sc/lang/bytecode_test.js on lines 373..373
src/sc/lang/bytecode_test.js on lines 375..375
src/sc/lang/bytecode_test.js on lines 377..377
src/sc/lang/bytecode_test.js on lines 379..379
src/sc/lang/bytecode_test.js on lines 383..383
src/sc/lang/bytecode_test.js on lines 430..430
src/sc/lang/bytecode_test.js on lines 432..432
src/sc/lang/bytecode_test.js on lines 434..434
src/sc/lang/bytecode_test.js on lines 436..436
src/sc/lang/bytecode_test.js on lines 438..438
src/sc/lang/bytecode_test.js on lines 442..442
src/sc/lang/bytecode_test.js on lines 456..456
src/sc/lang/bytecode_test.js on lines 458..458
src/sc/lang/bytecode_test.js on lines 460..460
src/sc/lang/bytecode_test.js on lines 462..462
src/sc/lang/bytecode_test.js on lines 464..464
src/sc/lang/bytecode_test.js on lines 466..466
src/sc/lang/bytecode_test.js on lines 496..496
src/sc/lang/bytecode_test.js on lines 498..498
src/sc/lang/bytecode_test.js on lines 500..500
src/sc/lang/bytecode_test.js on lines 502..502
src/sc/lang/bytecode_test.js on lines 506..506
src/sc/lang/bytecode_test.js on lines 508..508
src/sc/lang/bytecode_test.js on lines 555..555
src/sc/lang/bytecode_test.js on lines 557..557
src/sc/lang/bytecode_test.js on lines 559..559
src/sc/lang/bytecode_test.js on lines 565..565
src/sc/lang/bytecode_test.js on lines 567..567
src/sc/lang/bytecode_test.js on lines 569..569
src/sc/lang/bytecode_test.js on lines 575..575
src/sc/lang/bytecode_test.js on lines 622..622
src/sc/lang/bytecode_test.js on lines 624..624
src/sc/lang/bytecode_test.js on lines 626..626
src/sc/lang/bytecode_test.js on lines 632..632
src/sc/lang/bytecode_test.js on lines 635..635
src/sc/lang/bytecode_test.js on lines 637..637
src/sc/lang/bytecode_test.js on lines 639..639
src/sc/lang/bytecode_test.js on lines 645..645
src/sc/lang/bytecode_test.js on lines 725..725
src/sc/lang/bytecode_test.js on lines 727..727
src/sc/lang/bytecode_test.js on lines 731..731
src/sc/lang/bytecode_test.js on lines 733..733
src/sc/lang/bytecode_test.js on lines 735..735
src/sc/lang/bytecode_test.js on lines 739..739
src/sc/lang/bytecode_test.js on lines 741..741
src/sc/lang/bytecode_test.js on lines 745..745
src/sc/lang/bytecode_test.js on lines 768..768
src/sc/lang/bytecode_test.js on lines 770..770
src/sc/lang/bytecode_test.js on lines 774..774
src/sc/lang/bytecode_test.js on lines 808..808
src/sc/lang/bytecode_test.js on lines 810..810
src/sc/lang/bytecode_test.js on lines 814..814
src/sc/lang/bytecode_test.js on lines 818..818
src/sc/lang/bytecode_test.js on lines 838..838
src/sc/lang/bytecode_test.js on lines 840..840
src/sc/lang/bytecode_test.js on lines 891..891
src/sc/lang/bytecode_test.js on lines 893..893
src/sc/lang/bytecode_test.js on lines 895..895

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

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

      expect(instance.state(), 4).to.be.a("SCInteger").that.equals(sc.STATE_SUSPENDED);
Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 77 other locations - About 35 mins to fix
src/sc/classlib/Core/Thread_test.js on lines 255..255
src/sc/classlib/Core/Thread_test.js on lines 257..257
src/sc/classlib/Core/Thread_test.js on lines 261..261
src/sc/classlib/Core/Thread_test.js on lines 263..263
src/sc/classlib/Core/Thread_test.js on lines 265..265
src/sc/classlib/Core/Thread_test.js on lines 267..267
src/sc/classlib/Core/Thread_test.js on lines 269..269
src/sc/classlib/Core/Thread_test.js on lines 272..272
src/sc/lang/bytecode_test.js on lines 261..261
src/sc/lang/bytecode_test.js on lines 263..263
src/sc/lang/bytecode_test.js on lines 276..276
src/sc/lang/bytecode_test.js on lines 278..278
src/sc/lang/bytecode_test.js on lines 291..291
src/sc/lang/bytecode_test.js on lines 293..293
src/sc/lang/bytecode_test.js on lines 295..295
src/sc/lang/bytecode_test.js on lines 328..328
src/sc/lang/bytecode_test.js on lines 330..330
src/sc/lang/bytecode_test.js on lines 334..334
src/sc/lang/bytecode_test.js on lines 371..371
src/sc/lang/bytecode_test.js on lines 373..373
src/sc/lang/bytecode_test.js on lines 375..375
src/sc/lang/bytecode_test.js on lines 377..377
src/sc/lang/bytecode_test.js on lines 379..379
src/sc/lang/bytecode_test.js on lines 383..383
src/sc/lang/bytecode_test.js on lines 430..430
src/sc/lang/bytecode_test.js on lines 432..432
src/sc/lang/bytecode_test.js on lines 434..434
src/sc/lang/bytecode_test.js on lines 436..436
src/sc/lang/bytecode_test.js on lines 438..438
src/sc/lang/bytecode_test.js on lines 442..442
src/sc/lang/bytecode_test.js on lines 456..456
src/sc/lang/bytecode_test.js on lines 458..458
src/sc/lang/bytecode_test.js on lines 460..460
src/sc/lang/bytecode_test.js on lines 462..462
src/sc/lang/bytecode_test.js on lines 464..464
src/sc/lang/bytecode_test.js on lines 466..466
src/sc/lang/bytecode_test.js on lines 496..496
src/sc/lang/bytecode_test.js on lines 498..498
src/sc/lang/bytecode_test.js on lines 500..500
src/sc/lang/bytecode_test.js on lines 502..502
src/sc/lang/bytecode_test.js on lines 506..506
src/sc/lang/bytecode_test.js on lines 508..508
src/sc/lang/bytecode_test.js on lines 555..555
src/sc/lang/bytecode_test.js on lines 557..557
src/sc/lang/bytecode_test.js on lines 559..559
src/sc/lang/bytecode_test.js on lines 565..565
src/sc/lang/bytecode_test.js on lines 567..567
src/sc/lang/bytecode_test.js on lines 569..569
src/sc/lang/bytecode_test.js on lines 575..575
src/sc/lang/bytecode_test.js on lines 622..622
src/sc/lang/bytecode_test.js on lines 624..624
src/sc/lang/bytecode_test.js on lines 626..626
src/sc/lang/bytecode_test.js on lines 632..632
src/sc/lang/bytecode_test.js on lines 635..635
src/sc/lang/bytecode_test.js on lines 637..637
src/sc/lang/bytecode_test.js on lines 639..639
src/sc/lang/bytecode_test.js on lines 645..645
src/sc/lang/bytecode_test.js on lines 725..725
src/sc/lang/bytecode_test.js on lines 727..727
src/sc/lang/bytecode_test.js on lines 731..731
src/sc/lang/bytecode_test.js on lines 733..733
src/sc/lang/bytecode_test.js on lines 735..735
src/sc/lang/bytecode_test.js on lines 739..739
src/sc/lang/bytecode_test.js on lines 741..741
src/sc/lang/bytecode_test.js on lines 745..745
src/sc/lang/bytecode_test.js on lines 768..768
src/sc/lang/bytecode_test.js on lines 770..770
src/sc/lang/bytecode_test.js on lines 774..774
src/sc/lang/bytecode_test.js on lines 808..808
src/sc/lang/bytecode_test.js on lines 810..810
src/sc/lang/bytecode_test.js on lines 814..814
src/sc/lang/bytecode_test.js on lines 818..818
src/sc/lang/bytecode_test.js on lines 838..838
src/sc/lang/bytecode_test.js on lines 840..840
src/sc/lang/bytecode_test.js on lines 891..891
src/sc/lang/bytecode_test.js on lines 893..893
src/sc/lang/bytecode_test.js on lines 895..895

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

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

      expect(instance.state(), 6).to.be.a("SCInteger").that.equals(sc.STATE_INIT);
Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 77 other locations - About 35 mins to fix
src/sc/classlib/Core/Thread_test.js on lines 255..255
src/sc/classlib/Core/Thread_test.js on lines 257..257
src/sc/classlib/Core/Thread_test.js on lines 259..259
src/sc/classlib/Core/Thread_test.js on lines 263..263
src/sc/classlib/Core/Thread_test.js on lines 265..265
src/sc/classlib/Core/Thread_test.js on lines 267..267
src/sc/classlib/Core/Thread_test.js on lines 269..269
src/sc/classlib/Core/Thread_test.js on lines 272..272
src/sc/lang/bytecode_test.js on lines 261..261
src/sc/lang/bytecode_test.js on lines 263..263
src/sc/lang/bytecode_test.js on lines 276..276
src/sc/lang/bytecode_test.js on lines 278..278
src/sc/lang/bytecode_test.js on lines 291..291
src/sc/lang/bytecode_test.js on lines 293..293
src/sc/lang/bytecode_test.js on lines 295..295
src/sc/lang/bytecode_test.js on lines 328..328
src/sc/lang/bytecode_test.js on lines 330..330
src/sc/lang/bytecode_test.js on lines 334..334
src/sc/lang/bytecode_test.js on lines 371..371
src/sc/lang/bytecode_test.js on lines 373..373
src/sc/lang/bytecode_test.js on lines 375..375
src/sc/lang/bytecode_test.js on lines 377..377
src/sc/lang/bytecode_test.js on lines 379..379
src/sc/lang/bytecode_test.js on lines 383..383
src/sc/lang/bytecode_test.js on lines 430..430
src/sc/lang/bytecode_test.js on lines 432..432
src/sc/lang/bytecode_test.js on lines 434..434
src/sc/lang/bytecode_test.js on lines 436..436
src/sc/lang/bytecode_test.js on lines 438..438
src/sc/lang/bytecode_test.js on lines 442..442
src/sc/lang/bytecode_test.js on lines 456..456
src/sc/lang/bytecode_test.js on lines 458..458
src/sc/lang/bytecode_test.js on lines 460..460
src/sc/lang/bytecode_test.js on lines 462..462
src/sc/lang/bytecode_test.js on lines 464..464
src/sc/lang/bytecode_test.js on lines 466..466
src/sc/lang/bytecode_test.js on lines 496..496
src/sc/lang/bytecode_test.js on lines 498..498
src/sc/lang/bytecode_test.js on lines 500..500
src/sc/lang/bytecode_test.js on lines 502..502
src/sc/lang/bytecode_test.js on lines 506..506
src/sc/lang/bytecode_test.js on lines 508..508
src/sc/lang/bytecode_test.js on lines 555..555
src/sc/lang/bytecode_test.js on lines 557..557
src/sc/lang/bytecode_test.js on lines 559..559
src/sc/lang/bytecode_test.js on lines 565..565
src/sc/lang/bytecode_test.js on lines 567..567
src/sc/lang/bytecode_test.js on lines 569..569
src/sc/lang/bytecode_test.js on lines 575..575
src/sc/lang/bytecode_test.js on lines 622..622
src/sc/lang/bytecode_test.js on lines 624..624
src/sc/lang/bytecode_test.js on lines 626..626
src/sc/lang/bytecode_test.js on lines 632..632
src/sc/lang/bytecode_test.js on lines 635..635
src/sc/lang/bytecode_test.js on lines 637..637
src/sc/lang/bytecode_test.js on lines 639..639
src/sc/lang/bytecode_test.js on lines 645..645
src/sc/lang/bytecode_test.js on lines 725..725
src/sc/lang/bytecode_test.js on lines 727..727
src/sc/lang/bytecode_test.js on lines 731..731
src/sc/lang/bytecode_test.js on lines 733..733
src/sc/lang/bytecode_test.js on lines 735..735
src/sc/lang/bytecode_test.js on lines 739..739
src/sc/lang/bytecode_test.js on lines 741..741
src/sc/lang/bytecode_test.js on lines 745..745
src/sc/lang/bytecode_test.js on lines 768..768
src/sc/lang/bytecode_test.js on lines 770..770
src/sc/lang/bytecode_test.js on lines 774..774
src/sc/lang/bytecode_test.js on lines 808..808
src/sc/lang/bytecode_test.js on lines 810..810
src/sc/lang/bytecode_test.js on lines 814..814
src/sc/lang/bytecode_test.js on lines 818..818
src/sc/lang/bytecode_test.js on lines 838..838
src/sc/lang/bytecode_test.js on lines 840..840
src/sc/lang/bytecode_test.js on lines 891..891
src/sc/lang/bytecode_test.js on lines 893..893
src/sc/lang/bytecode_test.js on lines 895..895

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

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

      expect(instance.state(),10).to.be.a("SCInteger").that.equals(sc.STATE_SUSPENDED);
Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 77 other locations - About 35 mins to fix
src/sc/classlib/Core/Thread_test.js on lines 255..255
src/sc/classlib/Core/Thread_test.js on lines 257..257
src/sc/classlib/Core/Thread_test.js on lines 259..259
src/sc/classlib/Core/Thread_test.js on lines 261..261
src/sc/classlib/Core/Thread_test.js on lines 263..263
src/sc/classlib/Core/Thread_test.js on lines 267..267
src/sc/classlib/Core/Thread_test.js on lines 269..269
src/sc/classlib/Core/Thread_test.js on lines 272..272
src/sc/lang/bytecode_test.js on lines 261..261
src/sc/lang/bytecode_test.js on lines 263..263
src/sc/lang/bytecode_test.js on lines 276..276
src/sc/lang/bytecode_test.js on lines 278..278
src/sc/lang/bytecode_test.js on lines 291..291
src/sc/lang/bytecode_test.js on lines 293..293
src/sc/lang/bytecode_test.js on lines 295..295
src/sc/lang/bytecode_test.js on lines 328..328
src/sc/lang/bytecode_test.js on lines 330..330
src/sc/lang/bytecode_test.js on lines 334..334
src/sc/lang/bytecode_test.js on lines 371..371
src/sc/lang/bytecode_test.js on lines 373..373
src/sc/lang/bytecode_test.js on lines 375..375
src/sc/lang/bytecode_test.js on lines 377..377
src/sc/lang/bytecode_test.js on lines 379..379
src/sc/lang/bytecode_test.js on lines 383..383
src/sc/lang/bytecode_test.js on lines 430..430
src/sc/lang/bytecode_test.js on lines 432..432
src/sc/lang/bytecode_test.js on lines 434..434
src/sc/lang/bytecode_test.js on lines 436..436
src/sc/lang/bytecode_test.js on lines 438..438
src/sc/lang/bytecode_test.js on lines 442..442
src/sc/lang/bytecode_test.js on lines 456..456
src/sc/lang/bytecode_test.js on lines 458..458
src/sc/lang/bytecode_test.js on lines 460..460
src/sc/lang/bytecode_test.js on lines 462..462
src/sc/lang/bytecode_test.js on lines 464..464
src/sc/lang/bytecode_test.js on lines 466..466
src/sc/lang/bytecode_test.js on lines 496..496
src/sc/lang/bytecode_test.js on lines 498..498
src/sc/lang/bytecode_test.js on lines 500..500
src/sc/lang/bytecode_test.js on lines 502..502
src/sc/lang/bytecode_test.js on lines 506..506
src/sc/lang/bytecode_test.js on lines 508..508
src/sc/lang/bytecode_test.js on lines 555..555
src/sc/lang/bytecode_test.js on lines 557..557
src/sc/lang/bytecode_test.js on lines 559..559
src/sc/lang/bytecode_test.js on lines 565..565
src/sc/lang/bytecode_test.js on lines 567..567
src/sc/lang/bytecode_test.js on lines 569..569
src/sc/lang/bytecode_test.js on lines 575..575
src/sc/lang/bytecode_test.js on lines 622..622
src/sc/lang/bytecode_test.js on lines 624..624
src/sc/lang/bytecode_test.js on lines 626..626
src/sc/lang/bytecode_test.js on lines 632..632
src/sc/lang/bytecode_test.js on lines 635..635
src/sc/lang/bytecode_test.js on lines 637..637
src/sc/lang/bytecode_test.js on lines 639..639
src/sc/lang/bytecode_test.js on lines 645..645
src/sc/lang/bytecode_test.js on lines 725..725
src/sc/lang/bytecode_test.js on lines 727..727
src/sc/lang/bytecode_test.js on lines 731..731
src/sc/lang/bytecode_test.js on lines 733..733
src/sc/lang/bytecode_test.js on lines 735..735
src/sc/lang/bytecode_test.js on lines 739..739
src/sc/lang/bytecode_test.js on lines 741..741
src/sc/lang/bytecode_test.js on lines 745..745
src/sc/lang/bytecode_test.js on lines 768..768
src/sc/lang/bytecode_test.js on lines 770..770
src/sc/lang/bytecode_test.js on lines 774..774
src/sc/lang/bytecode_test.js on lines 808..808
src/sc/lang/bytecode_test.js on lines 810..810
src/sc/lang/bytecode_test.js on lines 814..814
src/sc/lang/bytecode_test.js on lines 818..818
src/sc/lang/bytecode_test.js on lines 838..838
src/sc/lang/bytecode_test.js on lines 840..840
src/sc/lang/bytecode_test.js on lines 891..891
src/sc/lang/bytecode_test.js on lines 893..893
src/sc/lang/bytecode_test.js on lines 895..895

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

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

      expect(instance.state(), 2).to.be.a("SCInteger").that.equals(sc.STATE_SUSPENDED);
Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 77 other locations - About 35 mins to fix
src/sc/classlib/Core/Thread_test.js on lines 255..255
src/sc/classlib/Core/Thread_test.js on lines 259..259
src/sc/classlib/Core/Thread_test.js on lines 261..261
src/sc/classlib/Core/Thread_test.js on lines 263..263
src/sc/classlib/Core/Thread_test.js on lines 265..265
src/sc/classlib/Core/Thread_test.js on lines 267..267
src/sc/classlib/Core/Thread_test.js on lines 269..269
src/sc/classlib/Core/Thread_test.js on lines 272..272
src/sc/lang/bytecode_test.js on lines 261..261
src/sc/lang/bytecode_test.js on lines 263..263
src/sc/lang/bytecode_test.js on lines 276..276
src/sc/lang/bytecode_test.js on lines 278..278
src/sc/lang/bytecode_test.js on lines 291..291
src/sc/lang/bytecode_test.js on lines 293..293
src/sc/lang/bytecode_test.js on lines 295..295
src/sc/lang/bytecode_test.js on lines 328..328
src/sc/lang/bytecode_test.js on lines 330..330
src/sc/lang/bytecode_test.js on lines 334..334
src/sc/lang/bytecode_test.js on lines 371..371
src/sc/lang/bytecode_test.js on lines 373..373
src/sc/lang/bytecode_test.js on lines 375..375
src/sc/lang/bytecode_test.js on lines 377..377
src/sc/lang/bytecode_test.js on lines 379..379
src/sc/lang/bytecode_test.js on lines 383..383
src/sc/lang/bytecode_test.js on lines 430..430
src/sc/lang/bytecode_test.js on lines 432..432
src/sc/lang/bytecode_test.js on lines 434..434
src/sc/lang/bytecode_test.js on lines 436..436
src/sc/lang/bytecode_test.js on lines 438..438
src/sc/lang/bytecode_test.js on lines 442..442
src/sc/lang/bytecode_test.js on lines 456..456
src/sc/lang/bytecode_test.js on lines 458..458
src/sc/lang/bytecode_test.js on lines 460..460
src/sc/lang/bytecode_test.js on lines 462..462
src/sc/lang/bytecode_test.js on lines 464..464
src/sc/lang/bytecode_test.js on lines 466..466
src/sc/lang/bytecode_test.js on lines 496..496
src/sc/lang/bytecode_test.js on lines 498..498
src/sc/lang/bytecode_test.js on lines 500..500
src/sc/lang/bytecode_test.js on lines 502..502
src/sc/lang/bytecode_test.js on lines 506..506
src/sc/lang/bytecode_test.js on lines 508..508
src/sc/lang/bytecode_test.js on lines 555..555
src/sc/lang/bytecode_test.js on lines 557..557
src/sc/lang/bytecode_test.js on lines 559..559
src/sc/lang/bytecode_test.js on lines 565..565
src/sc/lang/bytecode_test.js on lines 567..567
src/sc/lang/bytecode_test.js on lines 569..569
src/sc/lang/bytecode_test.js on lines 575..575
src/sc/lang/bytecode_test.js on lines 622..622
src/sc/lang/bytecode_test.js on lines 624..624
src/sc/lang/bytecode_test.js on lines 626..626
src/sc/lang/bytecode_test.js on lines 632..632
src/sc/lang/bytecode_test.js on lines 635..635
src/sc/lang/bytecode_test.js on lines 637..637
src/sc/lang/bytecode_test.js on lines 639..639
src/sc/lang/bytecode_test.js on lines 645..645
src/sc/lang/bytecode_test.js on lines 725..725
src/sc/lang/bytecode_test.js on lines 727..727
src/sc/lang/bytecode_test.js on lines 731..731
src/sc/lang/bytecode_test.js on lines 733..733
src/sc/lang/bytecode_test.js on lines 735..735
src/sc/lang/bytecode_test.js on lines 739..739
src/sc/lang/bytecode_test.js on lines 741..741
src/sc/lang/bytecode_test.js on lines 745..745
src/sc/lang/bytecode_test.js on lines 768..768
src/sc/lang/bytecode_test.js on lines 770..770
src/sc/lang/bytecode_test.js on lines 774..774
src/sc/lang/bytecode_test.js on lines 808..808
src/sc/lang/bytecode_test.js on lines 810..810
src/sc/lang/bytecode_test.js on lines 814..814
src/sc/lang/bytecode_test.js on lines 818..818
src/sc/lang/bytecode_test.js on lines 838..838
src/sc/lang/bytecode_test.js on lines 840..840
src/sc/lang/bytecode_test.js on lines 891..891
src/sc/lang/bytecode_test.js on lines 893..893
src/sc/lang/bytecode_test.js on lines 895..895

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

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

      expect(instance.state(),12).to.be.a("SCInteger").that.equals(sc.STATE_SUSPENDED);
Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 77 other locations - About 35 mins to fix
src/sc/classlib/Core/Thread_test.js on lines 255..255
src/sc/classlib/Core/Thread_test.js on lines 257..257
src/sc/classlib/Core/Thread_test.js on lines 259..259
src/sc/classlib/Core/Thread_test.js on lines 261..261
src/sc/classlib/Core/Thread_test.js on lines 263..263
src/sc/classlib/Core/Thread_test.js on lines 265..265
src/sc/classlib/Core/Thread_test.js on lines 269..269
src/sc/classlib/Core/Thread_test.js on lines 272..272
src/sc/lang/bytecode_test.js on lines 261..261
src/sc/lang/bytecode_test.js on lines 263..263
src/sc/lang/bytecode_test.js on lines 276..276
src/sc/lang/bytecode_test.js on lines 278..278
src/sc/lang/bytecode_test.js on lines 291..291
src/sc/lang/bytecode_test.js on lines 293..293
src/sc/lang/bytecode_test.js on lines 295..295
src/sc/lang/bytecode_test.js on lines 328..328
src/sc/lang/bytecode_test.js on lines 330..330
src/sc/lang/bytecode_test.js on lines 334..334
src/sc/lang/bytecode_test.js on lines 371..371
src/sc/lang/bytecode_test.js on lines 373..373
src/sc/lang/bytecode_test.js on lines 375..375
src/sc/lang/bytecode_test.js on lines 377..377
src/sc/lang/bytecode_test.js on lines 379..379
src/sc/lang/bytecode_test.js on lines 383..383
src/sc/lang/bytecode_test.js on lines 430..430
src/sc/lang/bytecode_test.js on lines 432..432
src/sc/lang/bytecode_test.js on lines 434..434
src/sc/lang/bytecode_test.js on lines 436..436
src/sc/lang/bytecode_test.js on lines 438..438
src/sc/lang/bytecode_test.js on lines 442..442
src/sc/lang/bytecode_test.js on lines 456..456
src/sc/lang/bytecode_test.js on lines 458..458
src/sc/lang/bytecode_test.js on lines 460..460
src/sc/lang/bytecode_test.js on lines 462..462
src/sc/lang/bytecode_test.js on lines 464..464
src/sc/lang/bytecode_test.js on lines 466..466
src/sc/lang/bytecode_test.js on lines 496..496
src/sc/lang/bytecode_test.js on lines 498..498
src/sc/lang/bytecode_test.js on lines 500..500
src/sc/lang/bytecode_test.js on lines 502..502
src/sc/lang/bytecode_test.js on lines 506..506
src/sc/lang/bytecode_test.js on lines 508..508
src/sc/lang/bytecode_test.js on lines 555..555
src/sc/lang/bytecode_test.js on lines 557..557
src/sc/lang/bytecode_test.js on lines 559..559
src/sc/lang/bytecode_test.js on lines 565..565
src/sc/lang/bytecode_test.js on lines 567..567
src/sc/lang/bytecode_test.js on lines 569..569
src/sc/lang/bytecode_test.js on lines 575..575
src/sc/lang/bytecode_test.js on lines 622..622
src/sc/lang/bytecode_test.js on lines 624..624
src/sc/lang/bytecode_test.js on lines 626..626
src/sc/lang/bytecode_test.js on lines 632..632
src/sc/lang/bytecode_test.js on lines 635..635
src/sc/lang/bytecode_test.js on lines 637..637
src/sc/lang/bytecode_test.js on lines 639..639
src/sc/lang/bytecode_test.js on lines 645..645
src/sc/lang/bytecode_test.js on lines 725..725
src/sc/lang/bytecode_test.js on lines 727..727
src/sc/lang/bytecode_test.js on lines 731..731
src/sc/lang/bytecode_test.js on lines 733..733
src/sc/lang/bytecode_test.js on lines 735..735
src/sc/lang/bytecode_test.js on lines 739..739
src/sc/lang/bytecode_test.js on lines 741..741
src/sc/lang/bytecode_test.js on lines 745..745
src/sc/lang/bytecode_test.js on lines 768..768
src/sc/lang/bytecode_test.js on lines 770..770
src/sc/lang/bytecode_test.js on lines 774..774
src/sc/lang/bytecode_test.js on lines 808..808
src/sc/lang/bytecode_test.js on lines 810..810
src/sc/lang/bytecode_test.js on lines 814..814
src/sc/lang/bytecode_test.js on lines 818..818
src/sc/lang/bytecode_test.js on lines 838..838
src/sc/lang/bytecode_test.js on lines 840..840
src/sc/lang/bytecode_test.js on lines 891..891
src/sc/lang/bytecode_test.js on lines 893..893
src/sc/lang/bytecode_test.js on lines 895..895

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

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

      expect(instance.state(), 8).to.be.a("SCInteger").that.equals(sc.STATE_SUSPENDED);
Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 77 other locations - About 35 mins to fix
src/sc/classlib/Core/Thread_test.js on lines 255..255
src/sc/classlib/Core/Thread_test.js on lines 257..257
src/sc/classlib/Core/Thread_test.js on lines 259..259
src/sc/classlib/Core/Thread_test.js on lines 261..261
src/sc/classlib/Core/Thread_test.js on lines 265..265
src/sc/classlib/Core/Thread_test.js on lines 267..267
src/sc/classlib/Core/Thread_test.js on lines 269..269
src/sc/classlib/Core/Thread_test.js on lines 272..272
src/sc/lang/bytecode_test.js on lines 261..261
src/sc/lang/bytecode_test.js on lines 263..263
src/sc/lang/bytecode_test.js on lines 276..276
src/sc/lang/bytecode_test.js on lines 278..278
src/sc/lang/bytecode_test.js on lines 291..291
src/sc/lang/bytecode_test.js on lines 293..293
src/sc/lang/bytecode_test.js on lines 295..295
src/sc/lang/bytecode_test.js on lines 328..328
src/sc/lang/bytecode_test.js on lines 330..330
src/sc/lang/bytecode_test.js on lines 334..334
src/sc/lang/bytecode_test.js on lines 371..371
src/sc/lang/bytecode_test.js on lines 373..373
src/sc/lang/bytecode_test.js on lines 375..375
src/sc/lang/bytecode_test.js on lines 377..377
src/sc/lang/bytecode_test.js on lines 379..379
src/sc/lang/bytecode_test.js on lines 383..383
src/sc/lang/bytecode_test.js on lines 430..430
src/sc/lang/bytecode_test.js on lines 432..432
src/sc/lang/bytecode_test.js on lines 434..434
src/sc/lang/bytecode_test.js on lines 436..436
src/sc/lang/bytecode_test.js on lines 438..438
src/sc/lang/bytecode_test.js on lines 442..442
src/sc/lang/bytecode_test.js on lines 456..456
src/sc/lang/bytecode_test.js on lines 458..458
src/sc/lang/bytecode_test.js on lines 460..460
src/sc/lang/bytecode_test.js on lines 462..462
src/sc/lang/bytecode_test.js on lines 464..464
src/sc/lang/bytecode_test.js on lines 466..466
src/sc/lang/bytecode_test.js on lines 496..496
src/sc/lang/bytecode_test.js on lines 498..498
src/sc/lang/bytecode_test.js on lines 500..500
src/sc/lang/bytecode_test.js on lines 502..502
src/sc/lang/bytecode_test.js on lines 506..506
src/sc/lang/bytecode_test.js on lines 508..508
src/sc/lang/bytecode_test.js on lines 555..555
src/sc/lang/bytecode_test.js on lines 557..557
src/sc/lang/bytecode_test.js on lines 559..559
src/sc/lang/bytecode_test.js on lines 565..565
src/sc/lang/bytecode_test.js on lines 567..567
src/sc/lang/bytecode_test.js on lines 569..569
src/sc/lang/bytecode_test.js on lines 575..575
src/sc/lang/bytecode_test.js on lines 622..622
src/sc/lang/bytecode_test.js on lines 624..624
src/sc/lang/bytecode_test.js on lines 626..626
src/sc/lang/bytecode_test.js on lines 632..632
src/sc/lang/bytecode_test.js on lines 635..635
src/sc/lang/bytecode_test.js on lines 637..637
src/sc/lang/bytecode_test.js on lines 639..639
src/sc/lang/bytecode_test.js on lines 645..645
src/sc/lang/bytecode_test.js on lines 725..725
src/sc/lang/bytecode_test.js on lines 727..727
src/sc/lang/bytecode_test.js on lines 731..731
src/sc/lang/bytecode_test.js on lines 733..733
src/sc/lang/bytecode_test.js on lines 735..735
src/sc/lang/bytecode_test.js on lines 739..739
src/sc/lang/bytecode_test.js on lines 741..741
src/sc/lang/bytecode_test.js on lines 745..745
src/sc/lang/bytecode_test.js on lines 768..768
src/sc/lang/bytecode_test.js on lines 770..770
src/sc/lang/bytecode_test.js on lines 774..774
src/sc/lang/bytecode_test.js on lines 808..808
src/sc/lang/bytecode_test.js on lines 810..810
src/sc/lang/bytecode_test.js on lines 814..814
src/sc/lang/bytecode_test.js on lines 818..818
src/sc/lang/bytecode_test.js on lines 838..838
src/sc/lang/bytecode_test.js on lines 840..840
src/sc/lang/bytecode_test.js on lines 891..891
src/sc/lang/bytecode_test.js on lines 893..893
src/sc/lang/bytecode_test.js on lines 895..895

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

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

      expect(instance.state(),17).to.be.a("SCInteger").that.equals(sc.STATE_INIT);
Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 77 other locations - About 35 mins to fix
src/sc/classlib/Core/Thread_test.js on lines 255..255
src/sc/classlib/Core/Thread_test.js on lines 257..257
src/sc/classlib/Core/Thread_test.js on lines 259..259
src/sc/classlib/Core/Thread_test.js on lines 261..261
src/sc/classlib/Core/Thread_test.js on lines 263..263
src/sc/classlib/Core/Thread_test.js on lines 265..265
src/sc/classlib/Core/Thread_test.js on lines 267..267
src/sc/classlib/Core/Thread_test.js on lines 269..269
src/sc/lang/bytecode_test.js on lines 261..261
src/sc/lang/bytecode_test.js on lines 263..263
src/sc/lang/bytecode_test.js on lines 276..276
src/sc/lang/bytecode_test.js on lines 278..278
src/sc/lang/bytecode_test.js on lines 291..291
src/sc/lang/bytecode_test.js on lines 293..293
src/sc/lang/bytecode_test.js on lines 295..295
src/sc/lang/bytecode_test.js on lines 328..328
src/sc/lang/bytecode_test.js on lines 330..330
src/sc/lang/bytecode_test.js on lines 334..334
src/sc/lang/bytecode_test.js on lines 371..371
src/sc/lang/bytecode_test.js on lines 373..373
src/sc/lang/bytecode_test.js on lines 375..375
src/sc/lang/bytecode_test.js on lines 377..377
src/sc/lang/bytecode_test.js on lines 379..379
src/sc/lang/bytecode_test.js on lines 383..383
src/sc/lang/bytecode_test.js on lines 430..430
src/sc/lang/bytecode_test.js on lines 432..432
src/sc/lang/bytecode_test.js on lines 434..434
src/sc/lang/bytecode_test.js on lines 436..436
src/sc/lang/bytecode_test.js on lines 438..438
src/sc/lang/bytecode_test.js on lines 442..442
src/sc/lang/bytecode_test.js on lines 456..456
src/sc/lang/bytecode_test.js on lines 458..458
src/sc/lang/bytecode_test.js on lines 460..460
src/sc/lang/bytecode_test.js on lines 462..462
src/sc/lang/bytecode_test.js on lines 464..464
src/sc/lang/bytecode_test.js on lines 466..466
src/sc/lang/bytecode_test.js on lines 496..496
src/sc/lang/bytecode_test.js on lines 498..498
src/sc/lang/bytecode_test.js on lines 500..500
src/sc/lang/bytecode_test.js on lines 502..502
src/sc/lang/bytecode_test.js on lines 506..506
src/sc/lang/bytecode_test.js on lines 508..508
src/sc/lang/bytecode_test.js on lines 555..555
src/sc/lang/bytecode_test.js on lines 557..557
src/sc/lang/bytecode_test.js on lines 559..559
src/sc/lang/bytecode_test.js on lines 565..565
src/sc/lang/bytecode_test.js on lines 567..567
src/sc/lang/bytecode_test.js on lines 569..569
src/sc/lang/bytecode_test.js on lines 575..575
src/sc/lang/bytecode_test.js on lines 622..622
src/sc/lang/bytecode_test.js on lines 624..624
src/sc/lang/bytecode_test.js on lines 626..626
src/sc/lang/bytecode_test.js on lines 632..632
src/sc/lang/bytecode_test.js on lines 635..635
src/sc/lang/bytecode_test.js on lines 637..637
src/sc/lang/bytecode_test.js on lines 639..639
src/sc/lang/bytecode_test.js on lines 645..645
src/sc/lang/bytecode_test.js on lines 725..725
src/sc/lang/bytecode_test.js on lines 727..727
src/sc/lang/bytecode_test.js on lines 731..731
src/sc/lang/bytecode_test.js on lines 733..733
src/sc/lang/bytecode_test.js on lines 735..735
src/sc/lang/bytecode_test.js on lines 739..739
src/sc/lang/bytecode_test.js on lines 741..741
src/sc/lang/bytecode_test.js on lines 745..745
src/sc/lang/bytecode_test.js on lines 768..768
src/sc/lang/bytecode_test.js on lines 770..770
src/sc/lang/bytecode_test.js on lines 774..774
src/sc/lang/bytecode_test.js on lines 808..808
src/sc/lang/bytecode_test.js on lines 810..810
src/sc/lang/bytecode_test.js on lines 814..814
src/sc/lang/bytecode_test.js on lines 818..818
src/sc/lang/bytecode_test.js on lines 838..838
src/sc/lang/bytecode_test.js on lines 840..840
src/sc/lang/bytecode_test.js on lines 891..891
src/sc/lang/bytecode_test.js on lines 893..893
src/sc/lang/bytecode_test.js on lines 895..895

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

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

      expect(instance.state(),14).to.be.a("SCInteger").that.equals(sc.STATE_DONE);
Severity: Major
Found in src/sc/classlib/Core/Thread_test.js and 77 other locations - About 35 mins to fix
src/sc/classlib/Core/Thread_test.js on lines 255..255
src/sc/classlib/Core/Thread_test.js on lines 257..257
src/sc/classlib/Core/Thread_test.js on lines 259..259
src/sc/classlib/Core/Thread_test.js on lines 261..261
src/sc/classlib/Core/Thread_test.js on lines 263..263
src/sc/classlib/Core/Thread_test.js on lines 265..265
src/sc/classlib/Core/Thread_test.js on lines 267..267
src/sc/classlib/Core/Thread_test.js on lines 272..272
src/sc/lang/bytecode_test.js on lines 261..261
src/sc/lang/bytecode_test.js on lines 263..263
src/sc/lang/bytecode_test.js on lines 276..276
src/sc/lang/bytecode_test.js on lines 278..278
src/sc/lang/bytecode_test.js on lines 291..291
src/sc/lang/bytecode_test.js on lines 293..293
src/sc/lang/bytecode_test.js on lines 295..295
src/sc/lang/bytecode_test.js on lines 328..328
src/sc/lang/bytecode_test.js on lines 330..330
src/sc/lang/bytecode_test.js on lines 334..334
src/sc/lang/bytecode_test.js on lines 371..371
src/sc/lang/bytecode_test.js on lines 373..373
src/sc/lang/bytecode_test.js on lines 375..375
src/sc/lang/bytecode_test.js on lines 377..377
src/sc/lang/bytecode_test.js on lines 379..379
src/sc/lang/bytecode_test.js on lines 383..383
src/sc/lang/bytecode_test.js on lines 430..430
src/sc/lang/bytecode_test.js on lines 432..432
src/sc/lang/bytecode_test.js on lines 434..434
src/sc/lang/bytecode_test.js on lines 436..436
src/sc/lang/bytecode_test.js on lines 438..438
src/sc/lang/bytecode_test.js on lines 442..442
src/sc/lang/bytecode_test.js on lines 456..456
src/sc/lang/bytecode_test.js on lines 458..458
src/sc/lang/bytecode_test.js on lines 460..460
src/sc/lang/bytecode_test.js on lines 462..462
src/sc/lang/bytecode_test.js on lines 464..464
src/sc/lang/bytecode_test.js on lines 466..466
src/sc/lang/bytecode_test.js on lines 496..496
src/sc/lang/bytecode_test.js on lines 498..498
src/sc/lang/bytecode_test.js on lines 500..500
src/sc/lang/bytecode_test.js on lines 502..502
src/sc/lang/bytecode_test.js on lines 506..506
src/sc/lang/bytecode_test.js on lines 508..508
src/sc/lang/bytecode_test.js on lines 555..555
src/sc/lang/bytecode_test.js on lines 557..557
src/sc/lang/bytecode_test.js on lines 559..559
src/sc/lang/bytecode_test.js on lines 565..565
src/sc/lang/bytecode_test.js on lines 567..567
src/sc/lang/bytecode_test.js on lines 569..569
src/sc/lang/bytecode_test.js on lines 575..575
src/sc/lang/bytecode_test.js on lines 622..622
src/sc/lang/bytecode_test.js on lines 624..624
src/sc/lang/bytecode_test.js on lines 626..626
src/sc/lang/bytecode_test.js on lines 632..632
src/sc/lang/bytecode_test.js on lines 635..635
src/sc/lang/bytecode_test.js on lines 637..637
src/sc/lang/bytecode_test.js on lines 639..639
src/sc/lang/bytecode_test.js on lines 645..645
src/sc/lang/bytecode_test.js on lines 725..725
src/sc/lang/bytecode_test.js on lines 727..727
src/sc/lang/bytecode_test.js on lines 731..731
src/sc/lang/bytecode_test.js on lines 733..733
src/sc/lang/bytecode_test.js on lines 735..735
src/sc/lang/bytecode_test.js on lines 739..739
src/sc/lang/bytecode_test.js on lines 741..741
src/sc/lang/bytecode_test.js on lines 745..745
src/sc/lang/bytecode_test.js on lines 768..768
src/sc/lang/bytecode_test.js on lines 770..770
src/sc/lang/bytecode_test.js on lines 774..774
src/sc/lang/bytecode_test.js on lines 808..808
src/sc/lang/bytecode_test.js on lines 810..810
src/sc/lang/bytecode_test.js on lines 814..814
src/sc/lang/bytecode_test.js on lines 818..818
src/sc/lang/bytecode_test.js on lines 838..838
src/sc/lang/bytecode_test.js on lines 840..840
src/sc/lang/bytecode_test.js on lines 891..891
src/sc/lang/bytecode_test.js on lines 893..893
src/sc/lang/bytecode_test.js on lines 895..895

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

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