cea-sec/miasm

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

Summary

Maintainability
F
2 wks
Test Coverage

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

# Toshiba MeP-c4 - miasm instructions side effects
# Guillaume Valadon <guillaume@valadon.net>

from miasm.core.sembuilder import SemBuilder
from miasm.ir.ir import Lifter
Severity: Major
Found in miasm/arch/mep/sem.py - About 1 day to fix

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

    def ldz(rn, rm):
        """LDZ - Count Leading Zeroes
    
           Note: this implementation is readable, yet slow. Each bit are tested
           individually, and the results are propagated to other bits.
    Severity: Minor
    Found in miasm/arch/mep/sem.py - About 4 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function ldz has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    def ldz(rn, rm):
        """LDZ - Count Leading Zeroes
    
           Note: this implementation is readable, yet slow. Each bit are tested
           individually, and the results are propagated to other bits.
    Severity: Minor
    Found in miasm/arch/mep/sem.py - About 1 hr to fix

      Function div has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      def div(rn, rm):
          """DIV - Signed division"""
      
          # LO <- Rn / Rm, HI <- Rn % Rm (Signed)
      
      
      Severity: Minor
      Found in miasm/arch/mep/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 add3 has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def add3(ir, instr, reg_dst, reg_src, reg_or_imm):
      Severity: Minor
      Found in miasm/arch/mep/sem.py - About 35 mins to fix

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

        def sbvck3(ir, instr, r0, rn, rm):
        Severity: Minor
        Found in miasm/arch/mep/sem.py - About 35 mins to fix

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

          def btstm(ir, instr, r0, rm_deref, imm3):
          Severity: Minor
          Found in miasm/arch/mep/sem.py - About 35 mins to fix

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

            @sbuild.parse
            def maddru(rn, rm):
                """MADDRU - Unsigned 32-bit multiplication, adding results to HI & LO registers & storing LO in Rn"""
            
                # HI||LO <- HI||LO + Rn*Rm; Rn <- LO (Unsigned)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 6 hrs to fix
            miasm/arch/mep/sem.py on lines 923..931

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

            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 maddr(rn, rm):
                """MADDR - Signed 32-bit multiplication, adding results to HI & LO registers & storing LO in Rn"""
            
                # HI||LO <- HI||LO + Rn*Rm; Rn <- LO (Signed)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 6 hrs to fix
            miasm/arch/mep/sem.py on lines 934..942

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

            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 madd(rn, rm):
                """MADD - Signed 32-bit multiplication, adding results to HI & LO registers"""
            
                # HI||LO <- HI||LO + Rn*Rm (Signed)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 5 hrs to fix
            miasm/arch/mep/sem.py on lines 913..920

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

            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 maddu(rn, rm):
                """MADDU - Unsigned 32-bit multiplication, adding results to HI & LO registers"""
            
                # HI||LO <- HI||LO + Rn*Rm (Unsigned)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 5 hrs to fix
            miasm/arch/mep/sem.py on lines 903..910

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

            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 smcpi(ir, instr, reg_src, deref_dst):
                """SMCPI - Store Word to memory, and increment the address"""
            
                # MemDword(Rm31..3||000) <- CRn; Rm<-Rm+8
                e = []
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 4 hrs to fix
            miasm/arch/mep/sem.py on lines 1141..1148

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

            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 bne(rn, rm, disp16):
                """BNE - Branch if the two registers are not equal."""
            
                # if(Rn!=Rm) PC <- PC +SignExt((disp17)16..1||0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 4 hrs to fix
            miasm/arch/mep/sem.py on lines 554..562

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

            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 beq(rn, rm, disp16):
                """BEQ - Branch if the two registers are equal."""
            
                # if(Rn==Rm) PC <- PC +SignExt((disp17)16..1||0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 4 hrs to fix
            miasm/arch/mep/sem.py on lines 543..551

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

            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 swcpi(ir, instr, reg_src, deref_dst):
                """SWCPI - Store Word to memory, and increment the address"""
            
                # MemWord(Rm31..2||00) <- CRn 31..0; Rm<-Rm+4
                e = []
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 4 hrs to fix
            miasm/arch/mep/sem.py on lines 1164..1171

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

            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 lmcpi(ir, instr, reg_dst, deref_src):
                """LMCPI - Load Word from memory, and increment the address"""
            
                # CRn <- MemDword(Rm31..3||000); Rm<-Rm+8
                e = []
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 4 hrs to fix
            miasm/arch/mep/sem.py on lines 1153..1160

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

            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 lwcpi(ir, instr, reg_dst, deref_src):
                """LWCPI - Load Word from memory, and increment the address"""
            
                # CRn <- MemWord(Rm31..2||00); Rm<-Rm+4
                e = []
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 4 hrs to fix
            miasm/arch/mep/sem.py on lines 1176..1183

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

            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 bnei(reg_test, imm4, disp16):
                """BNEI - Branch if the register does not store imm4."""
            
                # if(Rn!=ZeroExt(imm4)) PC <- PC+SignExt((disp17)16..1||0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 4 hrs to fix
            miasm/arch/mep/sem.py on lines 599..607

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

            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 beqi(reg_test, imm4, disp16):
                """BEQI - Branch if the register stores imm4."""
            
                # if(Rn==ZeroExt(imm4)) PC <- PC +SignExt((disp17)16..1||0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 4 hrs to fix
            miasm/arch/mep/sem.py on lines 588..596

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

            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 bsetm(ir, instr, rm_deref, imm3):
                """BSETM - Bit Set Memory"""
            
                # MemByte(Rm) <- MemByte(Rm) or (1<<imm3)
                e = []
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 3 hrs to fix
            miasm/arch/mep/sem.py on lines 818..824

            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 bnotm(ir, instr, rm_deref, imm3):
                """BNOTM - Bit Not Memory"""
            
                # MemByte(Rm) <- MemByte(Rm) xor (1<<imm3)
                e = []
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 3 hrs to fix
            miasm/arch/mep/sem.py on lines 795..801

            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

            @sbuild.parse
            def mulru(rn, rm):
                """MULRU - Unsigned 32-bit multiplication & store LO in Rn"""
            
                # HI||LO <- Rn * Rm; Rn <- LO (Unsigned)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 3 hrs to fix
            miasm/arch/mep/sem.py on lines 881..889

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

            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 mulr(rn, rm):
                """MULR - Signed 32-bit multiplication & store LO in Rn"""
            
                # HI||LO <- Rn * Rm; Rn <- LO (Signed)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 3 hrs to fix
            miasm/arch/mep/sem.py on lines 892..900

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 72.

            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 lh(ir, instr, reg_dst, deref_dst):
                """LH - Load Halfword from memory"""
            
                # Rn <- SignExt(MemHword(Rm31..1||0))
                # Rn <- SignExt(MemHword((ZeroExt((disp7)6..1||0)+TP)31..1||0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 2 hrs to fix
            miasm/arch/mep/sem.py on lines 177..185

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

            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 lhu(ir, instr, reg_dst, deref_dst):
                """LHU - Load an unsigned Halfword from memory"""
            
                # Rn <- ZeroExt(MemHword(Rm31..1||0))
                # Rn <- ZeroExt(MemHword((SignExt(disp16)+Rm)31..1||0))
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 2 hrs to fix
            miasm/arch/mep/sem.py on lines 138..146

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

            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 smcp(ir, instr, reg_src, deref_dst):
                """SMCP - Store Word to memory from a coprocessor register"""
            
                # MemDword(Rm31..3||000) <- CRn
                e = []
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 2 hrs to fix
            miasm/arch/mep/sem.py on lines 88..98

            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 lmcp(ir, instr, reg_dst, deref_src):
                """LMCP - Load Word from memory to a coprocessor register"""
            
                # CRn <- MemDword(Rm31..3||000)
                e = []
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 2 hrs to fix
            miasm/arch/mep/sem.py on lines 150..159

            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 sw(ir, instr, reg_src, deref_dst):
                """SW - Store Word into memory"""
            
                # MemWord(Rm31..2||00) <- Rn31..0
                # MemWord((ZeroExt((disp7)6..2||00)+SP)31..2||00)) <- Rn31..0
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 2 hrs to fix
            miasm/arch/mep/sem.py on lines 1119..1125

            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 lw(ir, instr, reg_dst, deref_dst):
                """LW - Load Word from memory"""
            
                # Rn <- MemWord(Rm31..2||00)
                # Rn <- MemWord((ZeroExt((disp7)6..2||00)+TP)31..2||00)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 2 hrs to fix
            miasm/arch/mep/sem.py on lines 1130..1136

            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 __init__(self, loc_db):
                    Lifter.__init__(self, mn_mep, "b", loc_db)
                    self.pc = mn_mep.getpc()
                    self.sp = mn_mep.getsp()
                    self.IRDst = ExprId("IRDst", 32)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 2 hrs to fix
            miasm/arch/mep/sem.py on lines 1236..1240

            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_mep, "l", loc_db)
                    self.pc = mn_mep.getpc()
                    self.sp = mn_mep.getsp()
                    self.IRDst = ExprId("IRDst", 32)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 2 hrs to fix
            miasm/arch/mep/sem.py on lines 1210..1214

            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 lbu(ir, instr, reg_dst, deref_dst):
                """LBU - Load an unsigned Byte from memory"""
            
                # Rn <- ZeroExt(MemByte(Rm31..0))
                # Rn <- ZeroExt(MemByte((ZeroExt(disp7)+TP)31..0))
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 2 hrs to fix
            miasm/arch/mep/sem.py on lines 125..133

            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 lb(ir, instr, reg_dst, deref_dst):
                """LB - Load Byte from memory"""
            
                # Rn <- SignExt(MemByte(Rm31..0))
                # Rn <- SignExt(MemByte((ZeroExt(disp7)+TP)31..0))
            Severity: Major
            Found in miasm/arch/mep/sem.py and 1 other location - About 2 hrs to fix
            miasm/arch/mep/sem.py on lines 164..172

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

                rn = b31 + b30 + b29 + b28 + b27 + b26 + b25 + b24 + b23 + b22 + b21 + b20 \
            Severity: Major
            Found in miasm/arch/mep/sem.py and 2 other locations - About 1 hr to fix
            miasm/arch/ppc/regs.py on lines 68..69
            miasm/expression/parser.py on lines 48..48

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

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

                b14 = (reversed_rm & i32(2**14)) >> i32(14) if b15 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b10 = (reversed_rm & i32(2**10)) >> i32(10) if b11 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b09 = (reversed_rm & i32(2 ** 9)) >> i32(9) if b10 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b29 = (reversed_rm & i32(2**29)) >> i32(29) if b30 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b07 = (reversed_rm & i32(2 ** 7)) >> i32(7) if b08 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b06 = (reversed_rm & i32(2 ** 6)) >> i32(6) if b07 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b01 = (reversed_rm & i32(2 ** 1)) >> i32(1) if b02 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b31 = (reversed_rm & i32(2**31)) >> i32(31) if reversed_rm else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b27 = (reversed_rm & i32(2**27)) >> i32(27) if b28 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b17 = (reversed_rm & i32(2**17)) >> i32(17) if b18 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b25 = (reversed_rm & i32(2**25)) >> i32(25) if b26 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b23 = (reversed_rm & i32(2**23)) >> i32(23) if b24 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b16 = (reversed_rm & i32(2**16)) >> i32(16) if b17 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b12 = (reversed_rm & i32(2**12)) >> i32(12) if b13 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b04 = (reversed_rm & i32(2 ** 4)) >> i32(4) if b05 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b05 = (reversed_rm & i32(2 ** 5)) >> i32(5) if b06 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b30 = (reversed_rm & i32(2**30)) >> i32(30) if b31 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b28 = (reversed_rm & i32(2**28)) >> i32(28) if b29 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b20 = (reversed_rm & i32(2**20)) >> i32(20) if b21 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b19 = (reversed_rm & i32(2**19)) >> i32(19) if b20 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b15 = (reversed_rm & i32(2**15)) >> i32(15) if b16 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b18 = (reversed_rm & i32(2**18)) >> i32(18) if b19 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b08 = (reversed_rm & i32(2 ** 8)) >> i32(8) if b09 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b00 = (reversed_rm & i32(2 ** 0)) >> i32(0) if b01 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096

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

                b26 = (reversed_rm & i32(2**26)) >> i32(26) if b27 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b21 = (reversed_rm & i32(2**21)) >> i32(21) if b22 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b11 = (reversed_rm & i32(2**11)) >> i32(11) if b12 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b24 = (reversed_rm & i32(2**24)) >> i32(24) if b25 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b22 = (reversed_rm & i32(2**22)) >> i32(22) if b23 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b13 = (reversed_rm & i32(2**13)) >> i32(13) if b14 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b03 = (reversed_rm & i32(2 ** 3)) >> i32(3) if b04 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1095..1095
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

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

                b02 = (reversed_rm & i32(2 ** 2)) >> i32(2) if b03 else i32(0)
            Severity: Major
            Found in miasm/arch/mep/sem.py and 31 other locations - About 1 hr to fix
            miasm/arch/mep/sem.py on lines 1066..1066
            miasm/arch/mep/sem.py on lines 1067..1067
            miasm/arch/mep/sem.py on lines 1068..1068
            miasm/arch/mep/sem.py on lines 1069..1069
            miasm/arch/mep/sem.py on lines 1070..1070
            miasm/arch/mep/sem.py on lines 1071..1071
            miasm/arch/mep/sem.py on lines 1072..1072
            miasm/arch/mep/sem.py on lines 1073..1073
            miasm/arch/mep/sem.py on lines 1074..1074
            miasm/arch/mep/sem.py on lines 1075..1075
            miasm/arch/mep/sem.py on lines 1076..1076
            miasm/arch/mep/sem.py on lines 1077..1077
            miasm/arch/mep/sem.py on lines 1078..1078
            miasm/arch/mep/sem.py on lines 1079..1079
            miasm/arch/mep/sem.py on lines 1080..1080
            miasm/arch/mep/sem.py on lines 1081..1081
            miasm/arch/mep/sem.py on lines 1082..1082
            miasm/arch/mep/sem.py on lines 1083..1083
            miasm/arch/mep/sem.py on lines 1084..1084
            miasm/arch/mep/sem.py on lines 1085..1085
            miasm/arch/mep/sem.py on lines 1086..1086
            miasm/arch/mep/sem.py on lines 1087..1087
            miasm/arch/mep/sem.py on lines 1088..1088
            miasm/arch/mep/sem.py on lines 1089..1089
            miasm/arch/mep/sem.py on lines 1090..1090
            miasm/arch/mep/sem.py on lines 1091..1091
            miasm/arch/mep/sem.py on lines 1092..1092
            miasm/arch/mep/sem.py on lines 1093..1093
            miasm/arch/mep/sem.py on lines 1094..1094
            miasm/arch/mep/sem.py on lines 1096..1096
            miasm/arch/mep/sem.py on lines 1097..1097

            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

                result = (((x - y) ^ ((x ^ y) & ((x - y) ^ x))) ^ x ^ y).msb()
            Severity: Minor
            Found in miasm/arch/mep/sem.py and 1 other location - About 55 mins to fix
            miasm/arch/mep/sem.py on lines 20..20

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                return ((arg1 - arg2) ^ ((arg1 ^ arg2) & ((arg1 - arg2) ^ arg1))).msb()
            Severity: Minor
            Found in miasm/arch/mep/sem.py and 1 other location - About 55 mins to fix
            miasm/arch/mep/sem.py on lines 24..24

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

            @sbuild.parse
            def sl2ad3(r0, rn, rm):
                """SL2AD3 - Shift a register two bits left, then add another one."""
            
                # R0 <- (Rn<<2) + Rm
            Severity: Minor
            Found in miasm/arch/mep/sem.py and 1 other location - About 50 mins to fix
            miasm/arch/mep/sem.py on lines 371..376

            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

            @sbuild.parse
            def sl1ad3(r0, rn, rm):
                """SL1AD3 - Shift a register one bit left, then add another one."""
            
                # R0 <- (Rn<<1) + Rm
            Severity: Minor
            Found in miasm/arch/mep/sem.py and 1 other location - About 50 mins to fix
            miasm/arch/mep/sem.py on lines 379..384

            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

            There are no issues that match your filters.

            Category
            Status