guimc233/lgz-bot

View on GitHub

Showing 108 of 108 total issues

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

            for (int i = 0; i < layers.length; i++) {
                layers[i].training = true;
                layers[i].forward();
                if (i < layers.length - 1) {
                    layers[i + 1].input = layers[i].output;
Severity: Major
Found in src/main/java/huzpsb/ll4j/model/Model.java and 3 other locations - About 1 hr to fix
src/main/java/huzpsb/ll4j/model/Model.java on lines 76..82
src/main/java/huzpsb/ll4j/model/Model.java on lines 104..110
src/main/java/huzpsb/ll4j/model/Model.java on lines 127..133

Duplicated Code

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

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

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

Tuning

This issue has a mass of 86.

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

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

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

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

Refactorings

Further Reading

Method trainOn has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public Pair<Integer, Integer> trainOn(DataSet dataSet, double learningRate) {
        int t = 0, f = 0;
        if (!(layers[layers.length - 1] instanceof JudgeLayer)) {
            throw new RuntimeException("Last layer is not output layer");
        }
Severity: Minor
Found in src/main/java/huzpsb/ll4j/model/Model.java - About 1 hr to fix

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

                for (int i = layers.length - 1; i >= 0; i--) {
                    layers[i].backward();
                    layers[i].update(learningRate);
                    if (i > 0) {
                        layers[i - 1].output_error = layers[i].input_error;
    Severity: Major
    Found in src/main/java/huzpsb/ll4j/model/Model.java and 1 other location - About 1 hr to fix
    src/main/java/huzpsb/ll4j/model/Model.java 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 82.

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

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

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

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

    Refactorings

    Further Reading

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

                for (int i = layers.length - 1; i >= 0; i--) {
                    layers[i].backward();
                    layers[i].update(learningRate);
                    if (i > 0) {
                        layers[i - 1].output_error = layers[i].input_error;
    Severity: Major
    Found in src/main/java/huzpsb/ll4j/model/Model.java and 1 other location - About 1 hr to fix
    src/main/java/huzpsb/ll4j/model/Model.java on lines 89..95

    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

            if (GithubWebhookSubData.sub[bot!!.id]!![repo] == null)
                GithubWebhookSubData.sub[bot!!.id]!![repo] = mutableListOf()
    src/main/kotlin/ltd/guimc/lgzbot/command/GithubWebhookSubCommand.kt on lines 42..43
    src/main/kotlin/ltd/guimc/lgzbot/command/GithubWebhookSubCommand.kt on lines 63..64

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

    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 (int i = 0; i < output_size; i++) {
                output[i] = 0;
                for (int j = 0; j < input_size; j++) {
                    output[i] += input[j] * weights[j][i];
                }
    Severity: Major
    Found in src/main/java/huzpsb/ll4j/layer/DenseLayer.java and 1 other location - About 1 hr to fix
    src/main/java/huzpsb/ll4j/layer/DenseLayer.java on lines 25..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 80.

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

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

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

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

    Refactorings

    Further Reading

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

            if (GithubWebhookSubData.sub[bot!!.id]!![repo] == null)
                GithubWebhookSubData.sub[bot!!.id]!![repo] = mutableListOf()
    src/main/kotlin/ltd/guimc/lgzbot/command/GithubWebhookSubCommand.kt on lines 22..23
    src/main/kotlin/ltd/guimc/lgzbot/command/GithubWebhookSubCommand.kt on lines 63..64

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

    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 (int i = 0; i < input_size; i++) {
                input_error[i] = 0;
                for (int j = 0; j < output_size; j++) {
                    input_error[i] += output_error[j] * weights[i][j];
                }
    Severity: Major
    Found in src/main/java/huzpsb/ll4j/layer/DenseLayer.java and 1 other location - About 1 hr to fix
    src/main/java/huzpsb/ll4j/layer/DenseLayer.java on lines 14..19

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 80.

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

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

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

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

    Refactorings

    Further Reading

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

            if (GithubWebhookSubData.ignore[bot!!.id]!![repo] == null)
                GithubWebhookSubData.ignore[bot!!.id]!![repo] = mutableListOf()
    src/main/kotlin/ltd/guimc/lgzbot/command/GithubWebhookSubCommand.kt on lines 22..23
    src/main/kotlin/ltd/guimc/lgzbot/command/GithubWebhookSubCommand.kt on lines 42..43

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 100.

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

        public List<DataEntry> trainAndGetWA(DataSet dataSet, double learningRate) {
            LinkedList<DataEntry> entries = new LinkedList<>();
            if (!(layers[layers.length - 1] instanceof JudgeLayer)) {
                throw new RuntimeException("Last layer is not output layer");
            }
    Severity: Minor
    Found in src/main/java/huzpsb/ll4j/model/Model.java - 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

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

            public static AbstractLayer parseLine(String line) {
                String[] tokens = line.split(" ");
                switch (tokens[0]) {
                    case "D":
                        int inputSize = Integer.parseInt(tokens[1]);
        Severity: Minor
        Found in src/main/java/huzpsb/ll4j/model/Model.java - 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 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

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

                  for (int i = 0; i < output_size; i++) {
                      if (input[i] > 0) {
                          output[i] = input[i];
                      } else {
                          output[i] = input[i] * 0.01;
          Severity: Major
          Found in src/main/java/huzpsb/ll4j/layer/LeakyRelu.java and 1 other location - About 1 hr to fix
          src/main/java/huzpsb/ll4j/layer/LeakyRelu.java on lines 22..28

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

          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 (int i = 0; i < output_size; i++) {
                      if (input[i] > 0) {
                          input_error[i] = output_error[i];
                      } else {
                          input_error[i] = output_error[i] * 0.01;
          Severity: Major
          Found in src/main/java/huzpsb/ll4j/layer/LeakyRelu.java and 1 other location - About 1 hr to fix
          src/main/java/huzpsb/ll4j/layer/LeakyRelu.java on lines 10..16

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

          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

          Severity
          Category
          Status
          Source
          Language