Showing 147 of 294 total issues

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

  @Override
  public <T> T[] cycle(T[] S, int first, int second, int third) {
    int temp = array[first];
    array[first] = array[second];
    array[second] = array[third];
Severity: Major
Found in src/main/java/com/trickl/math/IntArrayPermutator.java and 11 other locations - About 55 mins to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 126..133
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 140..147
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 154..161
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 168..175
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 182..189
src/main/java/com/trickl/math/StandardPermutator.java on lines 114..121
src/main/java/com/trickl/math/StandardPermutator.java on lines 128..135
src/main/java/com/trickl/math/StandardPermutator.java on lines 142..149
src/main/java/com/trickl/math/StandardPermutator.java on lines 156..163
src/main/java/com/trickl/math/StandardPermutator.java on lines 170..177
src/main/java/com/trickl/math/StandardPermutator.java on lines 184..191

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

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

    double y0 = this.a * other.a - this.b * other.b - this.c * other.c - this.d * other.d;
Severity: Major
Found in src/main/java/com/trickl/math/Quaternion.java and 3 other locations - About 40 mins to fix
src/main/java/com/trickl/math/Quaternion.java on lines 84..84
src/main/java/com/trickl/math/Quaternion.java on lines 85..85
src/main/java/com/trickl/math/Quaternion.java on lines 86..86

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

  @Override
  public double[] reverse(double[] S, int start, int end) {
    for (int i = start, j = end - 1; i < j; ++i, --j) {
      swap(S, i, j);
    }
Severity: Major
Found in src/main/java/com/trickl/math/StandardPermutator.java and 11 other locations - About 40 mins to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 397..403
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 410..416
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 423..429
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 436..442
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 449..455
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 462..468
src/main/java/com/trickl/math/StandardPermutator.java on lines 385..391
src/main/java/com/trickl/math/StandardPermutator.java on lines 398..404
src/main/java/com/trickl/math/StandardPermutator.java on lines 424..430
src/main/java/com/trickl/math/StandardPermutator.java on lines 437..443
src/main/java/com/trickl/math/StandardPermutator.java on lines 450..456

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

  @Override
  public int[] reverse(int[] S, int start, int end) {
    for (int i = start, j = end - 1; i < j; ++i, --j) {
      swap(S, i, j);
    }
Severity: Major
Found in src/main/java/com/trickl/math/StandardPermutator.java and 11 other locations - About 40 mins to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 397..403
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 410..416
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 423..429
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 436..442
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 449..455
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 462..468
src/main/java/com/trickl/math/StandardPermutator.java on lines 385..391
src/main/java/com/trickl/math/StandardPermutator.java on lines 398..404
src/main/java/com/trickl/math/StandardPermutator.java on lines 411..417
src/main/java/com/trickl/math/StandardPermutator.java on lines 424..430
src/main/java/com/trickl/math/StandardPermutator.java on lines 450..456

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

  @Override
  public <T> T[] reverse(T[] S, int start, int end) {
    for (int i = start, j = end - 1; i < j; ++i, --j) {
      swap(S, i, j);
    }
Severity: Major
Found in src/main/java/com/trickl/math/StandardPermutator.java and 11 other locations - About 40 mins to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 397..403
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 410..416
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 423..429
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 436..442
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 449..455
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 462..468
src/main/java/com/trickl/math/StandardPermutator.java on lines 385..391
src/main/java/com/trickl/math/StandardPermutator.java on lines 398..404
src/main/java/com/trickl/math/StandardPermutator.java on lines 411..417
src/main/java/com/trickl/math/StandardPermutator.java on lines 424..430
src/main/java/com/trickl/math/StandardPermutator.java on lines 437..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 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 12 locations. Consider refactoring.
Open

  @Override
  public char[] reverse(char[] S, int start, int end) {
    for (int i = start, j = end - 1; i < j; ++i, --j) {
      swap(S, i, j);
    }
Severity: Major
Found in src/main/java/com/trickl/math/IntArrayPermutator.java and 11 other locations - About 40 mins to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 397..403
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 423..429
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 436..442
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 449..455
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 462..468
src/main/java/com/trickl/math/StandardPermutator.java on lines 385..391
src/main/java/com/trickl/math/StandardPermutator.java on lines 398..404
src/main/java/com/trickl/math/StandardPermutator.java on lines 411..417
src/main/java/com/trickl/math/StandardPermutator.java on lines 424..430
src/main/java/com/trickl/math/StandardPermutator.java on lines 437..443
src/main/java/com/trickl/math/StandardPermutator.java on lines 450..456

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

  @Override
  public <T> T[] reverse(T[] S, int start, int end) {
    for (int i = start, j = end - 1; i < j; ++i, --j) {
      swap(S, i, j);
    }
Severity: Major
Found in src/main/java/com/trickl/math/IntArrayPermutator.java and 11 other locations - About 40 mins to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 397..403
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 410..416
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 423..429
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 436..442
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 449..455
src/main/java/com/trickl/math/StandardPermutator.java on lines 385..391
src/main/java/com/trickl/math/StandardPermutator.java on lines 398..404
src/main/java/com/trickl/math/StandardPermutator.java on lines 411..417
src/main/java/com/trickl/math/StandardPermutator.java on lines 424..430
src/main/java/com/trickl/math/StandardPermutator.java on lines 437..443
src/main/java/com/trickl/math/StandardPermutator.java on lines 450..456

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

    double y1 = this.a * other.b + this.b * other.a + this.c * other.d - this.d * other.c;
Severity: Major
Found in src/main/java/com/trickl/math/Quaternion.java and 3 other locations - About 40 mins to fix
src/main/java/com/trickl/math/Quaternion.java on lines 83..83
src/main/java/com/trickl/math/Quaternion.java on lines 85..85
src/main/java/com/trickl/math/Quaternion.java on lines 86..86

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

  @Override
  public short[] reverse(short[] S, int start, int end) {
    for (int i = start, j = end - 1; i < j; ++i, --j) {
      swap(S, i, j);
    }
Severity: Major
Found in src/main/java/com/trickl/math/StandardPermutator.java and 11 other locations - About 40 mins to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 397..403
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 410..416
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 423..429
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 436..442
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 449..455
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 462..468
src/main/java/com/trickl/math/StandardPermutator.java on lines 398..404
src/main/java/com/trickl/math/StandardPermutator.java on lines 411..417
src/main/java/com/trickl/math/StandardPermutator.java on lines 424..430
src/main/java/com/trickl/math/StandardPermutator.java on lines 437..443
src/main/java/com/trickl/math/StandardPermutator.java on lines 450..456

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

  @Override
  public double[] reverse(double[] S, int start, int end) {
    for (int i = start, j = end - 1; i < j; ++i, --j) {
      swap(S, i, j);
    }
Severity: Major
Found in src/main/java/com/trickl/math/IntArrayPermutator.java and 11 other locations - About 40 mins to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 397..403
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 410..416
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 436..442
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 449..455
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 462..468
src/main/java/com/trickl/math/StandardPermutator.java on lines 385..391
src/main/java/com/trickl/math/StandardPermutator.java on lines 398..404
src/main/java/com/trickl/math/StandardPermutator.java on lines 411..417
src/main/java/com/trickl/math/StandardPermutator.java on lines 424..430
src/main/java/com/trickl/math/StandardPermutator.java on lines 437..443
src/main/java/com/trickl/math/StandardPermutator.java on lines 450..456

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

    double y2 = this.a * other.c - this.b * other.d + this.c * other.a + this.d * other.b;
Severity: Major
Found in src/main/java/com/trickl/math/Quaternion.java and 3 other locations - About 40 mins to fix
src/main/java/com/trickl/math/Quaternion.java on lines 83..83
src/main/java/com/trickl/math/Quaternion.java on lines 84..84
src/main/java/com/trickl/math/Quaternion.java on lines 86..86

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

        : (comparator.compare(arr[b], arr[c]) > 0 ? b :
            comparator.compare(arr[a], arr[c]) > 0 ? c : a));
Severity: Minor
Found in src/main/java/com/trickl/sort/QuickSort.java and 1 other location - About 40 mins to fix
src/main/java/com/trickl/sort/QuickSort.java on lines 240..241

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

  @Override
  public float[] reverse(float[] S, int start, int end) {
    for (int i = start, j = end - 1; i < j; ++i, --j) {
      swap(S, i, j);
    }
Severity: Major
Found in src/main/java/com/trickl/math/StandardPermutator.java and 11 other locations - About 40 mins to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 397..403
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 410..416
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 423..429
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 436..442
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 449..455
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 462..468
src/main/java/com/trickl/math/StandardPermutator.java on lines 385..391
src/main/java/com/trickl/math/StandardPermutator.java on lines 398..404
src/main/java/com/trickl/math/StandardPermutator.java on lines 411..417
src/main/java/com/trickl/math/StandardPermutator.java on lines 437..443
src/main/java/com/trickl/math/StandardPermutator.java on lines 450..456

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

  @Override
  public float[] reverse(float[] S, int start, int end) {
    for (int i = start, j = end - 1; i < j; ++i, --j) {
      swap(S, i, j);
    }
Severity: Major
Found in src/main/java/com/trickl/math/IntArrayPermutator.java and 11 other locations - About 40 mins to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 397..403
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 410..416
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 423..429
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 449..455
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 462..468
src/main/java/com/trickl/math/StandardPermutator.java on lines 385..391
src/main/java/com/trickl/math/StandardPermutator.java on lines 398..404
src/main/java/com/trickl/math/StandardPermutator.java on lines 411..417
src/main/java/com/trickl/math/StandardPermutator.java on lines 424..430
src/main/java/com/trickl/math/StandardPermutator.java on lines 437..443
src/main/java/com/trickl/math/StandardPermutator.java on lines 450..456

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

  @Override
  public char[] reverse(char[] S, int start, int end) {
    for (int i = start, j = end - 1; i < j; ++i, --j) {
      swap(S, i, j);
    }
Severity: Major
Found in src/main/java/com/trickl/math/StandardPermutator.java and 11 other locations - About 40 mins to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 397..403
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 410..416
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 423..429
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 436..442
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 449..455
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 462..468
src/main/java/com/trickl/math/StandardPermutator.java on lines 385..391
src/main/java/com/trickl/math/StandardPermutator.java on lines 411..417
src/main/java/com/trickl/math/StandardPermutator.java on lines 424..430
src/main/java/com/trickl/math/StandardPermutator.java on lines 437..443
src/main/java/com/trickl/math/StandardPermutator.java on lines 450..456

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

  @Override
  public int[] reverse(int[] S, int start, int end) {
    for (int i = start, j = end - 1; i < j; ++i, --j) {
      swap(S, i, j);
    }
Severity: Major
Found in src/main/java/com/trickl/math/IntArrayPermutator.java and 11 other locations - About 40 mins to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 397..403
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 410..416
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 423..429
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 436..442
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 462..468
src/main/java/com/trickl/math/StandardPermutator.java on lines 385..391
src/main/java/com/trickl/math/StandardPermutator.java on lines 398..404
src/main/java/com/trickl/math/StandardPermutator.java on lines 411..417
src/main/java/com/trickl/math/StandardPermutator.java on lines 424..430
src/main/java/com/trickl/math/StandardPermutator.java on lines 437..443
src/main/java/com/trickl/math/StandardPermutator.java on lines 450..456

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

        ? (comparator.compare(arr[b], arr[c]) < 0 ? b :
            comparator.compare(arr[a], arr[c]) < 0 ? c : a)
Severity: Minor
Found in src/main/java/com/trickl/sort/QuickSort.java and 1 other location - About 40 mins to fix
src/main/java/com/trickl/sort/QuickSort.java on lines 242..243

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

  @Override
  public short[] reverse(short[] S, int start, int end) {
    for (int i = start, j = end - 1; i < j; ++i, --j) {
      swap(S, i, j);
    }
Severity: Major
Found in src/main/java/com/trickl/math/IntArrayPermutator.java and 11 other locations - About 40 mins to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 410..416
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 423..429
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 436..442
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 449..455
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 462..468
src/main/java/com/trickl/math/StandardPermutator.java on lines 385..391
src/main/java/com/trickl/math/StandardPermutator.java on lines 398..404
src/main/java/com/trickl/math/StandardPermutator.java on lines 411..417
src/main/java/com/trickl/math/StandardPermutator.java on lines 424..430
src/main/java/com/trickl/math/StandardPermutator.java on lines 437..443
src/main/java/com/trickl/math/StandardPermutator.java on lines 450..456

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

    double y3 = this.a * other.d + this.b * other.c - this.c * other.b + this.d * other.a;
Severity: Major
Found in src/main/java/com/trickl/math/Quaternion.java and 3 other locations - About 40 mins to fix
src/main/java/com/trickl/math/Quaternion.java on lines 83..83
src/main/java/com/trickl/math/Quaternion.java on lines 84..84
src/main/java/com/trickl/math/Quaternion.java on lines 85..85

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

  @Override
  public float[] swap(float[] S, int first, int second) {
    float temp = S[first];
    S[first] = S[second];
    S[second] = temp;
Severity: Major
Found in src/main/java/com/trickl/math/StandardPermutator.java and 11 other locations - About 40 mins to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 48..54
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 61..67
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 74..80
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 87..93
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 100..106
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 113..119
src/main/java/com/trickl/math/StandardPermutator.java on lines 36..42
src/main/java/com/trickl/math/StandardPermutator.java on lines 49..55
src/main/java/com/trickl/math/StandardPermutator.java on lines 62..68
src/main/java/com/trickl/math/StandardPermutator.java on lines 88..94
src/main/java/com/trickl/math/StandardPermutator.java on lines 101..107

Duplicated Code

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

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

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

Tuning

This issue has a mass of 50.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language