wurmlab/GeneValidator

View on GitHub

Showing 132 of 132 total issues

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

    for (var i = 0; i < footer.length; i++) {
      var array = footer[i].split(",");
      total_len = total_len + array[0].length*8 + 15;
    }
Severity: Major
Found in aux/source_assets/js/plots.js and 2 other locations - About 1 hr to fix
aux/source_assets/js/plots.js on lines 337..340
aux/source_assets/js/plots.js on lines 793..796

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

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

    for (var i = 0; i < footer.length; i++) {
      var array = footer[i].split(",");
      total_len = total_len + array[0].length*8 + 15;
    }
Severity: Major
Found in aux/source_assets/js/plots.js and 2 other locations - About 1 hr to fix
aux/source_assets/js/plots.js on lines 677..680
aux/source_assets/js/plots.js on lines 793..796

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

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

    for (var i = 0; i < footer.length; i++) {
      var array = footer[i].split(",");
      total_len = total_len + array[0].length*8 + 15;
    }
Severity: Major
Found in aux/source_assets/js/plots.js and 2 other locations - About 1 hr to fix
aux/source_assets/js/plots.js on lines 337..340
aux/source_assets/js/plots.js on lines 677..680

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

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

    def run(hits = @hits, prediction = @prediction)
      raise NotEnoughHitsError if hits.length < opt[:min_blast_hits]
      raise unless prediction.is_a?(Query) && hits[0].is_a?(Query)

      start = Time.now
Severity: Minor
Found in lib/genevalidator/validation_length_rank.rb - About 1 hr to fix

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

        var margin = {top: 70, right: 50, bottom: 75, left: 50},
        width = 600 - margin.left - margin.right,
        height = 500 - margin.top - margin.bottom;
    Severity: Major
    Found in aux/source_assets/js/plots.js and 4 other locations - About 1 hr to fix
    aux/source_assets/js/plots.js on lines 236..238
    aux/source_assets/js/plots.js on lines 362..364
    aux/source_assets/js/plots.js on lines 443..445
    aux/source_assets/js/plots.js on lines 702..704

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

    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

        var margin = {top: 70, right: 50, bottom: 75, left: 50},
          width = 600 - margin.left - margin.right,
          height = 500 - margin.top - margin.bottom;
    Severity: Major
    Found in aux/source_assets/js/plots.js and 4 other locations - About 1 hr to fix
    aux/source_assets/js/plots.js on lines 236..238
    aux/source_assets/js/plots.js on lines 443..445
    aux/source_assets/js/plots.js on lines 561..563
    aux/source_assets/js/plots.js on lines 702..704

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

    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

        var margin = {top: 50, right: 30, bottom: 75, left: 50},
        width = 500 - margin.left - margin.right,
        height = 500 - margin.top - margin.bottom;
    Severity: Major
    Found in aux/source_assets/js/plots.js and 4 other locations - About 1 hr to fix
    aux/source_assets/js/plots.js on lines 236..238
    aux/source_assets/js/plots.js on lines 362..364
    aux/source_assets/js/plots.js on lines 561..563
    aux/source_assets/js/plots.js on lines 702..704

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

    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

        var margin = {top: 75, right: 50, bottom: 75, left: 150},
        width = 600 - margin.left - margin.right,
        height = 300 - margin.top - margin.bottom;
    Severity: Major
    Found in aux/source_assets/js/plots.js and 4 other locations - About 1 hr to fix
    aux/source_assets/js/plots.js on lines 236..238
    aux/source_assets/js/plots.js on lines 362..364
    aux/source_assets/js/plots.js on lines 443..445
    aux/source_assets/js/plots.js on lines 561..563

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

    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

        var margin = {top: 70, right: 50, bottom: 75, left: 50},
          width = 600 - margin.left - margin.right,
          height = 500 - margin.top - margin.bottom;
    Severity: Major
    Found in aux/source_assets/js/plots.js and 4 other locations - About 1 hr to fix
    aux/source_assets/js/plots.js on lines 362..364
    aux/source_assets/js/plots.js on lines 443..445
    aux/source_assets/js/plots.js on lines 561..563
    aux/source_assets/js/plots.js on lines 702..704

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

    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 init_tabular_attribute has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

        def init_tabular_attribute(hash)
          @match_query_from    = hash['qstart'].to_i if hash['qstart']
          @match_query_to      = hash['qend'].to_i if hash['qend']
          @query_reading_frame = hash['qframe'].to_i if hash['qframe']
          @hit_from            = hash['sstart'].to_i if hash['sstart']
    Severity: Minor
    Found in lib/genevalidator/hsp.rb - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method run_validations has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

        def run_validations(iterator)
          p = Pool.new(@opt[:num_threads]) if @opt[:num_threads] > 1
    
          check_if_maker_input?
    
    
    Severity: Minor
    Found in lib/genevalidator/validation.rb - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method run has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

        def run(hits = @hits, prediction = @prediction)
          raise NotEnoughHitsError if hits.length < opt[:min_blast_hits]
          raise unless prediction.is_a?(Query) && hits[0].is_a?(Query)
    
          start = Time.now
    Severity: Minor
    Found in lib/genevalidator/validation_length_rank.rb - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method initialize has 12 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def initialize(short_header, header, description, msg, query_length,
                       no_of_hits, median, mean, smallest_hit, largest_hit,
                       extreme_hits, percentage)
    Severity: Major
    Found in lib/genevalidator/validation_length_rank.rb - About 1 hr to fix

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

            cluster.lengths.each do |elem1|
              lengths.each do |elem2|
                if method == 1
                  d += elem1[1] * elem2[1] * (elem1[0] - elem2[0]).abs
                  norm += elem1[1] * elem2[1]
      Severity: Major
      Found in lib/genevalidator/clusterization.rb and 1 other location - About 1 hr to fix
      lib/genevalidator/clusterization.rb on lines 110..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 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

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

            cluster.objects.each do |elem1|
              objects.each do |elem2|
                if method == 1
                  d += elem1[1] * elem2[1] * (elem1[0] - elem2[0]).abs
                  norm += elem1[1] * elem2[1]
      Severity: Major
      Found in lib/genevalidator/clusterization.rb and 1 other location - About 1 hr to fix
      lib/genevalidator/clusterization.rb on lines 196..203

      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

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

          svg.append("text")
               .attr("x", (width / 2))
               .attr("y", -35)
               .attr("text-anchor", "middle")
               .style("font-size", "16px")
      Severity: Major
      Found in aux/source_assets/js/plots.js and 4 other locations - About 1 hr to fix
      aux/source_assets/js/plots.js on lines 246..251
      aux/source_assets/js/plots.js on lines 372..377
      aux/source_assets/js/plots.js on lines 470..475
      aux/source_assets/js/plots.js on lines 730..735

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

      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

          svg.append("text")
            .attr("x", (width / 2))
            .attr("y", -45)
            .attr("text-anchor", "middle")
            .style("font-size", "16px")
      Severity: Major
      Found in aux/source_assets/js/plots.js and 4 other locations - About 1 hr to fix
      aux/source_assets/js/plots.js on lines 372..377
      aux/source_assets/js/plots.js on lines 470..475
      aux/source_assets/js/plots.js on lines 595..600
      aux/source_assets/js/plots.js on lines 730..735

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

      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

          svg.append("text")
            .attr("x", (width / 2))
            .attr("y", -45)
            .attr("text-anchor", "middle")
            .style("font-size", "16px")
      Severity: Major
      Found in aux/source_assets/js/plots.js and 4 other locations - About 1 hr to fix
      aux/source_assets/js/plots.js on lines 246..251
      aux/source_assets/js/plots.js on lines 470..475
      aux/source_assets/js/plots.js on lines 595..600
      aux/source_assets/js/plots.js on lines 730..735

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

      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

          svg.append("text")
               .attr("x", (width / 2))
               .attr("y", -35)
               .attr("text-anchor", "middle")
               .style("font-size", "16px")
      Severity: Major
      Found in aux/source_assets/js/plots.js and 4 other locations - About 1 hr to fix
      aux/source_assets/js/plots.js on lines 246..251
      aux/source_assets/js/plots.js on lines 372..377
      aux/source_assets/js/plots.js on lines 470..475
      aux/source_assets/js/plots.js on lines 595..600

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

      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

          svg.append("text")
               .attr("x", (width / 2))
               .attr("y", -25)
               .attr("text-anchor", "middle")
               .style("font-size", "16px")
      Severity: Major
      Found in aux/source_assets/js/plots.js and 4 other locations - About 1 hr to fix
      aux/source_assets/js/plots.js on lines 246..251
      aux/source_assets/js/plots.js on lines 372..377
      aux/source_assets/js/plots.js on lines 595..600
      aux/source_assets/js/plots.js on lines 730..735

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

      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