LiberTEM/LiberTEM

View on GitHub

Showing 220 of 903 total issues

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

    test('handles inputs without brackets', () => {
        const inputErrors: ErrorObject[] = [
            {
                "keyword": "minimum",
                "instancePath": ".nav_shape",
Severity: Major
Found in client/src/dataset/__tests__/validate.test.ts and 1 other location - About 3 hrs to fix
client/src/dataset/__tests__/validate.test.ts on lines 9..21

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

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

        case DatasetTypes.TVIPS: {
            const initial = formInitial && datasetType === formInitial.type ? formInitial : undefined;
            const info = formInfo && datasetType === formInfo.type ? formInfo : undefined;
            return renderForm(<TVIPSParamsForm {...commonParams} initial={initial} info={info} />);
        }
Severity: Major
Found in client/src/dataset/components/DatasetOpen.tsx and 13 other locations - About 2 hrs to fix
client/src/dataset/components/DatasetOpen.tsx on lines 169..173
client/src/dataset/components/DatasetOpen.tsx on lines 174..178
client/src/dataset/components/DatasetOpen.tsx on lines 179..183
client/src/dataset/components/DatasetOpen.tsx on lines 184..188
client/src/dataset/components/DatasetOpen.tsx on lines 189..193
client/src/dataset/components/DatasetOpen.tsx on lines 194..198
client/src/dataset/components/DatasetOpen.tsx on lines 199..203
client/src/dataset/components/DatasetOpen.tsx on lines 204..208
client/src/dataset/components/DatasetOpen.tsx on lines 209..213
client/src/dataset/components/DatasetOpen.tsx on lines 214..218
client/src/dataset/components/DatasetOpen.tsx on lines 219..223
client/src/dataset/components/DatasetOpen.tsx on lines 229..233
client/src/dataset/components/DatasetOpen.tsx on lines 234..238

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

        case DatasetTypes.HDF5: {
            const initial = formInitial && datasetType === formInitial.type ? formInitial : undefined;
            const info = formInfo && datasetType === formInfo.type ? formInfo : undefined;
            return renderForm(<HDF5ParamsForm {...commonParams} initial={initial} info={info} />);
        }
Severity: Major
Found in client/src/dataset/components/DatasetOpen.tsx and 13 other locations - About 2 hrs to fix
client/src/dataset/components/DatasetOpen.tsx on lines 174..178
client/src/dataset/components/DatasetOpen.tsx on lines 179..183
client/src/dataset/components/DatasetOpen.tsx on lines 184..188
client/src/dataset/components/DatasetOpen.tsx on lines 189..193
client/src/dataset/components/DatasetOpen.tsx on lines 194..198
client/src/dataset/components/DatasetOpen.tsx on lines 199..203
client/src/dataset/components/DatasetOpen.tsx on lines 204..208
client/src/dataset/components/DatasetOpen.tsx on lines 209..213
client/src/dataset/components/DatasetOpen.tsx on lines 214..218
client/src/dataset/components/DatasetOpen.tsx on lines 219..223
client/src/dataset/components/DatasetOpen.tsx on lines 224..228
client/src/dataset/components/DatasetOpen.tsx on lines 229..233
client/src/dataset/components/DatasetOpen.tsx on lines 234..238

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

        case DatasetTypes.NPY: {
            const initial = formInitial && datasetType === formInitial.type ? formInitial : undefined;
            const info = formInfo && datasetType === formInfo.type ? formInfo : undefined;
            return renderForm(<NPYParamsForm {...commonParams} initial={initial} info={info} />);
        }
Severity: Major
Found in client/src/dataset/components/DatasetOpen.tsx and 13 other locations - About 2 hrs to fix
client/src/dataset/components/DatasetOpen.tsx on lines 169..173
client/src/dataset/components/DatasetOpen.tsx on lines 174..178
client/src/dataset/components/DatasetOpen.tsx on lines 179..183
client/src/dataset/components/DatasetOpen.tsx on lines 189..193
client/src/dataset/components/DatasetOpen.tsx on lines 194..198
client/src/dataset/components/DatasetOpen.tsx on lines 199..203
client/src/dataset/components/DatasetOpen.tsx on lines 204..208
client/src/dataset/components/DatasetOpen.tsx on lines 209..213
client/src/dataset/components/DatasetOpen.tsx on lines 214..218
client/src/dataset/components/DatasetOpen.tsx on lines 219..223
client/src/dataset/components/DatasetOpen.tsx on lines 224..228
client/src/dataset/components/DatasetOpen.tsx on lines 229..233
client/src/dataset/components/DatasetOpen.tsx on lines 234..238

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

        case DatasetTypes.MIB: {
            const initial = formInitial && datasetType === formInitial.type ? formInitial : undefined;
            const info = formInfo && datasetType === formInfo.type ? formInfo : undefined;
            return renderForm(<MIBParamsForm {...commonParams} initial={initial} info={info} />);
        }
Severity: Major
Found in client/src/dataset/components/DatasetOpen.tsx and 13 other locations - About 2 hrs to fix
client/src/dataset/components/DatasetOpen.tsx on lines 169..173
client/src/dataset/components/DatasetOpen.tsx on lines 174..178
client/src/dataset/components/DatasetOpen.tsx on lines 184..188
client/src/dataset/components/DatasetOpen.tsx on lines 189..193
client/src/dataset/components/DatasetOpen.tsx on lines 194..198
client/src/dataset/components/DatasetOpen.tsx on lines 199..203
client/src/dataset/components/DatasetOpen.tsx on lines 204..208
client/src/dataset/components/DatasetOpen.tsx on lines 209..213
client/src/dataset/components/DatasetOpen.tsx on lines 214..218
client/src/dataset/components/DatasetOpen.tsx on lines 219..223
client/src/dataset/components/DatasetOpen.tsx on lines 224..228
client/src/dataset/components/DatasetOpen.tsx on lines 229..233
client/src/dataset/components/DatasetOpen.tsx on lines 234..238

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

        case DatasetTypes.MRC: {
            const initial = formInitial && datasetType === formInitial.type ? formInitial : undefined;
            const info = formInfo && datasetType === formInfo.type ? formInfo : undefined;
            return renderForm(<MRCParamsForm {...commonParams} initial={initial} info={info} />);
        }
Severity: Major
Found in client/src/dataset/components/DatasetOpen.tsx and 13 other locations - About 2 hrs to fix
client/src/dataset/components/DatasetOpen.tsx on lines 169..173
client/src/dataset/components/DatasetOpen.tsx on lines 174..178
client/src/dataset/components/DatasetOpen.tsx on lines 179..183
client/src/dataset/components/DatasetOpen.tsx on lines 184..188
client/src/dataset/components/DatasetOpen.tsx on lines 189..193
client/src/dataset/components/DatasetOpen.tsx on lines 194..198
client/src/dataset/components/DatasetOpen.tsx on lines 199..203
client/src/dataset/components/DatasetOpen.tsx on lines 204..208
client/src/dataset/components/DatasetOpen.tsx on lines 209..213
client/src/dataset/components/DatasetOpen.tsx on lines 214..218
client/src/dataset/components/DatasetOpen.tsx on lines 224..228
client/src/dataset/components/DatasetOpen.tsx on lines 229..233
client/src/dataset/components/DatasetOpen.tsx on lines 234..238

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

        case DatasetTypes.K2IS: {
            const initial = formInitial && datasetType === formInitial.type ? formInitial : undefined;
            const info = formInfo && datasetType === formInfo.type ? formInfo : undefined;
            return renderForm(<K2ISParamsForm {...commonParams} initial={initial} info={info} />);
        }
Severity: Major
Found in client/src/dataset/components/DatasetOpen.tsx and 13 other locations - About 2 hrs to fix
client/src/dataset/components/DatasetOpen.tsx on lines 169..173
client/src/dataset/components/DatasetOpen.tsx on lines 174..178
client/src/dataset/components/DatasetOpen.tsx on lines 179..183
client/src/dataset/components/DatasetOpen.tsx on lines 184..188
client/src/dataset/components/DatasetOpen.tsx on lines 189..193
client/src/dataset/components/DatasetOpen.tsx on lines 199..203
client/src/dataset/components/DatasetOpen.tsx on lines 204..208
client/src/dataset/components/DatasetOpen.tsx on lines 209..213
client/src/dataset/components/DatasetOpen.tsx on lines 214..218
client/src/dataset/components/DatasetOpen.tsx on lines 219..223
client/src/dataset/components/DatasetOpen.tsx on lines 224..228
client/src/dataset/components/DatasetOpen.tsx on lines 229..233
client/src/dataset/components/DatasetOpen.tsx on lines 234..238

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

        case DatasetTypes.RAW: {
            const initial = formInitial && datasetType === formInitial.type ? formInitial : undefined;
            const info = formInfo && datasetType === formInfo.type ? formInfo : undefined;
            return renderForm(<RawFileParamsForm {...commonParams} initial={initial} info={info} />);
        }
Severity: Major
Found in client/src/dataset/components/DatasetOpen.tsx and 13 other locations - About 2 hrs to fix
client/src/dataset/components/DatasetOpen.tsx on lines 169..173
client/src/dataset/components/DatasetOpen.tsx on lines 179..183
client/src/dataset/components/DatasetOpen.tsx on lines 184..188
client/src/dataset/components/DatasetOpen.tsx on lines 189..193
client/src/dataset/components/DatasetOpen.tsx on lines 194..198
client/src/dataset/components/DatasetOpen.tsx on lines 199..203
client/src/dataset/components/DatasetOpen.tsx on lines 204..208
client/src/dataset/components/DatasetOpen.tsx on lines 209..213
client/src/dataset/components/DatasetOpen.tsx on lines 214..218
client/src/dataset/components/DatasetOpen.tsx on lines 219..223
client/src/dataset/components/DatasetOpen.tsx on lines 224..228
client/src/dataset/components/DatasetOpen.tsx on lines 229..233
client/src/dataset/components/DatasetOpen.tsx on lines 234..238

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

        case DatasetTypes.SER: {
            const initial = formInitial && datasetType === formInitial.type ? formInitial : undefined;
            const info = formInfo && datasetType === formInfo.type ? formInfo : undefined;
            return renderForm(<SERParamsForm {...commonParams} initial={initial} info={info} />);
        }
Severity: Major
Found in client/src/dataset/components/DatasetOpen.tsx and 13 other locations - About 2 hrs to fix
client/src/dataset/components/DatasetOpen.tsx on lines 169..173
client/src/dataset/components/DatasetOpen.tsx on lines 174..178
client/src/dataset/components/DatasetOpen.tsx on lines 179..183
client/src/dataset/components/DatasetOpen.tsx on lines 184..188
client/src/dataset/components/DatasetOpen.tsx on lines 189..193
client/src/dataset/components/DatasetOpen.tsx on lines 194..198
client/src/dataset/components/DatasetOpen.tsx on lines 204..208
client/src/dataset/components/DatasetOpen.tsx on lines 209..213
client/src/dataset/components/DatasetOpen.tsx on lines 214..218
client/src/dataset/components/DatasetOpen.tsx on lines 219..223
client/src/dataset/components/DatasetOpen.tsx on lines 224..228
client/src/dataset/components/DatasetOpen.tsx on lines 229..233
client/src/dataset/components/DatasetOpen.tsx on lines 234..238

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

        case DatasetTypes.FRMS6: {
            const initial = formInitial && datasetType === formInitial.type ? formInitial : undefined;
            const info = formInfo && datasetType === formInfo.type ? formInfo : undefined;
            return renderForm(<FRMS6ParamsForm {...commonParams} initial={initial} info={info} />);
        }
Severity: Major
Found in client/src/dataset/components/DatasetOpen.tsx and 13 other locations - About 2 hrs to fix
client/src/dataset/components/DatasetOpen.tsx on lines 169..173
client/src/dataset/components/DatasetOpen.tsx on lines 174..178
client/src/dataset/components/DatasetOpen.tsx on lines 179..183
client/src/dataset/components/DatasetOpen.tsx on lines 184..188
client/src/dataset/components/DatasetOpen.tsx on lines 189..193
client/src/dataset/components/DatasetOpen.tsx on lines 194..198
client/src/dataset/components/DatasetOpen.tsx on lines 199..203
client/src/dataset/components/DatasetOpen.tsx on lines 209..213
client/src/dataset/components/DatasetOpen.tsx on lines 214..218
client/src/dataset/components/DatasetOpen.tsx on lines 219..223
client/src/dataset/components/DatasetOpen.tsx on lines 224..228
client/src/dataset/components/DatasetOpen.tsx on lines 229..233
client/src/dataset/components/DatasetOpen.tsx on lines 234..238

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

        case DatasetTypes.EMPAD: {
            const initial = formInitial && datasetType === formInitial.type ? formInitial : undefined;
            const info = formInfo && datasetType === formInfo.type ? formInfo : undefined;
            return renderForm(<EMPADParamsForm {...commonParams} initial={initial} info={info} />)
        }
Severity: Major
Found in client/src/dataset/components/DatasetOpen.tsx and 13 other locations - About 2 hrs to fix
client/src/dataset/components/DatasetOpen.tsx on lines 169..173
client/src/dataset/components/DatasetOpen.tsx on lines 174..178
client/src/dataset/components/DatasetOpen.tsx on lines 179..183
client/src/dataset/components/DatasetOpen.tsx on lines 184..188
client/src/dataset/components/DatasetOpen.tsx on lines 189..193
client/src/dataset/components/DatasetOpen.tsx on lines 194..198
client/src/dataset/components/DatasetOpen.tsx on lines 199..203
client/src/dataset/components/DatasetOpen.tsx on lines 204..208
client/src/dataset/components/DatasetOpen.tsx on lines 214..218
client/src/dataset/components/DatasetOpen.tsx on lines 219..223
client/src/dataset/components/DatasetOpen.tsx on lines 224..228
client/src/dataset/components/DatasetOpen.tsx on lines 229..233
client/src/dataset/components/DatasetOpen.tsx on lines 234..238

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

        case DatasetTypes.SEQ: {
            const initial = formInitial && datasetType === formInitial.type ? formInitial : undefined;
            const info = formInfo && datasetType === formInfo.type ? formInfo : undefined;
            return renderForm(<SEQParamsForm {...commonParams} initial={initial} info={info} />);
        }
Severity: Major
Found in client/src/dataset/components/DatasetOpen.tsx and 13 other locations - About 2 hrs to fix
client/src/dataset/components/DatasetOpen.tsx on lines 169..173
client/src/dataset/components/DatasetOpen.tsx on lines 174..178
client/src/dataset/components/DatasetOpen.tsx on lines 179..183
client/src/dataset/components/DatasetOpen.tsx on lines 184..188
client/src/dataset/components/DatasetOpen.tsx on lines 189..193
client/src/dataset/components/DatasetOpen.tsx on lines 194..198
client/src/dataset/components/DatasetOpen.tsx on lines 199..203
client/src/dataset/components/DatasetOpen.tsx on lines 204..208
client/src/dataset/components/DatasetOpen.tsx on lines 209..213
client/src/dataset/components/DatasetOpen.tsx on lines 219..223
client/src/dataset/components/DatasetOpen.tsx on lines 224..228
client/src/dataset/components/DatasetOpen.tsx on lines 229..233
client/src/dataset/components/DatasetOpen.tsx on lines 234..238

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

        case DatasetTypes.BLO: {
            const initial = formInitial && datasetType === formInitial.type ? formInitial : undefined;
            const info = formInfo && datasetType === formInfo.type ? formInfo : undefined;
            return renderForm(<BLOParamsForm {...commonParams} initial={initial} info={info} />);
        }
Severity: Major
Found in client/src/dataset/components/DatasetOpen.tsx and 13 other locations - About 2 hrs to fix
client/src/dataset/components/DatasetOpen.tsx on lines 169..173
client/src/dataset/components/DatasetOpen.tsx on lines 174..178
client/src/dataset/components/DatasetOpen.tsx on lines 179..183
client/src/dataset/components/DatasetOpen.tsx on lines 184..188
client/src/dataset/components/DatasetOpen.tsx on lines 194..198
client/src/dataset/components/DatasetOpen.tsx on lines 199..203
client/src/dataset/components/DatasetOpen.tsx on lines 204..208
client/src/dataset/components/DatasetOpen.tsx on lines 209..213
client/src/dataset/components/DatasetOpen.tsx on lines 214..218
client/src/dataset/components/DatasetOpen.tsx on lines 219..223
client/src/dataset/components/DatasetOpen.tsx on lines 224..228
client/src/dataset/components/DatasetOpen.tsx on lines 229..233
client/src/dataset/components/DatasetOpen.tsx on lines 234..238

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

        case DatasetTypes.DM: {
            const initial = formInitial && datasetType === formInitial.type ? formInitial : undefined;
            const info = formInfo && datasetType === formInfo.type ? formInfo : undefined;
            return renderForm(<DMParamsForm {...commonParams} initial={initial} info={info} />);
        }
Severity: Major
Found in client/src/dataset/components/DatasetOpen.tsx and 13 other locations - About 2 hrs to fix
client/src/dataset/components/DatasetOpen.tsx on lines 169..173
client/src/dataset/components/DatasetOpen.tsx on lines 174..178
client/src/dataset/components/DatasetOpen.tsx on lines 179..183
client/src/dataset/components/DatasetOpen.tsx on lines 184..188
client/src/dataset/components/DatasetOpen.tsx on lines 189..193
client/src/dataset/components/DatasetOpen.tsx on lines 194..198
client/src/dataset/components/DatasetOpen.tsx on lines 199..203
client/src/dataset/components/DatasetOpen.tsx on lines 204..208
client/src/dataset/components/DatasetOpen.tsx on lines 209..213
client/src/dataset/components/DatasetOpen.tsx on lines 214..218
client/src/dataset/components/DatasetOpen.tsx on lines 219..223
client/src/dataset/components/DatasetOpen.tsx on lines 224..228
client/src/dataset/components/DatasetOpen.tsx on lines 229..233

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

        case DatasetTypes.RAW_CSR: {
            const initial = formInitial && datasetType === formInitial.type ? formInitial : undefined;
            const info = formInfo && datasetType === formInfo.type ? formInfo : undefined;
            return renderForm(<RawCSRParamsForm {...commonParams} initial={initial} info={info} />);
        }        
Severity: Major
Found in client/src/dataset/components/DatasetOpen.tsx and 13 other locations - About 2 hrs to fix
client/src/dataset/components/DatasetOpen.tsx on lines 169..173
client/src/dataset/components/DatasetOpen.tsx on lines 174..178
client/src/dataset/components/DatasetOpen.tsx on lines 179..183
client/src/dataset/components/DatasetOpen.tsx on lines 184..188
client/src/dataset/components/DatasetOpen.tsx on lines 189..193
client/src/dataset/components/DatasetOpen.tsx on lines 194..198
client/src/dataset/components/DatasetOpen.tsx on lines 199..203
client/src/dataset/components/DatasetOpen.tsx on lines 204..208
client/src/dataset/components/DatasetOpen.tsx on lines 209..213
client/src/dataset/components/DatasetOpen.tsx on lines 214..218
client/src/dataset/components/DatasetOpen.tsx on lines 219..223
client/src/dataset/components/DatasetOpen.tsx on lines 224..228
client/src/dataset/components/DatasetOpen.tsx on lines 234..238

Duplicated Code

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

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

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

Tuning

This issue has a mass of 91.

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

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

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

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

Refactorings

Further Reading

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

    def merge_all(self, ordered_results):
        ''
        chunks = [b.logsum for b in ordered_results.values()]
        logsum = np.stack(chunks, axis=0).sum(axis=0)
        return {'logsum': logsum}
Severity: Major
Found in src/libertem/udf/logsum.py and 2 other locations - About 2 hrs to fix
src/libertem/udf/raw.py on lines 73..77
src/libertem/udf/sum.py on lines 54..58

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

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

    def merge_all(self, ordered_results):
        ''
        intensity_chunks = [b.intensity for b in ordered_results.values()]
        intensity_sum = np.stack(intensity_chunks, axis=0).sum(axis=0)
        return {'intensity': intensity_sum}
Severity: Major
Found in src/libertem/udf/raw.py and 2 other locations - About 2 hrs to fix
src/libertem/udf/logsum.py on lines 45..49
src/libertem/udf/sum.py on lines 54..58

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

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

    def merge_all(self, ordered_results):
        ''
        intensity_chunks = [b.intensity for b in ordered_results.values()]
        intensity_sum = np.stack(intensity_chunks, axis=0).sum(axis=0)
        return {'intensity': intensity_sum}
Severity: Major
Found in src/libertem/udf/sum.py and 2 other locations - About 2 hrs to fix
src/libertem/udf/logsum.py on lines 45..49
src/libertem/udf/raw.py on lines 73..77

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

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

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

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

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

Refactorings

Further Reading

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

    test('properly handles missing frames', () => {

        const navShapeProduct = productOfShapeInCommaSeparatedString("10,8");
        const imageCount = 64;
        const offsetVal = 0;
Severity: Major
Found in client/src/dataset/__tests__/validate.test.ts and 1 other location - About 2 hrs to fix
client/src/dataset/__tests__/validate.test.ts on lines 39..53

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

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

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

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

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

Refactorings

Further Reading

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

    test('properly handles positive offset', () => {

        const navShapeProduct = productOfShapeInCommaSeparatedString("8,8");
        const imageCount = 64;
        const offsetVal = 8;
Severity: Major
Found in client/src/dataset/__tests__/validate.test.ts and 1 other location - About 2 hrs to fix
client/src/dataset/__tests__/validate.test.ts on lines 71..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 87.

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