cea-sec/miasm

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

Summary

Maintainability
F
1 mo
Test Coverage

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

from builtins import range
from future.utils import viewitems

from miasm.expression.expression import ExprId, ExprInt, ExprLoc, ExprMem, \
    ExprCond, ExprCompose, ExprOp, ExprAssign
Severity: Major
Found in miasm/arch/aarch64/sem.py - About 4 days to fix

    Consider simplifying this complex logical expression.
    Open

        if arg1.is_int(3) and arg2.is_int(3) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(0):
            e.append(ExprAssign(nf, arg6[31:32]))
            e.append(ExprAssign(zf, arg6[30:31]))
            e.append(ExprAssign(cf, arg6[29:30]))
            e.append(ExprAssign(of, arg6[28:29]))
    Severity: Critical
    Found in miasm/arch/aarch64/sem.py - About 1 day to fix

      Consider simplifying this complex logical expression.
      Open

          if arg2.is_int(3) and arg3.is_int(3) and arg4.is_id("c4") and arg5.is_id("c2") and arg6.is_int(0):
              out = []
              out.append(ExprInt(0x0, 28))
              out.append(of)
              out.append(cf)
      Severity: Critical
      Found in miasm/arch/aarch64/sem.py - About 1 day to fix

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

        def get_mem_access(mem):
            updt = None
            if isinstance(mem, ExprOp):
                if mem.op == 'preinc':
                    if len(mem.args) == 1:
        Severity: Minor
        Found in miasm/arch/aarch64/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 mrs has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

        def mrs(ir, insr, arg1, arg2, arg3, arg4, arg5, arg6):
            e = []
            if arg2.is_int(3) and arg3.is_int(3) and arg4.is_id("c4") and arg5.is_id("c2") and arg6.is_int(0):
                out = []
                out.append(ExprInt(0x0, 28))
        Severity: Minor
        Found in miasm/arch/aarch64/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 msr has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

        def msr(ir, instr, arg1, arg2, arg3, arg4, arg5, arg6):
        
            e = []
            if arg1.is_int(3) and arg2.is_int(3) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(0):
                e.append(ExprAssign(nf, arg6[31:32]))
        Severity: Minor
        Found in miasm/arch/aarch64/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 extend_arg has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

        def extend_arg(dst, arg):
            if not isinstance(arg, ExprOp):
                return arg
        
            op, (reg, shift) = arg.op, arg.args
        Severity: Minor
        Found in miasm/arch/aarch64/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 mrs has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def mrs(ir, insr, arg1, arg2, arg3, arg4, arg5, arg6):
        Severity: Major
        Found in miasm/arch/aarch64/sem.py - About 1 hr to fix

          Function msr has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def msr(ir, instr, arg1, arg2, arg3, arg4, arg5, arg6):
          Severity: Major
          Found in miasm/arch/aarch64/sem.py - About 1 hr to fix

            Function csinv has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def csinv(ir, instr, arg1, arg2, arg3, arg4):
            Severity: Minor
            Found in miasm/arch/aarch64/sem.py - About 45 mins to fix

              Function ubfm has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def ubfm(ir, instr, arg1, arg2, arg3, arg4):
              Severity: Minor
              Found in miasm/arch/aarch64/sem.py - About 45 mins to fix

                Function ccmp has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def ccmp(ir, instr, arg1, arg2, arg3, arg4):
                Severity: Minor
                Found in miasm/arch/aarch64/sem.py - About 45 mins to fix

                  Function csinc has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def csinc(ir, instr, arg1, arg2, arg3, arg4):
                  Severity: Minor
                  Found in miasm/arch/aarch64/sem.py - About 45 mins to fix

                    Function fmsub has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def fmsub(ir, instr, arg1, arg2, arg3, arg4):
                    Severity: Minor
                    Found in miasm/arch/aarch64/sem.py - About 45 mins to fix

                      Function sbfm has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def sbfm(ir, instr, arg1, arg2, arg3, arg4):
                      Severity: Minor
                      Found in miasm/arch/aarch64/sem.py - About 45 mins to fix

                        Function csneg has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def csneg(ir, instr, arg1, arg2, arg3, arg4):
                        Severity: Minor
                        Found in miasm/arch/aarch64/sem.py - About 45 mins to fix

                          Function fmadd has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def fmadd(ir, instr, arg1, arg2, arg3, arg4):
                          Severity: Minor
                          Found in miasm/arch/aarch64/sem.py - About 45 mins to fix

                            Function bfm has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def bfm(ir, instr, arg1, arg2, arg3, arg4):
                            Severity: Minor
                            Found in miasm/arch/aarch64/sem.py - About 45 mins to fix

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        def mod_pc(self, instr, instr_ir, extra_ir):
                                                                            "Replace PC by the instruction's offset"
                                                                            cur_offset = ExprInt(instr.offset, 64)
                                                                            pc_fixed = {self.pc: cur_offset}
                                                                            for i, expr in enumerate(instr_ir):
                                                                    Severity: Minor
                                                                    Found in miasm/arch/aarch64/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 irbloc_fix_regs_for_mode has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                    Open

                                                                        def irbloc_fix_regs_for_mode(self, irblock, mode=64):
                                                                            irs = []
                                                                            for assignblk in irblock:
                                                                                new_assignblk = dict(assignblk)
                                                                                for dst, src in viewitems(assignblk):
                                                                    Severity: Minor
                                                                    Found in miasm/arch/aarch64/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 fmov has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                    Open

                                                                    def fmov(ir, instr, arg1, arg2):
                                                                        if arg2.is_int():
                                                                            # Transform int to signed floating-point constant with 3-bit exponent
                                                                            # and normalized 4 bits of precision
                                                                            # VFPExpandImm() of ARM Architecture Reference Manual
                                                                    Severity: Minor
                                                                    Found in miasm/arch/aarch64/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

                                                                        if sim > rim:
                                                                            res = arg2[rim:sim].signExtend(arg1.size)
                                                                        else:
                                                                            shift = ExprInt(arg2.size - rim, arg2.size)
                                                                            res = (arg2[:sim].signExtend(arg1.size) << shift)
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 4 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1479..1483

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

                                                                    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 sim > rim:
                                                                            res = arg2[rim:sim].zeroExtend(arg1.size)
                                                                        else:
                                                                            shift = ExprInt(arg2.size - rim, arg2.size)
                                                                            res = (arg2[:sim].zeroExtend(arg1.size) << shift)
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 4 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1454..1458

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

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def scvtf(ir, instr, arg1, arg2):
                                                                        # XXX TODO: rounding
                                                                        e = []
                                                                        src = ExprOp('sint_to_fp', arg2)
                                                                        if arg1.size != src.size:
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 4 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 2026..2033

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

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def ucvtf(ir, instr, arg1, arg2):
                                                                        # XXX TODO: rounding
                                                                        e = []
                                                                        src = ExprOp('uint_to_fp', arg2)
                                                                        if arg1.size != src.size:
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 4 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 2016..2023

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

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def ldrs_size(ir, instr, arg1, arg2, size):
                                                                        e = []
                                                                        addr, updt = get_mem_access(arg2)
                                                                        e.append(
                                                                            ExprAssign(arg1, ExprMem(addr, size).signExtend(arg1.size)))
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 3 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1319..1326

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

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def ldr_size(ir, instr, arg1, arg2, size):
                                                                        e = []
                                                                        addr, updt = get_mem_access(arg2)
                                                                        e.append(
                                                                            ExprAssign(arg1, ExprMem(addr, size).zeroExtend(arg1.size)))
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 3 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1337..1344

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

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def strb(ir, instr, arg1, arg2):
                                                                        e = []
                                                                        addr, updt = get_mem_access(arg2)
                                                                        e.append(ExprAssign(ExprMem(addr, 8), arg1[:8]))
                                                                        if updt:
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 3 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1420..1426

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

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def strh(ir, instr, arg1, arg2):
                                                                        e = []
                                                                        addr, updt = get_mem_access(arg2)
                                                                        e.append(ExprAssign(ExprMem(addr, 16), arg1[:16]))
                                                                        if updt:
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 3 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1411..1417

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

                                                                    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

                                                                            for idx, irblock in enumerate(extra_ir):
                                                                                extra_ir[idx] = irblock.modify_exprs(lambda expr: expr.replace_expr(pc_fixed) \
                                                                                                                     if expr != self.pc else expr,
                                                                                                                     lambda expr: expr.replace_expr(pc_fixed))
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 3 hrs to fix
                                                                    miasm/arch/x86/sem.py on lines 5932..5935

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

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def cset(ir, instr, arg1, arg2):
                                                                        e = []
                                                                        cond_expr = cond2expr[arg2.name]
                                                                        e.append(
                                                                            ExprAssign(
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 3 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1253..1266

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

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def csetm(ir, instr, arg1, arg2):
                                                                        e = []
                                                                        cond_expr = cond2expr[arg2.name]
                                                                        e.append(
                                                                            ExprAssign(
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 3 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1237..1250

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

                                                                    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 check_ops_msb(a, b, c):
                                                                        if not a or not b or not c or a != b or a != c:
                                                                            raise ValueError('bad ops size %s %s %s' % (a, b, c))
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 2 hrs to fix
                                                                    miasm/arch/x86/sem.py on lines 184..186

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

                                                                    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 update_flag_arith_add_zn(arg1, arg2):
                                                                        """
                                                                        Compute zf and nf flags for (arg1 + arg2)
                                                                        """
                                                                        e = []
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 2 hrs to fix
                                                                    miasm/arch/msp430/sem.py on lines 82..89

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

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

                                                                    @sbuild.parse
                                                                    def b_pl(arg1):
                                                                        cond = cond2expr['PL']
                                                                        dst = arg1 if cond else ExprLoc(ir.get_next_loc_key(instr), 64)
                                                                        PC = dst
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 11 other locations - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1725..1730
                                                                    miasm/arch/aarch64/sem.py on lines 1733..1738
                                                                    miasm/arch/aarch64/sem.py on lines 1741..1746
                                                                    miasm/arch/aarch64/sem.py on lines 1749..1754
                                                                    miasm/arch/aarch64/sem.py on lines 1765..1770
                                                                    miasm/arch/aarch64/sem.py on lines 1773..1778
                                                                    miasm/arch/aarch64/sem.py on lines 1781..1786
                                                                    miasm/arch/aarch64/sem.py on lines 1789..1794
                                                                    miasm/arch/aarch64/sem.py on lines 1797..1802
                                                                    miasm/arch/aarch64/sem.py on lines 1805..1810
                                                                    miasm/arch/aarch64/sem.py on lines 1813..1818

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

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

                                                                    @sbuild.parse
                                                                    def b_cc(arg1):
                                                                        cond = cond2expr['CC']
                                                                        dst = arg1 if cond else ExprLoc(ir.get_next_loc_key(instr), 64)
                                                                        PC = dst
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 11 other locations - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1725..1730
                                                                    miasm/arch/aarch64/sem.py on lines 1733..1738
                                                                    miasm/arch/aarch64/sem.py on lines 1741..1746
                                                                    miasm/arch/aarch64/sem.py on lines 1749..1754
                                                                    miasm/arch/aarch64/sem.py on lines 1757..1762
                                                                    miasm/arch/aarch64/sem.py on lines 1765..1770
                                                                    miasm/arch/aarch64/sem.py on lines 1781..1786
                                                                    miasm/arch/aarch64/sem.py on lines 1789..1794
                                                                    miasm/arch/aarch64/sem.py on lines 1797..1802
                                                                    miasm/arch/aarch64/sem.py on lines 1805..1810
                                                                    miasm/arch/aarch64/sem.py on lines 1813..1818

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

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

                                                                    @sbuild.parse
                                                                    def b_ne(arg1):
                                                                        cond = cond2expr['NE']
                                                                        dst = arg1 if cond else ExprLoc(ir.get_next_loc_key(instr), 64)
                                                                        PC = dst
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 11 other locations - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1733..1738
                                                                    miasm/arch/aarch64/sem.py on lines 1741..1746
                                                                    miasm/arch/aarch64/sem.py on lines 1749..1754
                                                                    miasm/arch/aarch64/sem.py on lines 1757..1762
                                                                    miasm/arch/aarch64/sem.py on lines 1765..1770
                                                                    miasm/arch/aarch64/sem.py on lines 1773..1778
                                                                    miasm/arch/aarch64/sem.py on lines 1781..1786
                                                                    miasm/arch/aarch64/sem.py on lines 1789..1794
                                                                    miasm/arch/aarch64/sem.py on lines 1797..1802
                                                                    miasm/arch/aarch64/sem.py on lines 1805..1810
                                                                    miasm/arch/aarch64/sem.py on lines 1813..1818

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

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

                                                                    @sbuild.parse
                                                                    def b_cs(arg1):
                                                                        cond = cond2expr['CS']
                                                                        dst = arg1 if cond else ExprLoc(ir.get_next_loc_key(instr), 64)
                                                                        PC = dst
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 11 other locations - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1725..1730
                                                                    miasm/arch/aarch64/sem.py on lines 1733..1738
                                                                    miasm/arch/aarch64/sem.py on lines 1741..1746
                                                                    miasm/arch/aarch64/sem.py on lines 1749..1754
                                                                    miasm/arch/aarch64/sem.py on lines 1757..1762
                                                                    miasm/arch/aarch64/sem.py on lines 1765..1770
                                                                    miasm/arch/aarch64/sem.py on lines 1773..1778
                                                                    miasm/arch/aarch64/sem.py on lines 1789..1794
                                                                    miasm/arch/aarch64/sem.py on lines 1797..1802
                                                                    miasm/arch/aarch64/sem.py on lines 1805..1810
                                                                    miasm/arch/aarch64/sem.py on lines 1813..1818

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

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

                                                                    @sbuild.parse
                                                                    def b_ge(arg1):
                                                                        cond = cond2expr['GE']
                                                                        dst = arg1 if cond else ExprLoc(ir.get_next_loc_key(instr), 64)
                                                                        PC = dst
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 11 other locations - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1725..1730
                                                                    miasm/arch/aarch64/sem.py on lines 1733..1738
                                                                    miasm/arch/aarch64/sem.py on lines 1749..1754
                                                                    miasm/arch/aarch64/sem.py on lines 1757..1762
                                                                    miasm/arch/aarch64/sem.py on lines 1765..1770
                                                                    miasm/arch/aarch64/sem.py on lines 1773..1778
                                                                    miasm/arch/aarch64/sem.py on lines 1781..1786
                                                                    miasm/arch/aarch64/sem.py on lines 1789..1794
                                                                    miasm/arch/aarch64/sem.py on lines 1797..1802
                                                                    miasm/arch/aarch64/sem.py on lines 1805..1810
                                                                    miasm/arch/aarch64/sem.py on lines 1813..1818

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

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

                                                                    @sbuild.parse
                                                                    def b_hi(arg1):
                                                                        cond = cond2expr['HI']
                                                                        dst = arg1 if cond else ExprLoc(ir.get_next_loc_key(instr), 64)
                                                                        PC = dst
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 11 other locations - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1725..1730
                                                                    miasm/arch/aarch64/sem.py on lines 1733..1738
                                                                    miasm/arch/aarch64/sem.py on lines 1741..1746
                                                                    miasm/arch/aarch64/sem.py on lines 1749..1754
                                                                    miasm/arch/aarch64/sem.py on lines 1757..1762
                                                                    miasm/arch/aarch64/sem.py on lines 1765..1770
                                                                    miasm/arch/aarch64/sem.py on lines 1773..1778
                                                                    miasm/arch/aarch64/sem.py on lines 1781..1786
                                                                    miasm/arch/aarch64/sem.py on lines 1797..1802
                                                                    miasm/arch/aarch64/sem.py on lines 1805..1810
                                                                    miasm/arch/aarch64/sem.py on lines 1813..1818

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

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

                                                                    @sbuild.parse
                                                                    def b_le(arg1):
                                                                        cond = cond2expr['LE']
                                                                        dst = arg1 if cond else ExprLoc(ir.get_next_loc_key(instr), 64)
                                                                        PC = dst
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 11 other locations - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1725..1730
                                                                    miasm/arch/aarch64/sem.py on lines 1733..1738
                                                                    miasm/arch/aarch64/sem.py on lines 1741..1746
                                                                    miasm/arch/aarch64/sem.py on lines 1749..1754
                                                                    miasm/arch/aarch64/sem.py on lines 1757..1762
                                                                    miasm/arch/aarch64/sem.py on lines 1765..1770
                                                                    miasm/arch/aarch64/sem.py on lines 1773..1778
                                                                    miasm/arch/aarch64/sem.py on lines 1781..1786
                                                                    miasm/arch/aarch64/sem.py on lines 1789..1794
                                                                    miasm/arch/aarch64/sem.py on lines 1805..1810
                                                                    miasm/arch/aarch64/sem.py on lines 1813..1818

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

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

                                                                    @sbuild.parse
                                                                    def b_ls(arg1):
                                                                        cond = cond2expr['LS']
                                                                        dst = arg1 if cond else ExprLoc(ir.get_next_loc_key(instr), 64)
                                                                        PC = dst
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 11 other locations - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1725..1730
                                                                    miasm/arch/aarch64/sem.py on lines 1733..1738
                                                                    miasm/arch/aarch64/sem.py on lines 1741..1746
                                                                    miasm/arch/aarch64/sem.py on lines 1749..1754
                                                                    miasm/arch/aarch64/sem.py on lines 1757..1762
                                                                    miasm/arch/aarch64/sem.py on lines 1765..1770
                                                                    miasm/arch/aarch64/sem.py on lines 1773..1778
                                                                    miasm/arch/aarch64/sem.py on lines 1781..1786
                                                                    miasm/arch/aarch64/sem.py on lines 1789..1794
                                                                    miasm/arch/aarch64/sem.py on lines 1797..1802
                                                                    miasm/arch/aarch64/sem.py on lines 1813..1818

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

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

                                                                    @sbuild.parse
                                                                    def b_eq(arg1):
                                                                        cond = cond2expr['EQ']
                                                                        dst = arg1 if cond else ExprLoc(ir.get_next_loc_key(instr), 64)
                                                                        PC = dst
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 11 other locations - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1725..1730
                                                                    miasm/arch/aarch64/sem.py on lines 1741..1746
                                                                    miasm/arch/aarch64/sem.py on lines 1749..1754
                                                                    miasm/arch/aarch64/sem.py on lines 1757..1762
                                                                    miasm/arch/aarch64/sem.py on lines 1765..1770
                                                                    miasm/arch/aarch64/sem.py on lines 1773..1778
                                                                    miasm/arch/aarch64/sem.py on lines 1781..1786
                                                                    miasm/arch/aarch64/sem.py on lines 1789..1794
                                                                    miasm/arch/aarch64/sem.py on lines 1797..1802
                                                                    miasm/arch/aarch64/sem.py on lines 1805..1810
                                                                    miasm/arch/aarch64/sem.py on lines 1813..1818

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

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

                                                                    @sbuild.parse
                                                                    def b_mi(arg1):
                                                                        cond = cond2expr['MI']
                                                                        dst = arg1 if cond else ExprLoc(ir.get_next_loc_key(instr), 64)
                                                                        PC = dst
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 11 other locations - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1725..1730
                                                                    miasm/arch/aarch64/sem.py on lines 1733..1738
                                                                    miasm/arch/aarch64/sem.py on lines 1741..1746
                                                                    miasm/arch/aarch64/sem.py on lines 1757..1762
                                                                    miasm/arch/aarch64/sem.py on lines 1765..1770
                                                                    miasm/arch/aarch64/sem.py on lines 1773..1778
                                                                    miasm/arch/aarch64/sem.py on lines 1781..1786
                                                                    miasm/arch/aarch64/sem.py on lines 1789..1794
                                                                    miasm/arch/aarch64/sem.py on lines 1797..1802
                                                                    miasm/arch/aarch64/sem.py on lines 1805..1810
                                                                    miasm/arch/aarch64/sem.py on lines 1813..1818

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

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

                                                                    @sbuild.parse
                                                                    def b_gt(arg1):
                                                                        cond = cond2expr['GT']
                                                                        dst = arg1 if cond else ExprLoc(ir.get_next_loc_key(instr), 64)
                                                                        PC = dst
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 11 other locations - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1725..1730
                                                                    miasm/arch/aarch64/sem.py on lines 1733..1738
                                                                    miasm/arch/aarch64/sem.py on lines 1741..1746
                                                                    miasm/arch/aarch64/sem.py on lines 1749..1754
                                                                    miasm/arch/aarch64/sem.py on lines 1757..1762
                                                                    miasm/arch/aarch64/sem.py on lines 1773..1778
                                                                    miasm/arch/aarch64/sem.py on lines 1781..1786
                                                                    miasm/arch/aarch64/sem.py on lines 1789..1794
                                                                    miasm/arch/aarch64/sem.py on lines 1797..1802
                                                                    miasm/arch/aarch64/sem.py on lines 1805..1810
                                                                    miasm/arch/aarch64/sem.py on lines 1813..1818

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

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

                                                                    @sbuild.parse
                                                                    def b_lt(arg1):
                                                                        cond = cond2expr['LT']
                                                                        dst = arg1 if cond else ExprLoc(ir.get_next_loc_key(instr), 64)
                                                                        PC = dst
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 11 other locations - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1725..1730
                                                                    miasm/arch/aarch64/sem.py on lines 1733..1738
                                                                    miasm/arch/aarch64/sem.py on lines 1741..1746
                                                                    miasm/arch/aarch64/sem.py on lines 1749..1754
                                                                    miasm/arch/aarch64/sem.py on lines 1757..1762
                                                                    miasm/arch/aarch64/sem.py on lines 1765..1770
                                                                    miasm/arch/aarch64/sem.py on lines 1773..1778
                                                                    miasm/arch/aarch64/sem.py on lines 1781..1786
                                                                    miasm/arch/aarch64/sem.py on lines 1789..1794
                                                                    miasm/arch/aarch64/sem.py on lines 1797..1802
                                                                    miasm/arch/aarch64/sem.py on lines 1805..1810

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

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def cmp(ir, instr, arg1, arg2):
                                                                        e = []
                                                                        arg2 = extend_arg(arg1, arg2)
                                                                    
                                                                        e += update_flag_arith_sub_zn(arg1, arg2)
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1072..1079

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

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def cmn(ir, instr, arg1, arg2):
                                                                        e = []
                                                                        arg2 = extend_arg(arg1, arg2)
                                                                    
                                                                        e += update_flag_arith_add_zn(arg1, arg2)
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1062..1069

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

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def update_flag_arith_subwc_zn(arg1, arg2, arg3):
                                                                        """
                                                                        Compute znp flags for (arg1 - (arg2 + cf))
                                                                        """
                                                                        e = []
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 838..845

                                                                    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

                                                                    def update_flag_arith_addwc_zn(arg1, arg2, arg3):
                                                                        """
                                                                        Compute znp flags for (arg1 + arg2 + cf)
                                                                        """
                                                                        e = []
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 848..855

                                                                    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

                                                                        def __init__(self, loc_db):
                                                                            Lifter.__init__(self, mn_aarch64, "l", loc_db)
                                                                            self.pc = PC
                                                                            self.sp = SP
                                                                            self.IRDst = ExprId('IRDst', 64)
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 2379..2386

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

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def fcvtzs(ir, instr, arg1, arg2):
                                                                        # XXX TODO: rounding
                                                                        e = []
                                                                        e.append(
                                                                            ExprAssign(
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 2050..2061

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

                                                                    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 Lifter_Aarch64b(Lifter_Aarch64l):
                                                                    
                                                                        def __init__(self, loc_db):
                                                                            Lifter.__init__(self, mn_aarch64, "b", loc_db)
                                                                            self.pc = PC
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 2295..2300

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

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def fcvtzu(ir, instr, arg1, arg2):
                                                                        # XXX TODO: rounding
                                                                        e = []
                                                                        e.append(
                                                                            ExprAssign(
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 2036..2047

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

                                                                    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

                                                                            sreg = (int(arg2), int(arg3), int(str(arg4)[1:]), int(str(arg5)[1:]), int(arg6))
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1610..1610

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 51.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                            sreg = (int(arg1), int(arg2), int(str(arg3)[1:]), int(str(arg4)[1:]), int(arg5))
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 2 hrs to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1565..1565

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 51.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def update_flag_arith_sub_zn(arg1, arg2):
                                                                        """
                                                                        Compute zf and nf flags for (arg1 - arg2)
                                                                        """
                                                                        e = []
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 2 hrs to fix
                                                                    miasm/arch/msp430/sem.py on lines 72..79

                                                                    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

                                                                    def fmadd(ir, instr, arg1, arg2, arg3, arg4):
                                                                        e = []
                                                                        e.append(
                                                                            ExprAssign(
                                                                                arg1,
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1993..2005

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

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def fmsub(ir, instr, arg1, arg2, arg3, arg4):
                                                                        e = []
                                                                        e.append(
                                                                            ExprAssign(
                                                                                arg1,
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1978..1990

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

                                                                    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

                                                                    @sbuild.parse
                                                                    def umsubbl(arg1, arg2, arg3, arg4):
                                                                        arg1 = arg2.zeroExtend(arg1.size) * arg3.zeroExtend(arg1.size) + arg4
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 2 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1684..1686
                                                                    miasm/arch/aarch64/sem.py on lines 2130..2132

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 46.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    @sbuild.parse
                                                                    def smaddl(arg1, arg2, arg3, arg4):
                                                                        arg1 = arg2.signExtend(arg1.size) * arg3.signExtend(arg1.size) + arg4
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 2 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 2130..2132
                                                                    miasm/arch/aarch64/sem.py on lines 2135..2137

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 46.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    @sbuild.parse
                                                                    def umaddl(arg1, arg2, arg3, arg4):
                                                                        arg1 = arg2.zeroExtend(arg1.size) * arg3.zeroExtend(arg1.size) + arg4
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 2 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1684..1686
                                                                    miasm/arch/aarch64/sem.py on lines 2135..2137

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

                                                                    def update_flag_arith_subwc_co(arg1, arg2, arg3):
                                                                        e = []
                                                                        e += update_flag_subwc_cf(arg1, arg2, arg3)
                                                                        e += update_flag_subwc_of(arg1, arg2, arg3)
                                                                        return e
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 5 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 868..872
                                                                    miasm/arch/x86/sem.py on lines 243..247
                                                                    miasm/arch/x86/sem.py on lines 250..254
                                                                    miasm/arch/x86/sem.py on lines 259..263
                                                                    miasm/arch/x86/sem.py on lines 266..270

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

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def update_flag_arith_addwc_co(arg1, arg2, arg3):
                                                                        e = []
                                                                        e += update_flag_addwc_cf(arg1, arg2, arg3)
                                                                        e += update_flag_addwc_of(arg1, arg2, arg3)
                                                                        return e
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 5 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 886..890
                                                                    miasm/arch/x86/sem.py on lines 243..247
                                                                    miasm/arch/x86/sem.py on lines 250..254
                                                                    miasm/arch/x86/sem.py on lines 259..263
                                                                    miasm/arch/x86/sem.py on lines 266..270

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

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def fadd(ir, instr, arg1, arg2, arg3):
                                                                        e = []
                                                                        e.append(ExprAssign(arg1, ExprOp('fadd', arg2, arg3)))
                                                                        return e, []
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 3 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1954..1957
                                                                    miasm/arch/aarch64/sem.py on lines 1960..1963
                                                                    miasm/arch/aarch64/sem.py on lines 1966..1969

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

                                                                    @sbuild.parse
                                                                    def smull(arg1, arg2, arg3):
                                                                        arg1 = (arg2.signExtend(64) * arg3.signExtend(64))[64:]
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 2 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 2145..2147
                                                                    miasm/arch/aarch64/sem.py on lines 2150..2152

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

                                                                    def fmul(ir, instr, arg1, arg2, arg3):
                                                                        e = []
                                                                        e.append(ExprAssign(arg1, ExprOp('fmul', arg2, arg3)))
                                                                        return e, []
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 3 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1948..1951
                                                                    miasm/arch/aarch64/sem.py on lines 1954..1957
                                                                    miasm/arch/aarch64/sem.py on lines 1966..1969

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

                                                                    def fdiv(ir, instr, arg1, arg2, arg3):
                                                                        e = []
                                                                        e.append(ExprAssign(arg1, ExprOp('fdiv', arg2, arg3)))
                                                                        return e, []
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 3 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1948..1951
                                                                    miasm/arch/aarch64/sem.py on lines 1954..1957
                                                                    miasm/arch/aarch64/sem.py on lines 1960..1963

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

                                                                    def fsub(ir, instr, arg1, arg2, arg3):
                                                                        e = []
                                                                        e.append(ExprAssign(arg1, ExprOp('fsub', arg2, arg3)))
                                                                        return e, []
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 3 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1948..1951
                                                                    miasm/arch/aarch64/sem.py on lines 1960..1963
                                                                    miasm/arch/aarch64/sem.py on lines 1966..1969

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

                                                                    @sbuild.parse
                                                                    def smulh(arg1, arg2, arg3):
                                                                        arg1 = (arg2.signExtend(128) * arg3.signExtend(128))[64:]
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 2 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 2145..2147
                                                                    miasm/arch/aarch64/sem.py on lines 2155..2157

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

                                                                    @sbuild.parse
                                                                    def umulh(arg1, arg2, arg3):
                                                                        arg1 = (arg2.zeroExtend(128) * arg3.zeroExtend(128))[64:]
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 2 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 2150..2152
                                                                    miasm/arch/aarch64/sem.py on lines 2155..2157

                                                                    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

                                                                    @sbuild.parse
                                                                    def udiv(arg1, arg2, arg3):
                                                                        if arg3:
                                                                            arg1 = ExprOp('udiv', arg2, arg3)
                                                                        else:
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1674..1680

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

                                                                    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 sdiv(arg1, arg2, arg3):
                                                                        if arg3:
                                                                            arg1 = ExprOp('sdiv', arg2, arg3)
                                                                        else:
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1666..1672

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

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

                                                                        elif arg1.is_int(3) and arg2.is_int(3) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(0):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1504..1504
                                                                    miasm/arch/aarch64/sem.py on lines 1513..1513
                                                                    miasm/arch/aarch64/sem.py on lines 1525..1525
                                                                    miasm/arch/aarch64/sem.py on lines 1531..1531
                                                                    miasm/arch/aarch64/sem.py on lines 1537..1537
                                                                    miasm/arch/aarch64/sem.py on lines 1543..1543
                                                                    miasm/arch/aarch64/sem.py on lines 1552..1552
                                                                    miasm/arch/aarch64/sem.py on lines 1558..1558
                                                                    miasm/arch/aarch64/sem.py on lines 1576..1576
                                                                    miasm/arch/aarch64/sem.py on lines 1582..1582
                                                                    miasm/arch/aarch64/sem.py on lines 1585..1585
                                                                    miasm/arch/aarch64/sem.py on lines 1588..1588
                                                                    miasm/arch/aarch64/sem.py on lines 1591..1591
                                                                    miasm/arch/aarch64/sem.py on lines 1594..1594
                                                                    miasm/arch/aarch64/sem.py on lines 1597..1597
                                                                    miasm/arch/aarch64/sem.py on lines 1603..1603
                                                                    miasm/arch/aarch64/sem.py on lines 1606..1606

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        elif arg1.is_int(3) and arg2.is_int(0) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(4):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1504..1504
                                                                    miasm/arch/aarch64/sem.py on lines 1513..1513
                                                                    miasm/arch/aarch64/sem.py on lines 1519..1519
                                                                    miasm/arch/aarch64/sem.py on lines 1531..1531
                                                                    miasm/arch/aarch64/sem.py on lines 1537..1537
                                                                    miasm/arch/aarch64/sem.py on lines 1543..1543
                                                                    miasm/arch/aarch64/sem.py on lines 1552..1552
                                                                    miasm/arch/aarch64/sem.py on lines 1558..1558
                                                                    miasm/arch/aarch64/sem.py on lines 1576..1576
                                                                    miasm/arch/aarch64/sem.py on lines 1582..1582
                                                                    miasm/arch/aarch64/sem.py on lines 1585..1585
                                                                    miasm/arch/aarch64/sem.py on lines 1588..1588
                                                                    miasm/arch/aarch64/sem.py on lines 1591..1591
                                                                    miasm/arch/aarch64/sem.py on lines 1594..1594
                                                                    miasm/arch/aarch64/sem.py on lines 1597..1597
                                                                    miasm/arch/aarch64/sem.py on lines 1603..1603
                                                                    miasm/arch/aarch64/sem.py on lines 1606..1606

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        elif arg1.is_int(3) and arg2.is_int(0) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(0):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1504..1504
                                                                    miasm/arch/aarch64/sem.py on lines 1513..1513
                                                                    miasm/arch/aarch64/sem.py on lines 1519..1519
                                                                    miasm/arch/aarch64/sem.py on lines 1525..1525
                                                                    miasm/arch/aarch64/sem.py on lines 1531..1531
                                                                    miasm/arch/aarch64/sem.py on lines 1537..1537
                                                                    miasm/arch/aarch64/sem.py on lines 1543..1543
                                                                    miasm/arch/aarch64/sem.py on lines 1552..1552
                                                                    miasm/arch/aarch64/sem.py on lines 1576..1576
                                                                    miasm/arch/aarch64/sem.py on lines 1582..1582
                                                                    miasm/arch/aarch64/sem.py on lines 1585..1585
                                                                    miasm/arch/aarch64/sem.py on lines 1588..1588
                                                                    miasm/arch/aarch64/sem.py on lines 1591..1591
                                                                    miasm/arch/aarch64/sem.py on lines 1594..1594
                                                                    miasm/arch/aarch64/sem.py on lines 1597..1597
                                                                    miasm/arch/aarch64/sem.py on lines 1603..1603
                                                                    miasm/arch/aarch64/sem.py on lines 1606..1606

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        elif arg1.is_int(3) and arg2.is_int(3) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(1):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1504..1504
                                                                    miasm/arch/aarch64/sem.py on lines 1513..1513
                                                                    miasm/arch/aarch64/sem.py on lines 1519..1519
                                                                    miasm/arch/aarch64/sem.py on lines 1525..1525
                                                                    miasm/arch/aarch64/sem.py on lines 1531..1531
                                                                    miasm/arch/aarch64/sem.py on lines 1537..1537
                                                                    miasm/arch/aarch64/sem.py on lines 1552..1552
                                                                    miasm/arch/aarch64/sem.py on lines 1558..1558
                                                                    miasm/arch/aarch64/sem.py on lines 1576..1576
                                                                    miasm/arch/aarch64/sem.py on lines 1582..1582
                                                                    miasm/arch/aarch64/sem.py on lines 1585..1585
                                                                    miasm/arch/aarch64/sem.py on lines 1588..1588
                                                                    miasm/arch/aarch64/sem.py on lines 1591..1591
                                                                    miasm/arch/aarch64/sem.py on lines 1594..1594
                                                                    miasm/arch/aarch64/sem.py on lines 1597..1597
                                                                    miasm/arch/aarch64/sem.py on lines 1603..1603
                                                                    miasm/arch/aarch64/sem.py on lines 1606..1606

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        elif arg1.is_int(3) and arg2.is_int(3) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(1):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1504..1504
                                                                    miasm/arch/aarch64/sem.py on lines 1513..1513
                                                                    miasm/arch/aarch64/sem.py on lines 1519..1519
                                                                    miasm/arch/aarch64/sem.py on lines 1525..1525
                                                                    miasm/arch/aarch64/sem.py on lines 1531..1531
                                                                    miasm/arch/aarch64/sem.py on lines 1537..1537
                                                                    miasm/arch/aarch64/sem.py on lines 1543..1543
                                                                    miasm/arch/aarch64/sem.py on lines 1552..1552
                                                                    miasm/arch/aarch64/sem.py on lines 1558..1558
                                                                    miasm/arch/aarch64/sem.py on lines 1576..1576
                                                                    miasm/arch/aarch64/sem.py on lines 1582..1582
                                                                    miasm/arch/aarch64/sem.py on lines 1585..1585
                                                                    miasm/arch/aarch64/sem.py on lines 1588..1588
                                                                    miasm/arch/aarch64/sem.py on lines 1591..1591
                                                                    miasm/arch/aarch64/sem.py on lines 1594..1594
                                                                    miasm/arch/aarch64/sem.py on lines 1603..1603
                                                                    miasm/arch/aarch64/sem.py on lines 1606..1606

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        elif arg1.is_int(3) and arg2.is_int(3) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(7):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1504..1504
                                                                    miasm/arch/aarch64/sem.py on lines 1519..1519
                                                                    miasm/arch/aarch64/sem.py on lines 1525..1525
                                                                    miasm/arch/aarch64/sem.py on lines 1531..1531
                                                                    miasm/arch/aarch64/sem.py on lines 1537..1537
                                                                    miasm/arch/aarch64/sem.py on lines 1543..1543
                                                                    miasm/arch/aarch64/sem.py on lines 1552..1552
                                                                    miasm/arch/aarch64/sem.py on lines 1558..1558
                                                                    miasm/arch/aarch64/sem.py on lines 1576..1576
                                                                    miasm/arch/aarch64/sem.py on lines 1582..1582
                                                                    miasm/arch/aarch64/sem.py on lines 1585..1585
                                                                    miasm/arch/aarch64/sem.py on lines 1588..1588
                                                                    miasm/arch/aarch64/sem.py on lines 1591..1591
                                                                    miasm/arch/aarch64/sem.py on lines 1594..1594
                                                                    miasm/arch/aarch64/sem.py on lines 1597..1597
                                                                    miasm/arch/aarch64/sem.py on lines 1603..1603
                                                                    miasm/arch/aarch64/sem.py on lines 1606..1606

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        elif arg1.is_int(3) and arg2.is_int(0) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(0):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1504..1504
                                                                    miasm/arch/aarch64/sem.py on lines 1513..1513
                                                                    miasm/arch/aarch64/sem.py on lines 1519..1519
                                                                    miasm/arch/aarch64/sem.py on lines 1525..1525
                                                                    miasm/arch/aarch64/sem.py on lines 1531..1531
                                                                    miasm/arch/aarch64/sem.py on lines 1537..1537
                                                                    miasm/arch/aarch64/sem.py on lines 1543..1543
                                                                    miasm/arch/aarch64/sem.py on lines 1552..1552
                                                                    miasm/arch/aarch64/sem.py on lines 1558..1558
                                                                    miasm/arch/aarch64/sem.py on lines 1576..1576
                                                                    miasm/arch/aarch64/sem.py on lines 1582..1582
                                                                    miasm/arch/aarch64/sem.py on lines 1585..1585
                                                                    miasm/arch/aarch64/sem.py on lines 1588..1588
                                                                    miasm/arch/aarch64/sem.py on lines 1591..1591
                                                                    miasm/arch/aarch64/sem.py on lines 1594..1594
                                                                    miasm/arch/aarch64/sem.py on lines 1597..1597
                                                                    miasm/arch/aarch64/sem.py on lines 1603..1603

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        elif arg1.is_int(3) and arg2.is_int(3) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(6):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1504..1504
                                                                    miasm/arch/aarch64/sem.py on lines 1513..1513
                                                                    miasm/arch/aarch64/sem.py on lines 1519..1519
                                                                    miasm/arch/aarch64/sem.py on lines 1525..1525
                                                                    miasm/arch/aarch64/sem.py on lines 1531..1531
                                                                    miasm/arch/aarch64/sem.py on lines 1543..1543
                                                                    miasm/arch/aarch64/sem.py on lines 1552..1552
                                                                    miasm/arch/aarch64/sem.py on lines 1558..1558
                                                                    miasm/arch/aarch64/sem.py on lines 1576..1576
                                                                    miasm/arch/aarch64/sem.py on lines 1582..1582
                                                                    miasm/arch/aarch64/sem.py on lines 1585..1585
                                                                    miasm/arch/aarch64/sem.py on lines 1588..1588
                                                                    miasm/arch/aarch64/sem.py on lines 1591..1591
                                                                    miasm/arch/aarch64/sem.py on lines 1594..1594
                                                                    miasm/arch/aarch64/sem.py on lines 1597..1597
                                                                    miasm/arch/aarch64/sem.py on lines 1603..1603
                                                                    miasm/arch/aarch64/sem.py on lines 1606..1606

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        if arg1.is_int(3) and arg2.is_int(3) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(0):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1504..1504
                                                                    miasm/arch/aarch64/sem.py on lines 1513..1513
                                                                    miasm/arch/aarch64/sem.py on lines 1519..1519
                                                                    miasm/arch/aarch64/sem.py on lines 1525..1525
                                                                    miasm/arch/aarch64/sem.py on lines 1531..1531
                                                                    miasm/arch/aarch64/sem.py on lines 1537..1537
                                                                    miasm/arch/aarch64/sem.py on lines 1543..1543
                                                                    miasm/arch/aarch64/sem.py on lines 1552..1552
                                                                    miasm/arch/aarch64/sem.py on lines 1558..1558
                                                                    miasm/arch/aarch64/sem.py on lines 1582..1582
                                                                    miasm/arch/aarch64/sem.py on lines 1585..1585
                                                                    miasm/arch/aarch64/sem.py on lines 1588..1588
                                                                    miasm/arch/aarch64/sem.py on lines 1591..1591
                                                                    miasm/arch/aarch64/sem.py on lines 1594..1594
                                                                    miasm/arch/aarch64/sem.py on lines 1597..1597
                                                                    miasm/arch/aarch64/sem.py on lines 1603..1603
                                                                    miasm/arch/aarch64/sem.py on lines 1606..1606

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        elif arg1.is_int(3) and arg2.is_int(3) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(7):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1504..1504
                                                                    miasm/arch/aarch64/sem.py on lines 1513..1513
                                                                    miasm/arch/aarch64/sem.py on lines 1519..1519
                                                                    miasm/arch/aarch64/sem.py on lines 1525..1525
                                                                    miasm/arch/aarch64/sem.py on lines 1531..1531
                                                                    miasm/arch/aarch64/sem.py on lines 1537..1537
                                                                    miasm/arch/aarch64/sem.py on lines 1543..1543
                                                                    miasm/arch/aarch64/sem.py on lines 1552..1552
                                                                    miasm/arch/aarch64/sem.py on lines 1558..1558
                                                                    miasm/arch/aarch64/sem.py on lines 1576..1576
                                                                    miasm/arch/aarch64/sem.py on lines 1585..1585
                                                                    miasm/arch/aarch64/sem.py on lines 1588..1588
                                                                    miasm/arch/aarch64/sem.py on lines 1591..1591
                                                                    miasm/arch/aarch64/sem.py on lines 1594..1594
                                                                    miasm/arch/aarch64/sem.py on lines 1597..1597
                                                                    miasm/arch/aarch64/sem.py on lines 1603..1603
                                                                    miasm/arch/aarch64/sem.py on lines 1606..1606

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        elif arg1.is_int(3) and arg2.is_int(0) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(2):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1504..1504
                                                                    miasm/arch/aarch64/sem.py on lines 1513..1513
                                                                    miasm/arch/aarch64/sem.py on lines 1519..1519
                                                                    miasm/arch/aarch64/sem.py on lines 1525..1525
                                                                    miasm/arch/aarch64/sem.py on lines 1531..1531
                                                                    miasm/arch/aarch64/sem.py on lines 1537..1537
                                                                    miasm/arch/aarch64/sem.py on lines 1543..1543
                                                                    miasm/arch/aarch64/sem.py on lines 1558..1558
                                                                    miasm/arch/aarch64/sem.py on lines 1576..1576
                                                                    miasm/arch/aarch64/sem.py on lines 1582..1582
                                                                    miasm/arch/aarch64/sem.py on lines 1585..1585
                                                                    miasm/arch/aarch64/sem.py on lines 1588..1588
                                                                    miasm/arch/aarch64/sem.py on lines 1591..1591
                                                                    miasm/arch/aarch64/sem.py on lines 1594..1594
                                                                    miasm/arch/aarch64/sem.py on lines 1597..1597
                                                                    miasm/arch/aarch64/sem.py on lines 1603..1603
                                                                    miasm/arch/aarch64/sem.py on lines 1606..1606

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        elif arg1.is_int(3) and arg2.is_int(0) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(2):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1504..1504
                                                                    miasm/arch/aarch64/sem.py on lines 1513..1513
                                                                    miasm/arch/aarch64/sem.py on lines 1519..1519
                                                                    miasm/arch/aarch64/sem.py on lines 1525..1525
                                                                    miasm/arch/aarch64/sem.py on lines 1531..1531
                                                                    miasm/arch/aarch64/sem.py on lines 1537..1537
                                                                    miasm/arch/aarch64/sem.py on lines 1543..1543
                                                                    miasm/arch/aarch64/sem.py on lines 1552..1552
                                                                    miasm/arch/aarch64/sem.py on lines 1558..1558
                                                                    miasm/arch/aarch64/sem.py on lines 1576..1576
                                                                    miasm/arch/aarch64/sem.py on lines 1582..1582
                                                                    miasm/arch/aarch64/sem.py on lines 1585..1585
                                                                    miasm/arch/aarch64/sem.py on lines 1588..1588
                                                                    miasm/arch/aarch64/sem.py on lines 1591..1591
                                                                    miasm/arch/aarch64/sem.py on lines 1594..1594
                                                                    miasm/arch/aarch64/sem.py on lines 1597..1597
                                                                    miasm/arch/aarch64/sem.py on lines 1606..1606

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        if arg2.is_int(3) and arg3.is_int(3) and arg4.is_id("c4") and arg5.is_id("c2") and arg6.is_int(0):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1513..1513
                                                                    miasm/arch/aarch64/sem.py on lines 1519..1519
                                                                    miasm/arch/aarch64/sem.py on lines 1525..1525
                                                                    miasm/arch/aarch64/sem.py on lines 1531..1531
                                                                    miasm/arch/aarch64/sem.py on lines 1537..1537
                                                                    miasm/arch/aarch64/sem.py on lines 1543..1543
                                                                    miasm/arch/aarch64/sem.py on lines 1552..1552
                                                                    miasm/arch/aarch64/sem.py on lines 1558..1558
                                                                    miasm/arch/aarch64/sem.py on lines 1576..1576
                                                                    miasm/arch/aarch64/sem.py on lines 1582..1582
                                                                    miasm/arch/aarch64/sem.py on lines 1585..1585
                                                                    miasm/arch/aarch64/sem.py on lines 1588..1588
                                                                    miasm/arch/aarch64/sem.py on lines 1591..1591
                                                                    miasm/arch/aarch64/sem.py on lines 1594..1594
                                                                    miasm/arch/aarch64/sem.py on lines 1597..1597
                                                                    miasm/arch/aarch64/sem.py on lines 1603..1603
                                                                    miasm/arch/aarch64/sem.py on lines 1606..1606

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        elif arg1.is_int(3) and arg2.is_int(0) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(4):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1504..1504
                                                                    miasm/arch/aarch64/sem.py on lines 1513..1513
                                                                    miasm/arch/aarch64/sem.py on lines 1519..1519
                                                                    miasm/arch/aarch64/sem.py on lines 1525..1525
                                                                    miasm/arch/aarch64/sem.py on lines 1531..1531
                                                                    miasm/arch/aarch64/sem.py on lines 1537..1537
                                                                    miasm/arch/aarch64/sem.py on lines 1543..1543
                                                                    miasm/arch/aarch64/sem.py on lines 1552..1552
                                                                    miasm/arch/aarch64/sem.py on lines 1558..1558
                                                                    miasm/arch/aarch64/sem.py on lines 1576..1576
                                                                    miasm/arch/aarch64/sem.py on lines 1582..1582
                                                                    miasm/arch/aarch64/sem.py on lines 1585..1585
                                                                    miasm/arch/aarch64/sem.py on lines 1591..1591
                                                                    miasm/arch/aarch64/sem.py on lines 1594..1594
                                                                    miasm/arch/aarch64/sem.py on lines 1597..1597
                                                                    miasm/arch/aarch64/sem.py on lines 1603..1603
                                                                    miasm/arch/aarch64/sem.py on lines 1606..1606

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        elif arg1.is_int(3) and arg2.is_int(3) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(0):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1504..1504
                                                                    miasm/arch/aarch64/sem.py on lines 1513..1513
                                                                    miasm/arch/aarch64/sem.py on lines 1519..1519
                                                                    miasm/arch/aarch64/sem.py on lines 1525..1525
                                                                    miasm/arch/aarch64/sem.py on lines 1531..1531
                                                                    miasm/arch/aarch64/sem.py on lines 1537..1537
                                                                    miasm/arch/aarch64/sem.py on lines 1543..1543
                                                                    miasm/arch/aarch64/sem.py on lines 1552..1552
                                                                    miasm/arch/aarch64/sem.py on lines 1558..1558
                                                                    miasm/arch/aarch64/sem.py on lines 1576..1576
                                                                    miasm/arch/aarch64/sem.py on lines 1582..1582
                                                                    miasm/arch/aarch64/sem.py on lines 1588..1588
                                                                    miasm/arch/aarch64/sem.py on lines 1591..1591
                                                                    miasm/arch/aarch64/sem.py on lines 1594..1594
                                                                    miasm/arch/aarch64/sem.py on lines 1597..1597
                                                                    miasm/arch/aarch64/sem.py on lines 1603..1603
                                                                    miasm/arch/aarch64/sem.py on lines 1606..1606

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        elif arg1.is_int(3) and arg2.is_int(3) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(6):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1504..1504
                                                                    miasm/arch/aarch64/sem.py on lines 1513..1513
                                                                    miasm/arch/aarch64/sem.py on lines 1519..1519
                                                                    miasm/arch/aarch64/sem.py on lines 1525..1525
                                                                    miasm/arch/aarch64/sem.py on lines 1531..1531
                                                                    miasm/arch/aarch64/sem.py on lines 1537..1537
                                                                    miasm/arch/aarch64/sem.py on lines 1543..1543
                                                                    miasm/arch/aarch64/sem.py on lines 1552..1552
                                                                    miasm/arch/aarch64/sem.py on lines 1558..1558
                                                                    miasm/arch/aarch64/sem.py on lines 1576..1576
                                                                    miasm/arch/aarch64/sem.py on lines 1582..1582
                                                                    miasm/arch/aarch64/sem.py on lines 1585..1585
                                                                    miasm/arch/aarch64/sem.py on lines 1588..1588
                                                                    miasm/arch/aarch64/sem.py on lines 1591..1591
                                                                    miasm/arch/aarch64/sem.py on lines 1597..1597
                                                                    miasm/arch/aarch64/sem.py on lines 1603..1603
                                                                    miasm/arch/aarch64/sem.py on lines 1606..1606

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        elif arg1.is_int(3) and arg2.is_int(0) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(3):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1504..1504
                                                                    miasm/arch/aarch64/sem.py on lines 1513..1513
                                                                    miasm/arch/aarch64/sem.py on lines 1519..1519
                                                                    miasm/arch/aarch64/sem.py on lines 1525..1525
                                                                    miasm/arch/aarch64/sem.py on lines 1531..1531
                                                                    miasm/arch/aarch64/sem.py on lines 1537..1537
                                                                    miasm/arch/aarch64/sem.py on lines 1543..1543
                                                                    miasm/arch/aarch64/sem.py on lines 1552..1552
                                                                    miasm/arch/aarch64/sem.py on lines 1558..1558
                                                                    miasm/arch/aarch64/sem.py on lines 1576..1576
                                                                    miasm/arch/aarch64/sem.py on lines 1582..1582
                                                                    miasm/arch/aarch64/sem.py on lines 1585..1585
                                                                    miasm/arch/aarch64/sem.py on lines 1588..1588
                                                                    miasm/arch/aarch64/sem.py on lines 1594..1594
                                                                    miasm/arch/aarch64/sem.py on lines 1597..1597
                                                                    miasm/arch/aarch64/sem.py on lines 1603..1603
                                                                    miasm/arch/aarch64/sem.py on lines 1606..1606

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                        elif arg1.is_int(3) and arg2.is_int(0) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(3):
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 17 other locations - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1504..1504
                                                                    miasm/arch/aarch64/sem.py on lines 1513..1513
                                                                    miasm/arch/aarch64/sem.py on lines 1519..1519
                                                                    miasm/arch/aarch64/sem.py on lines 1525..1525
                                                                    miasm/arch/aarch64/sem.py on lines 1537..1537
                                                                    miasm/arch/aarch64/sem.py on lines 1543..1543
                                                                    miasm/arch/aarch64/sem.py on lines 1552..1552
                                                                    miasm/arch/aarch64/sem.py on lines 1558..1558
                                                                    miasm/arch/aarch64/sem.py on lines 1576..1576
                                                                    miasm/arch/aarch64/sem.py on lines 1582..1582
                                                                    miasm/arch/aarch64/sem.py on lines 1585..1585
                                                                    miasm/arch/aarch64/sem.py on lines 1588..1588
                                                                    miasm/arch/aarch64/sem.py on lines 1591..1591
                                                                    miasm/arch/aarch64/sem.py on lines 1594..1594
                                                                    miasm/arch/aarch64/sem.py on lines 1597..1597
                                                                    miasm/arch/aarch64/sem.py on lines 1603..1603
                                                                    miasm/arch/aarch64/sem.py on lines 1606..1606

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                            if sreg in system_regs:
                                                                                e.append(ExprAssign(arg1, system_regs[sreg]))
                                                                            else:
                                                                                raise NotImplementedError("Unknown system register: %d %d %s %s %d" % (int(arg2), int(arg3), str(arg4), str(arg5), int(arg6)))
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1611..1614

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def fabs(ir, instr, arg1, arg2):
                                                                        e = []
                                                                        e.append(ExprAssign(arg1, ExprOp('fabs', arg2)))
                                                                        return e, []
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 2088..2091

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def clz(ir, instr, arg1, arg2):
                                                                        e = []
                                                                        e.append(ExprAssign(arg1, ExprOp('cntleadzeros', arg2)))
                                                                        return e, []
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1972..1975

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                                elif op == 'UXTW':
                                                                                    off = reg.zeroExtend(base.size) << shift.zeroExtend(base.size)
                                                                                    addr = base + off
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1280..1282

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                                if op == 'SXTW':
                                                                                    off = reg.signExtend(base.size) << shift.zeroExtend(base.size)
                                                                                    addr = base + off
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1283..1285

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                            if sreg in system_regs:
                                                                                e.append(ExprAssign(system_regs[sreg], arg6))
                                                                            else:
                                                                                raise NotImplementedError("Unknown system register: %d %d %s %s %d" % (int(arg1), int(arg2), str(arg3), str(arg4), int(arg5)))
                                                                    Severity: Major
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 1 hr to fix
                                                                    miasm/arch/aarch64/sem.py on lines 1566..1569

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 39.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                    def update_flag_zn(a):
                                                                        e = []
                                                                        e += update_flag_zf(a)
                                                                        e += update_flag_nf(a)
                                                                        return e
                                                                    Severity: Minor
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 50 mins to fix
                                                                    miasm/arch/x86/sem.py on lines 111..115

                                                                    Duplicated Code

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

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

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

                                                                    Tuning

                                                                    This issue has a mass of 36.

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

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

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

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

                                                                    Refactorings

                                                                    Further Reading

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

                                                                            out.append(arg2[index * 8:(index + 1) * 8])
                                                                    Severity: Minor
                                                                    Found in miasm/arch/aarch64/sem.py and 1 other location - About 35 mins to fix
                                                                    miasm/ir/symbexec.py on lines 311..311

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

                                                                    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