Showing 670 of 670 total issues

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

  test("add english translation", async () => {
    const context = rr0TestUtil.newHtmlContext("time/1/9/6/8/CondonReport/index_fr.html", `<span id="alternate"/>`)
    const command = new LanguageReplaceCommand()
    const outputFile = await command.execute(context)
    expect(outputFile.contents).toBe(
Severity: Major
Found in lang/LanguageReplaceCommant.test.ts and 1 other location - About 2 hrs to fix
lang/LanguageReplaceCommant.test.ts on lines 15..21

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

  this.valueG = this.g.append("g")
    .attr("class", "value-point")
    .attr("transform", "translate(" + this.x(this.xDefault) + "," + this.y(relu(this.xDefault)) + ")")
Severity: Major
Found in people/a/AlammarJay/js/relu_graph.js and 1 other location - About 2 hrs to fix
people/a/AlammarJay/js/sigmoid_graph.js on lines 121..123

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

    const caseSource: Source = {
      events: [], previousSourceRefs: [],
      url: sourceCase.url, title: "cas n° " + sourceCase.id, authors: this.authors,
      publication: {publisher: this.copyright, time: TimeContext.fromDate(sourceTime)}
    }
Severity: Major
Found in time/datasource/ufo-search/UfoSearchCaseRR0Mapper.ts and 4 other locations - About 2 hrs to fix
time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryRR0Mapper.ts on lines 22..26
time/datasource/essex-police/EssexPoliceCaseSummaryRR0Mapper.ts on lines 24..28
time/datasource/nuforc/NuforcRR0Mapper.ts on lines 89..96
time/datasource/urecat/UrecatRR0Mapper.ts on lines 24..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 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 5 locations. Consider refactoring.
Open

    const caseSource: Source = {
      events: [], previousSourceRefs: [],
      url: sourceCase.url, title: "cas n° " + sourceCase.id, authors: this.authors,
      publication: {publisher: this.copyright, time: TimeContext.fromDate(sourceTime)}
    }
Severity: Major
Found in time/datasource/urecat/UrecatRR0Mapper.ts and 4 other locations - About 2 hrs to fix
time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryRR0Mapper.ts on lines 22..26
time/datasource/essex-police/EssexPoliceCaseSummaryRR0Mapper.ts on lines 24..28
time/datasource/nuforc/NuforcRR0Mapper.ts on lines 89..96
time/datasource/ufo-search/UfoSearchCaseRR0Mapper.ts on lines 22..26

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

  test("add french translation", async () => {
    const context = rr0TestUtil.newHtmlContext("time/1/9/6/8/CondonReport/index.html", `<span id="alternate"/>`)
    const command = new LanguageReplaceCommand()
    const outputFile = await command.execute(context)
    expect(outputFile.contents).toBe(
Severity: Major
Found in lang/LanguageReplaceCommant.test.ts and 1 other location - About 2 hrs to fix
lang/LanguageReplaceCommant.test.ts on lines 7..13

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

  this.valueG = this.g.append("g")
    .attr("class", "value-point")
    .attr("transform", "translate(" + this.x(this.xDefault) + "," + this.y(sigmoid(this.xDefault)) + ")");
Severity: Major
Found in people/a/AlammarJay/js/sigmoid_graph.js and 1 other location - About 2 hrs to fix
people/a/AlammarJay/js/relu_graph.js on lines 121..123

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

    const caseSource: Source = {
      previousSourceRefs: [],
      events: [],
      url: sourceCase.url,
      title: "cas n° " + sourceCase.id,
Severity: Major
Found in time/datasource/nuforc/NuforcRR0Mapper.ts and 4 other locations - About 2 hrs to fix
time/datasource/baseovnifrance/BaseOvniFranceCaseSummaryRR0Mapper.ts on lines 22..26
time/datasource/essex-police/EssexPoliceCaseSummaryRR0Mapper.ts on lines 24..28
time/datasource/ufo-search/UfoSearchCaseRR0Mapper.ts on lines 22..26
time/datasource/urecat/UrecatRR0Mapper.ts on lines 24..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 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 5 locations. Consider refactoring.
Open

    const caseSource: Source = {
      previousSourceRefs: [], events: [],
      url: sourceCase.url, title: "cas n° " + sourceCase.id, authors: this.authors,
      publication: {publisher: this.copyright, time: TimeContext.fromDate(sourceTime)}
    }
time/datasource/essex-police/EssexPoliceCaseSummaryRR0Mapper.ts on lines 24..28
time/datasource/nuforc/NuforcRR0Mapper.ts on lines 89..96
time/datasource/ufo-search/UfoSearchCaseRR0Mapper.ts on lines 22..26
time/datasource/urecat/UrecatRR0Mapper.ts on lines 24..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 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

Function multiVariableNeuralNetworkTrainer has 62 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var multiVariableNeuralNetworkTrainer = function (numberOfInputNodes,
                                                  svg_el, table_el,
                                                  dataPoints, labels,
                                                  weights, bias,
                                                  gradientDescentButton, gradientDescent10Button, gradientDescent100Button,
Severity: Major
Found in people/a/AlammarJay/js/two_variable_nn.js - About 2 hrs to fix

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

      this.g.append("g")
        .attr("transform", "translate(0," + this.height + ")")
        .attr("class", "x-axis")
        .call(d3.axisBottom(obj.x))
        .select(".domain")
    Severity: Major
    Found in people/a/AlammarJay/js/relu_graph.js and 1 other location - About 2 hrs to fix
    people/a/AlammarJay/js/sigmoid_graph.js on lines 63..68

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

    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

      this.g.append("g")
        .attr("transform", "translate(0," + this.height + ")")
        .attr("class", "x-axis")
        .call(d3.axisBottom(obj.x))
        .select(".domain")
    Severity: Major
    Found in people/a/AlammarJay/js/sigmoid_graph.js and 1 other location - About 2 hrs to fix
    people/a/AlammarJay/js/relu_graph.js on lines 64..69

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

    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

      inputs.append("text")
        .attr("id", "output-name")
        .attr("class", "grapher-node-text")
        .attr("text-anchor", "middle")
        .attr("x", 0)
    Severity: Major
    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 2 hrs to fix
    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 206..214

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

    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

      inputs.append("text")
        .attr("id", "input-name")
        .attr("class", "grapher-node-text")
        .attr("text-anchor", "middle")
        .attr("x", 0)
    Severity: Major
    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 2 hrs to fix
    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 358..366

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

    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

    Function correctYM has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
    Open

    def correctYM(s, regexen, regexus):
        matched = regexen.search(s)
        if matched:  # push it to the front, order reversed
            splits = regexen.split(s)
            if int(splits[3]) > maxYear:
    Severity: Minor
    Found in time/datasource/sceau/naming_conventions_files.py - About 2 hrs 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

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

      var inputs = inputGroups.enter()
        .append("g")
        .attr("class", "output-group")
        .attr("transform", function (d) {
          return "translate(" + (d.x) + "," + (d.y) + ")";
    Severity: Major
    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 2 hrs to fix
    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 192..197

    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

      var inputs = inputGroups.enter()
        .append("g")
        .attr("class", "input-group")
        .attr("transform", function (d) {
          return "translate(" + (d.x) + "," + (d.y) + ")";
    Severity: Major
    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 2 hrs to fix
    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 344..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 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

    Function wrapObject has 59 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          const wrapObject = (target, wrappers = {}, metadata = {}) => {
            let cache = Object.create(null)
            let handlers = {
              has (proxyTarget, prop) {
                return prop in target || prop in cache
    Severity: Major
    Found in extension/Shared (Extension)/Resources/browser-polyfill.js - About 2 hrs to fix

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

        this.g.append("g")
          .attr("class", "grid")
          .attr("transform", "translate(0," + this.height + ")")
          .call(make_x_gridlines()
            .tickSize(-this.height)
      Severity: Major
      Found in people/a/AlammarJay/js/relu_graph.js and 1 other location - About 2 hrs to fix
      people/a/AlammarJay/js/sigmoid_graph.js on lines 91..97

      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

        this.g.append("g")
          .attr("class", "grid")
          .attr("transform", "translate(0," + this.height + ")")
          .call(make_x_gridlines()
            .tickSize(-this.height)
      Severity: Major
      Found in people/a/AlammarJay/js/sigmoid_graph.js and 1 other location - About 2 hrs to fix
      people/a/AlammarJay/js/relu_graph.js on lines 91..97

      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

      Function updateUI has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      NN_trainer.prototype.updateUI = function (mean_delta_sum, errorLineValues) {
      
        //Update error chart if available
        if (this.error_chart_el !== "")
          this.addErrorPoint(mean_delta_sum);
      Severity: Major
      Found in people/a/AlammarJay/js/simple_nn.js - About 2 hrs to fix
        Severity
        Category
        Status
        Source
        Language