guimc233/lgz-bot

View on GitHub

Showing 53 of 53 total issues

Method resolveGameType has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    fun resolveGameType(gametype: String): String {
        return when (gametype) {
            "QUAKECRAFT" -> "Quake"
            "WALLS" -> "Walls"
            "PAINTBALL" -> "Paintball"
Severity: Minor
Found in src/main/kotlin/ltd/guimc/lgzbot/utils/hypixel/HypixelApiUtils.kt - About 1 hr to fix

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

                for (regex in regexList) {
                    i++
                    if (regex.containsMatchIn(unPeekText)) {
                        logger.info("匹配成功 在第${i}行 ${regex.find(unPeekText)?.value}")
                        return true
    Severity: Major
    Found in src/main/kotlin/ltd/guimc/lgzbot/utils/RegexUtils.kt and 1 other location - About 1 hr to fix
    src/main/kotlin/ltd/guimc/lgzbot/utils/RegexUtils.kt on lines 73..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 112.

    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

                for (regex in regexList) {
                    i++
                    if (regex.containsMatchIn(unPeekText)) {
                        logger.info("匹配成功 在第${i}行 ${regex.find(unPeekText)?.value}")
                        return true
    Severity: Major
    Found in src/main/kotlin/ltd/guimc/lgzbot/utils/RegexUtils.kt and 1 other location - About 1 hr to fix
    src/main/kotlin/ltd/guimc/lgzbot/utils/RegexUtils.kt on lines 55..61

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 112.

    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 unFormatted has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        fun String.unFormatted(): String {
            return this.replace("§0", "")
                .replace("§1", "")
                .replace("§2", "")
                .replace("§3", "")
    Severity: Minor
    Found in src/main/kotlin/ltd/guimc/lgzbot/utils/MojangAPIUtils.kt - About 1 hr to fix

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

          suspend fun onNudge(e: NudgeEvent) {
              val from = e.from as User
              val timestamp = Instant.now().epochSecond
      
              if (e.target != e.bot) return    // 只处理对机器人的戳一戳
      Severity: Minor
      Found in src/main/kotlin/ltd/guimc/lgzbot/listener/nudge/AntiNudgeSpam.kt - About 1 hr to fix

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

                            } catch (e: Throwable) {
                                event.subject.sendMessage("处理时发生异常... \nStackTrace:")
                                event.subject.sendMessage(build2forwardMessage(e.stackTraceToString(), event.subject))
                            }
        src/main/kotlin/ltd/guimc/lgzbot/listener/message/FunListener.kt on lines 33..36
        src/main/kotlin/ltd/guimc/lgzbot/listener/message/FunListener.kt on lines 44..47

        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

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

                            } catch (e: Throwable) {
                                event.subject.sendMessage("处理时发生异常... \nStackTrace:")
                                event.subject.sendMessage(build2forwardMessage(e.stackTraceToString(), event.subject))
                            }
        src/main/kotlin/ltd/guimc/lgzbot/listener/message/FunListener.kt on lines 21..24
        src/main/kotlin/ltd/guimc/lgzbot/listener/message/FunListener.kt on lines 44..47

        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

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

                            } catch (e: Throwable) {
                                event.subject.sendMessage("处理时发生异常... \nStackTrace:")
                                event.subject.sendMessage(build2forwardMessage(e.stackTraceToString(), event.subject))
                            }
        src/main/kotlin/ltd/guimc/lgzbot/listener/message/FunListener.kt on lines 21..24
        src/main/kotlin/ltd/guimc/lgzbot/listener/message/FunListener.kt on lines 33..36

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

            private fun apiArray(url: String): JSONArray = HttpUtils.getJsonArray("https://api.github.com$url", if (GithubSubConfig.key != "" ) GithubSubConfig.key else null)
        Severity: Major
        Found in src/main/kotlin/ltd/guimc/lgzbot/utils/GithubUtils.kt and 1 other location - About 1 hr to fix
        src/main/kotlin/ltd/guimc/lgzbot/utils/GithubUtils.kt on lines 30..30

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 90.

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

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

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

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

        Refactorings

        Further Reading

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

            private fun apiObject(url: String): JSONObject = HttpUtils.getJsonObject("https://api.github.com$url", if (GithubSubConfig.key != "" ) GithubSubConfig.key else null)
        Severity: Major
        Found in src/main/kotlin/ltd/guimc/lgzbot/utils/GithubUtils.kt and 1 other location - About 1 hr to fix
        src/main/kotlin/ltd/guimc/lgzbot/utils/GithubUtils.kt on lines 32..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 90.

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

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

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

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

        Refactorings

        Further Reading

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

                for (i in listIterator()) {
                    if (i is PlainText) {
                        pt += i.content
                    }
        
        
        Severity: Minor
        Found in src/main/kotlin/ltd/guimc/lgzbot/utils/MessageUtils.kt and 1 other location - About 55 mins to fix
        src/main/kotlin/ltd/guimc/lgzbot/utils/MessageUtils.kt on lines 47..55

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 87.

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

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

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

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

        Refactorings

        Further Reading

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

                    for (k in i.messageChain.listIterator()) {
                        if (k is PlainText) {
                            pt += k.content
                        }
        
        
        Severity: Minor
        Found in src/main/kotlin/ltd/guimc/lgzbot/utils/MessageUtils.kt and 1 other location - About 55 mins to fix
        src/main/kotlin/ltd/guimc/lgzbot/utils/MessageUtils.kt on lines 26..34

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 87.

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

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

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

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

        Refactorings

        Further Reading

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

                                        "KDR: ${calculatorR(arcadeStats.getIntOrNull("kills_mini_walls")+arcadeStats.getIntOrNull("final_kills_mini_walls"), arcadeStats.getIntOrNull("deaths_mini_walls"))}\n" +
        Severity: Minor
        Found in src/main/kotlin/ltd/guimc/lgzbot/command/HypixelCommand.kt and 1 other location - About 55 mins to fix
        src/main/kotlin/ltd/guimc/lgzbot/command/HypixelCommand.kt on lines 169..174

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 86.

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

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

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

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

        Refactorings

        Further Reading

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

                                            "KDR: ${
                                                calculatorR(
                                                    bwStats.getIntOrNull("kills_bedwars") + bwStats.getIntOrNull("final_kills_bedwars"),
                                                    bwStats.getIntOrNull("deaths_bedwars")
                                                )
        Severity: Minor
        Found in src/main/kotlin/ltd/guimc/lgzbot/command/HypixelCommand.kt and 1 other location - About 55 mins to fix
        src/main/kotlin/ltd/guimc/lgzbot/command/HypixelCommand.kt on lines 349..349

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 86.

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

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

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

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

        Refactorings

        Further Reading

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

            override fun equals(other: Any?): Boolean {
                if (other !is RepoInfo) return false
                return other.repo == this.repo
            }
        Severity: Minor
        Found in src/main/kotlin/ltd/guimc/lgzbot/github/RepoInfo.kt and 1 other location - About 55 mins to fix
        src/main/kotlin/ltd/guimc/lgzbot/github/CommitInfo.kt on lines 22..25

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

        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

            override fun equals(other: Any?): Boolean {
                if (other !is CommitInfo) return false
                return other.commitId == this.commitId
            }
        Severity: Minor
        Found in src/main/kotlin/ltd/guimc/lgzbot/github/CommitInfo.kt and 1 other location - About 55 mins to fix
        src/main/kotlin/ltd/guimc/lgzbot/github/RepoInfo.kt on lines 28..31

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

        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

                                            "击杀/助攻/死亡: ${swStats.getIntOrNull("kills")}/${swStats.getIntOrNull("assists")}/${swStats.getIntOrNull("deaths")} " +
        Severity: Major
        Found in src/main/kotlin/ltd/guimc/lgzbot/command/HypixelCommand.kt and 2 other locations - About 55 mins to fix
        src/main/kotlin/ltd/guimc/lgzbot/command/HypixelCommand.kt on lines 214..218
        src/main/kotlin/ltd/guimc/lgzbot/command/HypixelCommand.kt on lines 379..379

        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

                                            "共有 ${swStats.getIntOrNull("heads")} 个 Heads, 放置了 ${swStats.getIntOrNull("blocks_placed")} 个方块, 打开了 ${
                                                swStats.getIntOrNull(
                                                    "chests_opened"
                                                )
                                            } 个箱子"
        Severity: Major
        Found in src/main/kotlin/ltd/guimc/lgzbot/command/HypixelCommand.kt and 2 other locations - About 55 mins to fix
        src/main/kotlin/ltd/guimc/lgzbot/command/HypixelCommand.kt on lines 206..206
        src/main/kotlin/ltd/guimc/lgzbot/command/HypixelCommand.kt on lines 379..379

        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

                                                "击杀/助攻/死亡: ${pitStats.getIntOrNull("kills")}/${pitStats.getIntOrNull("assists")}/${pitStats.getIntOrNull("deaths")} " +
        Severity: Major
        Found in src/main/kotlin/ltd/guimc/lgzbot/command/HypixelCommand.kt and 2 other locations - About 55 mins to fix
        src/main/kotlin/ltd/guimc/lgzbot/command/HypixelCommand.kt on lines 206..206
        src/main/kotlin/ltd/guimc/lgzbot/command/HypixelCommand.kt on lines 214..218

        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

                                        "击杀/死亡: ${arcadeStats.getIntOrNull("kills_mini_walls")+arcadeStats.getIntOrNull("final_kills_mini_walls")}/${arcadeStats.getIntOrNull("deaths_mini_walls")} " +
        Severity: Minor
        Found in src/main/kotlin/ltd/guimc/lgzbot/command/HypixelCommand.kt and 1 other location - About 50 mins to fix
        src/main/kotlin/ltd/guimc/lgzbot/command/HypixelCommand.kt on lines 164..168

        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

        Severity
        Category
        Status
        Source
        Language