LiberTEM/LiberTEM

View on GitHub
src/libertem/io/dataset/base/decode.py

Summary

Maintainability
F
3 days
Test Coverage

Function "decode_swap_4" has 8 parameters, which is greater than the 7 authorized.
Open

def decode_swap_4(inp, out, idx, native_dtype, rr, origin, shape, ds_shape):

A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

Noncompliant Code Example

With a maximum number of 4 parameters:

def do_something(param1, param2, param3, param4, param5):
    ...

Compliant Solution

def do_something(param1, param2, param3, param4):
    ...

Function "decode_swap_only_8" has 8 parameters, which is greater than the 7 authorized.
Open

def decode_swap_only_8(inp, out, idx, native_dtype, rr, origin, shape, ds_shape):

A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

Noncompliant Code Example

With a maximum number of 4 parameters:

def do_something(param1, param2, param3, param4, param5):
    ...

Compliant Solution

def do_something(param1, param2, param3, param4):
    ...

Function "decode_swap_2" has 8 parameters, which is greater than the 7 authorized.
Open

def decode_swap_2(inp, out, idx, native_dtype, rr, origin, shape, ds_shape):

A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

Noncompliant Code Example

With a maximum number of 4 parameters:

def do_something(param1, param2, param3, param4, param5):
    ...

Compliant Solution

def do_something(param1, param2, param3, param4):
    ...

Function "decode_swap_only_2" has 8 parameters, which is greater than the 7 authorized.
Open

def decode_swap_only_2(inp, out, idx, native_dtype, rr, origin, shape, ds_shape):

A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

Noncompliant Code Example

With a maximum number of 4 parameters:

def do_something(param1, param2, param3, param4, param5):
    ...

Compliant Solution

def do_something(param1, param2, param3, param4):
    ...

Function "decode_swap_only_4" has 8 parameters, which is greater than the 7 authorized.
Open

def decode_swap_only_4(inp, out, idx, native_dtype, rr, origin, shape, ds_shape):

A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

Noncompliant Code Example

With a maximum number of 4 parameters:

def do_something(param1, param2, param3, param4, param5):
    ...

Compliant Solution

def do_something(param1, param2, param3, param4):
    ...

Function "decode_swap_8" has 8 parameters, which is greater than the 7 authorized.
Open

def decode_swap_8(inp, out, idx, native_dtype, rr, origin, shape, ds_shape):

A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

Noncompliant Code Example

With a maximum number of 4 parameters:

def do_something(param1, param2, param3, param4, param5):
    ...

Compliant Solution

def do_something(param1, param2, param3, param4):
    ...

Function "default_decode" has 8 parameters, which is greater than the 7 authorized.
Open

def default_decode(inp, out, idx, native_dtype, rr, origin, shape, ds_shape):

A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

Noncompliant Code Example

With a maximum number of 4 parameters:

def do_something(param1, param2, param3, param4, param5):
    ...

Compliant Solution

def do_something(param1, param2, param3, param4):
    ...

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

@numba.njit(inline='always', cache=True)
def decode_swap_only_8(inp, out, idx, native_dtype, rr, origin, shape, ds_shape):
    byteswap_8_straight(inp, out=out[idx].view(np.uint8))
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 2 other locations - About 2 hrs to fix
src/libertem/io/dataset/base/decode.py on lines 88..90
src/libertem/io/dataset/base/decode.py on lines 93..95

Duplicated Code

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

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

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

Tuning

This issue has a mass of 51.

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

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

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

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

Refactorings

Further Reading

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

@numba.njit(inline='always', cache=True)
def decode_swap_only_4(inp, out, idx, native_dtype, rr, origin, shape, ds_shape):
    byteswap_4_straight(inp, out=out[idx].view(np.uint8))
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 2 other locations - About 2 hrs to fix
src/libertem/io/dataset/base/decode.py on lines 88..90
src/libertem/io/dataset/base/decode.py on lines 98..100

Duplicated Code

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

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

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

Tuning

This issue has a mass of 51.

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

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

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

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

Refactorings

Further Reading

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

@numba.njit(inline='always', cache=True)
def decode_swap_only_2(inp, out, idx, native_dtype, rr, origin, shape, ds_shape):
    byteswap_2_straight(inp, out=out[idx].view(np.uint8))
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 2 other locations - About 2 hrs to fix
src/libertem/io/dataset/base/decode.py on lines 93..95
src/libertem/io/dataset/base/decode.py on lines 98..100

Duplicated Code

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

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

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

Tuning

This issue has a mass of 51.

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

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

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

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

Refactorings

Further Reading

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

@numba.njit(inline='always', cache=True)
def decode_swap_2(inp, out, idx, native_dtype, rr, origin, shape, ds_shape):
    byteswap_2_decode(inp, out=out[idx])
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 2 other locations - About 1 hr to fix
src/libertem/io/dataset/base/decode.py on lines 78..80
src/libertem/io/dataset/base/decode.py on lines 83..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 43.

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

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

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

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

Refactorings

Further Reading

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

@numba.njit(inline='always', cache=True)
def decode_swap_8(inp, out, idx, native_dtype, rr, origin, shape, ds_shape):
    byteswap_8_decode(inp, out=out[idx])
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 2 other locations - About 1 hr to fix
src/libertem/io/dataset/base/decode.py on lines 73..75
src/libertem/io/dataset/base/decode.py on lines 78..80

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

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

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

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

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

Refactorings

Further Reading

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

@numba.njit(inline='always', cache=True)
def decode_swap_4(inp, out, idx, native_dtype, rr, origin, shape, ds_shape):
    byteswap_4_decode(inp, out=out[idx])
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 2 other locations - About 1 hr to fix
src/libertem/io/dataset/base/decode.py on lines 73..75
src/libertem/io/dataset/base/decode.py on lines 83..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 43.

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

        out[i * 2 + 0] = inp[i * 2 + 1]
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 13 other locations - About 1 hr to fix
src/libertem/io/dataset/base/decode.py on lines 11..11
src/libertem/io/dataset/base/decode.py on lines 25..25
src/libertem/io/dataset/base/decode.py on lines 26..26
src/libertem/io/dataset/base/decode.py on lines 27..27
src/libertem/io/dataset/base/decode.py on lines 28..28
src/libertem/io/dataset/base/decode.py on lines 44..44
src/libertem/io/dataset/base/decode.py on lines 45..45
src/libertem/io/dataset/base/decode.py on lines 46..46
src/libertem/io/dataset/base/decode.py on lines 47..47
src/libertem/io/dataset/base/decode.py on lines 48..48
src/libertem/io/dataset/base/decode.py on lines 49..49
src/libertem/io/dataset/base/decode.py on lines 50..50
src/libertem/io/dataset/base/decode.py on lines 51..51

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

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

        out[i * 2 + 1] = inp[i * 2 + 0]
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 13 other locations - About 1 hr to fix
src/libertem/io/dataset/base/decode.py on lines 10..10
src/libertem/io/dataset/base/decode.py on lines 25..25
src/libertem/io/dataset/base/decode.py on lines 26..26
src/libertem/io/dataset/base/decode.py on lines 27..27
src/libertem/io/dataset/base/decode.py on lines 28..28
src/libertem/io/dataset/base/decode.py on lines 44..44
src/libertem/io/dataset/base/decode.py on lines 45..45
src/libertem/io/dataset/base/decode.py on lines 46..46
src/libertem/io/dataset/base/decode.py on lines 47..47
src/libertem/io/dataset/base/decode.py on lines 48..48
src/libertem/io/dataset/base/decode.py on lines 49..49
src/libertem/io/dataset/base/decode.py on lines 50..50
src/libertem/io/dataset/base/decode.py on lines 51..51

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

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

        out[i * 4 + 3] = inp[i * 4 + 0]
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 13 other locations - About 1 hr to fix
src/libertem/io/dataset/base/decode.py on lines 10..10
src/libertem/io/dataset/base/decode.py on lines 11..11
src/libertem/io/dataset/base/decode.py on lines 26..26
src/libertem/io/dataset/base/decode.py on lines 27..27
src/libertem/io/dataset/base/decode.py on lines 28..28
src/libertem/io/dataset/base/decode.py on lines 44..44
src/libertem/io/dataset/base/decode.py on lines 45..45
src/libertem/io/dataset/base/decode.py on lines 46..46
src/libertem/io/dataset/base/decode.py on lines 47..47
src/libertem/io/dataset/base/decode.py on lines 48..48
src/libertem/io/dataset/base/decode.py on lines 49..49
src/libertem/io/dataset/base/decode.py on lines 50..50
src/libertem/io/dataset/base/decode.py on lines 51..51

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

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

        out[i * 8 + 5] = inp[i * 8 + 2]
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 13 other locations - About 1 hr to fix
src/libertem/io/dataset/base/decode.py on lines 10..10
src/libertem/io/dataset/base/decode.py on lines 11..11
src/libertem/io/dataset/base/decode.py on lines 25..25
src/libertem/io/dataset/base/decode.py on lines 26..26
src/libertem/io/dataset/base/decode.py on lines 27..27
src/libertem/io/dataset/base/decode.py on lines 28..28
src/libertem/io/dataset/base/decode.py on lines 44..44
src/libertem/io/dataset/base/decode.py on lines 45..45
src/libertem/io/dataset/base/decode.py on lines 47..47
src/libertem/io/dataset/base/decode.py on lines 48..48
src/libertem/io/dataset/base/decode.py on lines 49..49
src/libertem/io/dataset/base/decode.py on lines 50..50
src/libertem/io/dataset/base/decode.py on lines 51..51

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

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

        out[i * 8 + 6] = inp[i * 8 + 1]
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 13 other locations - About 1 hr to fix
src/libertem/io/dataset/base/decode.py on lines 10..10
src/libertem/io/dataset/base/decode.py on lines 11..11
src/libertem/io/dataset/base/decode.py on lines 25..25
src/libertem/io/dataset/base/decode.py on lines 26..26
src/libertem/io/dataset/base/decode.py on lines 27..27
src/libertem/io/dataset/base/decode.py on lines 28..28
src/libertem/io/dataset/base/decode.py on lines 44..44
src/libertem/io/dataset/base/decode.py on lines 46..46
src/libertem/io/dataset/base/decode.py on lines 47..47
src/libertem/io/dataset/base/decode.py on lines 48..48
src/libertem/io/dataset/base/decode.py on lines 49..49
src/libertem/io/dataset/base/decode.py on lines 50..50
src/libertem/io/dataset/base/decode.py on lines 51..51

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

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

        out[i * 8 + 2] = inp[i * 8 + 5]
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 13 other locations - About 1 hr to fix
src/libertem/io/dataset/base/decode.py on lines 10..10
src/libertem/io/dataset/base/decode.py on lines 11..11
src/libertem/io/dataset/base/decode.py on lines 25..25
src/libertem/io/dataset/base/decode.py on lines 26..26
src/libertem/io/dataset/base/decode.py on lines 27..27
src/libertem/io/dataset/base/decode.py on lines 28..28
src/libertem/io/dataset/base/decode.py on lines 44..44
src/libertem/io/dataset/base/decode.py on lines 45..45
src/libertem/io/dataset/base/decode.py on lines 46..46
src/libertem/io/dataset/base/decode.py on lines 47..47
src/libertem/io/dataset/base/decode.py on lines 48..48
src/libertem/io/dataset/base/decode.py on lines 50..50
src/libertem/io/dataset/base/decode.py on lines 51..51

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

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

        out[i * 8 + 1] = inp[i * 8 + 6]
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 13 other locations - About 1 hr to fix
src/libertem/io/dataset/base/decode.py on lines 10..10
src/libertem/io/dataset/base/decode.py on lines 11..11
src/libertem/io/dataset/base/decode.py on lines 25..25
src/libertem/io/dataset/base/decode.py on lines 26..26
src/libertem/io/dataset/base/decode.py on lines 27..27
src/libertem/io/dataset/base/decode.py on lines 28..28
src/libertem/io/dataset/base/decode.py on lines 44..44
src/libertem/io/dataset/base/decode.py on lines 45..45
src/libertem/io/dataset/base/decode.py on lines 46..46
src/libertem/io/dataset/base/decode.py on lines 47..47
src/libertem/io/dataset/base/decode.py on lines 48..48
src/libertem/io/dataset/base/decode.py on lines 49..49
src/libertem/io/dataset/base/decode.py on lines 51..51

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

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

        out[i * 4 + 1] = inp[i * 4 + 2]
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 13 other locations - About 1 hr to fix
src/libertem/io/dataset/base/decode.py on lines 10..10
src/libertem/io/dataset/base/decode.py on lines 11..11
src/libertem/io/dataset/base/decode.py on lines 25..25
src/libertem/io/dataset/base/decode.py on lines 26..26
src/libertem/io/dataset/base/decode.py on lines 28..28
src/libertem/io/dataset/base/decode.py on lines 44..44
src/libertem/io/dataset/base/decode.py on lines 45..45
src/libertem/io/dataset/base/decode.py on lines 46..46
src/libertem/io/dataset/base/decode.py on lines 47..47
src/libertem/io/dataset/base/decode.py on lines 48..48
src/libertem/io/dataset/base/decode.py on lines 49..49
src/libertem/io/dataset/base/decode.py on lines 50..50
src/libertem/io/dataset/base/decode.py on lines 51..51

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

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

        out[i * 8 + 7] = inp[i * 8 + 0]
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 13 other locations - About 1 hr to fix
src/libertem/io/dataset/base/decode.py on lines 10..10
src/libertem/io/dataset/base/decode.py on lines 11..11
src/libertem/io/dataset/base/decode.py on lines 25..25
src/libertem/io/dataset/base/decode.py on lines 26..26
src/libertem/io/dataset/base/decode.py on lines 27..27
src/libertem/io/dataset/base/decode.py on lines 28..28
src/libertem/io/dataset/base/decode.py on lines 45..45
src/libertem/io/dataset/base/decode.py on lines 46..46
src/libertem/io/dataset/base/decode.py on lines 47..47
src/libertem/io/dataset/base/decode.py on lines 48..48
src/libertem/io/dataset/base/decode.py on lines 49..49
src/libertem/io/dataset/base/decode.py on lines 50..50
src/libertem/io/dataset/base/decode.py on lines 51..51

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

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

        out[i * 4 + 2] = inp[i * 4 + 1]
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 13 other locations - About 1 hr to fix
src/libertem/io/dataset/base/decode.py on lines 10..10
src/libertem/io/dataset/base/decode.py on lines 11..11
src/libertem/io/dataset/base/decode.py on lines 25..25
src/libertem/io/dataset/base/decode.py on lines 27..27
src/libertem/io/dataset/base/decode.py on lines 28..28
src/libertem/io/dataset/base/decode.py on lines 44..44
src/libertem/io/dataset/base/decode.py on lines 45..45
src/libertem/io/dataset/base/decode.py on lines 46..46
src/libertem/io/dataset/base/decode.py on lines 47..47
src/libertem/io/dataset/base/decode.py on lines 48..48
src/libertem/io/dataset/base/decode.py on lines 49..49
src/libertem/io/dataset/base/decode.py on lines 50..50
src/libertem/io/dataset/base/decode.py on lines 51..51

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

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

        out[i * 4 + 0] = inp[i * 4 + 3]
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 13 other locations - About 1 hr to fix
src/libertem/io/dataset/base/decode.py on lines 10..10
src/libertem/io/dataset/base/decode.py on lines 11..11
src/libertem/io/dataset/base/decode.py on lines 25..25
src/libertem/io/dataset/base/decode.py on lines 26..26
src/libertem/io/dataset/base/decode.py on lines 27..27
src/libertem/io/dataset/base/decode.py on lines 44..44
src/libertem/io/dataset/base/decode.py on lines 45..45
src/libertem/io/dataset/base/decode.py on lines 46..46
src/libertem/io/dataset/base/decode.py on lines 47..47
src/libertem/io/dataset/base/decode.py on lines 48..48
src/libertem/io/dataset/base/decode.py on lines 49..49
src/libertem/io/dataset/base/decode.py on lines 50..50
src/libertem/io/dataset/base/decode.py on lines 51..51

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

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

        out[i * 8 + 4] = inp[i * 8 + 3]
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 13 other locations - About 1 hr to fix
src/libertem/io/dataset/base/decode.py on lines 10..10
src/libertem/io/dataset/base/decode.py on lines 11..11
src/libertem/io/dataset/base/decode.py on lines 25..25
src/libertem/io/dataset/base/decode.py on lines 26..26
src/libertem/io/dataset/base/decode.py on lines 27..27
src/libertem/io/dataset/base/decode.py on lines 28..28
src/libertem/io/dataset/base/decode.py on lines 44..44
src/libertem/io/dataset/base/decode.py on lines 45..45
src/libertem/io/dataset/base/decode.py on lines 46..46
src/libertem/io/dataset/base/decode.py on lines 48..48
src/libertem/io/dataset/base/decode.py on lines 49..49
src/libertem/io/dataset/base/decode.py on lines 50..50
src/libertem/io/dataset/base/decode.py on lines 51..51

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

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

        out[i * 8 + 3] = inp[i * 8 + 4]
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 13 other locations - About 1 hr to fix
src/libertem/io/dataset/base/decode.py on lines 10..10
src/libertem/io/dataset/base/decode.py on lines 11..11
src/libertem/io/dataset/base/decode.py on lines 25..25
src/libertem/io/dataset/base/decode.py on lines 26..26
src/libertem/io/dataset/base/decode.py on lines 27..27
src/libertem/io/dataset/base/decode.py on lines 28..28
src/libertem/io/dataset/base/decode.py on lines 44..44
src/libertem/io/dataset/base/decode.py on lines 45..45
src/libertem/io/dataset/base/decode.py on lines 46..46
src/libertem/io/dataset/base/decode.py on lines 47..47
src/libertem/io/dataset/base/decode.py on lines 49..49
src/libertem/io/dataset/base/decode.py on lines 50..50
src/libertem/io/dataset/base/decode.py on lines 51..51

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

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

        out[i * 8 + 0] = inp[i * 8 + 7]
Severity: Major
Found in src/libertem/io/dataset/base/decode.py and 13 other locations - About 1 hr to fix
src/libertem/io/dataset/base/decode.py on lines 10..10
src/libertem/io/dataset/base/decode.py on lines 11..11
src/libertem/io/dataset/base/decode.py on lines 25..25
src/libertem/io/dataset/base/decode.py on lines 26..26
src/libertem/io/dataset/base/decode.py on lines 27..27
src/libertem/io/dataset/base/decode.py on lines 28..28
src/libertem/io/dataset/base/decode.py on lines 44..44
src/libertem/io/dataset/base/decode.py on lines 45..45
src/libertem/io/dataset/base/decode.py on lines 46..46
src/libertem/io/dataset/base/decode.py on lines 47..47
src/libertem/io/dataset/base/decode.py on lines 48..48
src/libertem/io/dataset/base/decode.py on lines 49..49
src/libertem/io/dataset/base/decode.py on lines 50..50

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

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

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

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

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

Refactorings

Further Reading

There are no issues that match your filters.

Category
Status