SmashKs/OneShoot

View on GitHub

Showing 166 of 166 total issues

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

inline fun <T> Int.takeIfDefault(block: (Int) -> T) = takeIf(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 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
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> Long.takeIfDefault(block: (Long) -> T) = takeIf(Long::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 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
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> Long.takeUnlessDefault(block: (Long) -> T) = takeUnless(Long::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 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

Method peelResponseOptions has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    response: KsResponse<D>,
    isShowLoading: Boolean = true,
    isShowError: Boolean = true,
    isHideLoading: Boolean = true,
    errorBlock: ((String) -> Unit)? = null,
Severity: Major
Found in presentation/src/main/java/smash/ks/com/oneshoot/ext/aac/Extensions.kt - About 50 mins to fix

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

        val radius = Math.sqrt(width.toDouble().pow(2) + height.toDouble().pow(2)).toFloat()
    presentation/src/main/java/smash/ks/com/oneshoot/widgets/reveal/AnimationUtil.kt on lines 58..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 82.

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

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

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

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

    Refactorings

    Further Reading

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

                    val radius = Math.sqrt(width.toDouble().pow(2) + height.toDouble().pow(2)).toFloat()
    presentation/src/main/java/smash/ks/com/oneshoot/widgets/reveal/AnimationUtil.kt on lines 78..78

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

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

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

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

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

    Refactorings

    Further Reading

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

        /** Add the AAC [ViewModel] for each fragments. */
        @Suppress("UNCHECKED_CAST")
        protected val vm
            get() = vmCreateMethod.invoke(vmProviders, vmConcreteClass) as? VM ?: throw ClassCastException()
    presentation/src/main/java/smash/ks/com/oneshoot/bases/AdvActivity.kt on lines 30..33

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

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

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

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

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

    Refactorings

    Further Reading

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

        /** Add the AAC [ViewModel] for each fragments. */
        @Suppress("UNCHECKED_CAST")
        protected val vm
            get() = vmCreateMethod.invoke(vmProviders, vmConcreteClass) as? VM ?: throw ClassCastException()
    presentation/src/main/java/smash/ks/com/oneshoot/bases/AdvFragment.kt on lines 42..45

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

    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 xCenter = predictions[0][i][LEFT_POINT_OF_RECT] /
                              X_SCALE *
                              boxPriors[RIGHT_POINT_OF_RECT][i] +
                              boxPriors[1][i]
    presentation/src/main/java/smash/ks/com/oneshoot/classifiers/TFLiteObjectDetectionAPIModel.kt on lines 184..187

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

    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 yCenter = predictions[0][i][TOP_POINT_OF_RECT] /
                              Y_SCALE *
                              boxPriors[BOTTOM_POINT_OF_RECT][i] +
                              boxPriors[0][i]
    presentation/src/main/java/smash/ks/com/oneshoot/classifiers/TFLiteObjectDetectionAPIModel.kt on lines 188..191

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

    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

        private val adapter by lazy {
            val innerAdapter by instance<RVAdapterAny>(LABEL_ADAPTER)
    
            cast<MultiTypeAdapter>(innerAdapter)
        }
    presentation/src/main/java/smash/ks/com/oneshoot/features/fake/FakeFragment.kt on lines 52..56

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

    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

        private val adapter by lazy {
            val innerAdapter by instance<RVAdapterAny>(KS_ADAPTER)
    
            cast<MultiTypeAdapter>(innerAdapter)
        }
    presentation/src/main/java/smash/ks/com/oneshoot/features/photograph/AnalyzeFragment.kt on lines 81..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 80.

    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

        /**
         * To provide the necessary objects [MediaManager] into the repository.
         */
        private fun cloudinaryProvider() = Module("Cloudinary Module") {
            bind<MediaManager>() with provider { MediaManager.get() }
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/ServiceModule.kt on lines 77..83

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

    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

        /**
         * To provide the necessary objects [FirebaseDatabase] into the repository.
         */
        private fun firebaseProvider() = Module("Firebase Module") {
            bind<FirebaseDatabase>() with provider { FirebaseDatabase.getInstance() }
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/ServiceModule.kt on lines 85..90

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

    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

                    var roundHeight = (y + h).let { if (it > bmp.height) bmp.height - y else h }
    presentation/src/main/java/smash/ks/com/oneshoot/features/photograph/TakeAPicFragment.kt on lines 273..273

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

    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

                    var roundWidth = (x + w).let { if (it > bmp.width) bmp.width - x else w }
    presentation/src/main/java/smash/ks/com/oneshoot/features/photograph/TakeAPicFragment.kt on lines 274..274

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

    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<ViewModelEntry>().inSet() with provider {
                UploadPicViewModel::class.java to UploadPicViewModel(instance())
            }
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/UtilModule.kt on lines 59..59
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/UtilModule.kt on lines 60..60
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/UtilModule.kt on lines 61..61
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/fragment/UploadPicModule.kt on lines 30..32

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

    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<DataMapperEntry>().inSet() with provider { KsMapper::class.java to KsMapper(instance()) }
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/UtilModule.kt on lines 60..60
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/UtilModule.kt on lines 61..61
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/fragment/AnalyzeModule.kt on lines 44..46
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/fragment/UploadPicModule.kt on lines 30..32

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

    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<DataMapperEntry>().inSet() with provider { UploadResultMapper::class.java to UploadResultMapper(instance()) }
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/UtilModule.kt on lines 59..59
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/UtilModule.kt on lines 60..60
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/fragment/AnalyzeModule.kt on lines 44..46
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/fragment/UploadPicModule.kt on lines 30..32

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

    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<ViewModelEntry>().inSet() with provider {
                UploadPicViewModel::class.java to UploadPicViewModel(instance())
            }
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/UtilModule.kt on lines 59..59
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/UtilModule.kt on lines 60..60
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/UtilModule.kt on lines 61..61
    presentation/src/main/java/smash/ks/com/oneshoot/internal/di/modules/dependencies/fragment/AnalyzeModule.kt on lines 44..46

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

    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