enclose-io/compiler

View on GitHub
lts/deps/v8/tools/release/common_includes.py

Summary

Maintainability
F
1 mo
Test Coverage

File common_includes.py has 639 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/usr/bin/env python
# Copyright 2013 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
# met:
Severity: Major
Found in lts/deps/v8/tools/release/common_includes.py - About 1 day to fix

    Step has 33 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Step(GitRecipesMixin):
      def __init__(self, text, number, config, state, options, handler):
        self._text = text
        self._number = number
        self._config = config
    Severity: Minor
    Found in lts/deps/v8/tools/release/common_includes.py - About 4 hrs to fix

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

      def MakeChangeLogBugReference(body):
        """Grep for "BUG=xxxx" lines in the commit message and convert them to
        "(issue xxxx)".
        """
        crbugs = []
      Severity: Minor
      Found in lts/deps/v8/tools/release/common_includes.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 MakeChangeLogBody has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

      def MakeChangeLogBody(commit_messages, auto_format=False):
        result = ""
        added_titles = set()
        for (title, body, author) in commit_messages:
          # TODO(machenbach): Better check for reverts. A revert should remove the
      Severity: Minor
      Found in lts/deps/v8/tools/release/common_includes.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 Retry has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

        def Retry(self, cb, retry_on=None, wait_plan=None):
          """ Retry a function.
          Params:
            cb: The function to retry.
            retry_on: A callback that takes the result of the function and returns
      Severity: Minor
      Found in lts/deps/v8/tools/release/common_includes.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 RunSteps has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

        def RunSteps(self, step_classes, args=None):
          options = self.MakeOptions(args)
          if not options:
            return 1
      
      
      Severity: Minor
      Found in lts/deps/v8/tools/release/common_includes.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 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        def __init__(self, text, number, config, state, options, handler):
      Severity: Minor
      Found in lts/deps/v8/tools/release/common_includes.py - About 45 mins to fix

        Function MakeStep has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def MakeStep(step_class=Step, number=0, state=None, config=None,
        Severity: Minor
        Found in lts/deps/v8/tools/release/common_includes.py - About 45 mins to fix

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

            def SetVersion(self, version_file, prefix):
              output = ""
              for line in FileToText(version_file).splitlines():
                if line.startswith("#define V8_MAJOR_VERSION"):
                  line = re.sub("\d+$", self[prefix + "major"], line)
          Severity: Minor
          Found in lts/deps/v8/tools/release/common_includes.py - About 45 mins to fix

          Cognitive Complexity

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

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

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

          Further reading

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

          def Command(cmd, args="", prefix="", pipe=True, cwd=None):
          Severity: Minor
          Found in lts/deps/v8/tools/release/common_includes.py - About 35 mins to fix

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

              def Command(self, cmd, args="", prefix="", pipe=True, cwd=None):
            Severity: Minor
            Found in lts/deps/v8/tools/release/common_includes.py - About 35 mins to fix

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

                def Git(self, args="", prefix="", pipe=True, retry_on=None, cwd=None):
              Severity: Minor
              Found in lts/deps/v8/tools/release/common_includes.py - About 35 mins to fix

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

                  def DeleteBranch(self, name, cwd=None):
                    for line in self.GitBranch(cwd=cwd).splitlines():
                      if re.match(r"\*?\s*%s$" % re.escape(name), line):
                        msg = "Branch %s exists, do you want to delete it?" % name
                        if self.Confirm(msg):
                Severity: Minor
                Found in lts/deps/v8/tools/release/common_includes.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 RemoteBranch has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                  def RemoteBranch(self, name):
                    # Assume that if someone "fully qualified" the ref, they know what they
                    # want.
                    if name.startswith('refs/'):
                      return name
                Severity: Minor
                Found in lts/deps/v8/tools/release/common_includes.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 ScriptsBase(object):
                  def __init__(self,
                               config=None,
                               side_effect_handler=DEFAULT_SIDE_EFFECT_HANDLER,
                               state=None):
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 1 wk to fix
                current/deps/v8/tools/release/common_includes.py on lines 711..817

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

                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 GitInterface(VCInterface):
                  def Pull(self):
                    self.step.GitPull()
                
                  def Fetch(self):
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 4 days to fix
                current/deps/v8/tools/release/common_includes.py on lines 243..315

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

                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 SetVersion(self, version_file, prefix):
                    output = ""
                    for line in FileToText(version_file).splitlines():
                      if line.startswith("#define V8_MAJOR_VERSION"):
                        line = re.sub("\d+$", self[prefix + "major"], line)
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 2 days to fix
                current/deps/v8/tools/release/common_includes.py on lines 635..650

                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

                  def Retry(self, cb, retry_on=None, wait_plan=None):
                    """ Retry a function.
                    Params:
                      cb: The function to retry.
                      retry_on: A callback that takes the result of the function and returns
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 1 day to fix
                current/deps/v8/tools/release/common_includes.py on lines 367..397

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 173.

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

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

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

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

                Refactorings

                Further Reading

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

                class UploadStep(Step):
                  MESSAGE = "Upload for code review."
                
                  def RunStep(self):
                    reviewer = None
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 1 day to fix
                current/deps/v8/tools/release/common_includes.py on lines 669..692

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

                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 GetLatestReleaseBase(self, version=None):
                    """The latest release base is the latest revision that is covered in the
                    last change log file. It doesn't include cherry-picked patches.
                    """
                    latest_version = version or self.GetLatestVersion()
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 1 day to fix
                current/deps/v8/tools/release/common_includes.py on lines 590..617

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

                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 __init__(self, text, number, config, state, options, handler):
                    self._text = text
                    self._number = number
                    self._config = config
                    self._state = state
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 1 day to fix
                current/deps/v8/tools/release/common_includes.py on lines 319..336

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

                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 Command(cmd, args="", prefix="", pipe=True, cwd=None):
                  cwd = cwd or os.getcwd()
                  # TODO(machenbach): Use timeout.
                  cmd_line = "%s %s %s" % (prefix, cmd, args)
                  print("Command: %s" % cmd_line)
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 1 day to fix
                current/deps/v8/tools/release/common_includes.py on lines 107..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 149.

                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 VCInterface(object):
                  def InjectStep(self, step):
                    self.step=step
                
                  def Pull(self):
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 1 day to fix
                current/deps/v8/tools/release/common_includes.py on lines 201..240

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

                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 BootstrapStep(Step):
                  MESSAGE = "Bootstrapping checkout and state."
                
                  def RunStep(self):
                    # Reserve state entry for json output.
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 1 day to fix
                current/deps/v8/tools/release/common_includes.py on lines 653..666

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

                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 ReadAndPersistVersion(self, prefix=""):
                    def ReadAndPersist(var_name, def_name):
                      match = re.match(r"^#define %s\s+(\d*)" % def_name, line)
                      if match:
                        value = match.group(1)
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 1 day to fix
                current/deps/v8/tools/release/common_includes.py on lines 498..509

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 124.

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

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

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

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

                Refactorings

                Further Reading

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

                  def StoreVersion(self, version, prefix):
                    version_parts = version.split(".")
                    if len(version_parts) == 3:
                      version_parts.append("0")
                    major, minor, build, patch = version_parts
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 7 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 625..633

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

                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 DeleteBranch(self, name, cwd=None):
                    for line in self.GitBranch(cwd=cwd).splitlines():
                      if re.match(r"\*?\s*%s$" % re.escape(name), line):
                        msg = "Branch %s exists, do you want to delete it?" % name
                        if self.Confirm(msg):
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 7 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 449..458

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

                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 Run(self):
                    # Restore state.
                    state_file = "%s-state.json" % self._config["PERSISTFILE_BASENAME"]
                    if not self._state and os.path.exists(state_file):
                      self._state.update(json.loads(FileToText(state_file)))
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 7 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 351..362

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 115.

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

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

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

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

                Refactorings

                Further Reading

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

                  def ReadClusterFuzzAPI(self, api_key, **params):
                    params["api_key"] = api_key.strip()
                    params = urllib.urlencode(params)
                
                    headers = {"Content-type": "application/x-www-form-urlencoded"}
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 7 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 169..186

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

                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 InitialEnvironmentChecks(self, cwd):
                    # Cancel if this is not a git checkout.
                    if not os.path.exists(os.path.join(cwd, ".git")):  # pragma: no cover
                      self.Die("%s is not a git checkout. If you know what you're doing, try "
                               "deleting it and rerunning this script." % cwd)
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 6 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 460..470

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

                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 CommonCleanup(self):
                    self.GitCheckout('origin/master')
                    self.GitDeleteBranch(self._config["BRANCHNAME"])
                
                    # Clean up all temporary files.
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 6 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 487..496

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

                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 WaitForResolvingConflicts(self, patch_file):
                    print("Applying the patch \"%s\" failed. Either type \"ABORT<Return>\", "
                          "or resolve the conflicts, stage *all* touched files with "
                          "'git add', and type \"RESOLVED<Return>\"" % (patch_file))
                    self.DieNoManualMode()
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 6 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 523..535

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 98.

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

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

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

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

                Refactorings

                Further Reading

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

                def MakeStep(step_class=Step, number=0, state=None, config=None,
                             options=None, side_effect_handler=DEFAULT_SIDE_EFFECT_HANDLER):
                    # Allow to pass in empty dictionaries.
                    state = state if state is not None else {}
                    config = config if config is not None else {}
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 5 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 695..706

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 96.

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

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

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

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

                Refactorings

                Further Reading

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

                  def GetLatestVersion(self):
                    # Use cached version if available.
                    if self["latest_version"]:
                      return self["latest_version"]
                
                
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 5 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 562..576

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 90.

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

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

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

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

                Refactorings

                Further Reading

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

                  def Git(self, args="", prefix="", pipe=True, retry_on=None, cwd=None):
                    cmd = lambda: self._side_effect_handler.Command(
                        "git", args, prefix, pipe, cwd=cwd or self.default_cwd)
                    result = self.Retry(cmd, retry_on, [5, 30])
                    if result is None:
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 5 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 412..418

                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

                  def GetRecentReleases(self, max_age):
                    # Make sure tags are fetched.
                    self.Git("fetch origin +refs/tags/*:refs/tags/*")
                
                    # Current timestamp.
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 5 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 548..560

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 86.

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

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

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

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

                Refactorings

                Further Reading

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

                  def WaitForLGTM(self):
                    print ("Please wait for an LGTM, then type \"LGTM<Return>\" to commit "
                           "your change. (If you need to iterate on the patch or double check "
                           "that it's sane, do so in another shell, but remember to not "
                           "change the headline of the uploaded CL.")
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 4 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 511..521

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 77.

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

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

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

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

                Refactorings

                Further Reading

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

                  def ArrayToVersion(self, prefix):
                    return ".".join([self[prefix + "major"],
                                     self[prefix + "minor"],
                                     self[prefix + "build"],
                                     self[prefix + "patch"]])
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 3 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 619..623

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 69.

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

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

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

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

                Refactorings

                Further Reading

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

                def SanitizeVersionTag(tag):
                    version_without_prefix = re.compile(r"^\d+\.\d+\.\d+(?:\.\d+)?$")
                    version_with_prefix = re.compile(r"^tags\/\d+\.\d+\.\d+(?:\.\d+)?$")
                
                    if version_without_prefix.match(tag):
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 3 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 126..135

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 69.

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

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

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

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

                Refactorings

                Further Reading

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

                  def Confirm(self, msg):
                    print("%s [Y/n] " % msg, end=' ')
                    answer = self.ReadLine(default="Y")
                    return answer == "" or answer == "Y" or answer == "y"
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 3 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 444..447

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 64.

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

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

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

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

                Refactorings

                Further Reading

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

                def SortingKey(version):
                  """Key for sorting version number strings: '3.11' > '3.2.1.1'"""
                  version_keys = map(int, version.split("."))
                  # Fill up to full version numbers to normalize comparison.
                  while len(version_keys) < 4:  # pragma: no cover
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 3 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 95..102

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 64.

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

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

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

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

                Refactorings

                Further Reading

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

                  def ReadURL(self, url, params=None, retry_on=None, wait_plan=None):
                    wait_plan = wait_plan or [3, 60, 600]
                    cmd = lambda: self._side_effect_handler.ReadURL(url, params)
                    return self.Retry(cmd, retry_on, wait_plan)
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 2 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 428..431

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 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

                  def Command(self, name, args, cwd=None):
                    cmd = lambda: self._side_effect_handler.Command(
                        name, args, "", True, cwd=cwd or self.default_cwd)
                    return self.Retry(cmd, None, [5])
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 2 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 407..410

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 55.

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

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

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

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

                Refactorings

                Further Reading

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

                  def ReadLine(self, default=None):
                    # Don't prompt in forced mode.
                    if self._options.force_readline_defaults and default is not None:
                      print("%s (forced)" % default)
                      return default
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 2 hrs to fix
                current/deps/v8/tools/release/common_includes.py on lines 399..405

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

                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 NormalizeVersionTags(version_tags):
                  normalized_version_tags = []
                
                  # Remove tags/ prefix because of packed refs.
                  for current_tag in version_tags:
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 1 hr to fix
                current/deps/v8/tools/release/common_includes.py on lines 138..147

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 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 Die(self, msg=""):
                    if msg != "":
                      print("Error: %s" % msg)
                    print("Exiting")
                    raise Exception(msg)
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 1 hr to fix
                current/deps/v8/tools/release/common_includes.py on lines 433..437

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 46.

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

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

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

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

                Refactorings

                Further Reading

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

                  def CommonPrepare(self):
                    # Check for a clean workdir.
                    if not self.GitIsWorkdirClean():  # pragma: no cover
                      self.Die("Workspace is not clean. Please commit or undo your changes.")
                
                
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 1 hr to fix
                current/deps/v8/tools/release/common_includes.py on lines 472..481

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 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 Editor(self, args):
                    if self._options.requires_editor:
                      return self._side_effect_handler.Command(
                          os.environ["EDITOR"],
                          args,
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 1 hr to fix
                current/deps/v8/tools/release/common_includes.py on lines 420..426

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

                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 GetLatestRelease(self):
                    """The latest release is the git hash of the latest tagged version.
                
                    This revision should be rolled into chromium.
                    """
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 1 hr to fix
                current/deps/v8/tools/release/common_includes.py on lines 578..588

                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

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

                  def ReadURL(self, url, params=None):
                    # pylint: disable=E1121
                    url_fh = urllib2.urlopen(url, params, 60)
                    try:
                      return url_fh.read()
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 1 hr to fix
                current/deps/v8/tools/release/common_includes.py on lines 161..167

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 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 DieNoManualMode(self, msg=""):
                    if not self._options.manual:  # pragma: no cover
                      msg = msg or "Only available in manual mode."
                      self.Die(msg)
                Severity: Major
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 1 hr to fix
                current/deps/v8/tools/release/common_includes.py on lines 439..442

                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 ApplyPatch(self, patch_file, revert=False):
                    try:
                      self.GitApplyPatch(patch_file, revert)
                    except GitFailedException:
                      self.WaitForResolvingConflicts(patch_file)
                Severity: Minor
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 50 mins to fix
                current/deps/v8/tools/release/common_includes.py on lines 538..542

                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

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

                  def GetVersionTag(self, revision):
                    tag = self.Git("describe --tags %s" % revision).strip()
                    return SanitizeVersionTag(tag)
                Severity: Minor
                Found in lts/deps/v8/tools/release/common_includes.py and 1 other location - About 45 mins to fix
                current/deps/v8/tools/release/common_includes.py on lines 544..546

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 35.

                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