Showing 670 of 670 total issues

Function initializeGraph has 85 lines of code (exceeds 25 allowed). Consider refactoring.
Open

sigmoidGraph.prototype.initializeGraph = function () {
  var obj = this;
  this.graphHolder = d3.select(this.containerElement) // select the container element
    .append("svg")           // append an SVG element to the body
    .attr("class", "activation-graph")
Severity: Major
Found in people/a/AlammarJay/js/sigmoid_graph.js - About 3 hrs to fix

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

      test('build people with two first names', () => {
        const factory = new PeopleService(["people/b/BeauJeromePierre"], dataService, peopleFactory)
        expect(factory.createFromFullName('Jérôme Pierre Beau')).toEqual({
          title: 'Beau, Jérôme Pierre',
          countries: [],
    Severity: Major
    Found in people/PeopleFactory.test.ts and 2 other locations - About 3 hrs to fix
    people/PeopleFactory.test.ts on lines 53..66
    people/PeopleFactory.test.ts on lines 68..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 103.

    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

      test('build people with last name first', () => {
        const factory = new PeopleService(["people/h/HynekJosefAllen"], dataService, peopleFactory)
        expect(factory.createFromFullName('Hynek, Josef Allen')).toEqual({
          title: 'Hynek, Josef Allen',
          countries: [],
    Severity: Major
    Found in people/PeopleFactory.test.ts and 2 other locations - About 3 hrs to fix
    people/PeopleFactory.test.ts on lines 23..36
    people/PeopleFactory.test.ts on lines 53..66

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

    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

      test('build people with one initial first names', () => {
        const factory = new PeopleService(["people/c/CondonEdwardU"], dataService, peopleFactory)
        expect(factory.createFromFullName('Edward U. Condon')).toEqual({
          title: 'Condon, Edward U.',
          countries: [],
    Severity: Major
    Found in people/PeopleFactory.test.ts and 2 other locations - About 3 hrs to fix
    people/PeopleFactory.test.ts on lines 23..36
    people/PeopleFactory.test.ts on lines 68..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 103.

    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.biasNode = this.biasG
        .append("rect")
        .attr("class", "biasNode")
        .attr("width", nodeRadius * 2)
        .attr("height", nodeRadius * 2)
    Severity: Major
    Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 3 hrs to fix
    people/a/AlammarJay/js/simple_nn.js on lines 764..772

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

    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.biasNode = this.biasG
        .append("rect")
        .attr("class", "biasNode")
        .attr("width", nodeRadius * 2)
        .attr("height", nodeRadius * 2)
    Severity: Major
    Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 3 hrs to fix
    people/a/AlammarJay/js/two_variable_nn.js on lines 397..405

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

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

      async import(fileName: string) {
        const COLUMN_YEAR_PUBLISHED = "Year Published"
        const COLUMN_TITLE = "Title"
        const COLUMN_PUBLISHER = "Publisher"
        const COLUMN_AUTHOR = "Author"
    Severity: Major
    Found in book/BookService.ts - About 3 hrs to fix

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

        this.outputNode = this.neuralNetworkG
          .append("circle")
          .attr("class", "output-node")
          .attr("r", nodeRadius)
          .attr("cx", this.neuralNetworkWidth - nodeRadius + this.neuralNetworkMargin.left)
      Severity: Major
      Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 3 hrs to fix
      people/a/AlammarJay/js/two_variable_nn.js on lines 415..420

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

      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.outputNode = this.neuralNetworkG
          .append("circle")
          .attr("class", "output-node")
          .attr("r", nodeRadius)
          .attr("cx", this.neuralNetworkWidth - nodeRadius + this.neuralNetworkMargin.left)
      Severity: Major
      Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 3 hrs to fix
      people/a/AlammarJay/js/simple_nn.js on lines 782..787

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

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

        function graphSoftmax(data) {
      
          var softmax = this.neuralNetworkG.selectAll(this.svgElement + " .softmax")
            .data([data])
      
      
      Severity: Major
      Found in people/a/AlammarJay/js/nn_calc.js - About 3 hrs to fix

        Function graphNode has 82 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Function renderContent has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
          Open

            renderContent(context: HtmlRR0SsgContext, source: Source, container: HTMLElement): void {
              const doc = context.file.document
              const sourceContext = context.clone()
              const authors = source.authors
              if (authors?.length > 0) {
          Severity: Minor
          Found in source/SourceRenderer.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

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

            setDayOfMonth(dayOfMonth: number | undefined, print = true) {
              if (dayOfMonth != this.date?.day?.value && print) {
                this.setHour(undefined, print)
              }
              this.date = this.date || new EdtfDate()
          Severity: Major
          Found in time/TimeContext.ts and 2 other locations - About 3 hrs to fix
          time/TimeContext.ts on lines 126..133
          time/TimeContext.ts on lines 139..146

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 100.

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

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

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

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

          Refactorings

          Further Reading

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

            setMonth(month: number | undefined, print = true) {
              if (month != this.date?.month?.value && print) {
                this.setDayOfMonth(undefined, print)
              }
              this.date = this.date || new EdtfDate()
          Severity: Major
          Found in time/TimeContext.ts and 2 other locations - About 3 hrs to fix
          time/TimeContext.ts on lines 126..133
          time/TimeContext.ts on lines 152..159

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 100.

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

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

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

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

          Refactorings

          Further Reading

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

            setYear(year: number | undefined, print = true) {
              if (year != this.date?.year?.value && print) {
                this.setMonth(undefined, print)
              }
              this.date = this.date || new EdtfDate()
          Severity: Major
          Found in time/TimeContext.ts and 2 other locations - About 3 hrs to fix
          time/TimeContext.ts on lines 139..146
          time/TimeContext.ts on lines 152..159

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 100.

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

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

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

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

          Refactorings

          Further Reading

          Function graphWeightNodes has 81 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function graphWeightNodes(data) {
              var radius = this.nodeRadius * this.weightNodeSizeScale
              var grapher = this
              var t = d3.transition()
                .duration(750)
          Severity: Major
          Found in people/a/AlammarJay/js/nn_calc.js - About 3 hrs to fix

            Function initializeNeuralNetworkGraph has 81 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            NN_trainer.prototype.initializeNeuralNetworkGraph = function () {
              this.nnGraphHolder = d3.select(this.neuralNetworkGraphEl) // select the 'body' element
                .append("svg")           // append an SVG element to the body
                .attr("width", this.graphWidth)      // make the SVG element 449 pixels wide
                .attr("height", 150);    // make the SVG element 249 pixels high
            Severity: Major
            Found in people/a/AlammarJay/js/simple_nn.js - About 3 hrs to fix

              Function graphSigmoid has 79 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function graphSigmoid(data) {
              
                  var sigmoid = this.neuralNetworkG.selectAll(this.svgElement + " .sigmoid")
                    .data([data])
              
              
              Severity: Major
              Found in people/a/AlammarJay/js/nn_calc.js - About 3 hrs to fix

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

                  {
                    id: "35488",
                    url: new URL("/sighting/?id=35488", nuforcDatasource.baseUrl).href,
                    city: "Castlegar (Canada)",
                    state: NuforcState.BritishColumbia,
                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 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 3 locations. Consider refactoring.
                Open

                  this.outputLayerCoordinates = d3.range(this.outputNodeCount).map(function (i) {
                    var y = grapher.neuralNetworkMargin.top + (i + 1) * grapher.neuralNetworkHeight / (grapher.outputNodeCount + 1)
                    return { x: outputLayerX, 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 72..76

                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

                Severity
                Category
                Status
                Source
                Language