hackedteam/vector-edk

View on GitHub
BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py

Summary

Maintainability
F
1 wk
Test Coverage

File ModuleSurfaceAreaXml.py has 706 lines of code (exceeds 250 allowed). Consider refactoring.
Open

## @file
# This file is used to parse a Module file of .PKG file
#
# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
#
Severity: Major
Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py - About 1 day to fix

    Function ToXml has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
    Open

        def ToXml(self, Module):
            if self.Package:
                pass
            #
            # Create root node of module surface area
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.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

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

        def FromXml(self, Item, Key, IsStandAlongModule=False):
            IsBinaryModule = XmlAttribute(Item, 'BinaryModule')
            #
            # Header
            #
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.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

    Function FromXml has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

        def FromXml(self, Item, Key):
            if self.FileNames:
                pass
            BinaryFile = BinaryFileObject()
            FilenameList = []
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.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 ToXml has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
    Open

        def ToXml(self, BinaryFile, Key):
            if self.FileNames:
                pass
            NodeList = []
            FilenameList = BinaryFile.GetFileNameList()
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.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 ToXml has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def ToXml(self, Module):
            if self.Package:
                pass
            #
            # Create root node of module surface area
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py - About 1 hr to fix

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

          def ToXml(self, Header, BootModes, Events, Hobs, Key):
      Severity: Minor
      Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py - About 35 mins to fix

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

            def FromXml2(self, Item, Module):
                if self.Module:
                    pass
                #
                # PeiDepex
        Severity: Minor
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.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

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

            def __str__(self):
                Str = "EntryPoint = %s UnloadImage = %s Constructor = %s Destructor = %s %s" \
                      % (self.EntryPoint, self.UnloadImage, self.Constructor, self.Destructor, self.CommonDefines)
                for Item in self.HelpText:
                    Str = Str + '\n\t' + str(Item)
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 1 other location - About 3 hrs to fix
        BaseTools/Source/Python/UPT/Xml/CommonXml.py on lines 831..837

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

        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 __str__(self):
                Str = "SupportedBootModes = %s %s" % (self.SupportedBootModes, self.CommonDefines)
                for Item in self.HelpText:
                    Str = Str + '\n\t' + str(Item)
                return Str
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 3 other locations - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 413..417
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 459..463
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 121..125

        Duplicated Code

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

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

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

        Tuning

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

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

            def __str__(self):
                Str = "EventType = %s %s" % (self.EventType, self.CommonDefines)
                for Item in self.HelpText:
                    Str = Str + '\n\t' + str(Item)
                return Str
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 3 other locations - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 368..372
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 459..463
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 121..125

        Duplicated Code

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

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

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

        Tuning

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

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

            def __str__(self):
                Str = "HobType = %s %s" % (self.HobType, self.CommonDefines)
                for Item in self.HelpText:
                    Str = Str + '\n\t' + str(Item)
                return Str
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 3 other locations - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 368..372
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 413..417
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 121..125

        Duplicated Code

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

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

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

        Tuning

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

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

                for SubItem in XmlList(Item, '%s/Specification' % Key):
                    Specification = XmlElement(SubItem, '/Specification')
                    Version = XmlAttribute(XmlNode(SubItem, '/Specification'), 'Version')
                    self.SpecificationList.append((Specification, Version))
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 1 other location - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 57..61

        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

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

                for SubItem in XmlList(Item, '/ModuleSurfaceArea/Protocols/Protocol'):
                    Tmp = ProtocolXml('Module')
                    GuidProtocolPpi = Tmp.FromXml(SubItem, 'Protocol')
                    Module.SetProtocolList(Module.GetProtocolList() + [GuidProtocolPpi])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 5 other locations - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 741..744
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 763..766
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 217..220
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 229..232
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 241..244

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

        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

                for SubItem in XmlList(Item, '/ModuleSurfaceArea/PPIs/Ppi'):
                    Tmp = PpiXml('Module')
                    GuidProtocolPpi = Tmp.FromXml(SubItem, 'Ppi')
                    Module.SetPpiList(Module.GetPpiList() + [GuidProtocolPpi])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 5 other locations - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 741..744
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 752..755
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 217..220
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 229..232
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 241..244

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

        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

                for SubItem in XmlList(Item, '/ModuleSurfaceArea/Guids/GuidCName'):
                    Tmp = GuidXml('Module')
                    GuidProtocolPpi = Tmp.FromXml(SubItem, 'GuidCName')
                    Module.SetGuidList(Module.GetGuidList() + [GuidProtocolPpi])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 5 other locations - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 752..755
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 763..766
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 217..220
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 229..232
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 241..244

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

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

                for HelpTextItem in XmlList(Item, '%s/HelpText' % Key):
                    HelpTextObj = HelpTextXml()
                    HelpTextObj.FromXml(HelpTextItem, '%s/HelpText' % Key)
                    self.HelpText.append(HelpTextObj)
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 10 other locations - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/CommonXml.py on lines 776..779
        BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py on lines 68..71
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 298..301
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 344..347
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 387..390
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 51..54
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 90..93
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 152..155
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 195..198
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 235..238

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

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

                for HelpTextItem in XmlList(Item, '%s/HelpText' % Key):
                    HelpTextObj = HelpTextXml()
                    HelpTextObj.FromXml(HelpTextItem, '%s/HelpText' % Key)
                    self.HelpText.append(HelpTextObj)
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 10 other locations - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/CommonXml.py on lines 776..779
        BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py on lines 68..71
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 298..301
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 344..347
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 432..435
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 51..54
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 90..93
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 152..155
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 195..198
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 235..238

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

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

                for HelpTextItem in XmlList(Item, '%s/HelpText' % Key):
                    HelpTextObj = HelpTextXml()
                    HelpTextObj.FromXml(HelpTextItem, '%s/HelpText' % Key)
                    self.HelpText.append(HelpTextObj)
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 10 other locations - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/CommonXml.py on lines 776..779
        BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py on lines 68..71
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 298..301
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 387..390
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 432..435
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 51..54
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 90..93
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 152..155
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 195..198
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 235..238

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

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

                for HelpTextItem in XmlList(Item, '%s/HelpText' % Key):
                    HelpTextObj = HelpTextXml()
                    HelpTextObj.FromXml(HelpTextItem, '%s/HelpText' % Key)
                    self.HelpText.append(HelpTextObj)
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 10 other locations - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/CommonXml.py on lines 776..779
        BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py on lines 68..71
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 344..347
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 387..390
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 432..435
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 51..54
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 90..93
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 152..155
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 195..198
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 235..238

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

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

                for SubItem in XmlList(Item, '/ModuleSurfaceArea/PackageDependencies/Package'):
                    Tmp = PackageXml()
                    PackageDependency = Tmp.FromXml(SubItem, 'Package')
                    Module.SetPackageDependencyList(Module.GetPackageDependencyList() + [PackageDependency])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 10 other locations - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 655..658
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 694..697
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 706..709
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 718..721
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 774..777
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 786..789
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 180..183
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 192..195
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 205..208
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 253..256

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

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

                for SubItem in XmlList(Item, '/ModuleSurfaceArea/LibraryClassDefinitions/LibraryClass'):
                    Tmp = LibraryClassXml()
                    LibraryClass = Tmp.FromXml(SubItem, 'LibraryClass')
                    Module.SetLibraryClassList(Module.GetLibraryClassList() + [LibraryClass])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 10 other locations - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 655..658
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 706..709
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 718..721
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 729..732
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 774..777
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 786..789
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 180..183
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 192..195
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 205..208
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 253..256

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

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

                    for SubItem in XmlList(Item, '/ModuleSurfaceArea/PcdCoded/PcdEntry'):
                        Tmp = PcdEntryXml()
                        PcdEntry = Tmp.FromXml3(SubItem, 'PcdEntry')
                        Module.SetPcdList(Module.GetPcdList() + [PcdEntry])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 10 other locations - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 655..658
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 694..697
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 706..709
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 718..721
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 729..732
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 774..777
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 180..183
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 192..195
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 205..208
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 253..256

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

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

                for Item in XmlList(Item, '/ModuleSurfaceArea/UserExtensions'):
                    Tmp = UserExtensionsXml()
                    UserExtension = Tmp.FromXml(Item, 'UserExtensions')
                    Module.SetUserExtensionList(Module.GetUserExtensionList() + [UserExtension])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 10 other locations - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 694..697
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 706..709
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 718..721
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 729..732
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 774..777
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 786..789
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 180..183
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 192..195
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 205..208
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 253..256

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

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

                for SubItem in XmlList(Item, '/ModuleSurfaceArea/Externs/Extern'):
                    Tmp = ExternXml()
                    Extern = Tmp.FromXml(SubItem, 'Extern')
                    Module.SetExternList(Module.GetExternList() + [Extern])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 10 other locations - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 655..658
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 694..697
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 706..709
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 718..721
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 729..732
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 786..789
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 180..183
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 192..195
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 205..208
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 253..256

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

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

                for SubItem in XmlList(Item, '/ModuleSurfaceArea/BinaryFiles/BinaryFile'):
                    Tmp = BinaryFileXml()
                    BinaryFile = Tmp.FromXml(SubItem, 'BinaryFile')
                    Module.SetBinaryFileList(Module.GetBinaryFileList() + [BinaryFile])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 10 other locations - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 655..658
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 694..697
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 706..709
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 729..732
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 774..777
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 786..789
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 180..183
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 192..195
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 205..208
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 253..256

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

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

                for SubItem in XmlList(Item, '/ModuleSurfaceArea/SourceFiles/Filename'):
                    Tmp = SourceFileXml()
                    SourceFile = Tmp.FromXml(SubItem, 'Filename')
                    Module.SetSourceFileList(Module.GetSourceFileList() + [SourceFile])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 10 other locations - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 655..658
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 694..697
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 718..721
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 729..732
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 774..777
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 786..789
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 180..183
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 192..195
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 205..208
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 253..256

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

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

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

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

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

        Refactorings

        Further Reading

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

            def __str__(self):
                Str = "Expression = %s" % (self.Expression)
                for Item in self.HelpText:
                    Str = Str + '\n\t' + str(Item)
                return Str
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 1 other location - About 2 hrs to fix
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 73..77

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

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

                for SubItem in XmlList(Item, '%s/BootMode' % Key):
                    Axml = BootModeXml()
                    BootMode = Axml.FromXml(SubItem, 'BootMode')
                    self.BootModes.append(BootMode)
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 4 other locations - About 1 hr to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 532..535
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 536..539
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 156..159
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 199..202

        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

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

                for SubItem in XmlList(Item, '%s/HOB' % Key):
                    Axml = HobXml()
                    Hob = Axml.FromXml(SubItem, 'HOB')
                    self.HOBs.append(Hob)
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 4 other locations - About 1 hr to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 528..531
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 532..535
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 156..159
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 199..202

        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

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

                for SubItem in XmlList(Item, '%s/Event' % Key):
                    Axml = EventXml()
                    Event = Axml.FromXml(SubItem, 'Event')
                    self.Events.append(Event)
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 4 other locations - About 1 hr to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 528..531
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 536..539
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 156..159
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 199..202

        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

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

                NodeList = [['ModuleType', Header.GetModuleType()],
                            ['Path', Header.GetModulePath()],
                            ['PcdIsDriver', Header.GetPcdIsDriver()],
                            ['UefiSpecificationVersion', Header.GetUefiSpecificationVersion()],
                            ['PiSpecificationVersion', Header.GetPiSpecificationVersion()],
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 1 other location - About 1 hr to fix
        BaseTools/Source/Python/UPT/Xml/CommonXml.py on lines 448..452

        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

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

                for SubItem in XmlList(Item, '/ModuleSurfaceArea/SmmDepex'):
                    Tmp = DepexXml()
                    Depex = Tmp.FromXml(XmlNode(SubItem, 'SmmDepex'), 'SmmDepex')
                    SmmDepexList.append(Depex)
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 2 other locations - About 1 hr to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 617..620
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 627..630

        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

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

                for SubItem in XmlList(Item, '/ModuleSurfaceArea/DxeDepex'):
                    Tmp = DepexXml()
                    Depex = Tmp.FromXml(XmlNode(SubItem, 'DxeDepex'), 'DxeDepex')
                    DxeDepexList.append(Depex)
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 2 other locations - About 1 hr to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 617..620
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 637..640

        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

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

                for SubItem in XmlList(Item, '/ModuleSurfaceArea/PeiDepex'):
                    Tmp = DepexXml()
                    Depex = Tmp.FromXml(XmlNode(SubItem, 'PeiDepex'), 'PeiDepex')
                    PeiDepexList.append(Depex)
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 2 other locations - About 1 hr to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 627..630
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 637..640

        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

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

                if Module.GetDxeDepex():
                    for Item in Module.GetDxeDepex():
                        Tmp = DepexXml()
                        DomModule.appendChild(Tmp.ToXml(Item, 'DxeDepex'))
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 4 other locations - About 1 hr to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 908..911
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 924..927
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 938..941
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 393..396

        Duplicated Code

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

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

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

        Tuning

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

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

                if Module.GetSmmDepex():
                    for Item in Module.GetSmmDepex():
                        Tmp = DepexXml()
                        DomModule.appendChild(Tmp.ToXml(Item, 'SmmDepex'))
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 4 other locations - About 1 hr to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 908..911
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 916..919
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 938..941
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 393..396

        Duplicated Code

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

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

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

        Tuning

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

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

                if Module.GetUserExtensionList():
                    for UserExtension in Module.GetUserExtensionList():
                        Tmp = UserExtensionsXml()
                        DomModule.appendChild(Tmp.ToXml(UserExtension, 'UserExtensions'))
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 4 other locations - About 1 hr to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 908..911
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 916..919
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 924..927
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 393..396

        Duplicated Code

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

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

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

        Tuning

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

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

                if Module.GetPeiDepex():
                    for Item in Module.GetPeiDepex():
                        Tmp = DepexXml()
                        DomModule.appendChild(Tmp.ToXml(Item, 'PeiDepex'))
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 4 other locations - About 1 hr to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 916..919
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 924..927
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 938..941
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 393..396

        Duplicated Code

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

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

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

        Tuning

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

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

                        for SubItem in XmlList(AsBuiltItem, 'AsBuilt/PatchPcdValue'):
                            Axml = PcdEntryXml()
                            Bxml = Axml.FromXml(SubItem, 'PatchPcdValue')
                            PatchPcdValueList.append(Bxml)
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 1 other location - About 1 hr to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 101..104

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

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

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

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

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

        Refactorings

        Further Reading

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

                        for SubItem in XmlList(AsBuiltItem, 'AsBuilt/PcdExValue'):
                            Axml = PcdEntryXml()
                            Bxml = Axml.FromXml(SubItem, 'PcdExValue')
                            PcdExValueList.append(Bxml)
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 1 other location - About 1 hr to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 95..98

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

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

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

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

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

        Refactorings

        Further Reading

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

            def __init__(self):
                self.SourceFile = ''
                self.ToolChainFamily = ''
                self.FileType = ''
                self.CommonDefines = CommonDefinesXml()
        Severity: Minor
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 1 other location - About 50 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 192..196

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

            def __init__(self):
                self.HobType = ''
                self.Name = ''
                self.CommonDefines = CommonDefinesXml()
                self.HelpText = []
        Severity: Minor
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 1 other location - About 50 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 377..381

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

            def __init__(self):
                self.EventType = ''
                self.Name = ''
                self.CommonDefines = CommonDefinesXml()
                self.HelpText = []
        Severity: Minor
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 1 other location - About 50 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 422..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 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 2 locations. Consider refactoring.
        Open

            def __init__(self):
                self.Description = ''
                self.Guid = ''
                self.Version = ''
                self.CommonDefines = CommonDefinesXml()
        Severity: Minor
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 1 other location - About 50 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 469..473

        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

                for GuidProtocolPpi in Module.GetProtocolList():
                    Tmp = ProtocolXml('Module')
                    GuidProtocolPpiNode.appendChild(Tmp.ToXml(GuidProtocolPpi, 'Protocol'))
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 5 other locations - About 45 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 866..868
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 884..886
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 350..353
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 360..363
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 369..372

        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

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

                for GuidProtocolPpi in Module.GetPpiList():
                    Tmp = PpiXml('Module')
                    GuidProtocolPpiNode.appendChild(Tmp.ToXml(GuidProtocolPpi, 'Ppi'))
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 5 other locations - About 45 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 866..868
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 875..877
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 350..353
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 360..363
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 369..372

        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

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

                for GuidProtocolPpi in Module.GetGuidList():
                    Tmp = GuidXml('Module')
                    GuidProtocolPpiNode.appendChild(Tmp.ToXml(GuidProtocolPpi, 'GuidCName'))
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 5 other locations - About 45 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 875..877
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 884..886
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 350..353
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 360..363
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 369..372

        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

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

                    if len(GuiVerElemList) > 0:
                        LibGuidVerElem = CreateXmlElement('LibraryInstances', '', GuiVerElemList, [])
                        AsBuiltNodeList.append(LibGuidVerElem)
        Severity: Minor
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 1 other location - About 45 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 166..168

        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

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

                    for LibGuidVer in LibGuidVerList:
                        GuiVerElem = \
                        CreateXmlElement('GUID', LibGuidVer.GetLibGuid(), [], [['Version', LibGuidVer.GetLibVersion()]])
                        GuiVerElemList.append(GuiVerElem)
        Severity: Minor
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 1 other location - About 45 mins to fix
        BaseTools/Source/Python/UPT/Xml/PcdXml.py on lines 78..82

        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

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

                    if len(AsBuiltNodeList) > 0:
                        Element = CreateXmlElement('AsBuilt', '', AsBuiltNodeList, [])
                        NodeList.append(Element)
        Severity: Minor
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 1 other location - About 45 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 157..159

        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

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

                if XmlList(Item, '/ModuleSurfaceArea/Guids') and not XmlList(Item, '/ModuleSurfaceArea/Guids/GuidCName'):
                    Module.SetGuidList([None])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 699..701
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 711..713
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 723..725
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 734..736
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 757..758
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 768..769
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 779..780
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 791..793
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 197..199
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 210..212
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 234..236
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 246..248
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 258..260

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

                    if XmlList(Item, '/ModuleSurfaceArea/PcdCoded') and \
                        not XmlList(Item, '/ModuleSurfaceArea/PcdCoded/PcdEntry'):
                        Module.SetPcdList([None])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 699..701
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 711..713
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 723..725
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 734..736
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 746..747
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 757..758
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 768..769
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 779..780
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 197..199
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 210..212
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 234..236
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 246..248
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 258..260

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

                if XmlList(Item, '/ModuleSurfaceArea/Externs') and not XmlList(Item, '/ModuleSurfaceArea/Externs/Extern'):
                    Module.SetExternList([None])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 699..701
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 711..713
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 723..725
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 734..736
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 746..747
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 757..758
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 768..769
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 791..793
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 197..199
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 210..212
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 234..236
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 246..248
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 258..260

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

                if XmlList(Item, '/ModuleSurfaceArea/SourceFiles') and \
                   not XmlList(Item, '/ModuleSurfaceArea/SourceFiles/Filename') :
                    Module.SetSourceFileList([None])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 699..701
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 723..725
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 734..736
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 746..747
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 757..758
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 768..769
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 779..780
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 791..793
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 197..199
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 210..212
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 234..236
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 246..248
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 258..260

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

                if XmlList(Item, '/ModuleSurfaceArea/PackageDependencies') and \
                   not XmlList(Item, '/ModuleSurfaceArea/PackageDependencies/Package'):
                    Module.SetPackageDependencyList([None])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 699..701
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 711..713
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 723..725
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 746..747
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 757..758
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 768..769
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 779..780
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 791..793
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 197..199
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 210..212
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 234..236
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 246..248
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 258..260

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

                if XmlList(Item, '/ModuleSurfaceArea/Protocols') and not XmlList(Item, '/ModuleSurfaceArea/Protocols/Protocol'):
                    Module.SetProtocolList([None])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 699..701
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 711..713
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 723..725
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 734..736
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 746..747
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 768..769
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 779..780
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 791..793
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 197..199
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 210..212
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 234..236
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 246..248
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 258..260

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

                if XmlList(Item, '/ModuleSurfaceArea/BinaryFiles') and \
                   not XmlList(Item, '/ModuleSurfaceArea/BinaryFiles/BinaryFile') :
                    Module.SetBinaryFileList([None])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 699..701
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 711..713
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 734..736
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 746..747
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 757..758
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 768..769
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 779..780
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 791..793
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 197..199
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 210..212
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 234..236
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 246..248
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 258..260

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

                if XmlList(Item, '/ModuleSurfaceArea/LibraryClassDefinitions') and \
                   not XmlList(Item, '/ModuleSurfaceArea/LibraryClassDefinitions/LibraryClass'):
                    Module.SetLibraryClassList([None])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 711..713
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 723..725
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 734..736
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 746..747
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 757..758
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 768..769
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 779..780
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 791..793
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 197..199
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 210..212
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 234..236
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 246..248
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 258..260

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

                if XmlList(Item, '/ModuleSurfaceArea/PPIs') and not XmlList(Item, '/ModuleSurfaceArea/PPIs/Ppi'):
                    Module.SetPpiList([None])
        Severity: Major
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 15 other locations - About 40 mins to fix
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 699..701
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 711..713
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 723..725
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 734..736
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 746..747
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 757..758
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 779..780
        BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py on lines 791..793
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 185..187
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 197..199
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 210..212
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 222..224
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 234..236
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 246..248
        BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py on lines 258..260

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

                Str = "ModuleType = %s Path = %s PcdIsDriver = %s UefiSpecificationVersion = %s PiSpecificationVersion = %s \
                       Specification = %s SpecificationVersion = %s %s" % \
                (self.ModuleType, self.Path, self.PcdIsDriver, \
                 self.UefiSpecificationVersion, self.PiSpecificationVersion, \
                 self.SpecificationList, self.SpecificationVersion, self.CommonDefines)
        Severity: Minor
        Found in BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py and 1 other location - About 30 mins to fix
        BaseTools/Source/Python/UPT/Xml/CommonXml.py on lines 194..197

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 32.

        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