enclose-io/compiler

View on GitHub
current/deps/v8/tools/turbolizer/src/graph-view.ts

Summary

Maintainability
F
1 mo
Test Coverage

File graph-view.ts has 845 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import * as d3 from "d3";
Severity: Major
Found in current/deps/v8/tools/turbolizer/src/graph-view.ts - About 2 days to fix

    Function updateGraphVisibility has 189 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      updateGraphVisibility() {
        const view = this;
        const graph = this.graph;
        const state = this.state;
        if (!graph) return;
    Severity: Major
    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts - About 7 hrs to fix

      GraphView has 37 functions (exceeds 20 allowed). Consider refactoring.
      Open

      export class GraphView extends PhaseView {
        divElement: d3.Selection<any, any, any, any>;
        svg: d3.Selection<any, any, any, any>;
        showPhaseByName: (p: string, s: Set<any>) => void;
        state: GraphState;
      Severity: Minor
      Found in current/deps/v8/tools/turbolizer/src/graph-view.ts - About 4 hrs to fix

        Function constructor has 108 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          constructor(idOrContainer: string | HTMLElement, broker: SelectionBroker,
            showPhaseByName: (s: string) => void, toolbox: HTMLElement) {
            super(idOrContainer);
            const view = this;
            this.broker = broker;
        Severity: Major
        Found in current/deps/v8/tools/turbolizer/src/graph-view.ts - About 4 hrs to fix

          Function svgKeyDown has 101 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            svgKeyDown() {
              const view = this;
              const state = this.state;
          
              const showSelectionFrontierNodes = (inEdges: boolean, filter: (e: Edge, i: number) => boolean, doSelect: boolean) => {
          Severity: Major
          Found in current/deps/v8/tools/turbolizer/src/graph-view.ts - About 4 hrs to fix

            Function svgKeyDown has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
            Open

              svgKeyDown() {
                const view = this;
                const state = this.state;
            
                const showSelectionFrontierNodes = (inEdges: boolean, filter: (e: Edge, i: number) => boolean, doSelect: boolean) => {
            Severity: Minor
            Found in current/deps/v8/tools/turbolizer/src/graph-view.ts - About 3 hrs to fix

            Cognitive Complexity

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

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

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

            Further reading

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

              constructor(idOrContainer: string | HTMLElement, broker: SelectionBroker,
                showPhaseByName: (s: string) => void, toolbox: HTMLElement) {
                super(idOrContainer);
                const view = this;
                this.broker = broker;
            Severity: Minor
            Found in current/deps/v8/tools/turbolizer/src/graph-view.ts - About 3 hrs to fix

            Cognitive Complexity

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

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

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

            Further reading

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

                function appendInputAndOutputBubbles(g, d) {
                  for (let i = 0; i < d.inputs.length; ++i) {
                    const x = d.getInputX(i);
                    const y = -DEFAULT_NODE_BUBBLE_RADIUS;
                    g.append('circle')
            Severity: Minor
            Found in current/deps/v8/tools/turbolizer/src/graph-view.ts - About 1 hr to fix

              Function searchInputAction has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                searchInputAction(searchBar: HTMLInputElement, e: KeyboardEvent, onlyVisible: boolean) {
                  if (e.keyCode == 13) {
                    this.selectionHandler.clear();
                    const query = searchBar.value;
                    window.sessionStorage.setItem("lastSearch", query);
              Severity: Minor
              Found in current/deps/v8/tools/turbolizer/src/graph-view.ts - 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

              Function updateInputAndOutputBubbles has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                updateInputAndOutputBubbles() {
                  const view = this;
                  const g = this.graph;
                  const s = this.visibleBubbles;
                  s.classed("filledBubbleStyle", function (c) {
              Severity: Minor
              Found in current/deps/v8/tools/turbolizer/src/graph-view.ts - About 1 hr to fix

                Function initializeContent has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  initializeContent(data, rememberedSelection) {
                    this.show();
                    function createImgInput(id: string, title: string, onClick): HTMLElement {
                      const input = document.createElement("input");
                      input.setAttribute("id", id);
                Severity: Minor
                Found in current/deps/v8/tools/turbolizer/src/graph-view.ts - About 1 hr to fix

                  Function searchInputAction has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    searchInputAction(searchBar: HTMLInputElement, e: KeyboardEvent, onlyVisible: boolean) {
                      if (e.keyCode == 13) {
                        this.selectionHandler.clear();
                        const query = searchBar.value;
                        window.sessionStorage.setItem("lastSearch", query);
                  Severity: Minor
                  Found in current/deps/v8/tools/turbolizer/src/graph-view.ts - About 1 hr to fix

                    Function selectOrigins has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                      selectOrigins() {
                        const state = this.state;
                        const origins = [];
                        let phase = this.phaseName;
                        const selection = new Set<any>();
                    Severity: Minor
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts - About 55 mins 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 2 locations. Consider refactoring.
                    Open

                      updateGraphVisibility() {
                        const view = this;
                        const graph = this.graph;
                        const state = this.state;
                        if (!graph) return;
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 2 wks to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 640..855

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

                    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.selectionHandler = {
                          clear: function () {
                            view.state.selection.clear();
                            broker.broadcastClear(this);
                            view.updateGraphVisibility();
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 3 days to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 89..134

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

                    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

                      updateInputAndOutputBubbles() {
                        const view = this;
                        const g = this.graph;
                        const s = this.visibleBubbles;
                        s.classed("filledBubbleStyle", function (c) {
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 2 days to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 323..361

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

                    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

                      initializeContent(data, rememberedSelection) {
                        this.show();
                        function createImgInput(id: string, title: string, onClick): HTMLElement {
                          const input = document.createElement("input");
                          input.setAttribute("id", id);
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 2 days to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 229..269

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

                    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

                      viewSelection() {
                        const view = this;
                        let minX;
                        let maxX;
                        let minY;
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 1 day to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 888..910

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

                    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

                      selectOrigins() {
                        const state = this.state;
                        const origins = [];
                        let phase = this.phaseName;
                        const selection = new Set<any>();
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 1 day to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 612..637

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

                    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

                      getNodeFrontier(nodes: Iterable<GNode>, inEdges: boolean,
                        edgeFilter: (e: Edge, i: number) => boolean) {
                        const view = this;
                        const frontier: Set<GNode> = new Set();
                        let newState = true;
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 1 day to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 199..227

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

                    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

                      getEdgeFrontier(nodes: Iterable<GNode>, inEdges: boolean,
                        edgeFilter: (e: Edge, i: number) => boolean) {
                        const frontier: Set<Edge> = new Set();
                        for (const n of nodes) {
                          const edges = inEdges ? n.inputs : n.outputs;
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 6 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 183..197

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

                    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

                      createGraph(data, rememberedSelection) {
                        this.graph = new Graph(data);
                    
                        this.showControlAction(this);
                    
                    
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 6 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 290..305

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

                    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

                      connectVisibleSelectedNodes() {
                        const view = this;
                        for (const n of view.state.selection) {
                          n.inputs.forEach(function (edge: Edge) {
                            if (edge.source.visible && edge.target.visible) {
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 6 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 307..321

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

                    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

                        const showSelectionFrontierNodes = (inEdges: boolean, filter: (e: Edge, i: number) => boolean, doSelect: boolean) => {
                          const frontier = view.getNodeFrontier(state.selection, inEdges, filter);
                          if (frontier != undefined && frontier.size) {
                            if (doSelect) {
                              if (!d3.event.shiftKey) {
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 5 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 504..515

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

                    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

                      deleteContent() {
                        for (const item of this.toolbox.querySelectorAll(".graph-toolbox-item")) {
                          item.parentElement.removeChild(item);
                        }
                    
                    
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 4 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 271..283

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

                    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

                      attachSelection(s) {
                        if (!(s instanceof Set)) return;
                        this.selectionHandler.clear();
                        const selected = [...this.graph.nodes(n =>
                          s.has(this.state.selection.stringKey(n)) && (!this.state.hideDead || n.isLive()))];
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 4 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 363..369

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

                    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

                        const zoomSvg = d3.zoom<SVGElement, any>()
                          .scaleExtent([0.2, 40])
                          .on("zoom", zoomed)
                          .on("start", function () {
                            if (d3.event.shiftKey) return;
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 4 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 166..175

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

                    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

                          const filterFunction = (n: GNode) => {
                            return (reg.exec(n.getDisplayLabel()) != null ||
                              (this.state.showTypes && reg.exec(n.getDisplayType())) ||
                              (reg.exec(n.getTitle())) ||
                              reg.exec(n.nodeLabel.opcode) != null);
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 4 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 476..481

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

                    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

                      minScale() {
                        const dimensions = this.getSvgViewDimensions();
                        const minXScale = dimensions[0] / (2 * this.graph.width);
                        const minYScale = dimensions[1] / (2 * this.graph.height);
                        const minScale = Math.min(minXScale, minYScale);
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 3 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 865..872

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

                    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

                      selectAllNodes() {
                        if (!d3.event.shiftKey) {
                          this.state.selection.clear();
                        }
                        const allVisibleNodes = [...this.graph.nodes(n => n.visible)];
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 3 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 375..382

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

                    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

                      layoutGraph() {
                        console.time("layoutGraph");
                        layoutNodeGraph(this.graph, this.state.showTypes);
                        const extent = this.graph.redetermineGraphBoundingBox(this.state.showTypes);
                        this.panZoom.translateExtent(extent);
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 3 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 603..610

                    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

                      viewWholeGraph() {
                        this.panZoom.scaleTo(this.svg, 0);
                        this.panZoom.translateTo(this.svg,
                          this.graph.minGraphX + this.graph.width / 2,
                          this.graph.minGraphY + this.graph.height / 2);
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 3 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 925..930

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 97.

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

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

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

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

                    Refactorings

                    Further Reading

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

                      onresize() {
                        const trans = d3.zoomTransform(this.svg.node());
                        const ctrans = this.panZoom.constrain()(trans, this.getSvgExtent(), this.panZoom.translateExtent());
                        this.panZoom.transform(this.svg, ctrans);
                      }
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 3 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 874..878

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

                    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

                          const selection = [...this.graph.nodes(n => {
                            if ((e.ctrlKey || n.visible || !onlyVisible) && filterFunction(n)) {
                              if (e.ctrlKey || !onlyVisible) n.visible = true;
                              return true;
                            }
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 2 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 483..489

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

                    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

                        view.drag = d3.drag<any, GNode, GNode>()
                          .on("drag", function (d) {
                            d.x += d3.event.dx;
                            d.y += d3.event.dy;
                            view.updateGraphVisibility();
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 2 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 153..158

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

                    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

                      hideDead() {
                        for (const n of this.graph.nodes()) {
                          if (!n.isLive()) {
                            n.visible = false;
                            this.state.selection.select([n], false);
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 2 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 423..431

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

                    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

                      toggleTypes() {
                        const view = this;
                        view.state.showTypes = !view.state.showTypes;
                        const element = document.getElementById('toggle-types');
                        element.classList.toggle('button-input-toggled', view.state.showTypes);
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 2 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 880..886

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 89.

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

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

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

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

                    Refactorings

                    Further Reading

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

                        defs.append('svg:marker')
                          .attr('id', 'end-arrow')
                          .attr('viewBox', '0 -4 8 8')
                          .attr('refX', 2)
                          .attr('markerWidth', 2.5)
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 2 hrs to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 139..147

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

                    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

                        view.graph.forEachEdge((e: Edge) => {
                          e.visible = e.type == 'control' && e.source.visible && e.target.visible;
                        });
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 1 hr to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 405..407

                    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

                      showDead() {
                        for (const n of this.graph.nodes()) {
                          if (!n.isLive()) {
                            n.visible = true;
                          }
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 1 hr to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 433..440

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

                    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

                        for (const n of view.graph.nodes()) {
                          n.visible = n.cfg && (!view.state.hideDead || n.isLive());
                        }
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 1 hr to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 402..404

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

                    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

                          case 82:
                            // 'r'
                            if (!d3.event.ctrlKey && !d3.event.shiftKey) {
                              this.layoutAction(this);
                            } else {
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 3 other locations - About 1 hr to fix
                    current/deps/v8/tools/turbolizer/src/graph-view.ts on lines 609..616
                    current/deps/v8/tools/turbolizer/src/graph-view.ts on lines 617..624
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 582..589

                    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

                          case 85:
                            // 'u'
                            if (!d3.event.ctrlKey && !d3.event.shiftKey) {
                              this.hideUnselectedAction(this);
                            } else {
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 3 other locations - About 1 hr to fix
                    current/deps/v8/tools/turbolizer/src/graph-view.ts on lines 594..601
                    current/deps/v8/tools/turbolizer/src/graph-view.ts on lines 609..616
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 582..589

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

                        for (const n of view.graph.nodes()) {
                          if (!view.state.selection.isSelected(n)) {
                            n.visible = false;
                          }
                        }
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 1 hr to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 443..447

                    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

                          case 83:
                            // 's'
                            if (!d3.event.ctrlKey && !d3.event.shiftKey) {
                              this.hideSelectedAction(this);
                            } else {
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 3 other locations - About 1 hr to fix
                    current/deps/v8/tools/turbolizer/src/graph-view.ts on lines 594..601
                    current/deps/v8/tools/turbolizer/src/graph-view.ts on lines 617..624
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 582..589

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

                        for (const n of view.graph.nodes()) {
                          if (view.state.selection.isSelected(n)) {
                            n.visible = false;
                          }
                        }
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 1 hr to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 452..456

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

                    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

                        view.graph.forEachEdge((e: Edge) => {
                          e.visible = e.source.visible || e.target.visible;
                        });
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 1 hr to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 394..396

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

                    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

                          case 73:
                            // 'i'
                            if (!d3.event.ctrlKey && !d3.event.shiftKey) {
                              showSelectionFrontierNodes(true, undefined, false);
                            } else {
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 1 hr to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 563..570

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

                    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

                          case 57:
                            // '1'-'9'
                            showSelectionFrontierNodes(true,
                              (edge: Edge, index: number) => index == (d3.event.keyCode - 49),
                              !d3.event.ctrlKey);
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 1 hr to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 527..532

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

                    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 n of view.graph.nodes()) {
                          n.visible = !view.state.hideDead || n.isLive();
                        }
                    Severity: Major
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 1 hr to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 391..393

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

                    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 zoomed() {
                          if (d3.event.shiftKey) return false;
                          view.graphElement.attr("transform", d3.event.transform);
                          return true;
                        }
                    Severity: Minor
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 45 mins to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 160..164

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

                    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

                    interface GraphState {
                      showTypes: boolean;
                      selection: MySelection;
                      mouseDownNode: any;
                      justDragged: boolean;
                    Severity: Minor
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 45 mins to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 22..29

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

                    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

                      getSvgExtent(): [[number, number], [number, number]] {
                        return [[0, 0], [this.container.clientWidth, this.container.clientHeight]];
                      }
                    Severity: Minor
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 40 mins to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 861..863

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

                    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

                          case 105:
                            // 'numpad 1'-'numpad 9'
                            showSelectionFrontierNodes(true,
                              (edge, index) => index == (d3.event.keyCode - 97),
                              !d3.event.ctrlKey);
                    Severity: Minor
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 35 mins to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 541..546

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

                    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

                        const svg = this.divElement.append("svg")
                          .attr('version', '2.0')
                          .attr("width", "100%")
                          .attr("height", "100%");
                    Severity: Minor
                    Found in current/deps/v8/tools/turbolizer/src/graph-view.ts and 1 other location - About 35 mins to fix
                    lts/deps/v8/tools/turbolizer/src/graph-view.ts on lines 64..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 46.

                    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