Kynetics/uf-android-client

View on GitHub
uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt

Summary

Maintainability
A
1 hr
Test Coverage

Method fromJson has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        /**
         * Deserialize a [jsonContent] element into a corresponding object of type [UFServiceMessageV1].
         * @throws [SerializationException] if given input can not be deserialized
         * @throws [IllegalArgumentException] if given input isn't a UFServiceMessageV1 json serialization
         */

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

            /**
             * An error is occurred
             *
             * @property details optional additional details about the error
             */
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 135..145

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

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

            /**
             * Bad service configuration
             *
             * @property details optional additional information about the errors
             */
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 213..223

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

    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 6 locations. Consider refactoring.
    Invalid

            /**
             * A file downloading is started
             *
             * @property fileName file name
             */
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 170..180
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 239..249
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 251..261
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 263..273
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 288..299

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 117.

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

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

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

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

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Invalid

            /**
             * The configuration used by the service has been updated.
             * This event is notified when the configuration change doesn't require a restart of the service.
             *
             * @property configuration the new service configuration
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 158..168
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 170..180
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 239..249
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 251..261
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 263..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 117.

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

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

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

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

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Invalid

            /**
             * The service is stopped
             *
             * @property configuration the service configuration
             */
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 158..168
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 170..180
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 239..249
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 251..261
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 288..299

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 117.

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

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

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

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

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Invalid

            /**
             * A file is downloaded
             *
             * @property fileDownloaded name of file downloaded
             */
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 158..168
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 239..249
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 251..261
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 263..273
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 288..299

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 117.

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

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

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

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

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Invalid

            /**
             * An update is available on cloud
             *
             * @property id update id
             */
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 158..168
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 170..180
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 251..261
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 263..273
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 288..299

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 117.

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

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

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

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

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Invalid

            /**
             * The service is started
             *
             * @property configuration the service configuration
             */
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 158..168
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 170..180
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 239..249
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 263..273
    uf-client-service/uf-client-service-api/src/main/kotlin/com/kynetics/uf/android/api/v1/UFServiceMessageV1.kt on lines 288..299

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 117.

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

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

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

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

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status