cea-sec/miasm

View on GitHub
miasm/arch/ppc/sem.py

Summary

Maintainability
F
2 wks
Test Coverage

File sem.py has 793 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from __future__ import print_function
from builtins import range

import miasm.expression.expression as expr
from miasm.ir.ir import AssignBlock, Lifter, IRBlock
Severity: Major
Found in miasm/arch/ppc/sem.py - About 1 day to fix

    Function get_ir has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
    Open

        def get_ir(self, instr):
            args = instr.args[:]
            if instr.name[0:5] in [ 'ADDIS', 'ORIS', 'XORIS', 'ANDIS' ]:
                args[2] = ExprInt(int(args[2]) << 16, 32)
            if instr.name[0:3] == 'ADD':
    Severity: Minor
    Found in miasm/arch/ppc/sem.py - About 4 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

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

    def mn_do_load(ir, instr, arg1, arg2, arg3=None):
        assert instr.name[0] == 'L'
    
        ret = []
    
    
    Severity: Minor
    Found in miasm/arch/ppc/sem.py - About 3 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function mn_do_cond_branch has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
    Open

    def mn_do_cond_branch(ir, instr, dest):
        bo = instr.additional_info.bo
        bi = instr.additional_info.bi
        ret = []
    
    
    Severity: Minor
    Found in miasm/arch/ppc/sem.py - About 2 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function mn_do_store has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
    Open

    def mn_do_store(ir, instr, arg1, arg2, arg3=None):
        assert instr.name[0:2] == 'ST'
    
        ret = []
        additional_ir = []
    Severity: Minor
    Found in miasm/arch/ppc/sem.py - About 2 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function mn_do_div has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

    def mn_do_div(ir, instr, rd, ra, rb):
        assert instr.name[0:4] == 'DIVW'
    
        flags_update = []
    
    
    Severity: Minor
    Found in miasm/arch/ppc/sem.py - About 1 hr to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function mn_do_add has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

    def mn_do_add(ir, instr, arg1, arg2, arg3):
        assert instr.name[0:3] == 'ADD'
    
        flags_update = []
    
    
    Severity: Minor
    Found in miasm/arch/ppc/sem.py - About 1 hr to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function mn_do_sub has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

    def mn_do_sub(ir, instr, arg1, arg2, arg3):
        assert instr.name[0:4] == 'SUBF'
    
        flags_update = []
    
    
    Severity: Minor
    Found in miasm/arch/ppc/sem.py - About 1 hr to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function mn_do_cr has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    def mn_do_cr(ir, instr, crd, cra, crb):
        a = crbit_to_reg(cra)
        b = crbit_to_reg(crb)
        d = crbit_to_reg(crd)
    
    
    Severity: Minor
    Found in miasm/arch/ppc/sem.py - About 55 mins to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function mn_do_rotate has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def mn_do_rotate(ir, instr, ra, rs, shift, mb, me):
    Severity: Major
    Found in miasm/arch/ppc/sem.py - About 50 mins to fix

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

      def mn_do_xor(ir, instr, ra, rs, rb):
      Severity: Minor
      Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

        def mn_do_nand(ir, instr, ra, rs, rb):
        Severity: Minor
        Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

          def mn_do_store(ir, instr, arg1, arg2, arg3=None):
          Severity: Minor
          Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

            def mn_do_lswi(ir, instr, rd, ra, nb):
            Severity: Minor
            Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

              def mn_do_srw(ir, instr, ra, rs, rb):
              Severity: Minor
              Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

                def mn_do_sub(ir, instr, arg1, arg2, arg3):
                Severity: Minor
                Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

                  def mn_do_lswx(ir, instr, rd, ra, nb):
                  Severity: Minor
                  Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

                    def mn_do_and(ir, instr, ra, rs, arg2):
                    Severity: Minor
                    Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

                      def mn_do_cr(ir, instr, crd, cra, crb):
                      Severity: Minor
                      Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

                        def mn_do_srawi(ir, instr, ra, rs, imm):
                        Severity: Minor
                        Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

                          def mn_do_load(ir, instr, arg1, arg2, arg3=None):
                          Severity: Minor
                          Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

                            def mn_do_mul(ir, instr, rd, ra, arg2):
                            Severity: Minor
                            Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

                              def mn_do_or(ir, instr, ra, rs, arg2):
                              Severity: Minor
                              Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

                                def mn_do_add(ir, instr, arg1, arg2, arg3):
                                Severity: Minor
                                Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

                                  def mn_do_div(ir, instr, rd, ra, rb):
                                  Severity: Minor
                                  Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

                                    def mn_do_nor(ir, instr, ra, rs, rb):
                                    Severity: Minor
                                    Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

                                      def mn_do_slw(ir, instr, ra, rs, rb):
                                      Severity: Minor
                                      Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

                                        def mn_do_sraw(ir, instr, ra, rs, rb):
                                        Severity: Minor
                                        Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

                                          def mn_do_eqv(ir, instr, ra, rs, rb):
                                          Severity: Minor
                                          Found in miasm/arch/ppc/sem.py - About 35 mins to fix

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

                                            def mn_do_mul(ir, instr, rd, ra, arg2):
                                                variant = instr.name[3:]
                                                if variant[-1] == '.':
                                                    variant = variant[:-2]
                                            
                                            
                                            Severity: Minor
                                            Found in miasm/arch/ppc/sem.py - About 35 mins to fix

                                            Cognitive Complexity

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

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

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

                                            Further reading

                                            Function mn_mtcrf has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                            def mn_mtcrf(ir, instr, crm, rs):
                                                ret = []
                                            
                                                for i in range(8):
                                                    if int(crm) & (1 << (7 - i)):
                                            Severity: Minor
                                            Found in miasm/arch/ppc/sem.py - About 25 mins to fix

                                            Cognitive Complexity

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

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

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

                                            Further reading

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

                                                for l in instr.name[4:]:
                                                    if l == '.':
                                                        has_dot = True
                                                    elif l == 'C':
                                                        has_c = True
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 7 hrs to fix
                                            miasm/arch/ppc/sem.py on lines 83..95

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                                for l in instr.name[3:]:
                                                    if l == '.':
                                                        has_dot = True
                                                    elif l == 'C':
                                                        has_c = True
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 7 hrs to fix
                                            miasm/arch/ppc/sem.py on lines 695..707

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

                                            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

                                            @sbuild.parse
                                            def mn_cmp_unsigned(arg1, arg2, arg3):
                                                crf_dict[arg1]['LT'] = expr.ExprOp(expr.TOK_INF_UNSIGNED, arg2, arg3)
                                                crf_dict[arg1]['GT'] = expr.ExprOp(expr.TOK_INF_UNSIGNED, arg3, arg2)
                                                crf_dict[arg1]['EQ'] = expr.ExprOp(expr.TOK_EQUAL, arg2, arg3)
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 7 hrs to fix
                                            miasm/arch/ppc/sem.py on lines 807..812

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

                                            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

                                            @sbuild.parse
                                            def mn_cmp_signed(arg1, arg2, arg3):
                                                crf_dict[arg1]['LT'] = expr.ExprOp(expr.TOK_INF_SIGNED, arg2, arg3)
                                                crf_dict[arg1]['GT'] = expr.ExprOp(expr.TOK_INF_SIGNED, arg3, arg2)
                                                crf_dict[arg1]['EQ'] = expr.ExprOp(expr.TOK_EQUAL, arg2, arg3)
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 7 hrs to fix
                                            miasm/arch/ppc/sem.py on lines 814..819

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

                                            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 instr.name[0:3] == 'ADD':
                                                        if instr.name[0:4] == 'ADDZ':
                                                            last_arg = ExprInt(0, 32)
                                                        elif instr.name[0:4] == 'ADDM':
                                                            last_arg = ExprInt(0xFFFFFFFF, 32)
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 6 hrs to fix
                                            miasm/arch/ppc/sem.py on lines 959..967

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

                                            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

                                                    elif instr.name[0:4] == 'SUBF':
                                                        if instr.name[0:5] == 'SUBFZ':
                                                            last_arg = ExprInt(0, 32)
                                                        elif instr.name[0:5] == 'SUBFM':
                                                            last_arg = ExprInt(0xFFFFFFFF, 32)
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 6 hrs to fix
                                            miasm/arch/ppc/sem.py on lines 913..921

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

                                            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

                                            float_dict = {
                                                0: FPR0, 1: FPR1, 2: FPR2, 3: FPR3, 4: FPR4, 5: FPR5, 6: FPR6, 7: FPR7, 8: FPR8,
                                                9: FPR9, 10: FPR10, 11: FPR11, 12: FPR12, 13: FPR13, 14: FPR14, 15: FPR15, 16: FPR16,
                                                17: FPR17, 18: FPR18, 19: FPR19, 20: FPR20, 21: FPR21, 22: FPR22, 23: FPR23, 24: FPR24,
                                                25: FPR25, 26: FPR26, 27: FPR27, 28: FPR28, 29: FPR29, 30: FPR30, 31: FPR31
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 3 hrs to fix
                                            miasm/arch/ppc/sem.py on lines 35..39

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

                                            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

                                            vex_dict = {
                                                0: VR0, 1: VR1, 2: VR2, 3: VR3, 4: VR4, 5: VR5, 6: VR6, 7: VR7, 8: VR8,
                                                9: VR9, 10: VR10, 11: VR11, 12: VR12, 13: VR13, 14: VR14, 15: VR15, 16: VR16,
                                                17: VR17, 18: VR18, 19: VR19, 20: VR20, 21: VR21, 22: VR22, 23: VR23, 24: VR24,
                                                25: VR25, 26: VR26, 27: VR27, 28: VR28, 29: VR29, 30: VR30, 31: VR31,
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 3 hrs to fix
                                            miasm/arch/ppc/sem.py on lines 28..32

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

                                            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 has_u:
                                                    if arg3 is None:
                                                        ret.append(ExprAssign(arg2.ptr.args[0], address))
                                                    else:
                                                        ret.append(ExprAssign(arg2, address))
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 2 hrs to fix
                                            miasm/arch/ppc/sem.py on lines 309..313

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 53.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                                if has_u:
                                                    if arg3 is None:
                                                        ret.append(ExprAssign(arg2.ptr.args[0], address))
                                                    else:
                                                        ret.append(ExprAssign(arg2, address))
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 2 hrs to fix
                                            miasm/arch/ppc/sem.py on lines 660..664

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 53.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                                if len(instr.name) > 2 and instr.name[2] == 'C':
                                                    oarg = ~arg2
                                                else:
                                                    oarg = arg2
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 2 hrs to fix
                                            miasm/arch/ppc/sem.py on lines 122..125

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 50.

                                            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(instr.name) > 3 and instr.name[3] == 'C':
                                                    oarg = ~arg2
                                                else:
                                                    oarg = arg2
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 2 hrs to fix
                                            miasm/arch/ppc/sem.py on lines 512..515

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

                                            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

                                                ret.append(ExprAssign(XER_CA, rs.msb() &
                                                                   ExprCond(rs & mask, ExprInt(1, 1), ExprInt(0, 1))))
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 1 hr to fix
                                            miasm/arch/ppc/sem.py on lines 589..590

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 46.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                                        if name[-1] == '+' or name[-1] == '-':
                                                            name = name[0:-1]
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 1 hr to fix
                                            miasm/arch/ppc/arch.py on lines 166..167

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 46.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                                ret.append(ExprAssign(XER_CA, rs.msb() &
                                                                   ExprCond(rs & mask, ExprInt(1, 1), ExprInt(0, 1))))
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 1 hr to fix
                                            miasm/arch/ppc/sem.py on lines 575..576

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 46.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                                    carry_expr = ((((arg3 ^ arg2) ^ rvalue) ^
                                                                   ((arg3 ^ rvalue) & (arg3 ^ arg2))).msb())
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 1 hr to fix
                                            miasm/expression/expression.py on lines 1894..1894

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 45.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                                rvalue = ExprCond(rb[5:6], ExprInt(0xFFFFFFFF, 32),
                                                                  ExprOp('a>>', rs, rb & ExprInt(0b11111, 32)))
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 1 hr to fix
                                            miasm/arch/ppc/sem.py on lines 555..556

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 41.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                                rvalue = ExprCond(rb[5:6], ExprInt(0, 32),
                                                                  ExprOp('<<', rs, rb & ExprInt(0b11111, 32)))
                                            Severity: Major
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 1 hr to fix
                                            miasm/arch/ppc/sem.py on lines 565..566

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 41.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                                if arg3 is None:
                                                    assert isinstance(arg2, ExprMem)
                                            
                                                    address = arg2.ptr
                                                else:
                                            Severity: Minor
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 55 mins to fix
                                            miasm/arch/ppc/sem.py on lines 291..296

                                            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 arg3 is None:
                                                    assert isinstance(arg2, ExprMem)
                                            
                                                    address = arg2.ptr
                                                else:
                                            Severity: Minor
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 55 mins to fix
                                            miasm/arch/ppc/sem.py on lines 646..651

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 37.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                                if instr.name[2] == 'S':
                                                    raise RuntimeError("STSWI, and STSWX need implementing")
                                                elif instr.name[2] == 'F':
                                                    print("Warning, instruction %s implemented as NOP" % instr)
                                                    return  [], []
                                            Severity: Minor
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 55 mins to fix
                                            miasm/arch/ppc/sem.py on lines 263..268

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 37.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                                elif instr.name[1] == 'F':
                                                    print("Warning, instruction %s implemented as NOP" % instr)
                                                    return  [], []
                                                elif instr.name[1] == 'V':
                                                    print("Warning, instruction %s implemented as NOP" % instr)
                                            Severity: Minor
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 55 mins to fix
                                            miasm/arch/ppc/sem.py on lines 622..626

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 37.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                                    over_expr = ExprCond(ra ^ ExprInt(0x80000000, 32),
                                                                         ExprInt(0, 1), ExprInt(1, 1))
                                            Severity: Minor
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 30 mins to fix
                                            miasm/arch/ppc/sem.py on lines 770..770

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 32.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                                    ctr_cond = ExprCond(CTR ^ ExprInt(1, 32), ExprInt(1, 1), ExprInt(0, 1))
                                            Severity: Minor
                                            Found in miasm/arch/ppc/sem.py and 1 other location - About 30 mins to fix
                                            miasm/arch/ppc/sem.py on lines 491..492

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 32.

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

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

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

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

                                            Refactorings

                                            Further Reading

                                            There are no issues that match your filters.

                                            Category
                                            Status