hackedteam/vector-edk

View on GitHub

Showing 3,985 of 13,510 total issues

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

AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5hkscs.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp932.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp949.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp950.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jis_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jisx0213.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jp.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_kr.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb18030.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb2312.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gbk.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/hz.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_1.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_2.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_3.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_ext.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_kr.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/johab.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jisx0213.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/big5.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/big5hkscs.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp932.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp949.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp950.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jis_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jisx0213.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jp.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_kr.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gb18030.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gb2312.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gbk.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/hz.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_1.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_2.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_3.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_ext.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_kr.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/johab.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jis.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jisx0213.py on lines 0..34

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

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

Severity: Major
Found in vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp949.py and 47 other locations - About 1 day to fix
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5hkscs.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp932.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp949.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp950.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jis_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jisx0213.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jp.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_kr.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb18030.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb2312.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gbk.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/hz.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_1.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_2.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_3.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_ext.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_kr.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/johab.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jisx0213.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/big5.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/big5hkscs.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp932.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp950.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jis_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jisx0213.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jp.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_kr.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gb18030.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gb2312.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gbk.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/hz.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_1.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_2.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_3.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_ext.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_kr.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/johab.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jis.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jis_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jisx0213.py on lines 0..34

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

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

AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5hkscs.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp932.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp949.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp950.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jis_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jisx0213.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jp.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_kr.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb18030.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb2312.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gbk.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/hz.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_1.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_2.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_3.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_ext.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_kr.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/johab.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jisx0213.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/big5.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/big5hkscs.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp932.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp949.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp950.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jis_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jisx0213.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jp.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_kr.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gb18030.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gb2312.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gbk.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/hz.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_1.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_2.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_3.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_ext.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_kr.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/johab.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jis.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jis_2004.py on lines 0..34

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

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

Severity: Major
Found in vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp950.py and 47 other locations - About 1 day to fix
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5hkscs.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp932.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp949.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp950.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jis_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jisx0213.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jp.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_kr.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb18030.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb2312.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gbk.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/hz.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_1.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_2.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_3.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_ext.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_kr.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/johab.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jisx0213.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/big5.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/big5hkscs.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp932.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp949.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jis_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jisx0213.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jp.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_kr.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gb18030.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gb2312.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gbk.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/hz.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_1.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_2.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_3.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_ext.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_kr.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/johab.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jis.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jis_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jisx0213.py on lines 0..34

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

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

AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5hkscs.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp932.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp949.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp950.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jis_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jisx0213.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jp.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_kr.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb18030.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb2312.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gbk.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/hz.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_1.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_3.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_ext.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_kr.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/johab.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jisx0213.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/big5.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/big5hkscs.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp932.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp949.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp950.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jis_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jisx0213.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jp.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_kr.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gb18030.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gb2312.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gbk.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/hz.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_1.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_2.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_3.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_ext.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_kr.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/johab.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jis.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jis_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jisx0213.py on lines 0..34

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

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

Severity: Major
Found in vector-uefi/fd/efi/StdLib/lib/python.27/encodings/johab.py and 47 other locations - About 1 day to fix
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5hkscs.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp932.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp949.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp950.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jis_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jisx0213.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jp.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_kr.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb18030.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb2312.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gbk.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/hz.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_1.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_2.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_3.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_ext.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_kr.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/johab.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jisx0213.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/big5.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/big5hkscs.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp932.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp949.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp950.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jis_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jisx0213.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jp.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_kr.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gb18030.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gb2312.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gbk.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/hz.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_1.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_2.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_3.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_ext.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_kr.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jis.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jis_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jisx0213.py on lines 0..34

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

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

AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5hkscs.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp932.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp949.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp950.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jis_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jisx0213.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jp.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_kr.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb18030.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb2312.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gbk.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/hz.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_1.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_2.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_3.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_ext.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_kr.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/johab.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis_2004.py on lines 0..34
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jisx0213.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/big5.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/big5hkscs.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp932.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp949.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/cp950.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jis_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jisx0213.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_jp.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/euc_kr.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gb18030.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gb2312.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/gbk.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/hz.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_1.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_2.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_3.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/iso2022_jp_ext.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/johab.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jis.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jis_2004.py on lines 0..34
vector-uefi/fd/efi/StdLib/lib/python.27/encodings/shift_jisx0213.py on lines 0..34

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

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 Constructor:
                Statement = '%s = %s' % (DT.TAB_INF_DEFINES_CONSTRUCTOR, Constructor)
                if FFE:
                    Statement += ' | %s' % FFE
                    
Severity: Major
Found in BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py and 3 other locations - About 1 day to fix
BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py on lines 33..41
BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py on lines 42..51
BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py on lines 62..71

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

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

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

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

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

Refactorings

Further Reading

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

    def __IsToken(self, String, IgnoreCase = False):
        self.__SkipWhiteSpace()

        # Only consider the same line, no multi-line token allowed
        StartPos = self.CurrentOffsetWithinLine
Severity: Major
Found in BaseTools/Source/Python/Common/FdfParserLite.py and 1 other location - About 1 day to fix
BaseTools/Source/Python/GenFds/FdfParser.py on lines 886..900

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

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 UnloadImage:
                Statement = '%s = %s' % (DT.TAB_INF_DEFINES_UNLOAD_IMAGE, UnloadImage)
                if FFE:
                    Statement += ' | %s' % FFE
                
Severity: Major
Found in BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py and 3 other locations - About 1 day to fix
BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py on lines 33..41
BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py on lines 52..61
BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py on lines 62..71

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

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 Destructor:
                Statement = '%s = %s' % (DT.TAB_INF_DEFINES_DESTRUCTOR, Destructor)
                if FFE:
                    Statement += ' | %s' % FFE
                    
Severity: Major
Found in BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py and 3 other locations - About 1 day to fix
BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py on lines 33..41
BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py on lines 42..51
BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py on lines 52..61

Duplicated Code

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

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

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

Tuning

This issue has a mass of 138.

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 EntryPoint:
                Statement = '%s = %s' % (DT.TAB_INF_DEFINES_ENTRY_POINT, EntryPoint)
                if FFE:
                    Statement += ' | %s' % FFE
                if len(HelpStringList) > 0:
Severity: Major
Found in BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py and 3 other locations - About 1 day to fix
BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py on lines 42..51
BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py on lines 52..61
BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py on lines 62..71

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

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

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

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

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

Refactorings

Further Reading

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

    def __IsToken(self, String, IgnoreCase = False):
        self.__SkipWhiteSpace()

        # Only consider the same line, no multi-line token allowed
        StartPos = self.CurrentOffsetWithinLine
Severity: Major
Found in BaseTools/Source/Python/GenFds/FdfParser.py and 1 other location - About 1 day to fix
BaseTools/Source/Python/Common/FdfParserLite.py on lines 776..790

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

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

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

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

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

Refactorings

Further Reading

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

    if len(ItemList) > 5:
        RaiseParserError\
        (Item[0], 'LibraryClasses', ContainerFile, \
         '<LibraryClassKeyWord>[|<LibraryInstance>]\
         [|<TokenSpaceGuidCName>.<PcdCName>]')
Severity: Major
Found in BaseTools/Source/Python/UPT/Library/Parsing.py and 1 other location - About 1 day to fix
BaseTools/Source/Python/Common/Parsing.py on lines 278..286

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

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

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

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

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

Refactorings

Further Reading

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

    if len(ItemList) > 5:
        RaiseParserError(Item[0], 'LibraryClasses', ContainerFile, '<LibraryClassKeyWord>[|<LibraryInstance>][|<TokenSpaceGuidCName>.<PcdCName>]')
    else:
        CheckFileType(ItemList[1], '.Inf', ContainerFile, 'LibraryClasses', Item[0], LineNo)
        CheckFileExist(WorkspaceDir, ItemList[1], ContainerFile, 'LibraryClasses', Item[0], LineNo)
Severity: Major
Found in BaseTools/Source/Python/Common/Parsing.py and 1 other location - About 1 day to fix
BaseTools/Source/Python/UPT/Library/Parsing.py on lines 108..122

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

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

class BinaryBuildFlagObject(object):
    def __init__(self):
        self.Target = ''
        self.TagName = ''
        self.Family = ''
Severity: Major
Found in BaseTools/Source/Python/UPT/Object/POM/ModuleObject.py and 1 other location - About 1 day to fix
BaseTools/Source/Python/UPT/Object/POM/CommonObject.py on lines 90..119

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

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

class CommonHeaderObject(object):
    def __init__(self):
        self.Abstract = ''
        self.Description = ''
        self.Copyright = ''
Severity: Major
Found in BaseTools/Source/Python/UPT/Object/POM/CommonObject.py and 1 other location - About 1 day to fix
BaseTools/Source/Python/UPT/Object/POM/ModuleObject.py on lines 341..369

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

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

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

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

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

Refactorings

Further Reading

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

class SecondImport(Test):

    version = 2.0
    operations = 5 * 5
    rounds = 40000
AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Imports.py on lines 52..93
AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Imports.py on lines 96..137

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

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

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

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

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

Refactorings

Further Reading

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

class SecondPackageImport(Test):

    version = 2.0
    operations = 5 * 5
    rounds = 40000
AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Imports.py on lines 7..48
AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Imports.py on lines 96..137

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

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

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

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

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

Refactorings

Further Reading

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

class SecondSubmoduleImport(Test):

    version = 2.0
    operations = 5 * 5
    rounds = 40000
AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Imports.py on lines 7..48
AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Imports.py on lines 52..93

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

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