enclose-io/compiler

View on GitHub
current/deps/v8/tools/grokdump.py

Summary

Maintainability
F
10 mos
Test Coverage

File grokdump.py has 3284 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/usr/bin/env python
#
# Copyright 2012 the V8 project authors. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
Severity: Major
Found in current/deps/v8/tools/grokdump.py - About 1 wk to fix

    Function InterpretMemory has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
    Open

      def InterpretMemory(self, start, end):
        # On 64 bit we omit frame pointers, so we have to do some more guesswork.
        frame_pointer = 0
        if not self.reader.Is64():
          frame_pointer = self.reader.ExceptionFP()
    Severity: Minor
    Found in current/deps/v8/tools/grokdump.py - About 1 day 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 FullDump has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
    Open

    def FullDump(reader, heap):
      """Dump all available memory regions."""
      def dump_region(reader, start, size, location):
        print()
        while start & 3 != 0:
    Severity: Minor
    Found in current/deps/v8/tools/grokdump.py - About 6 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    MinidumpReader has 46 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class MinidumpReader(object):
      """Minidump (.dmp) reader."""
    
      _HEADER_MAGIC = 0x504d444d
    
    
    Severity: Minor
    Found in current/deps/v8/tools/grokdump.py - About 6 hrs to fix

      Function AnalyzeMinidump has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
      Open

      def AnalyzeMinidump(options, minidump_name):
        reader = MinidumpReader(options, minidump_name)
        heap = None
      
        stack_top = reader.ExceptionSP()
      Severity: Minor
      Found in current/deps/v8/tools/grokdump.py - About 5 hrs to fix

      Cognitive Complexity

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

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

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

      Further reading

      Function do_GET has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
      Open

        def do_GET(self):
          try:
            parsedurl = urlparse.urlparse(self.path)
            query_components = urlparse.parse_qs(parsedurl.query)
            if parsedurl.path == "/dumps.html":
      Severity: Minor
      Found in current/deps/v8/tools/grokdump.py - About 4 hrs to fix

      Cognitive Complexity

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

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

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

      Further reading

      Function output_words has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

        def output_words(self, f, start_address, end_address,
                         highlight_address, desc):
          region = self.reader.FindRegion(highlight_address)
          if region is None:
            f.write("<h3>Address 0x%x not found in the dump.</h3>" %
      Severity: Minor
      Found in current/deps/v8/tools/grokdump.py - About 4 hrs to fix

      Cognitive Complexity

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

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

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

      Further reading

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

      class InspectionShell(cmd.Cmd):
        def __init__(self, reader, heap):
          cmd.Cmd.__init__(self)
          self.reader = reader
          self.heap = heap
      Severity: Minor
      Found in current/deps/v8/tools/grokdump.py - About 4 hrs to fix

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

          def output_ascii(self, f, start_address, end_address, highlight_address):
            region = self.reader.FindRegion(highlight_address)
            if region is None:
              f.write("<h3>Address %x not found in the dump.</h3>" %
                  highlight_address)
        Severity: Minor
        Found in current/deps/v8/tools/grokdump.py - About 3 hrs to fix

        Cognitive Complexity

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

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

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

        Further reading

        InspectionWebFormatter has 28 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class InspectionWebFormatter(object):
          CONTEXT_FULL = 0
          CONTEXT_SHORT = 1
        
          def __init__(self, switches, minidump_name, http_server):
        Severity: Minor
        Found in current/deps/v8/tools/grokdump.py - About 3 hrs to fix

          Consider simplifying this complex logical expression.
          Open

                if (byte == 0x8b or           # mov
                    byte == 0x89 or           # mov reg-reg
                    (byte & 0xf0) == 0x50 or  # push/pop
                    (sixty_four and (byte & 0xf0) == 0x40) or  # rex prefix
                    byte == 0xc3 or           # return
          Severity: Critical
          Found in current/deps/v8/tools/grokdump.py - About 3 hrs to fix

            InspectionPadawan has 25 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class InspectionPadawan(object):
              """The padawan can improve annotations by sensing well-known objects."""
              def __init__(self, reader, heap):
                self.reader = reader
                self.heap = heap
            Severity: Minor
            Found in current/deps/v8/tools/grokdump.py - About 2 hrs to fix

              Function _ReadDirectories has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
              Open

                def _ReadDirectories(self, directories):
                  for d in directories:
                    DebugPrint(d)
                    if d.stream_type == MD_EXCEPTION_STREAM:
                      self.exception = MINIDUMP_EXCEPTION_STREAM.Read(
              Severity: Minor
              Found in current/deps/v8/tools/grokdump.py - About 2 hrs to fix

              Cognitive Complexity

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

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

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

              Further reading

              Map has 23 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class Map(HeapObject):
                def Decode(self, offset, size, value):
                  return (value >> offset) & ((1 << size) - 1)
              
                # Instance Sizes
              Severity: Minor
              Found in current/deps/v8/tools/grokdump.py - About 2 hrs to fix

                Function output_disasm_range has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                Open

                  def output_disasm_range(
                      self, f, start_address, end_address, highlight_address, exact):
                    region = self.reader.FindRegion(highlight_address)
                    if start_address < region[0]:
                      start_address = region[0]
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - About 2 hrs to fix

                Cognitive Complexity

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

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

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

                Further reading

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

                  def SenseObject(self, address, slot=None):
                    if self.IsFrameMarker(slot, address):
                      return self.FrameMarkerName(address)
                    if self.heap.IsSmi(address):
                      return self.FormatSmi(address)
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - 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 FindObjectPointers has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                Open

                  def FindObjectPointers(self, start=0, end=0):
                    objects = set()
                    def find_object_in_region(reader, start, size, location):
                      for slot in range(start, start+size, self.reader.PointerSize()):
                        if not self.reader.IsValidAddress(slot): break
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - 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 format_disasm_line has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                Open

                  def format_disasm_line(
                      self, f, start, line, next_address, highlight_address):
                    line_address = start + line[0]
                    address_fmt = "  <td>%s</td>"
                    if line_address == highlight_address:
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - 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 IsProbableASCIIRegion has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                  def IsProbableASCIIRegion(self, location, length):
                    ascii_bytes = 0
                    non_ascii_bytes = 0
                    for i in range(length):
                      loc = location + i
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - 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 FindLocation has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                  def FindLocation(self, address):
                    offset = 0
                    if self.memory_list64 is not None:
                      for r in self.memory_list64.ranges:
                        if r.start <= address < r.start + r.size:
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - 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 Read has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                  def Read(self, memory, offset):
                    if self.is_flexible:
                      fields_copy = self.fields[:]
                      last = 0
                      for name, type_or_func in fields_copy:
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - 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 FindObject has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                  def FindObject(self, tagged_address):
                    if tagged_address in self.objects:
                      return self.objects[tagged_address]
                    if not self.IsTaggedObjectAddress(tagged_address): return None
                    address = tagged_address - 1
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - 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 TryInferContext has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                  def TryInferContext(self, address):
                    if self.context: return
                    ptr_size = self.reader.PointerSize()
                    possible_context = dict()
                    count = 0
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - 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 do_help has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                Open

                  def do_help(self, cmd=None):
                    if len(cmd) == 0:
                      print("Available commands")
                      print("=" * 79)
                      prefix = "do_"
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - 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 _FindThirdPartyObjdump has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                Open

                  def _FindThirdPartyObjdump(self):
                      # Try to find the platform specific objdump
                      third_party_dir = os.path.join(
                          os.path.dirname(os.path.dirname(__file__)), 'third_party')
                      objdumps = []
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - 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 FindWordList has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                Open

                  def FindWordList(self, word):
                    aligned_res = []
                    unaligned_res = []
                    def search_inside_region(reader, start, size, location):
                      for i in range(size - self.PointerSize()):
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - 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 PrintStackTraceMessage has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                Open

                  def PrintStackTraceMessage(self, start=None, print_message=True):
                    """
                    Try to print a possible message from PushStackTraceAndDie.
                    Returns the first address where the normal stack starts again.
                    """
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - 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 output_context has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                  def output_context(self, f, details):
                    exception_thread = self.reader.thread_map[self.reader.exception.thread_id]
                    f.write("<h3>Exception context</h3>")
                    f.write('<div class="code">')
                    f.write("Thread id: %d" % exception_thread.id)
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - 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 IsProbableExecutableRegion has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                  def IsProbableExecutableRegion(self, location, length):
                    opcode_bytes = 0
                    sixty_four = self.Is64()
                    for i in range(length):
                      loc = location + i
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - 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 get_dump_formatter has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                  def get_dump_formatter(self, name):
                    if name is None:
                      return self.default_formatter
                    else:
                      if not DUMP_FILE_RE.match(name):
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - 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 do_disassemble has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                  def do_disassemble(self, args):
                    """
                     Unassemble memory in the region [address, address + size).
                
                     If the size is not specified, a default value of 32 bytes is used.
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - 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 __init__ has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                  def __init__(self, minidump_name, reader):
                    self.comment_file = minidump_name + ".comments"
                    self.address_comments = {}
                    self.page_address = {}
                    if os.path.exists(self.comment_file):
                Severity: Minor
                Found in current/deps/v8/tools/grokdump.py - 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

                Avoid deeply nested control flow statements.
                Open

                            if frame_pointer != 0:
                              self.TryInferContext(slot)
                        maybe_symbol = self.reader.FindSymbol(maybe_address)
                Severity: Major
                Found in current/deps/v8/tools/grokdump.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                              if byte >= 0x20 and byte < 0x7f:
                                asc_line += chr(byte)
                              else:
                                asc_line += "."
                              hex_line += " %02x" % (byte)
                  Severity: Major
                  Found in current/deps/v8/tools/grokdump.py - About 45 mins to fix

                    Function output_words has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      def output_words(self, f, start_address, end_address,
                    Severity: Minor
                    Found in current/deps/v8/tools/grokdump.py - About 35 mins to fix

                      Function format_disasm_line has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        def format_disasm_line(
                      Severity: Minor
                      Found in current/deps/v8/tools/grokdump.py - About 35 mins to fix

                        Function output_disasm_range has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          def output_disasm_range(
                        Severity: Minor
                        Found in current/deps/v8/tools/grokdump.py - About 35 mins to fix

                          Function FormatDisasmLine has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def FormatDisasmLine(start, heap, line):
                            line_address = start + line[0]
                            stack_slot = heap.stack_map.get(line_address)
                            marker = "  "
                            if stack_slot:
                          Severity: Minor
                          Found in current/deps/v8/tools/grokdump.py - About 35 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 do_list_modules has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                            def do_list_modules(self, arg):
                              """
                               List details for all loaded modules in the minidump.
                          
                               An argument can be passed to limit the output to only those modules that
                          Severity: Minor
                          Found in current/deps/v8/tools/grokdump.py - About 35 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

                          Avoid too many return statements within this function.
                          Open

                                if instance_type_name is None: return None
                          Severity: Major
                          Found in current/deps/v8/tools/grokdump.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                  return None
                            Severity: Major
                            Found in current/deps/v8/tools/grokdump.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                    if instance_type_name is None: return None
                              Severity: Major
                              Found in current/deps/v8/tools/grokdump.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                    return None
                                Severity: Major
                                Found in current/deps/v8/tools/grokdump.py - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                      return self.TryExtractOldStyleStackTrace(0, start, end,
                                  Severity: Major
                                  Found in current/deps/v8/tools/grokdump.py - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                        if found_obj: return found_obj
                                    Severity: Major
                                    Found in current/deps/v8/tools/grokdump.py - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                          return object
                                      Severity: Major
                                      Found in current/deps/v8/tools/grokdump.py - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                              return "T"
                                        Severity: Major
                                        Found in current/deps/v8/tools/grokdump.py - About 30 mins to fix

                                          Avoid too many return statements within this function.
                                          Open

                                                  return known_map
                                          Severity: Major
                                          Found in current/deps/v8/tools/grokdump.py - About 30 mins to fix

                                            Avoid too many return statements within this function.
                                            Open

                                                  if map is None: return None
                                            Severity: Major
                                            Found in current/deps/v8/tools/grokdump.py - About 30 mins to fix

                                              Avoid too many return statements within this function.
                                              Open

                                                  return "*"
                                              Severity: Major
                                              Found in current/deps/v8/tools/grokdump.py - About 30 mins to fix

                                                Avoid too many return statements within this function.
                                                Open

                                                      if map is None: return None
                                                Severity: Major
                                                Found in current/deps/v8/tools/grokdump.py - About 30 mins to fix

                                                  Avoid too many return statements within this function.
                                                  Open

                                                        return cls(self, map, address)
                                                  Severity: Major
                                                  Found in current/deps/v8/tools/grokdump.py - About 30 mins to fix

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

                                                      def TryExtractOldStyleStackTrace(self, message_slot, start, end,
                                                                                       print_message):
                                                        ptr_size = self.reader.PointerSize()
                                                        if message_slot == 0:
                                                          """
                                                    Severity: Minor
                                                    Found in current/deps/v8/tools/grokdump.py - 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 do_display_stack_objects has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                      def do_display_stack_objects(self, args):
                                                        """
                                                        Find and Print object pointers in the given range.
                                                    
                                                        Print all possible object pointers that are on the stack or in the given
                                                    Severity: Minor
                                                    Found in current/deps/v8/tools/grokdump.py - 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 ForEachMemoryRegion has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                      def ForEachMemoryRegion(self, cb):
                                                        if self.memory_list64 is not None:
                                                          for r in self.memory_list64.ranges:
                                                            location = self.memory_list64.base_rva + offset
                                                            cb(self, r.start, r.size, location)
                                                    Severity: Minor
                                                    Found in current/deps/v8/tools/grokdump.py - 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 AddressTypeMarker has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                      def AddressTypeMarker(self, address):
                                                        if not self.reader.IsValidAddress(address): return " "
                                                        if self.reader.IsExceptionStackAddress(address): return "S"
                                                        if self.reader.IsModuleAddress(address): return "C"
                                                        if self.IsTaggedAddress(address):
                                                    Severity: Minor
                                                    Found in current/deps/v8/tools/grokdump.py - 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 __init__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                      def __init__(self, heap, map, address):
                                                        HeapObject.__init__(self, heap, map, address)
                                                        try:
                                                          self.code = self.ObjectField(self.CodeOffset())
                                                          self.script = self.ObjectField(self.ScriptOffset())
                                                    Severity: Minor
                                                    Found in current/deps/v8/tools/grokdump.py - 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 format_address has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                      def format_address(self, maybeaddress, straddress = None):
                                                        if maybeaddress is None:
                                                          return "not in dump"
                                                        else:
                                                          if straddress is None:
                                                    Severity: Minor
                                                    Found in current/deps/v8/tools/grokdump.py - 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 output_dumps has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                      def output_dumps(self, f):
                                                        f.write(WEB_DUMPS_HEADER)
                                                        f.write("<h3>List of available dumps</h3>")
                                                        f.write("<table class=\"dumplist\">\n")
                                                        f.write("<thead><tr>")
                                                    Severity: Minor
                                                    Found in current/deps/v8/tools/grokdump.py - 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 FindFirstAsciiString has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                      def FindFirstAsciiString(self, start, end=None, min_length=32):
                                                        """ Walk the memory until we find a large string """
                                                        if not end: end = start + 64
                                                        for slot in range(start, end):
                                                          if not self.reader.IsValidAddress(slot): break
                                                    Severity: Minor
                                                    Found in current/deps/v8/tools/grokdump.py - 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 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                      def Print(self, p):
                                                        length = self.Length()
                                                        array = self.array
                                                    
                                                        p.Print("Transitions(%08x, length=%d)" % (array.address, length))
                                                    Severity: Minor
                                                    Found in current/deps/v8/tools/grokdump.py - 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 RelativeOffset has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                      def RelativeOffset(self, slot, address):
                                                        if not self.reader.IsValidAlignedAddress(slot): return None
                                                        if self.IsTaggedObjectAddress(address):
                                                          address -= 1
                                                        if not self.reader.IsValidAlignedAddress(address): return None
                                                    Severity: Minor
                                                    Found in current/deps/v8/tools/grokdump.py - 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 output_search_res has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                      def output_search_res(self, f, straddress):
                                                        try:
                                                          self.output_header(f)
                                                          f.write("<h3>Search results for %s</h3>" % straddress)
                                                    
                                                    
                                                    Severity: Minor
                                                    Found in current/deps/v8/tools/grokdump.py - 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 _ReadArchitecture has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                      def _ReadArchitecture(self, directories):
                                                        # Find MDRawSystemInfo stream and determine arch.
                                                        for d in directories:
                                                          if d.stream_type == MD_SYSTEM_INFO_STREAM:
                                                            system_info = MINIDUMP_RAW_SYSTEM_INFO.Read(
                                                    Severity: Minor
                                                    Found in current/deps/v8/tools/grokdump.py - 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 FindSymbol has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                      def FindSymbol(self, addr):
                                                        if not self._IsInModuleWithSymbols(addr):
                                                          return None
                                                    
                                                        i = bisect.bisect_left(self.symbols, addr)
                                                    Severity: Minor
                                                    Found in current/deps/v8/tools/grokdump.py - 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

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

                                                    class InspectionWebFormatter(object):
                                                      CONTEXT_FULL = 0
                                                      CONTEXT_SHORT = 1
                                                    
                                                      def __init__(self, switches, minidump_name, http_server):
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 2 mos to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 2699..3269

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

                                                    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

                                                    class InspectionPadawan(object):
                                                      """The padawan can improve annotations by sensing well-known objects."""
                                                      def __init__(self, reader, heap):
                                                        self.reader = reader
                                                        self.heap = heap
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 mo to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1987..2363

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

                                                    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

                                                    class InspectionShell(cmd.Cmd):
                                                      def __init__(self, reader, heap):
                                                        cmd.Cmd.__init__(self)
                                                        self.reader = reader
                                                        self.heap = heap
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 3 wks to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 3416..3777

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

                                                    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

                                                    class V8Heap(object):
                                                      CLASS_MAP = {
                                                        "SYMBOL_TYPE": SeqString,
                                                        "ONE_BYTE_SYMBOL_TYPE": SeqString,
                                                        "CONS_SYMBOL_TYPE": ConsString,
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 wk to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1720..1891

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

                                                    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

                                                    class InspectionWebHandler(BaseHTTPServer.BaseHTTPRequestHandler):
                                                      def formatter(self, query_components):
                                                        name = query_components.get("dump", [None])[0]
                                                        return self.server.get_dump_formatter(name)
                                                    
                                                    
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 wk to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 2583..2693

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

                                                    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

                                                    class Map(HeapObject):
                                                      def Decode(self, offset, size, value):
                                                        return (value >> offset) & ((1 << size) - 1)
                                                    
                                                      # Instance Sizes
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 wk to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1182..1297

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

                                                    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

                                                    def AnalyzeMinidump(options, minidump_name):
                                                      reader = MinidumpReader(options, minidump_name)
                                                      heap = None
                                                    
                                                      stack_top = reader.ExceptionSP()
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 wk to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 3825..3924

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

                                                    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

                                                    class InspectionWebServer(BaseHTTPServer.HTTPServer):
                                                      def __init__(self, port_number, switches, minidump_name):
                                                        BaseHTTPServer.HTTPServer.__init__(
                                                            self, ('localhost', port_number), InspectionWebHandler)
                                                        splitpath = os.path.split(minidump_name)
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 wk to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 3331..3414

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

                                                    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

                                                    class InspectionInfo(object):
                                                      def __init__(self, minidump_name, reader):
                                                        self.comment_file = minidump_name + ".comments"
                                                        self.address_comments = {}
                                                        self.page_address = {}
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 6 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1917..1984

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

                                                    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

                                                    class DescriptorArray(object):
                                                      def __init__(self, array):
                                                        self.array = array
                                                    
                                                      def Length(self):
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 5 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1458..1522

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

                                                    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

                                                    class JSFunction(HeapObject):
                                                      def CodeEntryOffset(self):
                                                        return 3 * self.heap.PointerSize()
                                                    
                                                      def SharedOffset(self):
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 5 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1563..1610

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

                                                    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

                                                      def _ReadDirectories(self, directories):
                                                        for d in directories:
                                                          DebugPrint(d)
                                                          if d.stream_type == MD_EXCEPTION_STREAM:
                                                            self.exception = MINIDUMP_EXCEPTION_STREAM.Read(
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 5 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 661..705

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

                                                    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

                                                    def FullDump(reader, heap):
                                                      """Dump all available memory regions."""
                                                      def dump_region(reader, start, size, location):
                                                        print()
                                                        while start & 3 != 0:
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 5 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 126..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 523.

                                                    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

                                                    MINIDUMP_CONTEXT_AMD64 = Descriptor([
                                                      ("p1_home", ctypes.c_uint64),
                                                      ("p2_home", ctypes.c_uint64),
                                                      ("p3_home", ctypes.c_uint64),
                                                      ("p4_home", ctypes.c_uint64),
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 4 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 428..492

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

                                                    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

                                                    MINIDUMP_CONTEXT_ARM64 = Descriptor([
                                                      ("context_flags", ctypes.c_uint64),
                                                      # MD_CONTEXT_ARM64_INTEGER.
                                                      ("r0", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_ARM64_INTEGER)),
                                                      ("r1", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_ARM64_INTEGER)),
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 3 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 379..417

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

                                                    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

                                                    class SharedFunctionInfo(HeapObject):
                                                      def CodeOffset(self):
                                                        return 2 * self.heap.PointerSize()
                                                    
                                                      def ScriptOffset(self):
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 3 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1613..1652

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

                                                    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

                                                    class TransitionArray(object):
                                                      def __init__(self, array):
                                                        self.array = array
                                                    
                                                      def IsSimpleTransition(self):
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 3 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1525..1560

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

                                                    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

                                                    class Descriptor(object):
                                                      """Descriptor of a structure in a memory."""
                                                    
                                                      def __init__(self, fields):
                                                        self.fields = fields
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 3 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 81..123

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

                                                    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

                                                    class FixedArray(HeapObject):
                                                      def LengthOffset(self):
                                                        return self.heap.PointerSize()
                                                    
                                                      def ElementsOffset(self):
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 3 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1420..1455

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

                                                    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

                                                    class Code(HeapObject):
                                                      CODE_ALIGNMENT_MASK = (1 << 5) - 1
                                                    
                                                      def InstructionSizeOffset(self):
                                                        return self.heap.PointerSize()
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 3 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1689..1717

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

                                                    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

                                                    MINIDUMP_CONTEXT_X86 = Descriptor([
                                                      ("context_flags", ctypes.c_uint32),
                                                      # MD_CONTEXT_X86_DEBUG_REGISTERS.
                                                      ("dr0", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_DEBUG_REGISTERS)),
                                                      ("dr1", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_DEBUG_REGISTERS)),
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 2 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 295..329

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

                                                    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 __name__ == "__main__":
                                                      parser = optparse.OptionParser(USAGE)
                                                      parser.add_option("-s", "--shell", dest="shell", action="store_true",
                                                                        help="start an interactive inspector shell")
                                                      parser.add_option("-w", "--web", dest="web", action="store_true",
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 2 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 3927..3956

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

                                                    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

                                                    def FormatDisasmLine(start, heap, line):
                                                      line_address = start + line[0]
                                                      stack_slot = heap.stack_map.get(line_address)
                                                      marker = "  "
                                                      if stack_slot:
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 2 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1117..1137

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

                                                    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

                                                    class Oddball(HeapObject):
                                                      #Should match declarations in objects.h
                                                      KINDS = [
                                                        "False",
                                                        "True",
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 2 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1381..1417

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

                                                    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

                                                    class ExternalString(String):
                                                      # TODO(vegorov) fix ExternalString for X64 architecture
                                                      RESOURCE_OFFSET = 12
                                                    
                                                      WEBKIT_RESOUCE_STRING_IMPL_OFFSET = 4
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 2 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1332..1359

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

                                                    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

                                                      def IsProbableExecutableRegion(self, location, length):
                                                        opcode_bytes = 0
                                                        sixty_four = self.Is64()
                                                        for i in range(length):
                                                          loc = location + i
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 2 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 855..880

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

                                                    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

                                                    class HeapObject(object):
                                                      def __init__(self, heap, map, address):
                                                        self.heap = heap
                                                        self.map = map
                                                        self.address = address
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 2 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1151..1179

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

                                                    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

                                                      def IsProbableASCIIRegion(self, location, length):
                                                        ascii_bytes = 0
                                                        non_ascii_bytes = 0
                                                        for i in range(length):
                                                          loc = location + i
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 2 days to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 833..853

                                                    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

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

                                                    MINIDUMP_CONTEXT_ARM = Descriptor([
                                                      ("context_flags", ctypes.c_uint32),
                                                      # MD_CONTEXT_ARM_INTEGER.
                                                      ("r0", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
                                                      ("r1", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 day to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 344..365

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

                                                    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

                                                      def _FindThirdPartyObjdump(self):
                                                          # Try to find the platform specific objdump
                                                          third_party_dir = os.path.join(
                                                              os.path.dirname(os.path.dirname(__file__)), 'third_party')
                                                          objdumps = []
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 day to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 720..743

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

                                                    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

                                                      def GetDisasmLines(self, address, size):
                                                        def CountUndefinedInstructions(lines):
                                                          pattern = "<UNDEFINED>"
                                                          return sum([line.count(pattern) for (ignore, line) in lines])
                                                    
                                                    
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 day to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 943..969

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

                                                    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

                                                    class CodeCache(HeapObject):
                                                      def DefaultCacheOffset(self):
                                                        return self.heap.PointerSize()
                                                    
                                                      def NormalTypeCacheOffset(self):
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 day to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1668..1686

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

                                                    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

                                                      def FindSymbol(self, addr):
                                                        if not self._IsInModuleWithSymbols(addr):
                                                          return None
                                                    
                                                        i = bisect.bisect_left(self.symbols, addr)
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 day to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1075..1088

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

                                                    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

                                                      def FindLocation(self, address):
                                                        offset = 0
                                                        if self.memory_list64 is not None:
                                                          for r in self.memory_list64.ranges:
                                                            if r.start <= address < r.start + r.size:
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 day to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 930..941

                                                    Duplicated Code

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

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

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

                                                    Tuning

                                                    This issue has a mass of 166.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                    def PrintModuleDetails(reader, module):
                                                      print("%s" % GetModuleName(reader, module))
                                                      file_version = GetVersionString(module.version_info.dwFileVersionMS,
                                                                                      module.version_info.dwFileVersionLS);
                                                      product_version = GetVersionString(module.version_info.dwProductVersionMS,
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 day to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 3810..3822

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

                                                    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

                                                      def _LoadSymbolsFrom(self, symfile, baseaddr):
                                                        print("Loading symbols from %s" % (symfile))
                                                        funcs = []
                                                        with open(symfile) as f:
                                                          for line in f:
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 day to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1039..1052

                                                    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

                                                      def FindWord(self, word, alignment=0):
                                                        def search_inside_region(reader, start, size, location):
                                                          location = (location + alignment) & ~alignment
                                                          for i in range(size - self.PointerSize()):
                                                            loc = location + i
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 day to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 904..913

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

                                                    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

                                                    class Printer(object):
                                                      """Printer with indentation support."""
                                                    
                                                      def __init__(self):
                                                        self.indent = 0
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 day to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1091..1111

                                                    Duplicated Code

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

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

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

                                                    Tuning

                                                    This issue has a mass of 140.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                    class ConsString(String):
                                                      def LeftOffset(self):
                                                        return self.heap.PointerSize() * 3
                                                    
                                                      def RightOffset(self):
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 day to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1362..1378

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

                                                    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

                                                      def FindWordList(self, word):
                                                        aligned_res = []
                                                        unaligned_res = []
                                                        def search_inside_region(reader, start, size, location):
                                                          for i in range(size - self.PointerSize()):
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 day to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 915..928

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

                                                    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

                                                    class FuncSymbol:
                                                      def __init__(self, start, size, name):
                                                        self.start = start
                                                        self.end = self.start + size
                                                        self.name = name
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 7 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 598..610

                                                    Duplicated Code

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

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

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

                                                    Tuning

                                                    This issue has a mass of 111.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                    class String(HeapObject):
                                                      def LengthOffset(self):
                                                        # First word after the map is the hash, the second is the length.
                                                        return self.heap.PointerSize() * 2
                                                    
                                                    
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 7 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1300..1316

                                                    Duplicated Code

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

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

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

                                                    Tuning

                                                    This issue has a mass of 111.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                      def ForEachMemoryRegion(self, cb):
                                                        if self.memory_list64 is not None:
                                                          for r in self.memory_list64.ranges:
                                                            location = self.memory_list64.base_rva + offset
                                                            cb(self, r.start, r.size, location)
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 6 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 893..902

                                                    Duplicated Code

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

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

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

                                                    Tuning

                                                    This issue has a mass of 109.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                    def AnnotateAddresses(heap, line):
                                                      extra = []
                                                      for m in ADDRESS_RE.finditer(line):
                                                        maybe_address = int(m.group(0), 16)
                                                        object = heap.FindObject(maybe_address)
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 6 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1140..1148

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

                                                    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

                                                      def FindRegion(self, addr):
                                                        answer = [-1, -1]
                                                        def is_in(reader, start, size, location):
                                                          if addr >= start and addr < start + size:
                                                            answer[0] = start
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 6 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 882..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 104.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                      def _ReadArchitecture(self, directories):
                                                        # Find MDRawSystemInfo stream and determine arch.
                                                        for d in directories:
                                                          if d.stream_type == MD_SYSTEM_INFO_STREAM:
                                                            system_info = MINIDUMP_RAW_SYSTEM_INFO.Read(
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 6 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 646..659

                                                    Duplicated Code

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

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

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

                                                    Tuning

                                                    This issue has a mass of 102.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                    class Script(HeapObject):
                                                      def SourceOffset(self):
                                                        return self.heap.PointerSize()
                                                    
                                                      def NameOffset(self):
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 6 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1655..1665

                                                    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

                                                    CONTEXT_FOR_ARCH = {
                                                        MD_CPU_ARCHITECTURE_AMD64:
                                                          ['rax', 'rbx', 'rcx', 'rdx', 'rdi', 'rsi', 'rbp', 'rsp', 'rip',
                                                           'r8', 'r9', 'r10', 'r11', 'r12', 'r13', 'r14', 'r15'],
                                                        MD_CPU_ARCHITECTURE_ARM:
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 5 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 3781..3794

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

                                                    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

                                                      def TryLoadSymbolsFor(self, modulename, module):
                                                        try:
                                                          symfile = os.path.join(self.symdir,
                                                                                 modulename.replace('.', '_') + ".pdb.sym")
                                                          if os.path.isfile(symfile):
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 5 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1054..1062

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

                                                    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

                                                      def _FindObjdump(self, options):
                                                        if options.objdump:
                                                            objdump_bin = options.objdump
                                                        else:
                                                          objdump_bin = self._FindThirdPartyObjdump()
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 5 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 707..718

                                                    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

                                                    MINIDUMP_VS_FIXEDFILEINFO = Descriptor([
                                                      ("dwSignature", ctypes.c_uint32),
                                                      ("dwStrucVersion", ctypes.c_uint32),
                                                      ("dwFileVersionMS", ctypes.c_uint32),
                                                      ("dwFileVersionLS", ctypes.c_uint32),
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 5 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 543..556

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

                                                    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

                                                    class SeqString(String):
                                                      def CharsOffset(self):
                                                        return self.heap.PointerSize() * 3
                                                    
                                                      def __init__(self, heap, map, address):
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 5 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1319..1329

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

                                                    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

                                                      def ExceptionIP(self):
                                                        if self.arch == MD_CPU_ARCHITECTURE_AMD64:
                                                          return self.exception_context.rip
                                                        elif self.arch == MD_CPU_ARCHITECTURE_ARM:
                                                          return self.exception_context.pc
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 3 other locations - About 4 hrs to fix
                                                    current/deps/v8/tools/grokdump.py on lines 990..998
                                                    lts/deps/v8/tools/grokdump.py on lines 976..984
                                                    lts/deps/v8/tools/grokdump.py on lines 986..994

                                                    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

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

                                                      def ExceptionSP(self):
                                                        if self.arch == MD_CPU_ARCHITECTURE_AMD64:
                                                          return self.exception_context.rsp
                                                        elif self.arch == MD_CPU_ARCHITECTURE_ARM:
                                                          return self.exception_context.sp
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 3 other locations - About 4 hrs to fix
                                                    current/deps/v8/tools/grokdump.py on lines 980..988
                                                    lts/deps/v8/tools/grokdump.py on lines 976..984
                                                    lts/deps/v8/tools/grokdump.py on lines 986..994

                                                    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

                                                    MINIDUMP_RAW_MODULE = Descriptor([
                                                      ("base_of_image", ctypes.c_uint64),
                                                      ("size_of_image", ctypes.c_uint32),
                                                      ("checksum", ctypes.c_uint32),
                                                      ("time_date_stamp", ctypes.c_uint32),
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 4 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 559..569

                                                    Duplicated Code

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

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

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

                                                    Tuning

                                                    This issue has a mass of 82.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                      def ExceptionFP(self):
                                                        if self.arch == MD_CPU_ARCHITECTURE_AMD64:
                                                          return self.exception_context.rbp
                                                        elif self.arch == MD_CPU_ARCHITECTURE_ARM:
                                                          return None
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 4 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 996..1004

                                                    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

                                                      def ContextDescriptor(self):
                                                        if self.arch == MD_CPU_ARCHITECTURE_X86:
                                                          return MINIDUMP_CONTEXT_X86
                                                        elif self.arch == MD_CPU_ARCHITECTURE_AMD64:
                                                          return MINIDUMP_CONTEXT_AMD64
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 3 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 745..755

                                                    Duplicated Code

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

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

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

                                                    Tuning

                                                    This issue has a mass of 73.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                    MINIDUMP_FLOATING_SAVE_AREA_X86 = Descriptor([
                                                      ("control_word", ctypes.c_uint32),
                                                      ("status_word", ctypes.c_uint32),
                                                      ("tag_word", ctypes.c_uint32),
                                                      ("error_offset", ctypes.c_uint32),
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 3 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 269..278

                                                    Duplicated Code

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

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

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

                                                    Tuning

                                                    This issue has a mass of 70.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                      def ReadAsciiString(self, address):
                                                        string = ""
                                                        while self.IsValidAddress(address):
                                                          code = self.ReadU8(address)
                                                          if 0 < code < 128:
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 3 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 822..831

                                                    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

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

                                                      def ReadAsciiPtr(self, address):
                                                        ascii_content = [c if c >= '\x20' and c <  '\x7f' else '.'
                                                                           for c in self.ReadBytes(address, self.PointerSize())]
                                                        return ''.join(ascii_content)
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 3 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 817..820

                                                    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

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

                                                      def _IsInModuleWithSymbols(self, addr):
                                                        for module in self.modules_with_symbols:
                                                          start = module.base_of_image
                                                          end = start + module.size_of_image
                                                          if (start <= addr) and (addr < end):
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 3 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1065..1071

                                                    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

                                                      def ReadMinidumpString(self, rva):
                                                        string = bytearray(MINIDUMP_STRING.Read(self.minidump, rva).buffer)
                                                        string = string.decode("utf16")
                                                        return string[0:len(string) - 1]
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 2 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1030..1033

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

                                                    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

                                                    MINIDUMP_EXCEPTION = Descriptor([
                                                      ("code", ctypes.c_uint32),
                                                      ("flags", ctypes.c_uint32),
                                                      ("record", ctypes.c_uint64),
                                                      ("address", ctypes.c_uint64),
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 2 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 229..236

                                                    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

                                                    def GetModuleName(reader, module):
                                                      name = reader.ReadMinidumpString(module.module_name_rva)
                                                      # simplify for path manipulation
                                                      name = name.encode('utf-8')
                                                      return str(os.path.basename(str(name).replace("\\", "/")))
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 2 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 3803..3807

                                                    Duplicated Code

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

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

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

                                                    Tuning

                                                    This issue has a mass of 57.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                    class KnownMap(HeapObject):
                                                      def __init__(self, heap, known_name, instance_type):
                                                        HeapObject.__init__(self, heap, None, None)
                                                        self.instance_type = instance_type
                                                        self.known_name = known_name
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 2 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1902..1909

                                                    Duplicated Code

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

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

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

                                                    Tuning

                                                    This issue has a mass of 56.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                      def GetModuleForAddress(self, address):
                                                        for module in self.module_list.modules:
                                                          start = module.base_of_image
                                                          end = start + module.size_of_image
                                                          if start <= address < end: return module
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 2 hrs to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 780..785

                                                    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

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

                                                    MINIDUMP_HEADER = Descriptor([
                                                      ("signature", ctypes.c_uint32),
                                                      ("version", ctypes.c_uint32),
                                                      ("stream_count", ctypes.c_uint32),
                                                      ("stream_directories_rva", ctypes.c_uint32),
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 3 other locations - About 2 hrs to fix
                                                    current/deps/v8/tools/grokdump.py on lines 522..529
                                                    lts/deps/v8/tools/grokdump.py on lines 202..209
                                                    lts/deps/v8/tools/grokdump.py on lines 522..529

                                                    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

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

                                                    MINIDUMP_THREAD = Descriptor([
                                                      ("id", ctypes.c_uint32),
                                                      ("suspend_count", ctypes.c_uint32),
                                                      ("priority_class", ctypes.c_uint32),
                                                      ("priority", ctypes.c_uint32),
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 3 other locations - About 2 hrs to fix
                                                    current/deps/v8/tools/grokdump.py on lines 202..209
                                                    lts/deps/v8/tools/grokdump.py on lines 202..209
                                                    lts/deps/v8/tools/grokdump.py on lines 522..529

                                                    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

                                                    class KnownObject(HeapObject):
                                                      def __init__(self, heap, known_name):
                                                        HeapObject.__init__(self, heap, None, None)
                                                        self.known_name = known_name
                                                    
                                                    
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 hr to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1893..1899

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

                                                    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

                                                      def _ReadWord(self, location):
                                                        if self.Is64():
                                                          return ctypes.c_uint64.from_buffer(self.minidump, location).value
                                                        return ctypes.c_uint32.from_buffer(self.minidump, location).value
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 hr to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 812..815

                                                    Duplicated Code

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

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

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

                                                    Tuning

                                                    This issue has a mass of 47.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

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

                                                    def GetVersionString(ms, ls):
                                                      return "%d.%d.%d.%d" % (ms >> 16, ms & 0xffff, ls >> 16, ls & 0xffff)
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 hr to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 3799..3800

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

                                                    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

                                                    def EnableOnFlag(type, flag):
                                                      return lambda o: [None, type][int((o.context_flags & flag) != 0)]
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 hr to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 292..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 43.

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

                                                    MINIDUMP_THREAD_LIST_Mac = Descriptor([
                                                      ("thread_count", ctypes.c_uint32),
                                                      ("junk", ctypes.c_uint32),
                                                      ("threads", lambda t: MINIDUMP_THREAD.ctype * t.thread_count)
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 7 other locations - About 1 hr to fix
                                                    current/deps/v8/tools/grokdump.py on lines 510..513
                                                    current/deps/v8/tools/grokdump.py on lines 516..519
                                                    current/deps/v8/tools/grokdump.py on lines 577..580
                                                    lts/deps/v8/tools/grokdump.py on lines 510..513
                                                    lts/deps/v8/tools/grokdump.py on lines 516..519
                                                    lts/deps/v8/tools/grokdump.py on lines 537..540
                                                    lts/deps/v8/tools/grokdump.py on lines 577..580

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

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

                                                    MINIDUMP_MEMORY_LIST_Mac = Descriptor([
                                                      ("range_count", ctypes.c_uint32),
                                                      ("junk", ctypes.c_uint32),
                                                      ("ranges", lambda m: MINIDUMP_MEMORY_DESCRIPTOR.ctype * m.range_count)
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 7 other locations - About 1 hr to fix
                                                    current/deps/v8/tools/grokdump.py on lines 516..519
                                                    current/deps/v8/tools/grokdump.py on lines 537..540
                                                    current/deps/v8/tools/grokdump.py on lines 577..580
                                                    lts/deps/v8/tools/grokdump.py on lines 510..513
                                                    lts/deps/v8/tools/grokdump.py on lines 516..519
                                                    lts/deps/v8/tools/grokdump.py on lines 537..540
                                                    lts/deps/v8/tools/grokdump.py on lines 577..580

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

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

                                                    MINIDUMP_MODULE_LIST_Mac = Descriptor([
                                                      ("number_of_modules", ctypes.c_uint32),
                                                      ("junk", ctypes.c_uint32),
                                                      ("modules", lambda t: MINIDUMP_RAW_MODULE.ctype * t.number_of_modules)
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 7 other locations - About 1 hr to fix
                                                    current/deps/v8/tools/grokdump.py on lines 510..513
                                                    current/deps/v8/tools/grokdump.py on lines 516..519
                                                    current/deps/v8/tools/grokdump.py on lines 537..540
                                                    lts/deps/v8/tools/grokdump.py on lines 510..513
                                                    lts/deps/v8/tools/grokdump.py on lines 516..519
                                                    lts/deps/v8/tools/grokdump.py on lines 537..540
                                                    lts/deps/v8/tools/grokdump.py on lines 577..580

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

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

                                                    MINIDUMP_MEMORY_LIST64 = Descriptor([
                                                      ("range_count", ctypes.c_uint64),
                                                      ("base_rva", ctypes.c_uint64),
                                                      ("ranges", lambda m: MINIDUMP_MEMORY_DESCRIPTOR64.ctype * m.range_count)
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 7 other locations - About 1 hr to fix
                                                    current/deps/v8/tools/grokdump.py on lines 510..513
                                                    current/deps/v8/tools/grokdump.py on lines 537..540
                                                    current/deps/v8/tools/grokdump.py on lines 577..580
                                                    lts/deps/v8/tools/grokdump.py on lines 510..513
                                                    lts/deps/v8/tools/grokdump.py on lines 516..519
                                                    lts/deps/v8/tools/grokdump.py on lines 537..540
                                                    lts/deps/v8/tools/grokdump.py on lines 577..580

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

                                                    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

                                                    MINIDUMP_STRING = Descriptor([
                                                      ("length", ctypes.c_uint32),
                                                      ("buffer", lambda t: ctypes.c_uint8 * (t.length + 2))
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 hr to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 217..219

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

                                                    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 _ in range(self.header.stream_count):
                                                          directories.append(MINIDUMP_DIRECTORY.Read(self.minidump, offset))
                                                          offset += MINIDUMP_DIRECTORY.size
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 hr to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 627..629

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

                                                    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

                                                    MINIDUMP_FLOATING_SAVE_AREA_ARM = Descriptor([
                                                      ("fpscr", ctypes.c_uint64),
                                                      ("regs", ctypes.c_uint64 * MD_FLOATINGSAVEAREA_ARM_FPR_COUNT),
                                                      ("extra", ctypes.c_uint64 * MD_FLOATINGSAVEAREA_ARM_FPEXTRA_COUNT)
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 hr to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 338..341

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

                                                    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

                                                      def ReadBytes(self, address, size):
                                                        location = self.FindLocation(address)
                                                        return self.minidump[location:location + size]
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 1 hr to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 808..810

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

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

                                                    MINIDUMP_MEMORY_LIST = Descriptor([
                                                      ("range_count", ctypes.c_uint32),
                                                      ("ranges", lambda m: MINIDUMP_MEMORY_DESCRIPTOR.ctype * m.range_count)
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 5 other locations - About 50 mins to fix
                                                    current/deps/v8/tools/grokdump.py on lines 532..534
                                                    current/deps/v8/tools/grokdump.py on lines 572..574
                                                    lts/deps/v8/tools/grokdump.py on lines 505..507
                                                    lts/deps/v8/tools/grokdump.py on lines 532..534
                                                    lts/deps/v8/tools/grokdump.py on lines 572..574

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

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

                                                    MINIDUMP_MODULE_LIST = Descriptor([
                                                      ("number_of_modules", ctypes.c_uint32),
                                                      ("modules", lambda t: MINIDUMP_RAW_MODULE.ctype * t.number_of_modules)
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 5 other locations - About 50 mins to fix
                                                    current/deps/v8/tools/grokdump.py on lines 505..507
                                                    current/deps/v8/tools/grokdump.py on lines 532..534
                                                    lts/deps/v8/tools/grokdump.py on lines 505..507
                                                    lts/deps/v8/tools/grokdump.py on lines 532..534
                                                    lts/deps/v8/tools/grokdump.py on lines 572..574

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

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

                                                    MINIDUMP_THREAD_LIST = Descriptor([
                                                      ("thread_count", ctypes.c_uint32),
                                                      ("threads", lambda t: MINIDUMP_THREAD.ctype * t.thread_count)
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 5 other locations - About 50 mins to fix
                                                    current/deps/v8/tools/grokdump.py on lines 505..507
                                                    current/deps/v8/tools/grokdump.py on lines 572..574
                                                    lts/deps/v8/tools/grokdump.py on lines 505..507
                                                    lts/deps/v8/tools/grokdump.py on lines 532..534
                                                    lts/deps/v8/tools/grokdump.py on lines 572..574

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

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

                                                      def ReadU8(self, address):
                                                        location = self.FindLocation(address)
                                                        return ctypes.c_uint8.from_buffer(self.minidump, location).value
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 5 other locations - About 40 mins to fix
                                                    current/deps/v8/tools/grokdump.py on lines 795..797
                                                    current/deps/v8/tools/grokdump.py on lines 799..801
                                                    lts/deps/v8/tools/grokdump.py on lines 787..789
                                                    lts/deps/v8/tools/grokdump.py on lines 791..793
                                                    lts/deps/v8/tools/grokdump.py on lines 795..797

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

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

                                                      def ReadU64(self, address):
                                                        location = self.FindLocation(address)
                                                        return ctypes.c_uint64.from_buffer(self.minidump, location).value
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 5 other locations - About 40 mins to fix
                                                    current/deps/v8/tools/grokdump.py on lines 791..793
                                                    current/deps/v8/tools/grokdump.py on lines 795..797
                                                    lts/deps/v8/tools/grokdump.py on lines 787..789
                                                    lts/deps/v8/tools/grokdump.py on lines 791..793
                                                    lts/deps/v8/tools/grokdump.py on lines 795..797

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

                                                    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

                                                      def StackBottom(self):
                                                        exception_thread = self.ExceptionThread()
                                                        return exception_thread.stack.start + \
                                                            exception_thread.stack.memory.data_size
                                                    Severity: Minor
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 40 mins to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1012..1015

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

                                                    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

                                                    MINIDUMP_EXCEPTION_STREAM = Descriptor([
                                                      ("thread_id", ctypes.c_uint32),
                                                      ("unused_alignment", ctypes.c_uint32),
                                                      ("exception", MINIDUMP_EXCEPTION.ctype),
                                                      ("thread_context", MINIDUMP_LOCATION_DESCRIPTOR.ctype)
                                                    Severity: Minor
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 40 mins to fix
                                                    lts/deps/v8/tools/grokdump.py 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 34.

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

                                                      def ReadU32(self, address):
                                                        location = self.FindLocation(address)
                                                        return ctypes.c_uint32.from_buffer(self.minidump, location).value
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 5 other locations - About 40 mins to fix
                                                    current/deps/v8/tools/grokdump.py on lines 791..793
                                                    current/deps/v8/tools/grokdump.py on lines 799..801
                                                    lts/deps/v8/tools/grokdump.py on lines 787..789
                                                    lts/deps/v8/tools/grokdump.py on lines 791..793
                                                    lts/deps/v8/tools/grokdump.py on lines 795..797

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

                                                    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

                                                      def IsExceptionStackAddress(self, address):
                                                        if not self.IsAlignedAddress(address): return False
                                                        return self.IsAnyExceptionStackAddress(address)
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 3 other locations - About 35 mins to fix
                                                    current/deps/v8/tools/grokdump.py on lines 777..779
                                                    lts/deps/v8/tools/grokdump.py on lines 766..768
                                                    lts/deps/v8/tools/grokdump.py on lines 773..775

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

                                                    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

                                                      def IsValidExceptionStackAddress(self, address):
                                                        if not self.IsValidAddress(address): return False
                                                        return self.IsExceptionStackAddress(address)
                                                    Severity: Major
                                                    Found in current/deps/v8/tools/grokdump.py and 3 other locations - About 35 mins to fix
                                                    current/deps/v8/tools/grokdump.py on lines 770..772
                                                    lts/deps/v8/tools/grokdump.py on lines 766..768
                                                    lts/deps/v8/tools/grokdump.py on lines 773..775

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

                                                    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

                                                      def FormatIntPtr(self, value):
                                                        if self.Is64():
                                                          return "%016x" % value
                                                        return "%08x" % value
                                                    Severity: Minor
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 35 mins to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 1017..1020

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

                                                    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

                                                      def ReadUIntPtr(self, address):
                                                        if self.Is64():
                                                          return self.ReadU64(address)
                                                        return self.ReadU32(address)
                                                    Severity: Minor
                                                    Found in current/deps/v8/tools/grokdump.py and 1 other location - About 35 mins to fix
                                                    lts/deps/v8/tools/grokdump.py on lines 803..806

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

                                                    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