hackedteam/vector-edk

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

Summary

Maintainability
F
1 wk
Test Coverage

File XmlParser.py has 542 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

    Function ValidateMS2 has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
    Open

    def ValidateMS2(Module, TopXmlTreeLevel):
        #
        # Check Header
        #
        XmlTreeLevel = TopXmlTreeLevel + ['Header']
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py - About 7 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 ValidateMS3 has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
    Open

    def ValidateMS3(Module, TopXmlTreeLevel):
        #
        # Check PackageDependencies -> Package
        #
        XmlTreeLevel = TopXmlTreeLevel + ['PackageDependencies']
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py - About 5 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

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

    def ValidateMS1(Module, TopXmlTreeLevel):
        #
        # Check Guids -> GuidCName
        #
        XmlTreeLevel = TopXmlTreeLevel + ['Guids']
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py - About 5 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function ValidateDistributionPackage has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
    Open

        def ValidateDistributionPackage(self):
            XmlTreeLevel = ['DistributionPackage']
            if self.DistP:
                #
                # Check DistributionPackage -> DistributionHeader
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.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 ValidatePS2 has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

    def ValidatePS2(Package):
        #
        # Check DistributionPackage -> PackageSurfaceArea -> Modules -> ModuleSurfaceArea
        #
        XmlTreeLevel = ['DistributionPackage', 'PackageSurfaceArea', 'Modules', 'ModuleSurfaceArea']
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.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 ValidatePS1 has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

    def ValidatePS1(Package):
        #
        # Check DistributionPackage -> PackageSurfaceArea -> Header
        #
        XmlTreeLevel = ['DistributionPackage', 'PackageSurfaceArea', 'Header']
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.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 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def ToXml(self, DistP):
            if self.DistP:
                pass
            if DistP != None:
                #
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.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 FromXml has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def FromXml(self, Filename=None):
            if Filename != None:
                self.DistP = DistributionPackageClass()
                #
                # Load to XML
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.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

                if self.DistP.Tools:
                    XmlTreeLevel = ['DistributionPackage', 'Tools', 'Header']
                    CheckDict = {'Name':self.DistP.Tools.GetName(), }
                    IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 1 other location - About 1 day to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 129..141

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

    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 self.DistP.MiscellaneousFiles:
                    XmlTreeLevel = ['DistributionPackage', 'MiscellaneousFiles', 'Header']
                    CheckDict = {'Name':self.DistP.MiscellaneousFiles.GetName(), }
                    IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 1 other location - About 1 day to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 112..124

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

    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 PcdErrorItem in PcdExItem.PcdErrorsList:
                        CheckDict = {'ErrorNumber':PcdErrorItem.ErrorNumber}
                        XmlTreeLevel = TopXmlTreeLevel + ['BinaryFiles', 'BinaryFile', 'AsBuilt',
                                                          'PcdExValue', 'PcdError']
                        IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 1 other location - About 1 hr to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 689..693

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

                    for PcdErrorItem in PatchPcdItem.PcdErrorsList:
                        CheckDict = {'ErrorNumber':PcdErrorItem.ErrorNumber}
                        XmlTreeLevel = TopXmlTreeLevel + ['BinaryFiles', 'BinaryFile', 'AsBuilt',
                                                          'PatchPcdValue', 'PcdError']
                        IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 1 other location - About 1 hr to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 707..711

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

                for Package in DistP.PackageSurfaceArea.values():
                    Psa = PackageSurfaceAreaXml()
                    DomPackage = Psa.ToXml(Package)
                    Root.appendChild(DomPackage)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 1 other location - About 1 hr to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 239..242

    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 Module in DistP.ModuleSurfaceArea.values():
                    Msa = ModuleSurfaceAreaXml()
                    DomModule = Msa.ToXml(Module)
                    Root.appendChild(DomModule)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 1 other location - About 1 hr to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 232..235

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

        for Item in Module.GetProtocolList():
            if Item == None:
                CheckDict = {'Protocol':''}
                IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

        for Item in Module.GetPackageDependencyList():
            if Item == None:
                CheckDict = {'Package':''}
                IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

        for Item in Module.GetLibraryClassList():
            if Item == None:
                CheckDict = {'LibraryClass':''}
                IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

        for Item in Package.GetPpiList():
            if Item == None:
                CheckDict = {'Entry':''}
                IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

        for Item in Module.GetPpiList():
            if Item == None:
                CheckDict = {'Ppi':''}
                IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

        for Item in Package.GetStandardIncludeFileList():
            if Item == None:
                CheckDict = {'IndustryStandardHeader':''}
                IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

        for Item in Module.GetSourceFileList():
            if Item == None:
                CheckDict = {'Filename':''}
                IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

        for Item in Package.GetGuidList():
            if Item == None:
                CheckDict = {'Entry':''}
                IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

        for Item in Module.GetBootModeList():
            CheckDict = {'Usage':Item.GetUsage(),
                         'SupportedBootModes':Item.GetSupportedBootModes()}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

        for Item in Module.GetHobList():
            CheckDict = {'Usage':Item.GetUsage(),
                         'HobType':Item.GetHobType()}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

        for Item in Package.GetGuidList():
            CheckDict = {'CName':Item.GetCName(),
                         'GuidValue':Item.GetGuid()}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

        for Item in Module.GetPcdList():
            if Item == None:
                CheckDict = {'PcdEntry':''}
                IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

        for Item in Package.GetPcdList():
            if Item == None:
                CheckDict = {'PcdEntry':''}
                IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871

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

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

            for File in Item.GetFileNameList():
                CheckDict = {'Filename':File.GetFilename(),
                             'FileType':File.GetFileType()}
                IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

        for Item in Package.GetUserExtensionList():
            CheckDict = {'UserId':Item.GetUserID(), 'Identifier':Item.GetIdentifier()}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877

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

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

        for Item in Module.GetExternList():
            if Item == None:
                CheckDict = {'Extern':''}
                IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

        for Item in Package.GetProtocolList():
            if Item == None:
                CheckDict = {'Entry':''}
                IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

        for Item in Module.GetPpiList():
            CheckDict = {'CName':Item.GetCName(),
                         'Usage':Item.GetUsage()}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

        for Item in Module.GetUserExtensionList():
            CheckDict = {'UserId':Item.GetUserID(), 'Identifier':Item.GetIdentifier()}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

        for Item in Module.GetProtocolList():
            CheckDict = {'CName':Item.GetCName(),
                         'Usage':Item.GetUsage()}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

        for Item in Module.GetEventList():
            CheckDict = {'Usage':Item.GetUsage(),
                         'EventType':Item.GetEventType()}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

        for Item in Package.GetProtocolList():
            CheckDict = {'CName':Item.GetCName(),
                         'GuidValue':Item.GetGuid()}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

        for Item in Package.GetPpiList():
            CheckDict = {'CName':Item.GetCName(),
                         'GuidValue':Item.GetGuid()}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

        for Item in Module.GetUserExtensionList():
            CheckDict = {'UserId':Item.GetUserID(), 'Identifier':Item.GetIdentifier()}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 789..792
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

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

        for Item in Module.GetGuidList():
            if Item == None:
                CheckDict = {'GuidCName':''}
                IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

        for Item in Package.GetPackageIncludeFileList():
            if Item == None:
                CheckDict = {'PackageHeader':''}
                IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 783..786
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

        for Item in Package.GetLibraryClassList():
            if Item == None:
                CheckDict = {'LibraryClass':''}
                IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 14 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 334..337
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 359..362
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 374..377
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 389..392
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 406..409
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 526..529
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 598..601
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 631..634
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 798..801
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 812..815
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 838..841
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 853..856
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 868..871
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 883..886

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

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

        for Item in Package.GetLibraryClassList():
            CheckDict = {'Keyword':Item.GetLibraryClass(),
                         'HeaderFile':Item.GetIncludeHeader()}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
    Severity: Major
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 12 other locations - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 365..368
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 380..383
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 430..432
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 479..482
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 488..491
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 497..500
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 655..658
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 740..742
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 844..847
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 859..862
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 874..877
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 902..904

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

    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 not IsValidInstallPath(Package.GetPackagePath()):
            Logger.Error("UPT", FORMAT_INVALID, ERR_FILE_NAME_INVALIDE % Package.GetPackagePath())
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 1 other location - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 472..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 37.

    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 not IsValidInstallPath(Module.GetModulePath()):
            Logger.Error("UPT", FORMAT_INVALID, ERR_FILE_NAME_INVALIDE % Module.GetModulePath())
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 1 other location - About 55 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 761..762

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

    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 hasattr(Item, 'SupModList') and len(Item.SupModList) > 0 and \
                   not IsEqualList(Item.SupModList, [Module.ModuleType]):
                    Logger.Error('\nUPT',
                         PARSER_ERROR,
                         ERR_XML_INVALID_EXTERN_SUPMODLIST_NOT_LIB % (str(Module.ModuleType), str(Item.SupModList)),
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 1 other location - About 50 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 420..423

    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

                if not IsEqualList(Item.SupArchList, Module.SupArchList):
                    Logger.Error('\nUPT',
                                 PARSER_ERROR,
                                 ERR_XML_INVALID_EXTERN_SUPARCHLIST % (str(Item.SupArchList), str(Module.SupArchList)),
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 1 other location - About 50 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 588..592

    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

            if Item and len(Item.FileNamList) > 0 and Item.FileNamList[0].FileType == 'DISPOSABLE':
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 1 other location - About 45 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 610..610

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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 Item and len(Item.FileNamList) > 0 and Item.FileNamList[0].FileType == 'FREEFORM':
    Severity: Minor
    Found in BaseTools/Source/Python/UPT/Xml/XmlParser.py and 1 other location - About 45 mins to fix
    BaseTools/Source/Python/UPT/Xml/XmlParser.py on lines 613..613

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 35.

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

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

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

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

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status