Showing 670 of 670 total issues

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 337..343

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

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

      if (sameMonth) {
        dayOfMonthDelta = dayOfMonth - (previousTime.getDayOfMonth() || 0)
        if (dayOfMonthDelta != 0) {
          deltaTime.setDayOfMonth(dayOfMonth)
        }
Severity: Major
Found in time/RelativeTimeTextBuilder.ts and 1 other location - About 1 hr to fix
time/RelativeTimeTextBuilder.ts on lines 70..77

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

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

      if (!dirBook.title) {
        const lastSlash = dirBook.dirName.lastIndexOf("/")
        const lastDir = dirBook.dirName.substring(lastSlash + 1)
        dirBook.title = StringUtil.camelToText(lastDir)
      }
Severity: Major
Found in book/BookDirectoryStep.ts and 1 other location - About 1 hr to fix
science/crypto/ufo/enquete/dossier/CaseDirectoryStep.ts on lines 39..43

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

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

export const yonneMessages = DepartmentMessages.create<DepMessages>("Yonne", {
  [YonneCityCode.FlognyLaChapelle]: flognyLaChapelleMessages,
  [YonneCityCode.Avallon]: avallonMessages,
  [YonneCityCode.JouxLaVille]: jouxLaVilleMessages,
  [YonneCityCode.PrecyLeSec]: precyLeSecMessages,
Severity: Major
Found in org/eu/fr/region/bfc/89/YonneMessages.ts and 1 other location - About 1 hr to fix
org/eu/fr/region/ges/GrandEstDepartmentsMessages.ts on lines 13..22

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

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

      if (!dirCase.title) {
        const lastSlash = dirCase.dirName.lastIndexOf("/")
        const lastDir = dirCase.dirName.substring(lastSlash + 1)
        dirCase.title = StringUtil.camelToText(lastDir)
      }
Severity: Major
Found in science/crypto/ufo/enquete/dossier/CaseDirectoryStep.ts and 1 other location - About 1 hr to fix
book/BookDirectoryStep.ts on lines 67..71

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

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

      if (sameDay) {
        hourDelta = hour - (previousTime.getHour() || 0)
        if (hourDelta != 0) {
          deltaTime.setHour(hour)
        }
Severity: Major
Found in time/RelativeTimeTextBuilder.ts and 1 other location - About 1 hr to fix
time/RelativeTimeTextBuilder.ts on lines 58..65

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

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

export const grandEstDepartmentsMessages: OccitanieDepartmentMessagesList = {
  [GrandEstDepartementCode.Ardennes]: ardennesMessages,
  [GrandEstDepartementCode.BasRhin]: basRhinMessages,
  [GrandEstDepartementCode.HautRhin]: hautRhinMessages,
  [GrandEstDepartementCode.Marne]: marneMessages,
Severity: Major
Found in org/eu/fr/region/ges/GrandEstDepartmentsMessages.ts and 1 other location - About 1 hr to fix
org/eu/fr/region/bfc/89/YonneMessages.ts on lines 14..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 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

Function initializeErrorGraph has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

multiVariableNeuralNetworkTrainer.prototype.initializeErrorGraph = function () {

  this.error_chart_history_x = 300;       // How many error data points to show
  this.error_chart_history_y = 100000;    // How high the bar goes
  this.error_history = [10000];
Severity: Minor
Found in people/a/AlammarJay/js/two_variable_nn.js - About 1 hr to fix

    Function getFromRow has 48 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      protected async getFromRow(context: RR0SsgContext, row: Element): Promise<UfoSearchCase> {
        const fieldsHeadings = Array.from(row.querySelectorAll("strong"))
        const dateLabel = fieldsHeadings.find(heading => heading.textContent.indexOf("Date") >= 0)
        const itemContext = context.clone()
        const time = itemContext.time.reset()
    Severity: Minor
    Found in time/datasource/ufo-search/UfoSearchHttpDatasource.ts - About 1 hr to fix

      Function handle has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        async handle(context: HtmlRR0SsgContext, link: HTMLAnchorElement, pathToSearch: string) {
          if (!link.title) {
            const aCase = (await this.caseService.get(pathToSearch))[0]
            if (aCase) {
              const caseContext = context.clone()
      Severity: Minor
      Found in anchor/CaseAnchorHandler.ts - About 1 hr to fix

        Function addSpeech has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

        export const addSpeech = (e, lang = e.lang, text = getText(e)) => {
          if (!e.classList.contains(transformed)) {
            e.classList.add(transformed)
            const speechEl = document.createElement('button')
            speechEl.className = 'speech'
        Severity: Minor
        Found in lang/speech.js - About 1 hr to fix

        Cognitive Complexity

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

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

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

        Further reading

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

              {
                path: "fond_patrick_fournel/base_fond_patrick_fournel.html",
                mapping: {
                  datePubli: "DATE PUBLI",
                  dateCas: "DATE CAS",
        Severity: Major
        Found in time/datasource/sceau/SceauDatasource.ts and 4 other locations - About 1 hr to fix
        time/datasource/sceau/SceauDatasource.ts on lines 53..69
        time/datasource/sceau/SceauDatasource.ts on lines 103..119
        time/datasource/sceau/SceauDatasource.ts on lines 120..136
        time/datasource/sceau/SceauDatasource.ts on lines 137..153

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 73.

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

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

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

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

        Refactorings

        Further Reading

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

          var softmaxGroup = softmax.enter()
            .append("g")
            .attr("class", "softmax")
            .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 1 hr to fix
        people/a/AlammarJay/js/nn_calc.js on lines 766..774

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 73.

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

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

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

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

        Refactorings

        Further Reading

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

            var sigmoidGroup = sigmoid.enter()
              .append("g")
              .attr("class", "sigmoid activation")
              .attr("transform", function (d) {
                return "translate(" +
        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 522..527

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 73.

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

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

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

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

        Refactorings

        Further Reading

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

              {
                path: "fond_rre/base_fond_rre_CdP1_2.html",
                mapping: {
                  datePubli: "DATE PUBLI",
                  dateCas: "DATE CAS",
        Severity: Major
        Found in time/datasource/sceau/SceauDatasource.ts and 4 other locations - About 1 hr to fix
        time/datasource/sceau/SceauDatasource.ts on lines 36..52
        time/datasource/sceau/SceauDatasource.ts on lines 53..69
        time/datasource/sceau/SceauDatasource.ts on lines 120..136
        time/datasource/sceau/SceauDatasource.ts on lines 137..153

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 73.

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

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

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

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

        Refactorings

        Further Reading

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

              {
                path: "fond_gueudelot/base_fiches_gueudelot.html",
                mapping: {
                  id: "#",
                  dateCas: "DATE",
        Severity: Major
        Found in time/datasource/sceau/SceauDatasource.ts and 4 other locations - About 1 hr to fix
        time/datasource/sceau/SceauDatasource.ts on lines 36..52
        time/datasource/sceau/SceauDatasource.ts on lines 103..119
        time/datasource/sceau/SceauDatasource.ts on lines 120..136
        time/datasource/sceau/SceauDatasource.ts on lines 137..153

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 73.

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

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

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

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

        Refactorings

        Further Reading

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

              {
                path: "fond_rre/base_fond_rre_CdP1_2_3.html",
                mapping: {
                  datePubli: "DATE PUBLI",
                  dateCas: "DATE CAS",
        Severity: Major
        Found in time/datasource/sceau/SceauDatasource.ts and 4 other locations - About 1 hr to fix
        time/datasource/sceau/SceauDatasource.ts on lines 36..52
        time/datasource/sceau/SceauDatasource.ts on lines 53..69
        time/datasource/sceau/SceauDatasource.ts on lines 103..119
        time/datasource/sceau/SceauDatasource.ts on lines 137..153

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 73.

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

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

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

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

        Refactorings

        Further Reading

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

              {
                path: "fond_rre/base_fond_rre_CdP1_2_3_4.html",
                mapping: {
                  datePubli: "DATE PUBLI",
                  dateCas: "DATE CAS",
        Severity: Major
        Found in time/datasource/sceau/SceauDatasource.ts and 4 other locations - About 1 hr to fix
        time/datasource/sceau/SceauDatasource.ts on lines 36..52
        time/datasource/sceau/SceauDatasource.ts on lines 53..69
        time/datasource/sceau/SceauDatasource.ts on lines 103..119
        time/datasource/sceau/SceauDatasource.ts on lines 120..136

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 73.

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

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

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

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

        Refactorings

        Further Reading

        Function onMessageWrappers has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              const onMessageWrappers = new DefaultWeakMap(listener => {
                if (typeof listener !== "function") {
                  return listener
                }
        
        
        Severity: Minor
        Found in extension/Shared (Extension)/Resources/browser-polyfill.js - About 1 hr to fix

          Function graphLayerInputs has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function graphLayerInputs(layerInputsArray, layerNumber) {
          
          
              var layerInputs = layerInputsArray[layerNumber], layerInputsObjects = []
          
          
          Severity: Minor
          Found in people/a/AlammarJay/js/nn_calc.js - About 1 hr to fix
            Severity
            Category
            Status
            Source
            Language