Showing 147 of 294 total issues

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

  public int partition(int[] arr, int start, int end, int pivot) {
    int i = start;
    int j = end - 1;
    while (true) {
      while (i < end && arr[i] < pivot) {
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 31..51
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 62..82
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 93..113
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 124..144

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

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 int partition(float[] arr, int start, int end, float pivot) {
    int i = start;
    int j = end - 1;
    while (true) {
      while (i < end && arr[i] < pivot) {
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 31..51
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 62..82
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 93..113
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 155..175

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

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 int partition(char[] arr, int start, int end, char pivot) {
    int i = start;
    int j = end - 1;
    while (true) {
      while (i < end && arr[i] < pivot) {
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 31..51
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 93..113
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 124..144
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 155..175

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

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 int partition(short[] arr, int start, int end, short pivot) {
    int i = start;
    int j = end - 1;
    while (true) {
      while (i < end && arr[i] < pivot) {
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 62..82
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 93..113
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 124..144
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 155..175

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

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 int partition(double[] arr, int start, int end, double pivot) {
    int i = start;
    int j = end - 1;
    while (true) {
      while (i < end && arr[i] < pivot) {
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 31..51
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 62..82
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 124..144
src/main/java/com/trickl/sort/GreaterOrEqualPartitioner.java on lines 155..175

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

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

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

  @Override
  public float[] cycle(float[] S, int first, int second, int third, int fourth, int fifth) {
    float temp = S[first];
    S[first] = S[second];
    S[second] = S[third];
Severity: Major
Found in src/main/java/com/trickl/math/StandardPermutator.java and 1 other location - About 1 hr to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 332..342

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

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

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

  @Override
  public float[] cycle(float[] S, int first, int second, int third, int fourth, int fifth) {
    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 1 other location - About 1 hr to fix
src/main/java/com/trickl/math/StandardPermutator.java on lines 320..330

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

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

  private int medianOf3(float[] arr, int a, int b, int c) {
    return (arr[a] < arr[b]
        ? (arr[b] < arr[c] ? b : arr[a] < arr[c] ? c : a)
        : (arr[b] > arr[c] ? b : arr[a] > arr[c] ? c : a));
  }
Severity: Major
Found in src/main/java/com/trickl/sort/QuickSort.java and 4 other locations - About 1 hr to fix
src/main/java/com/trickl/sort/QuickSort.java on lines 208..212
src/main/java/com/trickl/sort/QuickSort.java on lines 214..218
src/main/java/com/trickl/sort/QuickSort.java on lines 220..224
src/main/java/com/trickl/sort/QuickSort.java on lines 232..236

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

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

  private int medianOf3(double[] arr, int a, int b, int c) {
    return (arr[a] < arr[b]
        ? (arr[b] < arr[c] ? b : arr[a] < arr[c] ? c : a)
        : (arr[b] > arr[c] ? b : arr[a] > arr[c] ? c : a));
  }
Severity: Major
Found in src/main/java/com/trickl/sort/QuickSort.java and 4 other locations - About 1 hr to fix
src/main/java/com/trickl/sort/QuickSort.java on lines 208..212
src/main/java/com/trickl/sort/QuickSort.java on lines 214..218
src/main/java/com/trickl/sort/QuickSort.java on lines 226..230
src/main/java/com/trickl/sort/QuickSort.java on lines 232..236

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

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

  private int medianOf3(int[] arr, int a, int b, int c) {
    return (arr[a] < arr[b]
        ? (arr[b] < arr[c] ? b : arr[a] < arr[c] ? c : a)
        : (arr[b] > arr[c] ? b : arr[a] > arr[c] ? c : a));
  }
Severity: Major
Found in src/main/java/com/trickl/sort/QuickSort.java and 4 other locations - About 1 hr to fix
src/main/java/com/trickl/sort/QuickSort.java on lines 208..212
src/main/java/com/trickl/sort/QuickSort.java on lines 214..218
src/main/java/com/trickl/sort/QuickSort.java on lines 220..224
src/main/java/com/trickl/sort/QuickSort.java on lines 226..230

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

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

  private int medianOf3(short[] arr, int a, int b, int c) {
    return (arr[a] < arr[b]
        ? (arr[b] < arr[c] ? b : arr[a] < arr[c] ? c : a)
        : (arr[b] > arr[c] ? b : arr[a] > arr[c] ? c : a));
  }
Severity: Major
Found in src/main/java/com/trickl/sort/QuickSort.java and 4 other locations - About 1 hr to fix
src/main/java/com/trickl/sort/QuickSort.java on lines 214..218
src/main/java/com/trickl/sort/QuickSort.java on lines 220..224
src/main/java/com/trickl/sort/QuickSort.java on lines 226..230
src/main/java/com/trickl/sort/QuickSort.java on lines 232..236

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

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

  private int medianOf3(char[] arr, int a, int b, int c) {
    return (arr[a] < arr[b]
        ? (arr[b] < arr[c] ? b : arr[a] < arr[c] ? c : a)
        : (arr[b] > arr[c] ? b : arr[a] > arr[c] ? c : a));
  }
Severity: Major
Found in src/main/java/com/trickl/sort/QuickSort.java and 4 other locations - About 1 hr to fix
src/main/java/com/trickl/sort/QuickSort.java on lines 208..212
src/main/java/com/trickl/sort/QuickSort.java on lines 220..224
src/main/java/com/trickl/sort/QuickSort.java on lines 226..230
src/main/java/com/trickl/sort/QuickSort.java on lines 232..236

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

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

  @Override
  public short[] cycle(short[] S, int first, int second, int third, int fourth, int fifth) {
    short temp = S[first];
    S[first] = S[second];
    S[second] = S[third];
Severity: Major
Found in src/main/java/com/trickl/math/StandardPermutator.java and 9 other locations - About 1 hr to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 300..309
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 316..325
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 349..358
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 365..374
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 381..390
src/main/java/com/trickl/math/StandardPermutator.java on lines 304..313
src/main/java/com/trickl/math/StandardPermutator.java on lines 337..346
src/main/java/com/trickl/math/StandardPermutator.java on lines 353..362
src/main/java/com/trickl/math/StandardPermutator.java on lines 369..378

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

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

  @Override
  public int[] cycle(int[] S, int first, int second, int third, int fourth, int fifth) {
    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 9 other locations - About 1 hr to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 300..309
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 316..325
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 349..358
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 381..390
src/main/java/com/trickl/math/StandardPermutator.java on lines 288..297
src/main/java/com/trickl/math/StandardPermutator.java on lines 304..313
src/main/java/com/trickl/math/StandardPermutator.java on lines 337..346
src/main/java/com/trickl/math/StandardPermutator.java on lines 353..362
src/main/java/com/trickl/math/StandardPermutator.java on lines 369..378

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

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

  @Override
  public int[] cycle(int[] S, int first, int second, int third, int fourth, int fifth) {
    int temp = S[first];
    S[first] = S[second];
    S[second] = S[third];
Severity: Major
Found in src/main/java/com/trickl/math/StandardPermutator.java and 9 other locations - About 1 hr to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 300..309
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 316..325
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 349..358
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 365..374
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 381..390
src/main/java/com/trickl/math/StandardPermutator.java on lines 288..297
src/main/java/com/trickl/math/StandardPermutator.java on lines 304..313
src/main/java/com/trickl/math/StandardPermutator.java on lines 337..346
src/main/java/com/trickl/math/StandardPermutator.java on lines 369..378

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

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

  @Override
  public char[] cycle(char[] S, int first, int second, int third, int fourth, int fifth) {
    char temp = S[first];
    S[first] = S[second];
    S[second] = S[third];
Severity: Major
Found in src/main/java/com/trickl/math/StandardPermutator.java and 9 other locations - About 1 hr to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 300..309
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 316..325
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 349..358
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 365..374
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 381..390
src/main/java/com/trickl/math/StandardPermutator.java on lines 288..297
src/main/java/com/trickl/math/StandardPermutator.java on lines 337..346
src/main/java/com/trickl/math/StandardPermutator.java on lines 353..362
src/main/java/com/trickl/math/StandardPermutator.java on lines 369..378

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

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

  @Override
  public <T> T[] cycle(T[] S, int first, int second, int third, int fourth, int fifth) {
    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 9 other locations - About 1 hr to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 300..309
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 316..325
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 349..358
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 365..374
src/main/java/com/trickl/math/StandardPermutator.java on lines 288..297
src/main/java/com/trickl/math/StandardPermutator.java on lines 304..313
src/main/java/com/trickl/math/StandardPermutator.java on lines 337..346
src/main/java/com/trickl/math/StandardPermutator.java on lines 353..362
src/main/java/com/trickl/math/StandardPermutator.java on lines 369..378

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

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

  @Override
  public double[] cycle(double[] S, int first, int second, int third, int fourth, int fifth) {
    double temp = S[first];
    S[first] = S[second];
    S[second] = S[third];
Severity: Major
Found in src/main/java/com/trickl/math/StandardPermutator.java and 9 other locations - About 1 hr to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 300..309
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 316..325
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 349..358
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 365..374
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 381..390
src/main/java/com/trickl/math/StandardPermutator.java on lines 288..297
src/main/java/com/trickl/math/StandardPermutator.java on lines 304..313
src/main/java/com/trickl/math/StandardPermutator.java on lines 353..362
src/main/java/com/trickl/math/StandardPermutator.java on lines 369..378

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

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

  @Override
  public short[] cycle(short[] S, int first, int second, int third, int fourth, int fifth) {
    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 9 other locations - About 1 hr to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 316..325
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 349..358
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 365..374
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 381..390
src/main/java/com/trickl/math/StandardPermutator.java on lines 288..297
src/main/java/com/trickl/math/StandardPermutator.java on lines 304..313
src/main/java/com/trickl/math/StandardPermutator.java on lines 337..346
src/main/java/com/trickl/math/StandardPermutator.java on lines 353..362
src/main/java/com/trickl/math/StandardPermutator.java on lines 369..378

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

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

  @Override
  public <T> T[] cycle(T[] S, int first, int second, int third, int fourth, int fifth) {
    T temp = S[first];
    S[first] = S[second];
    S[second] = S[third];
Severity: Major
Found in src/main/java/com/trickl/math/StandardPermutator.java and 9 other locations - About 1 hr to fix
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 300..309
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 316..325
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 349..358
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 365..374
src/main/java/com/trickl/math/IntArrayPermutator.java on lines 381..390
src/main/java/com/trickl/math/StandardPermutator.java on lines 288..297
src/main/java/com/trickl/math/StandardPermutator.java on lines 304..313
src/main/java/com/trickl/math/StandardPermutator.java on lines 337..346
src/main/java/com/trickl/math/StandardPermutator.java on lines 353..362

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

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