mohayonao/SCScript

View on GitHub
src/sc/libs/mathlib_test.js

Summary

Maintainability
F
1 wk
Test Coverage

File mathlib_test.js has 672 lines of code (exceeds 250 allowed). Consider refactoring.
Open

describe("sc.libs.mathlib", function() {
  "use strict";

  var mathlib = sc.libs.mathlib;
  var strlib  = sc.libs.strlib;
Severity: Major
Found in src/sc/libs/mathlib_test.js - About 1 day to fix

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

      it("wrap", function() {
        testCase(this, [
          [ +0.0, -0.2, -0.2, -0.2 ],
          [ -0.2, -0.2, +0.2, -0.2 ],
          [ +0.2, -0.2, +0.2, -0.2 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 1 other location - About 6 hrs to fix
    src/sc/libs/mathlib_test.js on lines 676..688

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

    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("fold", function() {
        testCase(this, [
          [ +0.0, -0.2, -0.2, -0.2 ],
          [ -0.2, -0.2, +0.2, -0.2 ],
          [ +0.2, -0.2, +0.2, +0.2 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 1 other location - About 6 hrs to fix
    src/sc/libs/mathlib_test.js on lines 640..652

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

    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("ring3", function() {
        testCase(this, [
          [ -31.4, -1.5, -1478.94 ],
          [ -31.4,  0.0,     0.00 ],
          [ -31.4, +1.5,  1478.94 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 1 other location - About 3 hrs to fix
    src/sc/libs/mathlib_test.js on lines 389..401

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

    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("ring4", function() {
        testCase(this, [
          [ -31.4, -1.5, -1408.29 ],
          [ -31.4,  0.0,     0.00 ],
          [ -31.4, +1.5,  1549.59 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 1 other location - About 3 hrs to fix
    src/sc/libs/mathlib_test.js on lines 375..387

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("sqrsum", function() {
        testCase(this, [
          [ -31.4, -1.5, 1082.41 ],
          [ -31.4,  0.0,  985.96 ],
          [ -31.4, +1.5,  894.01 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 4 other locations - About 3 hrs to fix
    src/sc/libs/mathlib_test.js on lines 277..289
    src/sc/libs/mathlib_test.js on lines 291..303
    src/sc/libs/mathlib_test.js on lines 417..429
    src/sc/libs/mathlib_test.js on lines 445..457

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("sumsqr", function() {
        testCase(this, [
          [ -31.4, -1.5, 988.21 ],
          [ -31.4,  0.0, 985.96 ],
          [ -31.4, +1.5, 988.21 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 4 other locations - About 3 hrs to fix
    src/sc/libs/mathlib_test.js on lines 277..289
    src/sc/libs/mathlib_test.js on lines 291..303
    src/sc/libs/mathlib_test.js on lines 431..443
    src/sc/libs/mathlib_test.js on lines 445..457

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("hypot", function() {
        testCase(this, [
          [ -31.4, -1.5, 31.435807608522 ],
          [ -31.4,  0.0, 31.4 ],
          [ -31.4, +1.5, 31.435807608522 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 4 other locations - About 3 hrs to fix
    src/sc/libs/mathlib_test.js on lines 291..303
    src/sc/libs/mathlib_test.js on lines 417..429
    src/sc/libs/mathlib_test.js on lines 431..443
    src/sc/libs/mathlib_test.js on lines 445..457

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("hypotApx", function() {
        testCase(this, [
          [ -31.4, -1.5, 32.278679648042 ],
          [ -31.4,  0.0, 31.4 ],
          [ -31.4, +1.5, 32.278679648042 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 4 other locations - About 3 hrs to fix
    src/sc/libs/mathlib_test.js on lines 277..289
    src/sc/libs/mathlib_test.js on lines 417..429
    src/sc/libs/mathlib_test.js on lines 431..443
    src/sc/libs/mathlib_test.js on lines 445..457

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("sqrdif", function() {
        testCase(this, [
          [ -31.4, -1.5,  894.01 ],
          [ -31.4,  0.0,  985.96 ],
          [ -31.4, +1.5, 1082.41 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 4 other locations - About 3 hrs to fix
    src/sc/libs/mathlib_test.js on lines 277..289
    src/sc/libs/mathlib_test.js on lines 291..303
    src/sc/libs/mathlib_test.js on lines 417..429
    src/sc/libs/mathlib_test.js on lines 431..443

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("roundUp", function() {
        testCase(this, [
          [ -31.4, -1.5, -31.5 ],
          [ -31.4,  0.0, -31.4 ],
          [ -31.4, +1.5, -30.0 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 4 other locations - About 3 hrs to fix
    src/sc/libs/mathlib_test.js on lines 221..233
    src/sc/libs/mathlib_test.js on lines 249..261
    src/sc/libs/mathlib_test.js on lines 305..317
    src/sc/libs/mathlib_test.js on lines 319..331

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("rightShift", function() {
        testCase(this, [
          [ -31.4, -1.5, -62 ],
          [ -31.4,  0.0, -31 ],
          [ -31.4, +1.5, -16 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 4 other locations - About 3 hrs to fix
    src/sc/libs/mathlib_test.js on lines 221..233
    src/sc/libs/mathlib_test.js on lines 235..247
    src/sc/libs/mathlib_test.js on lines 249..261
    src/sc/libs/mathlib_test.js on lines 305..317

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("round", function() {
        testCase(this, [
          [ -31.4, -1.5, -31.5 ],
          [ -31.4,  0.0, -31.4 ],
          [ -31.4, +1.5, -31.5 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 4 other locations - About 3 hrs to fix
    src/sc/libs/mathlib_test.js on lines 235..247
    src/sc/libs/mathlib_test.js on lines 249..261
    src/sc/libs/mathlib_test.js on lines 305..317
    src/sc/libs/mathlib_test.js on lines 319..331

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("leftShift", function() {
        testCase(this, [
          [ -31.4, -1.5, -16 ],
          [ -31.4,  0.0, -31 ],
          [ -31.4, +1.5, -62 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 4 other locations - About 3 hrs to fix
    src/sc/libs/mathlib_test.js on lines 221..233
    src/sc/libs/mathlib_test.js on lines 235..247
    src/sc/libs/mathlib_test.js on lines 249..261
    src/sc/libs/mathlib_test.js on lines 319..331

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("trunc", function() {
        testCase(this, [
          [ -31.4, -1.5, -30.0 ],
          [ -31.4,  0.0, -31.4 ],
          [ -31.4, +1.5, -31.5 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 4 other locations - About 3 hrs to fix
    src/sc/libs/mathlib_test.js on lines 221..233
    src/sc/libs/mathlib_test.js on lines 235..247
    src/sc/libs/mathlib_test.js on lines 305..317
    src/sc/libs/mathlib_test.js on lines 319..331

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("gcd", function() {
        testCase(this, [
          [ -42, -24,  6 ],
          [ -42,   0, 42 ],
          [ -42, +24,  6 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 4 other locations - About 2 hrs to fix
    src/sc/libs/mathlib_test.js on lines 193..205
    src/sc/libs/mathlib_test.js on lines 333..345
    src/sc/libs/mathlib_test.js on lines 459..471
    src/sc/libs/mathlib_test.js on lines 473..485

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("lcm", function() {
        testCase(this, [
          [ -42, -24, 168 ],
          [ -42,   0,   0 ],
          [ -42, +24, 168 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 4 other locations - About 2 hrs to fix
    src/sc/libs/mathlib_test.js on lines 207..219
    src/sc/libs/mathlib_test.js on lines 333..345
    src/sc/libs/mathlib_test.js on lines 459..471
    src/sc/libs/mathlib_test.js on lines 473..485

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("absdif", function() {
        testCase(this, [
          [ -31.4, -1.5, 29.9 ],
          [ -31.4,  0.0, 31.4 ],
          [ -31.4, +1.5, 32.9 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 4 other locations - About 2 hrs to fix
    src/sc/libs/mathlib_test.js on lines 193..205
    src/sc/libs/mathlib_test.js on lines 207..219
    src/sc/libs/mathlib_test.js on lines 333..345
    src/sc/libs/mathlib_test.js on lines 473..485

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("unsignedRightShift", function() {
        testCase(this, [
          [ -31.4, -1.5, 4294967234 ],
          [ -31.4,  0.0, 4294967265 ],
          [ -31.4, +1.5, 2147483632 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 4 other locations - About 2 hrs to fix
    src/sc/libs/mathlib_test.js on lines 193..205
    src/sc/libs/mathlib_test.js on lines 207..219
    src/sc/libs/mathlib_test.js on lines 459..471
    src/sc/libs/mathlib_test.js on lines 473..485

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("thresh", function() {
        testCase(this, [
          [ -31.4, -1.5,  0.0 ],
          [ -31.4,  0.0,  0.0 ],
          [ -31.4, +1.5,  0.0 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 4 other locations - About 2 hrs to fix
    src/sc/libs/mathlib_test.js on lines 193..205
    src/sc/libs/mathlib_test.js on lines 207..219
    src/sc/libs/mathlib_test.js on lines 333..345
    src/sc/libs/mathlib_test.js on lines 459..471

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("foldIndex", function() {
        testCase(this, [
          [ -4, 4, 2 ],
          [ -3, 4, 3 ],
          [ -2, 4, 2 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 2 other locations - About 2 hrs to fix
    src/sc/libs/mathlib_test.js on lines 690..702
    src/sc/libs/mathlib_test.js on lines 704..716

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("clipIndex", function() {
        testCase(this, [
          [ -4, 4, 0 ],
          [ -3, 4, 0 ],
          [ -2, 4, 0 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 2 other locations - About 2 hrs to fix
    src/sc/libs/mathlib_test.js on lines 704..716
    src/sc/libs/mathlib_test.js on lines 718..730

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

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

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

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

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

    Refactorings

    Further Reading

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

      it("wrapIndex", function() {
        testCase(this, [
          [ -4, 4, 0 ],
          [ -3, 4, 1 ],
          [ -2, 4, 2 ],
    Severity: Major
    Found in src/sc/libs/mathlib_test.js and 2 other locations - About 2 hrs to fix
    src/sc/libs/mathlib_test.js on lines 690..702
    src/sc/libs/mathlib_test.js on lines 718..730

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

    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("min", function() {
        testCase(this, [
          [ 1, 0, 0 ],
          [ 1, 1, 1 ],
          [ 1, 2, 1 ],
    Severity: Minor
    Found in src/sc/libs/mathlib_test.js and 1 other location - About 50 mins to fix
    src/sc/libs/mathlib_test.js on lines 155..164

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 52.

    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("max", function() {
        testCase(this, [
          [ 1, 0, 1 ],
          [ 1, 1, 1 ],
          [ 1, 2, 2 ],
    Severity: Minor
    Found in src/sc/libs/mathlib_test.js and 1 other location - About 50 mins to fix
    src/sc/libs/mathlib_test.js on lines 144..153

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

    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