Showing 670 of 670 total issues

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

  this.biasLayerCoordinates = d3.range(this.outputNodeCount).map(function (i) {

    var y = grapher.neuralNetworkMargin.top + (i + 1) * grapher.neuralNetworkHeight / (grapher.outputNodeCount + 1)
    return { x: biasLayerX, y: y, index: i }
  });
Severity: Major
Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 2 other locations - About 3 hrs to fix
people/a/AlammarJay/js/shallow_nn_grapher.js on lines 67..70
people/a/AlammarJay/js/shallow_nn_grapher.js on lines 78..81

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

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

  this.inputLayerCoordinates = d3.range(this.inputNodeCount).map(function (i) {
    var y = grapher.neuralNetworkMargin.top + (i + 1) * grapher.neuralNetworkHeight / (grapher.inputNodeCount + 1)
    return { x: inputLayerX, y: y, index: i }
  });
Severity: Major
Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 2 other locations - About 3 hrs to fix
people/a/AlammarJay/js/shallow_nn_grapher.js on lines 72..76
people/a/AlammarJay/js/shallow_nn_grapher.js on lines 78..81

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

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

  {
    id: "44702",
    url: new URL("/sighting/?id=44702", nuforcDatasource.baseUrl).href,
    city: "Camp Pendleton",
    state: NuforcState.California,
Severity: Major
Found in time/datasource/nuforc/NuforcTestCases.ts and 6 other locations - About 3 hrs to fix
time/datasource/nuforc/NuforcTestCases.ts on lines 9..21
time/datasource/nuforc/NuforcTestCases.ts on lines 35..47
time/datasource/nuforc/NuforcTestCases.ts on lines 48..60
time/datasource/nuforc/NuforcTestCases.ts on lines 61..73
time/datasource/nuforc/NuforcTestCases.ts on lines 74..86
time/datasource/nuforc/NuforcTestCases.ts on lines 87..99

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

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

  {
    id: "61361",
    url: new URL("/sighting/?id=61361", nuforcDatasource.baseUrl).href,
    city: "St. Petersburg",
    state: NuforcState.Florida,
Severity: Major
Found in time/datasource/nuforc/NuforcTestCases.ts and 6 other locations - About 3 hrs to fix
time/datasource/nuforc/NuforcTestCases.ts on lines 9..21
time/datasource/nuforc/NuforcTestCases.ts on lines 22..34
time/datasource/nuforc/NuforcTestCases.ts on lines 35..47
time/datasource/nuforc/NuforcTestCases.ts on lines 48..60
time/datasource/nuforc/NuforcTestCases.ts on lines 61..73
time/datasource/nuforc/NuforcTestCases.ts on lines 87..99

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

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

  getFromRows(context: RR0SsgContext, rows: Element[]): FuforaCaseSummary[] {
    const cases: FuforaCaseSummary[] = []
    for (const row of rows) {
      if (row.hasChildNodes()) {
        cases.push(this.getFromRow(context, row))
Severity: Major
Found in time/datasource/fufora/FuforaHttpDatasource.ts and 1 other location - About 3 hrs to fix
time/datasource/rr0/RR0HttpDatasource.ts on lines 24..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 98.

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

  getFromRows(context: HtmlRR0SsgContext, rows: Element[]): RR0CaseSummary[] {
    const cases: RR0CaseSummary[] = []
    for (const row of rows) {
      if (row.hasChildNodes()) {
        cases.push(this.getFromRow(context, row))
Severity: Major
Found in time/datasource/rr0/RR0HttpDatasource.ts and 1 other location - About 3 hrs to fix
time/datasource/fufora/FuforaHttpDatasource.ts on lines 162..170

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

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

  {
    id: "34046",
    url: new URL("/sighting/?id=34046", nuforcDatasource.baseUrl).href,
    city: "Slocomb",
    state: NuforcState.Alabama,
Severity: Major
Found in time/datasource/nuforc/NuforcTestCases.ts and 6 other locations - About 3 hrs to fix
time/datasource/nuforc/NuforcTestCases.ts on lines 22..34
time/datasource/nuforc/NuforcTestCases.ts on lines 35..47
time/datasource/nuforc/NuforcTestCases.ts on lines 48..60
time/datasource/nuforc/NuforcTestCases.ts on lines 61..73
time/datasource/nuforc/NuforcTestCases.ts on lines 74..86
time/datasource/nuforc/NuforcTestCases.ts on lines 87..99

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

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

  {
    id: "171536",
    url: new URL("/sighting/?id=171536", nuforcDatasource.baseUrl).href,
    city: "Bonney lake",
    state: NuforcState.Washington,
Severity: Major
Found in time/datasource/nuforc/NuforcTestCases.ts and 6 other locations - About 3 hrs to fix
time/datasource/nuforc/NuforcTestCases.ts on lines 9..21
time/datasource/nuforc/NuforcTestCases.ts on lines 22..34
time/datasource/nuforc/NuforcTestCases.ts on lines 35..47
time/datasource/nuforc/NuforcTestCases.ts on lines 48..60
time/datasource/nuforc/NuforcTestCases.ts on lines 61..73
time/datasource/nuforc/NuforcTestCases.ts on lines 74..86

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

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

  {
    id: "35880",
    url: new URL("/sighting/?id=35880", nuforcDatasource.baseUrl).href,
    city: "Fort Worth",
    state: NuforcState.Texas,
Severity: Major
Found in time/datasource/nuforc/NuforcTestCases.ts and 6 other locations - About 3 hrs to fix
time/datasource/nuforc/NuforcTestCases.ts on lines 9..21
time/datasource/nuforc/NuforcTestCases.ts on lines 22..34
time/datasource/nuforc/NuforcTestCases.ts on lines 48..60
time/datasource/nuforc/NuforcTestCases.ts on lines 61..73
time/datasource/nuforc/NuforcTestCases.ts on lines 74..86
time/datasource/nuforc/NuforcTestCases.ts on lines 87..99

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

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

  {
    id: "97066",
    url: new URL("/sighting/?id=97066", nuforcDatasource.baseUrl).href,
    city: "Monessen",
    state: NuforcState.Pennsylvania,
Severity: Major
Found in time/datasource/nuforc/NuforcTestCases.ts and 6 other locations - About 3 hrs to fix
time/datasource/nuforc/NuforcTestCases.ts on lines 9..21
time/datasource/nuforc/NuforcTestCases.ts on lines 22..34
time/datasource/nuforc/NuforcTestCases.ts on lines 35..47
time/datasource/nuforc/NuforcTestCases.ts on lines 48..60
time/datasource/nuforc/NuforcTestCases.ts on lines 74..86
time/datasource/nuforc/NuforcTestCases.ts on lines 87..99

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

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

export enum NouvelleAquitaineDepartmentCode {
  Charente = FranceDepartementCode.Charente,
  CharenteMaritime = FranceDepartementCode.CharenteMaritime,
  Correze = FranceDepartementCode.Correze,
  Creuse = FranceDepartementCode.Creuse,
Severity: Major
Found in org/eu/fr/region/naq/NouvelleAquitaineDepartmentCode.ts and 1 other location - About 3 hrs to fix
org/eu/fr/region/ara/AuvergneRhoneAlpesDepartementCode.ts on lines 3..14

Duplicated Code

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

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

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

Tuning

This issue has a mass of 97.

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

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

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

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

Refactorings

Further Reading

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

export enum AuvergneRhoneAlpesDepartementCode {
  Ain = FranceDepartementCode.Ain,
  Ardeche = FranceDepartementCode.Ardeche,
  Allier = FranceDepartementCode.Allier,
  Cantal = FranceDepartementCode.Cantal,
Severity: Major
Found in org/eu/fr/region/ara/AuvergneRhoneAlpesDepartementCode.ts and 1 other location - About 3 hrs to fix
org/eu/fr/region/naq/NouvelleAquitaineDepartmentCode.ts on lines 3..14

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

Function handleImage has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

  private handleImage(context: HtmlRR0SsgContext, imageUrl: string) {
    const inputFile = context.file.name
    if (imageUrl) {
      const isLocal = !imageUrl.startsWith("http")
      if (isLocal) {
Severity: Minor
Found in ImageCommand.ts - About 3 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

Function graphSoftmaxToOutputArrows has 73 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function graphSoftmaxToOutputArrows(data) {

    var inputToBiasLines = this.neuralNetworkG.selectAll(this.svgElement + " .softmax-to-output-line")
      .data(data)

Severity: Major
Found in people/a/AlammarJay/js/nn_calc.js - About 2 hrs to fix

    Function replaceItem has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

      protected replaceItem(context: HtmlRR0SsgContext, item: HTMLLIElement, i: number): number {
        const anchor = item.querySelector(".index-anchor")
        let nextIndex: number
        if (!anchor) {
          const value = item.getAttribute("value")
    Severity: Minor
    Found in index/IndexedReplacer.ts - 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

    Function draw has 69 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        draw: function (layer, properties, activeRegionSVGGroup) {
          var data = layer.nodeRenderingDetails,
            containerElement = properties.containerElement
          var inputGroups = activeRegionSVGGroup.selectAll(properties.containerElement + " .input-group")
            .data(data)
    Severity: Major
    Found in people/a/AlammarJay/js/nn_calc.js - About 2 hrs to fix

      Function NN_trainer has 69 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var NN_trainer = function (svg_el, table_el, areas, prices, weight, bias, x1, y1, x2, y2,
                                 gradientDescentButton, gradientDescent10Button, gradientDescent100Button,
                                 gradientDescentConvergeButton, normalize, error_chart_el, heatmap_el,
                                 weightRange, biasRange, neuralNetworkGraphEl, analyticsCategory) {
        this.svg_el = svg_el;
      Severity: Major
      Found in people/a/AlammarJay/js/simple_nn.js - About 2 hrs to fix

        Function graphInputNodes has 68 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function graphInputNodes(data) {
        
            var grapher = this
            // JOIN
            var inputGroups = this.neuralNetworkG.selectAll(this.svgElement + " .input-group")
        Severity: Major
        Found in people/a/AlammarJay/js/nn_calc.js - About 2 hrs to fix

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

          export const pacaMessages = RegionMessages.create<PacaDepartmentMessagesList>(
            "Provence-Alpes-Côte d'Azur", {
              [PacaDepartementCode.AlpesDeHauteProvence]: alpesDeHauteProvenceMessages,
              [PacaDepartementCode.AlpesMaritimes]: alpesMaritimesMessages,
              [PacaDepartementCode.BouchesDuRhone]: bouchesDuRhoneMessages,
          Severity: Major
          Found in org/eu/fr/region/pac/PacaMessages.ts and 1 other location - About 2 hrs to fix
          org/eu/fr/region/bfc/BourgogneFrancheComteMessages.ts on lines 13..23

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

          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 inputLayerX = this.neuralNetworkMargin.left + this.nodeRadius, // X value of input layer
                biasLayerX = this.neuralNetworkWidth * 2 / 3 - 20, //
                outputLayerX = this.neuralNetworkWidth - this.nodeRadius + this.neuralNetworkMargin.left,
                activationLayerX = (outputLayerX + biasLayerX) / 2
          Severity: Major
          Found in people/a/AlammarJay/js/nn_calc.js and 1 other location - About 2 hrs to fix
          people/a/AlammarJay/js/shallow_nn_grapher.js on lines 60..63

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

          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