hackedteam/vector-edk

View on GitHub

Showing 3,985 of 13,510 total issues

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

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

    for Result in ResultSet:
        PSL.append([Result[0], Result[1], Result[2]])
Severity: Major
Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 55 mins to fix
BaseTools/Source/Python/Ecc/c.py on lines 1986..1987
BaseTools/Source/Python/Ecc/c.py on lines 2065..2066

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

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

    for Result in ResultSet:
        PSL.append([Result[0], Result[1], Result[2]])
Severity: Major
Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 55 mins to fix
BaseTools/Source/Python/Ecc/c.py on lines 1907..1908
BaseTools/Source/Python/Ecc/c.py on lines 1986..1987

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

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

    for Result in ResultSet:
        PSL.append([Result[0], Result[1], Result[2]])
Severity: Major
Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 55 mins to fix
BaseTools/Source/Python/Ecc/c.py on lines 1907..1908
BaseTools/Source/Python/Ecc/c.py on lines 2065..2066

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

        IfLine = Line[NewLine.find(TAB_IF_DEF) + len(TAB_IF_DEF) + 1:].strip()
Severity: Major
Found in BaseTools/Source/Python/Eot/Parser.py and 4 other locations - About 55 mins to fix
BaseTools/Source/Python/Eot/Parser.py on lines 273..273
BaseTools/Source/Python/Eot/Parser.py on lines 290..290
BaseTools/Source/Python/Eot/Parser.py on lines 297..297
BaseTools/Source/Python/Eot/Parser.py on lines 302..302

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

        IfLine = Line[NewLine.find(TAB_IF_N_DEF) + len(TAB_IF_N_DEF) + 1:].strip()
Severity: Major
Found in BaseTools/Source/Python/Eot/Parser.py and 4 other locations - About 55 mins to fix
BaseTools/Source/Python/Eot/Parser.py on lines 273..273
BaseTools/Source/Python/Eot/Parser.py on lines 283..283
BaseTools/Source/Python/Eot/Parser.py on lines 297..297
BaseTools/Source/Python/Eot/Parser.py on lines 302..302

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

        IfLine = Line[NewLine.find(TAB_IF_EXIST) + len(TAB_IF_EXIST) + 1:].strip()
Severity: Major
Found in BaseTools/Source/Python/Eot/Parser.py and 4 other locations - About 55 mins to fix
BaseTools/Source/Python/Eot/Parser.py on lines 283..283
BaseTools/Source/Python/Eot/Parser.py on lines 290..290
BaseTools/Source/Python/Eot/Parser.py on lines 297..297
BaseTools/Source/Python/Eot/Parser.py on lines 302..302

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

        IfLine = Line[NewLine.find(TAB_IF) + len(TAB_IF) + 1:].strip()
Severity: Major
Found in BaseTools/Source/Python/Eot/Parser.py and 4 other locations - About 55 mins to fix
BaseTools/Source/Python/Eot/Parser.py on lines 273..273
BaseTools/Source/Python/Eot/Parser.py on lines 283..283
BaseTools/Source/Python/Eot/Parser.py on lines 290..290
BaseTools/Source/Python/Eot/Parser.py on lines 302..302

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

        IfLine = Line[NewLine.find(TAB_ELSE_IF) + len(TAB_ELSE_IF) + 1:].strip()
Severity: Major
Found in BaseTools/Source/Python/Eot/Parser.py and 4 other locations - About 55 mins to fix
BaseTools/Source/Python/Eot/Parser.py on lines 273..273
BaseTools/Source/Python/Eot/Parser.py on lines 283..283
BaseTools/Source/Python/Eot/Parser.py on lines 290..290
BaseTools/Source/Python/Eot/Parser.py on lines 297..297

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

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

    try:
        db = dbopen(dbfile, 'c')
    except bsddb.error:
        sys.stderr.write("Unable to open %s.  " % dbfile)
        sys.stderr.write("Check for format or version mismatch.\n")
AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/db2pickle.py on lines 119..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 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

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

            if self.__Token == "COMPRESS" or self.__Token == "GUIDED":
                self.SetFileBufferPos(OldPos)
                return False
Severity: Minor
Found in BaseTools/Source/Python/GenFds/FdfParser.py and 1 other location - About 55 mins to fix
BaseTools/Source/Python/Common/FdfParserLite.py on lines 2450..2452

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

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

                if BuildNum != None and BuildNum != '':
                    BuildNumTuple = ('-j', BuildNum)
                else:
                    BuildNumTuple = tuple()
Severity: Minor
Found in BaseTools/Source/Python/GenFds/EfiSection.py and 1 other location - About 55 mins to fix
BaseTools/Source/Python/GenFds/EfiSection.py on lines 112..115

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

    if ModuleObject.GetPcdIsDriver():
        Statement = '%s = %s' % (DT.TAB_INF_DEFINES_PCD_IS_DRIVER, ModuleObject.GetPcdIsDriver())
        SpecialStatementList.append(Statement)
Severity: Major
Found in BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py and 3 other locations - About 55 mins to fix
BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py on lines 146..148
BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py on lines 152..155
BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py on lines 156..158

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

        if Type == DataType.TAB_PCDS_DYNAMIC_HII:
            Model = MODEL_PCD_DYNAMIC_HII
        elif Type == DataType.TAB_PCDS_DYNAMIC_EX_HII:
            Model = MODEL_PCD_DYNAMIC_EX_HII
Severity: Major
Found in BaseTools/Source/Python/Common/DscClassObject.py and 3 other locations - About 55 mins to fix
BaseTools/Source/Python/Common/DscClassObject.py on lines 465..468
BaseTools/Source/Python/Common/DscClassObject.py on lines 568..571
BaseTools/Source/Python/Common/DscClassObject.py on lines 682..685

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

Severity
Category
Status
Source
Language