enclose-io/compiler

View on GitHub
lts/deps/v8/tools/windbg.js

Summary

Maintainability
F
3 wks
Test Coverage

File windbg.js has 580 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

/*=============================================================================
Severity: Major
Found in lts/deps/v8/tools/windbg.js - About 1 day to fix

    Function help has 85 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function help() {
      if (supports_call_command()) {
      print("--------------------------------------------------------------------");
      print("  LIVE debugging only");
      print("--------------------------------------------------------------------");
    Severity: Major
    Found in lts/deps/v8/tools/windbg.js - About 3 hrs to fix

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

      function print_objects_tree(root, depth_limit) {
        if(!is_likely_object(root)) {
          print(`${hex(root)} doesn't look like an object`);
          return;
        }
      Severity: Minor
      Found in lts/deps/v8/tools/windbg.js - About 1 hr to fix

      Cognitive Complexity

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

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

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

      Further reading

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

      function print_handles_data(print_handles = false) {
        if (isolate_address == 0) {
          print("Please call !set_iso(isolate_address) first.");
          return;
        }
      Severity: Minor
      Found in lts/deps/v8/tools/windbg.js - About 1 hr to fix

      Cognitive Complexity

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

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

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

      Further reading

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

      function print_handles_data(print_handles = false) {
        if (isolate_address == 0) {
          print("Please call !set_iso(isolate_address) first.");
          return;
        }
      Severity: Minor
      Found in lts/deps/v8/tools/windbg.js - About 1 hr to fix

        Function print_memory has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function print_memory(space = "all") {
          if (isolate_address == 0) {
            print("Please call !set_iso(isolate_address) first.");
            return;
          }
        Severity: Minor
        Found in lts/deps/v8/tools/windbg.js - About 1 hr to fix

          Function module_name has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

          function module_name(use_this_module) {
            if (use_this_module) {
              module_name_cache = use_this_module;
            }
          
          
          Severity: Minor
          Found in lts/deps/v8/tools/windbg.js - About 1 hr to fix

          Cognitive Complexity

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

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

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

          Further reading

          Function find_object_near has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

          function find_object_near(aligned_addr, max_distance, step_op) {
            if (!step_op) {
              const step = pointer_size();
              const prev =
                find_object_near(aligned_addr, max_distance, x => x - step);
          Severity: Minor
          Found in lts/deps/v8/tools/windbg.js - About 1 hr to fix

          Cognitive Complexity

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

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

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

          Further reading

          Function print_objects_tree has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function print_objects_tree(root, depth_limit) {
            if(!is_likely_object(root)) {
              print(`${hex(root)} doesn't look like an object`);
              return;
            }
          Severity: Minor
          Found in lts/deps/v8/tools/windbg.js - About 1 hr to fix

            Function dp has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

            function dp(addr, count = 10) {
              if (isolate_address == 0) {
                print(`To see where objects are located, run !set_iso.`);
              }
            
            
            Severity: Minor
            Found in lts/deps/v8/tools/windbg.js - About 1 hr to fix

            Cognitive Complexity

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

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

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

            Further reading

            Function module_name has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function module_name(use_this_module) {
              if (use_this_module) {
                module_name_cache = use_this_module;
              }
            
            
            Severity: Minor
            Found in lts/deps/v8/tools/windbg.js - About 1 hr to fix

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

              function print_memory(space = "all") {
                if (isolate_address == 0) {
                  print("Please call !set_iso(isolate_address) first.");
                  return;
                }
              Severity: Minor
              Found in lts/deps/v8/tools/windbg.js - 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

              Function int has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function int(val) {
                if (typeof val === 'number') {
                  return Number.isInteger(val) ? val : undefined;
                }
                if (typeof val === 'object') {
              Severity: Minor
              Found in lts/deps/v8/tools/windbg.js - About 25 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

              Function print_objects_in_range has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function print_objects_in_range(start, end){
                if (!Number.isSafeInteger(int(start)) || !Number.isSafeInteger(int(end))) {
                  return;
                }
              
              
              Severity: Minor
              Found in lts/deps/v8/tools/windbg.js - About 25 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

              Function print_memory_chunk_list has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function print_memory_chunk_list(space_type, front, top, age_mark) {
                let alloc_pos = top ? ` (allocating at: ${top})` : "";
                let age_mark_pos = age_mark ? ` (age_mark at: ${top})` : "";
                print(`${space_type}${alloc_pos}${age_mark_pos}:`);
                if (front.isNull) {
              Severity: Minor
              Found in lts/deps/v8/tools/windbg.js - About 25 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

              function print_handles_data(print_handles = false) {
                if (isolate_address == 0) {
                  print("Please call !set_iso(isolate_address) first.");
                  return;
                }
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 3 days to fix
              current/deps/v8/tools/windbg.js on lines 682..741

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

              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

              function print_memory(space = "all") {
                if (isolate_address == 0) {
                  print("Please call !set_iso(isolate_address) first.");
                  return;
                }
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 3 days to fix
              current/deps/v8/tools/windbg.js on lines 611..661

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

              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

              function print_objects_tree(root, depth_limit) {
                if(!is_likely_object(root)) {
                  print(`${hex(root)} doesn't look like an object`);
                  return;
                }
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 2 days to fix
              current/deps/v8/tools/windbg.js on lines 492..535

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

              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 print_memory_chunk_list(space_type, front, top, age_mark) {
                let alloc_pos = top ? ` (allocating at: ${top})` : "";
                let age_mark_pos = age_mark ? ` (age_mark at: ${top})` : "";
                print(`${space_type}${alloc_pos}${age_mark_pos}:`);
                if (front.isNull) {
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 1 day to fix
              current/deps/v8/tools/windbg.js on lines 542..561

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

              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 get_chunks() {
                let iso = cast(isolate_address, "v8::internal::Isolate");
                let h = iso.heap_;
              
                let chunks = [];
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 1 day to fix
              current/deps/v8/tools/windbg.js on lines 578..595

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

              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

              function find_object_near(aligned_addr, max_distance, step_op) {
                if (!step_op) {
                  const step = pointer_size();
                  const prev =
                    find_object_near(aligned_addr, max_distance, x => x - step);
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 7 hrs to fix
              current/deps/v8/tools/windbg.js on lines 397..420

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

              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

              function initializeScript() {
                return [
                    new host.functionAlias(help, "help"),
                    new host.functionAlias(print_object_from_handle, "jlh"),
                    new host.functionAlias(print_object, "job"),
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 6 hrs to fix
              current/deps/v8/tools/windbg.js on lines 868..891

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

              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

              function is_map(addr) {
                let address = int(addr);
                if (!Number.isSafeInteger(address) || address % 2 == 0) return false;
              
                // the first field in all objects, including maps, is a map pointer, but for
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 4 hrs to fix
              current/deps/v8/tools/windbg.js on lines 374..387

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

              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 make_call(fn) {
                if (!supports_call_command()) {
                  print("ERROR: This command is supported in live sessions only!");
                  return;
                }
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 4 hrs to fix
              current/deps/v8/tools/windbg.js on lines 292..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 117.

              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

              function print_object_next(addr, max_slots = 100) {
                let obj_addr = find_object_next(addr, max_slots);
                if (!obj_addr) {
                  print(
                    `No object found within ${max_slots} slots following ${hex(addr)}`);
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 3 hrs to fix
              current/deps/v8/tools/windbg.js on lines 450..460

              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

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

                while (cur && cur < end) {
                  let obj = find_object_next(cur, iters);
                  if (obj) {
                    count++;
                    print(`${hex(obj + 1)} : ${hex(poi(obj))}`);
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 3 hrs to fix
              current/deps/v8/tools/windbg.js on lines 477..485

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

              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

              function print_object_prev(addr, max_slots = 100) {
                let obj_addr = find_object_prev(addr, max_slots);
                if (!obj_addr) {
                  print(
                    `No object found within ${max_slots} slots prior to ${hex(addr)}`);
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 3 hrs to fix
              current/deps/v8/tools/windbg.js on lines 438..448

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

              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 find_chunk(address) {
                if (!Number.isSafeInteger(int(address))) return undefined;
              
                let chunks = get_chunks(isolate_address);
                for (let c of chunks) {
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 3 hrs to fix
              current/deps/v8/tools/windbg.js on lines 597..609

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

              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 get_chunks_space(space_tag, front, chunks) {
                  let cur = front;
                  while (!cur.isNull) {
                      chunks.push({
                        'address':cur.address,
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 2 hrs to fix
              current/deps/v8/tools/windbg.js on lines 566..576

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

              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 int(val) {
                if (typeof val === 'number') {
                  return Number.isInteger(val) ? val : undefined;
                }
                if (typeof val === 'object') {
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 2 hrs to fix
              current/deps/v8/tools/windbg.js on lines 154..163

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

              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

                      let exe = host.namespace.Debugger.State.DebuggerVariables.curprocess
                                .Modules.Where(
                                  function(m) {
                                    return m.Name.indexOf(`\\${exe_name}.exe`) !== -1;
                                  });
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 2 hrs to fix
              current/deps/v8/tools/windbg.js on lines 253..257

              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

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

              function find_object_next(addr, max_distance) {
                if (!Number.isSafeInteger(int(addr))) return;
              
                const ptr_size = pointer_size();
                const aligned_addr = addr - (addr % ptr_size) + ptr_size;
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 2 hrs to fix
              current/deps/v8/tools/windbg.js on lines 430..436

              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

                if (c) {
                    print(`${hex(address)} is in ${c.space} (chunk: ${hex(c.address)})`);
                }
                else {
                    print(`Address ${hex(address)} is not in managed heap`);
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 1 hr to fix
              current/deps/v8/tools/windbg.js on lines 671..676

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

              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

              function find_object_prev(addr, max_distance) {
                if (!Number.isSafeInteger(int(addr))) return;
              
                const ptr_size = pointer_size();
                const aligned_addr = addr - (addr % ptr_size);
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 1 hr to fix
              current/deps/v8/tools/windbg.js on lines 422..428

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

              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

              function is_likely_object(addr) {
                let address = int(addr);
                if (!Number.isSafeInteger(address) || address % 2 == 0) return false;
              
                // the first field in all objects must be a map pointer
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 1 hr to fix
              current/deps/v8/tools/windbg.js on lines 389..395

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

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

                  let v8 = host.namespace.Debugger.State.DebuggerVariables.curprocess
                           .Modules.Where(
                              function(m) {
                               return m.Name.indexOf("\\v8.dll") !== -1;
                              });
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 2 other locations - About 1 hr to fix
              current/deps/v8/tools/windbg.js on lines 233..237
              current/deps/v8/tools/windbg.js on lines 239..243

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

              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 inspect(s) {
                for (let k of Reflect.ownKeys(s)) {
                  // Attempting to print either of:
                  // 'Reflect.get(s, k)', 'typeof Reflect.get(s, k)', 's[k]'
                  // might throw: "Error: Object does not have a size",
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 1 hr to fix
              current/deps/v8/tools/windbg.js on lines 119..128

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

              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 pad_right(addr) {
                let addr_hex = hex(addr);
                return `${addr_hex}${" ".repeat(pointer_size() * 2 + 2 - addr_hex.length)}`;
              }
              Severity: Major
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 1 hr to fix
              current/deps/v8/tools/windbg.js on lines 746..749

              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

                for (let line of output) {
                  if (!skip_line) {
                    print(line);
                    continue;
                  }
              Severity: Minor
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 50 mins to fix
              current/deps/v8/tools/windbg.js on lines 312..320

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 52.

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

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

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

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

              Refactorings

              Further Reading

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

              function set_user_js_bp() {
                let ctl = host.namespace.Debugger.Utility.Control;
                ctl.ExecuteCommand(`bp ${module_name()}!v8::internal::Execution::Call`)
              }
              Severity: Minor
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 45 mins to fix
              current/deps/v8/tools/windbg.js on lines 334..337

              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

              function poi(address) {
                try {
                  // readMemoryValues throws if cannot read from 'address'.
                  return host.memory.readMemoryValues(address, 1, pointer_size())[0];
                }
              Severity: Minor
              Found in lts/deps/v8/tools/windbg.js and 1 other location - About 40 mins to fix
              current/deps/v8/tools/windbg.js on lines 189..195

              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

              There are no issues that match your filters.

              Category
              Status