enclose-io/compiler

View on GitHub
lts/deps/v8/tools/turbolizer/src/sequence-view.ts

Summary

Maintainability
F
1 wk
Test Coverage

Function elementForBlock has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
Open

  elementForBlock(block) {
    const view = this;
    function createElement(tag: string, cls: string | Array<string>, content?: string) {
      const el = document.createElement(tag);
      if (isIterable(cls)) {
Severity: Minor
Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts - About 6 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 elementForBlock has 149 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  elementForBlock(block) {
    const view = this;
    function createElement(tag: string, cls: string | Array<string>, content?: string) {
      const el = document.createElement(tag);
      if (isIterable(cls)) {
Severity: Major
Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts - About 5 hrs to fix

    Function elementForInstruction has 66 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function elementForInstruction(instruction, searchInfo) {
          const instNodeEl = createElement("div", "instruction-node");
    
          const instId = createElement("div", "instruction-id", instruction.id);
          const offsets = view.sourceResolver.instructionToPcOffsets(instruction.id);
    Severity: Major
    Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts - About 2 hrs to fix

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

        initializeContent(data, rememberedSelection) {
          this.divNode.innerHTML = '';
          this.sequence = data.sequence;
          this.searchInfo = [];
          this.divNode.addEventListener('click', (e: MouseEvent) => {
      Severity: Major
      Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts and 1 other location - About 1 day to fix
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 40..54

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

      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

            for (const gap of instruction.gaps) {
              const moves = createElement("div", ["comma-sep-list", "gap-move"]);
              for (const move of gap) {
                hasGaps = true;
                const moveEl = createElement("div", "move");
      Severity: Major
      Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts and 1 other location - About 6 hrs to fix
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 117..131

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

      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

        searchInputAction(searchBar, e) {
          e.stopPropagation();
          this.selectionHandler.clear();
          const query = searchBar.value;
          if (query.length == 0) return;
      Severity: Major
      Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts and 1 other location - About 6 hrs to fix
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 242..256

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

      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

          for (const phi of block.phis) {
            const phiEl = createElement("div", "phi");
            phiContents.appendChild(phiEl);
      
            const outputEl = elementForOperand(phi.output, this.searchInfo);
      Severity: Major
      Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts and 1 other location - About 5 hrs to fix
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 203..217

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

      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

          function createElement(tag: string, cls: string | Array<string>, content?: string) {
            const el = document.createElement(tag);
            if (isIterable(cls)) {
              for (const c of cls) el.classList.add(c);
            } else {
      Severity: Major
      Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts and 1 other location - About 4 hrs to fix
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 58..67

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

      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

          function elementForOperand(operand, searchInfo) {
            const text = operand.text;
            const operandEl = createElement("div", ["parameter", "tag", "clickable", operand.type], text);
            if (operand.tooltip) {
              operandEl.setAttribute("title", operand.tooltip);
      Severity: Major
      Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts and 1 other location - About 3 hrs to fix
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 87..97

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 111.

      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

            if (instruction.outputs.length > 0) {
              const outputs = createElement("div", ["comma-sep-list", "input-output-list"]);
              for (const output of instruction.outputs) {
                const outputEl = elementForOperand(output, searchInfo);
                outputs.appendChild(outputEl);
      Severity: Major
      Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts and 1 other location - About 3 hrs to fix
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 139..148

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

      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

        attachSelection(s) {
          const view = this;
          if (!(s instanceof Set)) return;
          view.selectionHandler.clear();
          view.blockSelectionHandler.clear();
      Severity: Major
      Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts and 3 other locations - About 3 hrs to fix
      current/deps/v8/tools/turbolizer/src/schedule-view.ts on lines 25..33
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 25..33
      lts/deps/v8/tools/turbolizer/src/schedule-view.ts on lines 23..31

      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

            if (instruction.temps.length > 0) {
              const temps = createElement("div", ["comma-sep-list", "input-output-list", "temps"]);
              for (const temp of instruction.temps) {
                const tempEl = elementForOperand(temp, searchInfo);
                temps.appendChild(tempEl);
      Severity: Major
      Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts and 1 other location - About 2 hrs to fix
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 169..176

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

      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

            if (instruction.inputs.length > 0) {
              const inputs = createElement("div", ["comma-sep-list", "input-output-list"]);
              for (const input of instruction.inputs) {
                const inputEl = elementForOperand(input, searchInfo);
                inputs.appendChild(inputEl);
      Severity: Major
      Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts and 1 other location - About 2 hrs to fix
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 160..167

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 85.

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

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

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

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

      Refactorings

      Further Reading

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

            if (instruction.opcode == "ArchNop" && instruction.outputs.length == 1 && instruction.outputs[0].tooltip) {
              instLabel.innerText = instruction.outputs[0].tooltip;
            }
      Severity: Major
      Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts and 1 other location - About 1 hr to fix
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 152..154

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

      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

          function mkLinkHandler(id, handler) {
            return function (e) {
              e.stopPropagation();
              if (!e.shiftKey) {
                handler.clear();
      Severity: Major
      Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts and 1 other location - About 1 hr to fix
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 69..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 70.

      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

            instId.setAttribute("title", `This instruction generated gap code at pc-offset 0x${offsets.gap.toString(16)}, code at pc-offset 0x${offsets.arch.toString(16)}, condition handling at pc-offset 0x${offsets.condition.toString(16)}.`);
      Severity: Major
      Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts and 1 other location - About 1 hr to fix
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 107..107

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

      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

          for (const pred of block.predecessors) {
            const predEl = createElement("div", ["block-id", "com", "clickable"], pred);
            predEl.onclick = mkBlockLinkHandler(pred);
            blockPred.appendChild(predEl);
          }
      Severity: Major
      Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts and 3 other locations - About 1 hr to fix
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 188..192
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 225..229
      lts/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 221..225

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

      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

          for (const succ of block.successors) {
            const succEl = createElement("div", ["block-id", "com", "clickable"], succ);
            succEl.onclick = mkBlockLinkHandler(succ);
            blockSucc.appendChild(succEl);
          }
      Severity: Major
      Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts and 3 other locations - About 1 hr to fix
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 188..192
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 225..229
      lts/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 184..188

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

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

        addBlocks(blocks) {
          for (const block of blocks) {
            const blockEl = this.elementForBlock(block);
            this.divNode.appendChild(blockEl);
          }
      Severity: Major
      Found in lts/deps/v8/tools/turbolizer/src/sequence-view.ts and 3 other locations - About 50 mins to fix
      current/deps/v8/tools/turbolizer/src/schedule-view.ts on lines 162..167
      current/deps/v8/tools/turbolizer/src/sequence-view.ts on lines 235..240
      lts/deps/v8/tools/turbolizer/src/schedule-view.ts on lines 160..165

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

      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

      There are no issues that match your filters.

      Category
      Status