Showing 147 of 294 total issues

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

  protected int select(float[] S, int[] freq, int[] index, int start, int end, int k) {

    if (end == (start + 1)) {
      return start;
    } else {
Severity: Major
Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 3 hrs to fix
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 58..79
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 109..130
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 160..181
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 262..283

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

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

  protected int select(int[] S, int[] freq, int[] index, int start, int end, int k) {

    if (end == (start + 1)) {
      return start;
    } else {
Severity: Major
Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 3 hrs to fix
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 58..79
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 109..130
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 160..181
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 211..232

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

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

  protected int select(char[] S, int[] freq, int[] index, int start, int end, int k) {

    if (end == (start + 1)) {
      return start;
    } else {
Severity: Major
Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 3 hrs to fix
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 109..130
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 160..181
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 211..232
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 262..283

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

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

  protected int select(short[] S, int[] freq, int[] index, int start, int end, int k) {

    if (end == (start + 1)) {
      return start;
    } else {
Severity: Major
Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 3 hrs to fix
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 58..79
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 160..181
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 211..232
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 262..283

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

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

  protected int select(double[] S, int[] freq, int[] index, int start, int end, int k) {

    if (end == (start + 1)) {
      return start;
    } else {
Severity: Major
Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 3 hrs to fix
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 58..79
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 109..130
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 211..232
src/main/java/com/trickl/selection/MedianOfMedians.java on lines 262..283

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

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

  @Override
  public double[] sort(double[] arr, int start, int end) {
    int i0 = start;
    int i1 = start + 1;
    int i2 = start + 2;
Severity: Major
Found in src/main/java/com/trickl/sort/FourElementSort.java and 4 other locations - About 3 hrs to fix
src/main/java/com/trickl/sort/FourElementSort.java on lines 25..51
src/main/java/com/trickl/sort/FourElementSort.java on lines 58..84
src/main/java/com/trickl/sort/FourElementSort.java on lines 124..150
src/main/java/com/trickl/sort/FourElementSort.java on lines 157..183

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

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

  @Override
  public int[] sort(int[] arr, int start, int end) {
    int i0 = start;
    int i1 = start + 1;
    int i2 = start + 2;
Severity: Major
Found in src/main/java/com/trickl/sort/FourElementSort.java and 4 other locations - About 3 hrs to fix
src/main/java/com/trickl/sort/FourElementSort.java on lines 25..51
src/main/java/com/trickl/sort/FourElementSort.java on lines 58..84
src/main/java/com/trickl/sort/FourElementSort.java on lines 91..117
src/main/java/com/trickl/sort/FourElementSort.java on lines 124..150

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

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

  @Override
  public float[] sort(float[] arr, int start, int end) {
    int i0 = start;
    int i1 = start + 1;
    int i2 = start + 2;
Severity: Major
Found in src/main/java/com/trickl/sort/FourElementSort.java and 4 other locations - About 3 hrs to fix
src/main/java/com/trickl/sort/FourElementSort.java on lines 25..51
src/main/java/com/trickl/sort/FourElementSort.java on lines 58..84
src/main/java/com/trickl/sort/FourElementSort.java on lines 91..117
src/main/java/com/trickl/sort/FourElementSort.java on lines 157..183

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

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

  @Override
  public char[] sort(char[] arr, int start, int end) {
    int i0 = start;
    int i1 = start + 1;
    int i2 = start + 2;
Severity: Major
Found in src/main/java/com/trickl/sort/FourElementSort.java and 4 other locations - About 3 hrs to fix
src/main/java/com/trickl/sort/FourElementSort.java on lines 58..84
src/main/java/com/trickl/sort/FourElementSort.java on lines 91..117
src/main/java/com/trickl/sort/FourElementSort.java on lines 124..150
src/main/java/com/trickl/sort/FourElementSort.java on lines 157..183

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

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

  @Override
  public short[] sort(short[] arr, int start, int end) {
    int i0 = start;
    int i1 = start + 1;
    int i2 = start + 2;
Severity: Major
Found in src/main/java/com/trickl/sort/FourElementSort.java and 4 other locations - About 3 hrs to fix
src/main/java/com/trickl/sort/FourElementSort.java on lines 25..51
src/main/java/com/trickl/sort/FourElementSort.java on lines 91..117
src/main/java/com/trickl/sort/FourElementSort.java on lines 124..150
src/main/java/com/trickl/sort/FourElementSort.java on lines 157..183

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

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

  @Override
  public char[] sort(char[] arr, int start, int end) {
    if (end > start) {
      if (end - start < 10) {
        return insertionSort.sort(arr, start, end);
Severity: Major
Found in src/main/java/com/trickl/sort/QuickSort.java and 4 other locations - About 2 hrs to fix
src/main/java/com/trickl/sort/QuickSort.java on lines 55..77
src/main/java/com/trickl/sort/QuickSort.java on lines 84..106
src/main/java/com/trickl/sort/QuickSort.java on lines 113..135
src/main/java/com/trickl/sort/QuickSort.java on lines 142..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 154.

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

  @Override
  public double[] sort(double[] arr, int start, int end) {
    if (end > start) {
      if (end - start < 10) {
        return insertionSort.sort(arr, start, end);
Severity: Major
Found in src/main/java/com/trickl/sort/QuickSort.java and 4 other locations - About 2 hrs to fix
src/main/java/com/trickl/sort/QuickSort.java on lines 26..48
src/main/java/com/trickl/sort/QuickSort.java on lines 55..77
src/main/java/com/trickl/sort/QuickSort.java on lines 113..135
src/main/java/com/trickl/sort/QuickSort.java on lines 142..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 154.

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

  @Override
  public short[] sort(short[] arr, int start, int end) {
    if (end > start) {
      if (end - start < 10) {
        return insertionSort.sort(arr, start, end);
Severity: Major
Found in src/main/java/com/trickl/sort/QuickSort.java and 4 other locations - About 2 hrs to fix
src/main/java/com/trickl/sort/QuickSort.java on lines 26..48
src/main/java/com/trickl/sort/QuickSort.java on lines 84..106
src/main/java/com/trickl/sort/QuickSort.java on lines 113..135
src/main/java/com/trickl/sort/QuickSort.java on lines 142..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 154.

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

  @Override
  public float[] sort(float[] arr, int start, int end) {
    if (end > start) {
      if (end - start < 10) {
        return insertionSort.sort(arr, start, end);
Severity: Major
Found in src/main/java/com/trickl/sort/QuickSort.java and 4 other locations - About 2 hrs to fix
src/main/java/com/trickl/sort/QuickSort.java on lines 26..48
src/main/java/com/trickl/sort/QuickSort.java on lines 55..77
src/main/java/com/trickl/sort/QuickSort.java on lines 84..106
src/main/java/com/trickl/sort/QuickSort.java on lines 142..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 154.

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

  @Override
  public int[] sort(int[] arr, int start, int end) {
    if (end > start) {
      if (end - start < 10) {
        return insertionSort.sort(arr, start, end);
Severity: Major
Found in src/main/java/com/trickl/sort/QuickSort.java and 4 other locations - About 2 hrs to fix
src/main/java/com/trickl/sort/QuickSort.java on lines 26..48
src/main/java/com/trickl/sort/QuickSort.java on lines 55..77
src/main/java/com/trickl/sort/QuickSort.java on lines 84..106
src/main/java/com/trickl/sort/QuickSort.java on lines 113..135

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

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

  public static short[] lexiographicPermute(short[] S, Permutator permutator) {
    // Find the position where lexiographic order
    // is not true
    int i = S.length - 2;
    while (i >= 0 && S[i] >= S[i + 1]) {
Severity: Major
Found in src/main/java/com/trickl/math/Permutations.java and 4 other locations - About 2 hrs to fix
src/main/java/com/trickl/math/Permutations.java on lines 84..107
src/main/java/com/trickl/math/Permutations.java on lines 116..139
src/main/java/com/trickl/math/Permutations.java on lines 148..171
src/main/java/com/trickl/math/Permutations.java on lines 180..203

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

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

  public static float[] lexiographicPermute(float[] S, Permutator permutator) {
    // Find the position where lexiographic order
    // is not true
    int i = S.length - 2;
    while (i >= 0 && S[i] >= S[i + 1]) {
Severity: Major
Found in src/main/java/com/trickl/math/Permutations.java and 4 other locations - About 2 hrs to fix
src/main/java/com/trickl/math/Permutations.java on lines 52..75
src/main/java/com/trickl/math/Permutations.java on lines 84..107
src/main/java/com/trickl/math/Permutations.java on lines 116..139
src/main/java/com/trickl/math/Permutations.java on lines 180..203

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

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

  public static double[] lexiographicPermute(double[] S, Permutator permutator) {
    // Find the position where lexiographic order
    // is not true
    int i = S.length - 2;
    while (i >= 0 && S[i] >= S[i + 1]) {
Severity: Major
Found in src/main/java/com/trickl/math/Permutations.java and 4 other locations - About 2 hrs to fix
src/main/java/com/trickl/math/Permutations.java on lines 52..75
src/main/java/com/trickl/math/Permutations.java on lines 84..107
src/main/java/com/trickl/math/Permutations.java on lines 116..139
src/main/java/com/trickl/math/Permutations.java on lines 148..171

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

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

  public static char[] lexiographicPermute(char[] S, Permutator permutator) {
    // Find the position where lexiographic order
    // is not true
    int i = S.length - 2;
    while (i >= 0 && S[i] >= S[i + 1]) {
Severity: Major
Found in src/main/java/com/trickl/math/Permutations.java and 4 other locations - About 2 hrs to fix
src/main/java/com/trickl/math/Permutations.java on lines 52..75
src/main/java/com/trickl/math/Permutations.java on lines 116..139
src/main/java/com/trickl/math/Permutations.java on lines 148..171
src/main/java/com/trickl/math/Permutations.java on lines 180..203

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

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

  public static int[] lexiographicPermute(int[] S, Permutator permutator) {
    // Find the position where lexiographic order
    // is not true
    int i = S.length - 2;
    while (i >= 0 && S[i] >= S[i + 1]) {
Severity: Major
Found in src/main/java/com/trickl/math/Permutations.java and 4 other locations - About 2 hrs to fix
src/main/java/com/trickl/math/Permutations.java on lines 52..75
src/main/java/com/trickl/math/Permutations.java on lines 84..107
src/main/java/com/trickl/math/Permutations.java on lines 148..171
src/main/java/com/trickl/math/Permutations.java on lines 180..203

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

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