coding-blocks/CBOnlineApp

View on GitHub
onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt

Summary

Maintainability
F
3 days
Test Coverage

Class OnlineRestApi has 37 methods (exceeds 20 allowed). Consider refactoring.
Open

interface OnlineRestApi {
    @Deprecated("Progress is part of run")
    @GET("v2/run_attempts/{runid}/progress")
    fun getMyCourseProgress(@Path("runid") id: String): Call<HashMap<Any, Any>>

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

        @POST("v2/run_attempts/purchase")
        @FormUrlEncoded
        suspend fun capturePayment(@FieldMap params: Map<String, String>): Response<JsonObject>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 313..317
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 102..104
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 106..108
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 126..128

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

    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

        @POST("jwt/login")
        @FormUrlEncoded
        suspend fun getJwtWithEmail(@FieldMap params: Map<String, String>): Response<JsonObject>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 313..317
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 102..104
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 106..108
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 137..139

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

    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

        @POST("jwt/otp/v2")
        @FormUrlEncoded
        suspend fun getOtp(@FieldMap params: HashMap<String, String>): Response<JsonObject>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 313..317
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 106..108
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 126..128
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 137..139

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

    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

        @POST("users/find")
        @FormUrlEncoded
        suspend fun findUser(@FieldMap params: HashMap<String, String>): Response<JsonArray>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 313..317
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 102..104
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 126..128
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 137..139

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

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

        @POST("v2/courses/{id}/rating")
        suspend fun sendFeedback(
            @Path("id") id: String,
            @Body json: SendFeedback
        ): Response<Feedback>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 70..74
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 196..200
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 212..216

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

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

        @PATCH("users/verifymobile")
        suspend fun verifyMobile(@Body params: Map<String, String>): Response<JsonObject>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 71..72
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 116..117
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 141..142

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

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

        @POST("users")
        suspend fun createUser(@Body params: Map<String, String>): Response<JsonObject>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 71..72
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 113..114
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 141..142

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

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

        @POST("v2/hubspot/lead")
        suspend fun generateLead(@Body body: HashMap<String, Any>): Response<JsonObject>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 71..72
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 113..114
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 116..117

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

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

        @PATCH("v2/runs/purchase")
        suspend fun updateCart(@Body body: HashMap<String, Any>): Response<JsonObject>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 113..114
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 116..117
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 141..142

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

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

        @GET("v2/runs/{runid}/leaderboard")
        suspend fun leaderboardById(
            @Path("runid") id: String
        ): Response<List<Leaderboard>>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 65..68
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 86..89
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 159..162
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 164..167
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 300..303

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

    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

        @POST("jwt/login?android=true")
        @FormUrlEncoded
        suspend fun getToken(@Field("code") code: String): Response<JsonObject>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 77..79

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

    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

        @POST("jwt/refresh/?android=true")
        @FormUrlEncoded
        suspend fun refreshToken(@Field("refresh_token") refresh_token: String): Response<JsonObject>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 42..44

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

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

        @GET("v2/courses/{id}/rating")
        suspend fun getFeedback(
            @Path("id") id: String
        ): Response<Feedback>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 46..49
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 81..84
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 96..99
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 108..109
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 144..147
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 149..152
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 154..157
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 191..194
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 218..221
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 246..249
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 251..254
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 279..282
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 305..308
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 390..393
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 395..398
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 46..49
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 54..55
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 57..58
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 84..85
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 93..94
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 99..100

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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 22 locations. Consider refactoring.
    Open

        @GET("v2/runs/{runId}/buy")
        suspend fun addToCart(@Path("runId") id: String): Response<JsonObject>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 46..49
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 81..84
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 96..99
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 108..109
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 144..147
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 149..152
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 154..157
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 191..194
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 218..221
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 246..249
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 251..254
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 279..282
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 305..308
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 390..393
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 395..398
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 46..49
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 54..55
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 84..85
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 93..94
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 99..100
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 162..165

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

        @GET("v2/runs/{runId}/enroll")
        suspend fun enrollTrial(@Path("runId") id: String): Response<JsonObject>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 46..49
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 81..84
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 96..99
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 108..109
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 144..147
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 149..152
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 154..157
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 191..194
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 218..221
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 246..249
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 251..254
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 279..282
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 305..308
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 390..393
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 395..398
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 46..49
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 57..58
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 84..85
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 93..94
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 99..100
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 162..165

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

        @GET("v2/progresses/stats/{id}")
        suspend fun getMyStats(
            @Path("id") id: String
        ): Response<PerformanceResponse>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 46..49
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 81..84
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 96..99
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 108..109
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 144..147
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 149..152
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 154..157
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 191..194
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 218..221
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 246..249
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 251..254
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 279..282
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 305..308
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 390..393
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 395..398
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 54..55
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 57..58
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 84..85
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 93..94
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 99..100
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 162..165

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

        @POST("v2/chats/{id}")
        suspend fun getChatId(@Path("id") doubtId: String): Response<JsonObject>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 46..49
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 81..84
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 96..99
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 108..109
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 144..147
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 149..152
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 154..157
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 191..194
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 218..221
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 246..249
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 251..254
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 279..282
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 305..308
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 390..393
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 395..398
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 46..49
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 54..55
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 57..58
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 84..85
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 93..94
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 162..165

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

        @GET("v2/run_attempts/{runAttemptId}/requestApproval")
        suspend fun requestApproval(@Path("runAttemptId") id: String): Response<ResponseBody>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 46..49
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 81..84
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 96..99
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 108..109
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 144..147
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 149..152
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 154..157
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 191..194
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 218..221
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 246..249
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 251..254
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 279..282
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 305..308
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 390..393
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 395..398
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 46..49
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 54..55
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 57..58
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 93..94
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 99..100
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 162..165

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

        @GET("v2/doubts/stats/{id}")
        suspend fun doubtStats(@Path("id") userId: String): Response<DoubtStats>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 46..49
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 81..84
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 96..99
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 108..109
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 144..147
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 149..152
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 154..157
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 191..194
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 218..221
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 246..249
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 251..254
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 279..282
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 305..308
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 390..393
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 395..398
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 46..49
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 54..55
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 57..58
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 84..85
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 99..100
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 162..165

    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

        suspend fun updateUser(
            @Path("id") id: String,
            @FieldMap params: Map<String, String>
        ): Response<JsonObject>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 111..111

    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

        suspend fun verifyOtp(@Path("id") uniqueId: String, @Body params: HashMap<String, Any>): Response<JsonObject>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 121..124

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

        @POST("v2/runs/extensions/{id}/buy")
        fun buyExtension(@Path("id") extensionId: Int): Call<JsonObject>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 284..287
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 87..88

    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

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

        @GET("v2/runs/products/{id}")
        fun getExtensions(@Path("id") productId: Int): Call<Extension>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 284..287
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineRestApi.kt on lines 90..91

    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

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

        @POST("v2/progresses/reset")
        suspend fun resetProgress(@Body runAttemptId: ResetRunAttempt): Response<ResponseBody>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 91..94
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 202..205
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 207..210
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 229..232
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 256..257
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 259..260
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 265..266
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 387..388

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

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

        @GET("dashboard-banners")
        suspend fun getBanner(): Response<List<Banner>>
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 111..112
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 262..263
    onlineapi/src/main/kotlin/com/codingblocks/onlineapi/api/OnlineJsonApi.kt on lines 310..311

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

    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