SmashKs/OneShoot

View on GitHub

Showing 166 of 166 total issues

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

    /**
     * Executes the current use case with request [parameter] with an anonymous function..
     *
     * @param parameter the parameter for retrieving data.
     * @param lifecycleProvider an activity or a fragment of the [LifecycleProvider] object.
domain/src/main/java/smash/ks/com/domain/CompletableUseCase.kt on lines 58..75

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

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

    /**
     * Executes the current use case with request [parameter].
     *
     * @param parameter the parameter for retrieving data.
     * @param lifecycleProvider the life cycle provider for cutting RxJava runs.
domain/src/main/java/smash/ks/com/domain/CompletableUseCase.kt on lines 91..108

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

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

            val h = exp((predictions[0][i][BOTTOM_POINT_OF_RECT] / H_SCALE).toDouble()).toFloat() *
                    boxPriors[BOTTOM_POINT_OF_RECT][i]
presentation/src/main/java/smash/ks/com/oneshoot/classifiers/TFLiteObjectDetectionAPIModel.kt on lines 194..195

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

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

            val w = exp((predictions[0][i][RIGHT_POINT_OF_RECT] / W_SCALE).toDouble()).toFloat() *
                    boxPriors[RIGHT_POINT_OF_RECT][i]
presentation/src/main/java/smash/ks/com/oneshoot/classifiers/TFLiteObjectDetectionAPIModel.kt on lines 192..193

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

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

Method onPreDraw has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

        @Override
        public boolean onPreDraw() {
            int[] locations = new int[2];
            Bitmap oldBmp = mBlurredBitmap;
            View decor = mDecorView;

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method peelResponseOptions has a Cognitive Complexity of 24 (exceeds 20 allowed). Consider refactoring.
Open

/**
 * Check the [KsResponse]'s changing and do the corresponding reaction. Here're three data
 * type [Loading], [Success], and [Error].
 *
 * - [Loading] state will show the loading view.
Severity: Minor
Found in presentation/src/main/java/smash/ks/com/oneshoot/ext/aac/Extensions.kt - About 55 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

        bind<GetKsImageCase>() with scoped(fragmentScope).singleton {
            FindKsImageUsecase(instance(), instance(), instance())
        }
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 47..49
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 52..54
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 56..58
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 60..62

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

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

        bind<SaveKsImageCase>() with scoped(fragmentScope).singleton {
            PersistKsImageUsecase(instance(), instance(), instance())
        }
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 43..45
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 52..54
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 56..58
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 60..62

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

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

        bind<UploadImageToFirebaseCase>() with scoped(fragmentScope).singleton {
            UploadImageToFirebaseUsecase(instance(), instance(), instance())
        }
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 43..45
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 47..49
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 52..54
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 56..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 84.

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

        bind<GetImageTagsCase>() with scoped(fragmentScope).singleton {
            FindImageTagsUsecase(instance(), instance(), instance())
        }
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 43..45
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 47..49
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 56..58
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 60..62

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

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

        bind<GetImageContentWordsCase>() with scoped(fragmentScope).singleton {
            FindImageContentWordsUsecase(instance(), instance(), instance())
        }
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 43..45
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 47..49
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 52..54
presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/UsecaseModule.kt on lines 60..62

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

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

inline fun <T> Int.takeUnlessDefault(block: (Int) -> T) = takeUnless(Int::isDefault)?.let(block)
Severity: Major
Found in ext/src/main/java/smash/ks/com/ext/const/Default.kt and 9 other locations - About 55 mins to fix
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 33..33
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 34..34
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 35..35
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 36..36
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 37..37
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 40..40
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 41..41
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 42..42
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 43..43

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

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

inline fun <T> String.takeUnlessDefault(block: (String) -> T) = takeUnless(String::isDefault)?.let(block)
Severity: Major
Found in ext/src/main/java/smash/ks/com/ext/const/Default.kt and 9 other locations - About 55 mins to fix
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 33..33
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 34..34
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 35..35
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 36..36
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 37..37
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 39..39
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 40..40
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 42..42
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 43..43

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

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

inline fun <T> Float.takeIfDefault(block: (Float) -> T) = takeIf(Float::isDefault)?.let(block)
Severity: Major
Found in ext/src/main/java/smash/ks/com/ext/const/Default.kt and 9 other locations - About 55 mins to fix
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 33..33
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 34..34
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 35..35
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 36..36
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 39..39
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 40..40
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 41..41
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 42..42
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 43..43

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

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

inline fun <T> String.takeIfDefault(block: (String) -> T) = takeIf(String::isDefault)?.let(block)
Severity: Major
Found in ext/src/main/java/smash/ks/com/ext/const/Default.kt and 9 other locations - About 55 mins to fix
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 33..33
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 34..34
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 36..36
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 37..37
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 39..39
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 40..40
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 41..41
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 42..42
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 43..43

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

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

inline fun <T> Float.takeUnlessDefault(block: (Float) -> T) = takeUnless(Float::isDefault)?.let(block)
Severity: Major
Found in ext/src/main/java/smash/ks/com/ext/const/Default.kt and 9 other locations - About 55 mins to fix
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 33..33
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 34..34
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 35..35
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 36..36
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 37..37
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 39..39
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 40..40
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 41..41
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 42..42

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

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

inline fun <T> Double.takeIfDefault(block: (Double) -> T) = takeIf(Double::isDefault)?.let(block)
Severity: Major
Found in ext/src/main/java/smash/ks/com/ext/const/Default.kt and 9 other locations - About 55 mins to fix
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 33..33
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 34..34
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 35..35
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 37..37
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 39..39
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 40..40
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 41..41
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 42..42
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 43..43

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

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

inline fun <T> Double.takeUnlessDefault(block: (Double) -> T) = takeUnless(Double::isDefault)?.let(block)
Severity: Major
Found in ext/src/main/java/smash/ks/com/ext/const/Default.kt and 9 other locations - About 55 mins to fix
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 33..33
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 34..34
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 35..35
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 36..36
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 37..37
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 39..39
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 40..40
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 41..41
ext/src/main/java/smash/ks/com/ext/const/Default.kt on lines 43..43

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

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

    /**
     * Composing the transfer a new thread [ThreadExecutor] scheduler to [smash.ks.com.oneshoot.UiThread]
     * for [io.reactivex.Single].
     */
    protected fun <T> singleTransferSchedule() = SingleTransformer<T, T> {
Severity: Minor
Found in domain/src/main/java/smash/ks/com/domain/BaseUseCase.kt and 1 other location - About 55 mins to fix
domain/src/main/java/smash/ks/com/domain/BaseUseCase.kt on lines 47..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 83.

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

    /**
     * Composing the transfer a new thread [ThreadExecutor] scheduler to [smash.ks.com.oneshoot.UiThread]
     * for [Observable].
     */
    protected fun <T> observableTransferSchedule() = ObservableTransformer<T, T> {
Severity: Minor
Found in domain/src/main/java/smash/ks/com/domain/BaseUseCase.kt and 1 other location - About 55 mins to fix
domain/src/main/java/smash/ks/com/domain/BaseUseCase.kt on lines 55..61

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

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