enclose-io/compiler

View on GitHub
lts/deps/v8/tools/heap-stats/details-selection.js

Summary

Maintainability
F
2 wks
Test Coverage

File details-selection.js has 358 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// Copyright 2018 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.

'use strict';
Severity: Minor
Found in lts/deps/v8/tools/heap-stats/details-selection.js - About 4 hrs to fix

    DetailsSelection has 34 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class DetailsSelection extends HTMLElement {
      constructor() {
        super();
        const shadowRoot = this.attachShadow({mode: 'open'});
        shadowRoot.appendChild(details_selection_template.content.cloneNode(true));
    Severity: Minor
    Found in lts/deps/v8/tools/heap-stats/details-selection.js - About 4 hrs to fix

      Function buildCategory has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        buildCategory(name) {
          const div = document.createElement('div');
          div.id = name;
          div.classList.add('box');
          const ul = document.createElement('ul');
      Severity: Minor
      Found in lts/deps/v8/tools/heap-stats/details-selection.js - About 1 hr to fix

        Function handleIsolateChange has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          handleIsolateChange(e) {
            this.selection.isolate = this.isolateSelect.value;
            if (this.selection.isolate.length === 0) {
              this.selection.isolate = null;
              return;
        Severity: Minor
        Found in lts/deps/v8/tools/heap-stats/details-selection.js - About 1 hr to fix

          Function notifySelectionChanged has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

            notifySelectionChanged(e) {
              if (!this.selection.isolate) return;
          
              this.selection.data_view = this.dataViewSelect.value;
              this.selection.categories = {};
          Severity: Minor
          Found in lts/deps/v8/tools/heap-stats/details-selection.js - About 45 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

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

            buildCategory(name) {
              const div = document.createElement('div');
              div.id = name;
              div.classList.add('box');
              const ul = document.createElement('ul');
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 2 days to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 84..117

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

          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

            exportCurrentSelection(e) {
              const data = [];
              const selected_data =
                  this.selectedIsolate.gcs[this.selection.gc][this.selection.data_set]
                      .instance_type_data;
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 1 day to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 379..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 331.

          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

            notifySelectionChanged(e) {
              if (!this.selection.isolate) return;
          
              this.selection.data_view = this.dataViewSelect.value;
              this.selection.categories = {};
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 1 day to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 183..205

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

          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

            handleIsolateChange(e) {
              this.selection.isolate = this.isolateSelect.value;
              if (this.selection.isolate.length === 0) {
                this.selection.isolate = null;
                return;
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 1 day to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 152..181

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

          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

            updatePercentagesInCategory() {
              const overalls = {};
              let overall = 0;
              // Reset all categories.
              this.selection.category_names.forEach((_, category) => {
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 1 day to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 243..266

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

          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

            createCheckBox(instance_type, category) {
              const div = document.createElement('div');
              div.classList.add('instanceTypeSelectBox');
              const input = document.createElement('input');
              div.appendChild(input);
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 1 day to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 357..377

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

          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

            populateCategories() {
              this.clearCategories();
              const categories = {};
              for (let cat of CATEGORIES.keys()) {
                categories[cat] = [];
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 1 day to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 325..343

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 197.

          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

            filterCurrentSelectionWithThresold(minSize) {
              if (minSize === 0) return;
          
              this.selection.category_names.forEach((_, category) => {
                for (let checkbox of this.querySelectorAll(
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 6 hrs to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 225..241

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

          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

            updatePercentagesInInstanceTypes() {
              const instanceTypeData = this.selectedData.instance_type_data;
              const maxInstanceType = this.selectedData.singleInstancePeakMemory;
              this.querySelectorAll('.instanceTypeSelectBox  input').forEach(checkbox => {
                let instanceType = checkbox.value;
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 5 hrs to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 268..279

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

          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

            populateSelect(id, iterable, labelFn = null, autoselect = null) {
              if (labelFn == null) labelFn = e => e;
              let index = 0;
              for (let [key, value] of iterable) {
                index++;
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 5 hrs to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 302..314

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

          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

            populateIsolateSelect() {
              let isolates = Object.entries(this.data);
              // Sorty by peak heap memory consumption.
              isolates.sort((a, b) => b[1].peakMemory - a[1].peakMemory);
              this.populateSelect(
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 2 hrs to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 127..133

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

          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

            filterTop20Categories(e) {
              // Limit to show top 20 categories only.
              let minSize = 0;
              let count = 0;
              let sizes = this.selectedIsolate.instanceTypePeakMemory;
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 2 hrs to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 212..223

          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

            setButtonState(disabled) {
              this.$('#csv-export-btn').disabled = disabled;
              this.$('#category-filter').disabled = disabled;
              this.$('#category-filter-btn').disabled = disabled;
              this.$('#category-auto-filter-btn').disabled = disabled;
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 2 hrs to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 145..150

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 85.

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

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

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

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

          Refactorings

          Further Reading

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

            dataChanged() {
              this.selection = {categories: {}};
              this.resetUI(true);
              this.populateIsolateSelect();
              this.handleIsolateChange();
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 2 hrs to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 119..125

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

          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

            resetUI(resetIsolateSelect) {
              if (resetIsolateSelect) removeAllChildren(this.isolateSelect);
          
              removeAllChildren(this.dataViewSelect);
              removeAllChildren(this.datasetSelect);
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 2 hrs to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 135..143

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 78.

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

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

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

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

          Refactorings

          Further Reading

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

            clearCategories() {
              for (const category of CATEGORIES.keys()) {
                let f = this.$('#' + category + 'Content');
                while (f.firstChild) {
                  f.removeChild(f.firstChild);
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 2 hrs to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 316..323

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 77.

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

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

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

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

          Refactorings

          Further Reading

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

            get selectedData() {
              console.assert(this.data, 'invalid data');
              console.assert(this.selection, 'invalid selection');
              return this.selectedIsolate.gcs[this.selection.gc][this.selection.data_set];
            }
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 2 hrs to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 54..58

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

          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

            selectedInCategory(category) {
              let tmp = [];
              this.querySelectorAll('input[name=' + category + 'Checkbox]:checked')
                  .forEach(checkbox => tmp.push(checkbox.value));
              return tmp;
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 1 hr to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 281..286

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

          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

            selectCategory(category) {
              this.querySelectorAll('input[name=' + category + 'Checkbox]')
                  .forEach(checkbox => checkbox.checked = true);
              this.notifySelectionChanged();
            }
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 3 other locations - About 1 hr to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 345..349
          current/deps/v8/tools/heap-stats/details-selection.js on lines 351..355
          lts/deps/v8/tools/heap-stats/details-selection.js on lines 346..350

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

            unselectCategory(category) {
              this.querySelectorAll('input[name=' + category + 'Checkbox]')
                  .forEach(checkbox => checkbox.checked = false);
              this.notifySelectionChanged();
            }
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 3 other locations - About 1 hr to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 345..349
          current/deps/v8/tools/heap-stats/details-selection.js on lines 351..355
          lts/deps/v8/tools/heap-stats/details-selection.js on lines 352..356

          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

            connectedCallback() {
              for (let category of CATEGORIES.keys()) {
                this.$('#categories').appendChild(this.buildCategory(category));
              }
            }
          Severity: Major
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 1 hr to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 35..39

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

          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

            categoryForType(instance_type) {
              for (let [key, value] of CATEGORIES.entries()) {
                if (value.has(instance_type)) return key;
              }
              return 'unclassified';
          Severity: Minor
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 45 mins to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 288..293

          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

            createOption(value, text) {
              const option = document.createElement('option');
              option.value = value;
              option.text = text;
              return option;
          Severity: Minor
          Found in lts/deps/v8/tools/heap-stats/details-selection.js and 1 other location - About 45 mins to fix
          current/deps/v8/tools/heap-stats/details-selection.js on lines 295..300

          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

          There are no issues that match your filters.

          Category
          Status