Showing 670 of 670 total issues

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

  this.valueG.append("text")
    .attr("class", "relu-value-text activation-value-text")
    .attr("fill", "red")
    .attr("text-anchor", "middle")
    .attr("font-size", "12")
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 133..139

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

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.append("text")
    .attr("class", "sigmoid-value-text")
    .attr("fill", "red")
    .attr("text-anchor", "middle")
    .attr("font-size", "12")
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 133..139

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

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

File sw.js has 255 lines of code (exceeds 250 allowed). Consider refactoring.
Open

const version = '0.1.0'
let serverUrl
// Cache IDs
let coreID = `core_${version}`
let pageID = `pages_${version}`
Severity: Minor
Found in public/sw.js - About 2 hrs to fix

    Function replace has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          replace: async (imgEl: HTMLImageElement): Promise<HTMLImageElement> => {
            const src = imgEl.src
            const imgParentEl = imgEl.parentElement
            if (imgParentEl.tagName === "FIGURE") {
              const captionEl = imgParentEl.querySelector("figcaption")
    Severity: Major
    Found in ImageCommand.ts - About 2 hrs to fix

      Function getSources has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        protected getSources(row: Element, itemContext: HtmlRR0SsgContext): Source[] {
          const sources: Source[] = []
          const sourceEls = row.querySelectorAll(".source-id")
          for (const sourceEl of sourceEls) {
            const id = sourceEl.childNodes[0].textContent
      Severity: Major
      Found in time/datasource/rr0/RR0HttpDatasource.ts - About 2 hrs to fix

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

          this.g.append("g")
            .attr("class", "axis axis--x")
            .attr("transform", "translate(0," + this.height + ")")
            .call(d3.axisBottom(this.x).ticks(5));
        Severity: Major
        Found in people/a/AlammarJay/js/simple_nn.js and 3 other locations - About 2 hrs to fix
        people/a/AlammarJay/js/simple_nn.js on lines 227..230
        people/a/AlammarJay/js/simple_nn.js on lines 579..582
        people/a/AlammarJay/js/two_variable_nn.js on lines 138..141

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

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

          this.heatmapG.append("g")
            .attr("class", "axis axis--x")
            .attr("transform", "translate(0," + this.heatmapHeight + ")")
            .call(d3.axisBottom(this.heatmapXAxisScale).ticks(5));
        Severity: Major
        Found in people/a/AlammarJay/js/simple_nn.js and 3 other locations - About 2 hrs to fix
        people/a/AlammarJay/js/simple_nn.js on lines 160..163
        people/a/AlammarJay/js/simple_nn.js on lines 227..230
        people/a/AlammarJay/js/two_variable_nn.js on lines 138..141

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

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

          this.errorG.append("g")
            .attr("class", "axis axis--x")
            .attr("transform", "translate(0," + this.errorChartHeight + ")")
            .call(d3.axisBottom(this.error_x).ticks(4));
        Severity: Major
        Found in people/a/AlammarJay/js/simple_nn.js and 3 other locations - About 2 hrs to fix
        people/a/AlammarJay/js/simple_nn.js on lines 160..163
        people/a/AlammarJay/js/simple_nn.js on lines 579..582
        people/a/AlammarJay/js/two_variable_nn.js on lines 138..141

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

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

          this.errorG.append("g")
            .attr("class", "axis axis--x")
            .attr("transform", "translate(0," + this.errorChartHeight + ")")
            .call(d3.axisBottom(this.error_x).ticks(5));
        Severity: Major
        Found in people/a/AlammarJay/js/two_variable_nn.js and 3 other locations - About 2 hrs to fix
        people/a/AlammarJay/js/simple_nn.js on lines 160..163
        people/a/AlammarJay/js/simple_nn.js on lines 227..230
        people/a/AlammarJay/js/simple_nn.js on lines 579..582

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

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

          protected async aggregateDatasource(mapping: RR0CaseMapping<any>, context: HtmlRR0SsgContext,
                                              existingCases: RR0CaseSummary[], casesToAdd: RR0CaseSummary[]) {
            let fetched: any[]
            const datasource = mapping.datasource
            const backupDatasource = mapping.backupDatasource
        Severity: Minor
        Found in time/datasource/ChronologyReplacer.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 constructor has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

          constructor(
            _year?: number,
            _month?: number,
            _dayOfMonth?: number,
            _hour?: number,
        Severity: Minor
        Found in time/TimeContext.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 initializeTable has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          neuralNetworkCalculationViz.prototype.initializeTable = function (trainingSet) {
        
        
            var viz = this
            var table = d3.select(this.tableElement)
        Severity: Major
        Found in people/a/AlammarJay/js/nn_calc.js - About 2 hrs to fix

          Function build has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            build(context: RR0SsgContext, print = true, options = this.options): string {
              const time = context.time
              const printOptions: Intl.DateTimeFormatOptions = {}
              const date = new Date(undefined, undefined, undefined)
              const year = time.getYear()
          Severity: Major
          Found in time/TimeTextBuilder.ts - About 2 hrs to fix

            Function portSearchChange has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function portSearchChange (filter) {
              tableBody.innerHTML = ""
              const input = (portSearchInput.value || "").toLowerCase().trim()
            
              /**
            Severity: Minor
            Found in tech/info/soft/net/protocole/index.js - About 2 hrs to fix

              Function processDirs has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                protected async processDirs(context: HtmlRR0SsgContext, dirNames: string[]): Promise<void> {
                  const allPeopleList = await this.service.getAll()
                  let peopleList = allPeopleList.filter(this.filter)
                  const outputPath = this.config.getOutputPath(context)
                  const output = context.newOutput(outputPath)
              Severity: Minor
              Found in people/PeopleDirectoryStep.ts - About 2 hrs to fix

                Function compute has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                            compute: function (probable) {
                                var zerosCount = {};
                                var max = 0;
                                var questions = self.questions;
                                for (var q in questions) {
                Severity: Minor
                Found in time/1/9/7/7/Poher_Matrice/matrix.js - About 1 hr to fix

                  Function compute has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      compute: function (probable) {
                        var zerosCount = {}
                        var max = 0
                        var questions = self.questions
                        for (var q in questions) {
                  Severity: Minor
                  Found in time/1/9/7/7/Poher_Matrice/matrix.es5.js - About 1 hr to fix

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

                      softmaxGroup.append("text")
                        .attr("id", "biasValue")
                        .attr("text-anchor", "middle")
                        .attr("x", this.neuralNetworkHeight / 2)
                        .attr("y", -2)
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 1 hr to fix
                    people/a/AlammarJay/js/nn_calc.js on lines 648..654

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

                    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

                        softmaxGroup.append("text")
                          .attr("id", "biasValue")
                          .attr("text-anchor", "middle")
                          .attr("x", this.neuralNetworkHeight / 2)
                          .attr("y", -2)
                    Severity: Major
                    Found in people/a/AlammarJay/js/nn_calc.js and 1 other location - About 1 hr to fix
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 539..545

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

                    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.weightNode = this.weightG
                        .append("ellipse")
                        .attr("class", "weightNode")
                        .attr("rx", nodeRadius * 1.7)
                        .attr("ry", nodeRadius)
                    Severity: Major
                    Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 1 hr to fix
                    people/a/AlammarJay/js/two_variable_nn.js on lines 377..383

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

                    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