FrenchYeti/dexcalibur

View on GitHub
src/Decompiler.js

Summary

Maintainability
F
2 mos
Test Coverage

Function simplifyBasicBlock has a Cognitive Complexity of 249 (exceeds 5 allowed). Consider refactoring.
Open

    simplifyBasicBlock(pBlock, pDepth=0){
        let ops = [], dec=[],  f={res:false}, v='', regX=null,  regV=null, oper=null, tmp=[];
        let indent = "    ".repeat(pDepth);

        ops = pBlock.getInstructions();  ;  
Severity: Minor
Found in src/Decompiler.js - About 5 days 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 decompileBasicBlock has a Cognitive Complexity of 196 (exceeds 5 allowed). Consider refactoring.
Open

    decompileBasicBlock(pBlock, pDepth=0){
        let ops = [], dec=[],  f={res:false}, v='', regX=null,  regV=null, oper=null, tmp=[];
        let indent = "    ".repeat(pDepth);

        ops = pBlock.getInstructions();  ;  
Severity: Minor
Found in src/Decompiler.js - About 4 days 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

File Decompiler.js has 1334 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

const CLASS = require("./CoreClass.js");
const CONST = require("./CoreConst.js");
const OPCODE = require('./Opcode.js').OPCODE;
Severity: Major
Found in src/Decompiler.js - About 3 days to fix

    Function simplifyBasicBlock has 446 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        simplifyBasicBlock(pBlock, pDepth=0){
            let ops = [], dec=[],  f={res:false}, v='', regX=null,  regV=null, oper=null, tmp=[];
            let indent = "    ".repeat(pDepth);
    
            ops = pBlock.getInstructions();  ;  
    Severity: Major
    Found in src/Decompiler.js - About 2 days to fix

      Function decompileBasicBlock has 334 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          decompileBasicBlock(pBlock, pDepth=0){
              let ops = [], dec=[],  f={res:false}, v='', regX=null,  regV=null, oper=null, tmp=[];
              let indent = "    ".repeat(pDepth);
      
              ops = pBlock.getInstructions();  ;  
      Severity: Major
      Found in src/Decompiler.js - About 1 day to fix

        Function runDecompile has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
        Open

            runDecompile(pTree, pSource=[], pDepth=0, pStop=false, pClose=false){
                let cont = true, source=pSource, res={ depth:0 }, succ=null, pred=[], d=null, tmp=null;
                let next = [], ifelse=false;
                
                console.log(this.dump(pTree));
        Severity: Minor
        Found in src/Decompiler.js - About 7 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 analyzeBlocks has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
        Open

            analyzeBlocks(pMethod){
                
                let blocks =  pMethod.getBasicBlocks();
        
                if(blocks.length == 0) return null;
        Severity: Minor
        Found in src/Decompiler.js - 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 runSimplify has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
        Open

            runSimplify(){
                let ssmali=[], dec=null, f=0, pDepth=0, d=null;
                let bbs = this.method.getBasicBlocks();
        
                for(let i=0; i<bbs.length; i++){
        Severity: Minor
        Found in src/Decompiler.js - 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 runDecompile has 65 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            runDecompile(pTree, pSource=[], pDepth=0, pStop=false, pClose=false){
                let cont = true, source=pSource, res={ depth:0 }, succ=null, pred=[], d=null, tmp=null;
                let next = [], ifelse=false;
                
                console.log(this.dump(pTree));
        Severity: Major
        Found in src/Decompiler.js - About 2 hrs to fix

          Function analyzeBlocks has 52 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              analyzeBlocks(pMethod){
                  
                  let blocks =  pMethod.getBasicBlocks();
          
                  if(blocks.length == 0) return null;
          Severity: Major
          Found in src/Decompiler.js - About 2 hrs to fix

            Function runSimplify has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                runSimplify(){
                    let ssmali=[], dec=null, f=0, pDepth=0, d=null;
                    let bbs = this.method.getBasicBlocks();
            
                    for(let i=0; i<bbs.length; i++){
            Severity: Minor
            Found in src/Decompiler.js - About 1 hr to fix

              Avoid deeply nested control flow statements.
              Open

                                      if(succ[i].isConditionalBlock()){
                                          cont = source.pop();
                                          source.push(cont+'{');
                                      }else{
                                          source.push(`${"    ".repeat(pDepth)}else{`);
              Severity: Major
              Found in src/Decompiler.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    if(next.hasPredecessor(blocks[i])==false){
                                        next.addPredecessor(blocks[i]);
                                    }
                Severity: Major
                Found in src/Decompiler.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                              if(this.isImm(regV))
                                                  v+= this.getImmediateValue(regV)+',';
                                              else
                                                  v+= regX+',';
                  Severity: Major
                  Found in src/Decompiler.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if(blocks[i+1].hasPredecessor(blocks[i])==false){
                                                blocks[i+1].addPredecessor(blocks[i]);
                                            }
                    Severity: Major
                    Found in src/Decompiler.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                      else if(instr[k].opcode.type == CONST.INSTR_TYPE.RET){
                                          Logger.debug(`Block ${i} RETURN`)
                                          jump = true;
                                      }
                      Severity: Major
                      Found in src/Decompiler.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                    if(this.simplify >= 1 && this.isImm(regV))
                                                        v += `${this.getImmediateValue(regV)},`;
                                                    else{
                                                        v += `${tmp},`;
                                                    }
                        Severity: Major
                        Found in src/Decompiler.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                      if(this.simplify >= 1 && this.isImm(regV))
                                                          v += `${this.getImmediateValue(regV)},`;
                                                      else{
                                                          v += `${tmp},`;
                                                      }
                          Severity: Major
                          Found in src/Decompiler.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if(d[i].getException() != null)
                                                        ssmali.push(`${"    ".repeat(this.depth-1)}}catch(${d[i].getException().name}) :${d[i].getTarget().getCatchLabel()}`);
                                                    else
                                                        ssmali.push(`${"    ".repeat(this.depth-1)}}catchall :${d[i].getTarget().getCatchLabel()}`);
                            Severity: Major
                            Found in src/Decompiler.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                          if(this.isImm(this.getSymbol(regX)))
                                                              this.setSymbol(this.getRegisterName(oper.left[0]), regV.add(this.getImmediateValue(oper.right), oper.opcode.byte));
                                                          else{
                                                              v = `${this.getRegisterName(oper.left[0])} = ${this.getRegisterName(oper.left[1])}+${this.getImmediateValue(regV)};`;                    
                                                              dec.push(v);
                              Severity: Major
                              Found in src/Decompiler.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                            if(this.isImm(regV))
                                                                v+= this.getImmediateValue(regV)+',';
                                                            else
                                                                v+= regX+',';
                                Severity: Major
                                Found in src/Decompiler.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                              if(this.isImm(regX)){
                                                                  this.setSymbol(regX, regX.add(regV.getValue(), oper.opcode.byte));
                                                              }
                                  Severity: Major
                                  Found in src/Decompiler.js - About 45 mins to fix

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

                                                    if(instr[k].opcode.type == CONST.INSTR_TYPE.IF){
                                                        //console.log("IF-", instr[k]);
                                                        next =  pMethod.getBasicBlockByLabel(instr[k].right.name, CONST.INSTR_TYPE.IF);
                                                        Logger.debug(`Block ${i} IF => Block ${next.offset}`)
                                                        blocks[i].addSuccessor(next);
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 3 days to fix
                                    src/Simplifier.js on lines 71..104

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

                                    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

                                                    case OPCODE.IGET_BOOLEAN.byte:
                                                        regX = this.getRegisterName(oper.left[0]);
                                                        regV = oper.right.type.name;
                                                        
                                                        if(this.getRegisterName(oper.left[1])=="p0" && (this.method.modifiers.static==false)){
                                    Severity: Major
                                    Found in src/Decompiler.js and 2 other locations - About 1 day to fix
                                    src/Decompiler.js on lines 710..728
                                    src/Decompiler.js on lines 1268..1286

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

                                    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

                                                    case OPCODE.IGET_BOOLEAN.byte:
                                                        regX = this.getRegisterName(oper.left[0]);
                                                        regV = oper.right.type.name;
                                                        
                                                        if(this.getRegisterName(oper.left[1])=="p0" && (this.method.modifiers.static==false)){
                                    Severity: Major
                                    Found in src/Decompiler.js and 2 other locations - About 1 day to fix
                                    src/Decompiler.js on lines 1242..1260
                                    src/Decompiler.js on lines 1268..1286

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

                                    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

                                                    case OPCODE.SGET_BOOLEAN.byte:
                                                        regX = this.getRegisterName(oper.left[0]);
                                                        regV = oper.right.type.name;
                                                        
                                                        if(this.getRegisterName(oper.left[1])=="p0" && (this.method.modifiers.static==false)){
                                    Severity: Major
                                    Found in src/Decompiler.js and 2 other locations - About 1 day to fix
                                    src/Decompiler.js on lines 710..728
                                    src/Decompiler.js on lines 1242..1260

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

                                    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

                                                    case OPCODE.RETURN.byte:
                                                        regX = this.getRegisterName(oper.left);
                                                        regV = this.getSymbol(regX);
                                    
                                                        if((regX=="p0") && (this.method.modifiers.static==false)){
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 1 day to fix
                                    src/Decompiler.js on lines 1343..1363

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

                                    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

                                                    case OPCODE.RETURN.byte:
                                                        regX = this.getRegisterName(oper.left);
                                                        regV = this.getSymbol(regX);
                                    
                                                        if((regX=="p0") && (this.method.modifiers.static==false)){
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 1 day to fix
                                    src/Decompiler.js on lines 779..799

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

                                    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

                                                    case OPCODE.MOVE_RESULT_WIDE.byte:
                                    //                        console.log(oper);
                                    
                                                        regX = this.getRegisterName(oper.left);
                                                        if(this.invokes.length > 0){
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 1 day to fix
                                    src/Decompiler.js on lines 594..622

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

                                    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

                                                    case OPCODE.MOVE_RESULT_WIDE.byte:
                                    //                        console.log(oper);
                                    
                                                        regX = this.getRegisterName(oper.left);
                                                        if(this.invokes.length > 0){
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 1 day to fix
                                    src/Decompiler.js on lines 1106..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 264.

                                    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

                                                    case OPCODE.SPUT_WIDE.byte:
                                                    
                                                        regX = this.getRegisterName(oper.left[0]);
                                                            
                                                        if(this.getRegisterName(oper.left[1])=="p0" && (this.method.modifiers.static==false)){
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 1 day to fix
                                    src/Decompiler.js on lines 736..753

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

                                    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

                                                    case OPCODE.SPUT_WIDE.byte:
                                                    
                                                        regX = this.getRegisterName(oper.left[0]);
                                                            
                                                        if(this.getRegisterName(oper.left[1])=="p0" && (this.method.modifiers.static==false)){
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 1 day to fix
                                    src/Decompiler.js on lines 1324..1341

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.MOVE_RESULT_OBJECT.byte:
                                    
                                                        regX = this.getRegisterName(oper.left);
                                                        if(this.invokes.length > 0){
                                                            regV = this.invokes.pop();
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 1 day to fix
                                    src/Decompiler.js on lines 1138..1159

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.MOVE_RESULT_OBJECT.byte:
                                    
                                                        regX = this.getRegisterName(oper.left);
                                                        if(this.invokes.length > 0){
                                                            regV = this.invokes.pop();
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 1 day to fix
                                    src/Decompiler.js on lines 624..645

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.INVOKE_STATIC.byte:
                                                        v = `${indent}${oper.right.enclosingClass.name}.${ops[k].right.name}(`;
                                                        if(oper.left.length > 0){
                                                            for(let j=0; j<oper.left.length; j++){
                                                                regX = this.getRegisterName(oper.left[j]);
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 1 day to fix
                                    src/Decompiler.js on lines 647..665

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.INVOKE_STATIC.byte:
                                                        v = `${indent}${oper.right.enclosingClass.name}.${ops[k].right.name}(`;
                                                        if(oper.left.length > 0){
                                                            for(let j=0; j<oper.left.length; j++){
                                                                regX = this.getRegisterName(oper.left[j]);
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 1 day to fix
                                    src/Decompiler.js on lines 1178..1196

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

                                    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

                                                    case OPCODE.RETURN_OBJECT.byte:
                                                        regX = this.getRegisterName(oper.left);
                                                        regV = this.getSymbol(regX);
                                                        
                                                        if(this.getRegisterName(oper.left)=="p0" && (this.method.modifiers.static==false)){
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 1 day to fix
                                    src/Decompiler.js on lines 800..818

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

                                    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

                                                    case OPCODE.RETURN_OBJECT.byte:
                                                        regX = this.getRegisterName(oper.left);
                                                        regV = this.getSymbol(regX);
                                                        
                                                        if(this.getRegisterName(oper.left)=="p0" && (this.method.modifiers.static==false)){
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 1 day to fix
                                    src/Decompiler.js on lines 1364..1382

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.IF_GE.byte:                
                                                        regX = this.getRegisterName(oper.left[0]);
                                                        regV = this.getRegisterName(oper.left[1]);
                                    
                                                        if(this.simplify>0){
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 7 hrs to fix
                                    src/Decompiler.js on lines 1404..1416
                                    src/Decompiler.js on lines 1417..1429
                                    src/Decompiler.js on lines 1443..1455

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.IF_GT.byte:                
                                                        regX = this.getRegisterName(oper.left[0]);
                                                        regV = this.getRegisterName(oper.left[1]);
                                    
                                                        if(this.simplify>0){
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 7 hrs to fix
                                    src/Decompiler.js on lines 1404..1416
                                    src/Decompiler.js on lines 1417..1429
                                    src/Decompiler.js on lines 1430..1442

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.IF_LT.byte:                
                                                        regX = this.getRegisterName(oper.left[0]);
                                                        regV = this.getRegisterName(oper.left[1]);
                                    
                                                        if(this.simplify>0){
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 7 hrs to fix
                                    src/Decompiler.js on lines 1404..1416
                                    src/Decompiler.js on lines 1430..1442
                                    src/Decompiler.js on lines 1443..1455

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.IF_NE.byte:                
                                                        regX = this.getRegisterName(oper.left[0]);
                                                        regV = this.getRegisterName(oper.left[1]);
                                    
                                                        if(this.simplify>0){
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 7 hrs to fix
                                    src/Decompiler.js on lines 1417..1429
                                    src/Decompiler.js on lines 1430..1442
                                    src/Decompiler.js on lines 1443..1455

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.IF_NE.byte:                
                                                        regX = this.getRegisterName(oper.left[0]);
                                                        regV = this.getRegisterName(oper.left[1]);
                                    
                                                        if(this.simplify>0){
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 6 hrs to fix
                                    src/Decompiler.js on lines 853..865
                                    src/Decompiler.js on lines 866..878
                                    src/Decompiler.js on lines 879..891

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.IF_GT.byte:                
                                                        regX = this.getRegisterName(oper.left[0]);
                                                        regV = this.getRegisterName(oper.left[1]);
                                    
                                                        if(this.simplify>0){
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 6 hrs to fix
                                    src/Decompiler.js on lines 840..852
                                    src/Decompiler.js on lines 853..865
                                    src/Decompiler.js on lines 866..878

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.IF_LT.byte:                
                                                        regX = this.getRegisterName(oper.left[0]);
                                                        regV = this.getRegisterName(oper.left[1]);
                                    
                                                        if(this.simplify>0){
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 6 hrs to fix
                                    src/Decompiler.js on lines 840..852
                                    src/Decompiler.js on lines 866..878
                                    src/Decompiler.js on lines 879..891

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.IF_GE.byte:                
                                                        regX = this.getRegisterName(oper.left[0]);
                                                        regV = this.getRegisterName(oper.left[1]);
                                    
                                                        if(this.simplify>0){
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 6 hrs to fix
                                    src/Decompiler.js on lines 840..852
                                    src/Decompiler.js on lines 853..865
                                    src/Decompiler.js on lines 879..891

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                        if(oper.left.length > 1){
                                                            for(let j=1; j<oper.left.length; j++){
                                    
                                                                tmp = this.getRegisterName(oper.left[j]);
                                                                regV = this.getSymbol(tmp);
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 6 hrs to fix
                                    src/Decompiler.js on lines 686..699

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                        if(oper.left.length > 1){
                                                            for(let j=1; j<oper.left.length; j++){
                                    
                                                                tmp = this.getRegisterName(oper.left[j]);
                                                                regV = this.getSymbol(tmp);
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 6 hrs to fix
                                    src/Decompiler.js on lines 1217..1230

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                        sub(pValue, pType){
                                            switch(pType){
                                                case OPCODE.SUB_INT_2ADDR.byte:
                                                case OPCODE.SUB_LONG_2ADDR.byte:
                                                case OPCODE.SUB_INT_LIT8.byte:
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 5 hrs to fix
                                    src/Decompiler.js on lines 70..85
                                    src/Decompiler.js on lines 104..119
                                    src/Decompiler.js on lines 122..137

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 172.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                        mul(pValue, pType){
                                            switch(pType){
                                                case OPCODE.MUL_INT_2ADDR.byte:
                                                case OPCODE.MUL_LONG_2ADDR.byte:
                                                case OPCODE.MUL_INT_LIT8.byte:
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 5 hrs to fix
                                    src/Decompiler.js on lines 70..85
                                    src/Decompiler.js on lines 87..102
                                    src/Decompiler.js on lines 122..137

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 172.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                        add(pValue, pType){
                                            switch(pType){
                                                case OPCODE.ADD_INT_2ADDR.byte:
                                                case OPCODE.ADD_LONG_2ADDR.byte:
                                                case OPCODE.ADD_INT_LIT8.byte:
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 5 hrs to fix
                                    src/Decompiler.js on lines 87..102
                                    src/Decompiler.js on lines 104..119
                                    src/Decompiler.js on lines 122..137

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 172.

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                        div(pValue, pType){
                                            switch(pType){
                                                case OPCODE.DIV_INT_2ADDR.byte:
                                                case OPCODE.DIV_LONG_2ADDR.byte:
                                                case OPCODE.DIV_INT_LIT8.byte:
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 5 hrs to fix
                                    src/Decompiler.js on lines 70..85
                                    src/Decompiler.js on lines 87..102
                                    src/Decompiler.js on lines 104..119

                                    Duplicated Code

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

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

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

                                    Tuning

                                    This issue has a mass of 172.

                                    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

                                                    case OPCODE.IF_GTZ.byte:                
                                                        regX = this.getRegisterName(oper.left);
                                                        regV = this.getSymbol(regX);
                                                        if(this.simplify>0 && this.isImm(regV))
                                                            dec.push(`${indent}if( ${this.getImmediateValue(regV)} > 0 ) :cond_${oper.right.name}`);
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 4 hrs to fix
                                    src/Decompiler.js on lines 1502..1509

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

                                    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

                                                    case OPCODE.IF_GEZ.byte:                
                                                        regX = this.getRegisterName(oper.left);
                                                        regV = this.getSymbol(regX);
                                                        if(this.simplify>0 && this.isImm(regV))
                                                            dec.push(`${indent}if( ${this.getImmediateValue(regV)} >= 0 ) :cond_${oper.right.name}`);
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 4 hrs to fix
                                    src/Decompiler.js on lines 1510..1517

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                if((jump == false)
                                                    && (blocks[i+1] !== undefined) 
                                                    && (blocks[i].hasSuccessor(blocks[i+1])==false)){
                                                    
                                                    Logger.debug(`Block ${i} CONTINUE => Block ${blocks[i+1].offset}`)
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 3 hrs to fix
                                    src/Simplifier.js on lines 107..114

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.IF_LTZ.byte:                
                                                        regX = this.getRegisterName(oper.left);
                                                        regV = this.getSymbol(regX);
                                                        if(this.simplify>0 && this.isImm(regV))
                                                            dec.push(`${indent}if( ${this.getImmediateValue(regV)} < 0 )`);
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 3 hrs to fix
                                    src/Decompiler.js on lines 921..928
                                    src/Decompiler.js on lines 937..944
                                    src/Decompiler.js on lines 945..952

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.IF_NEZ.byte:                
                                                        regX = this.getRegisterName(oper.left);
                                                        regV = this.getSymbol(regX);
                                                        if(this.simplify>0 && this.isImm(regV))
                                                            dec.push(`${indent}if( ${this.getImmediateValue(regV)} != 0 )`);
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 3 hrs to fix
                                    src/Decompiler.js on lines 929..936
                                    src/Decompiler.js on lines 937..944
                                    src/Decompiler.js on lines 945..952

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.IF_GEZ.byte:                
                                                        regX = this.getRegisterName(oper.left);
                                                        regV = this.getSymbol(regX);
                                                        if(this.simplify>0 && this.isImm(regV))
                                                            dec.push(`${indent}if( ${this.getImmediateValue(regV)} >= 0 )`);
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 3 hrs to fix
                                    src/Decompiler.js on lines 921..928
                                    src/Decompiler.js on lines 929..936
                                    src/Decompiler.js on lines 945..952

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.IF_GTZ.byte:                
                                                        regX = this.getRegisterName(oper.left);
                                                        regV = this.getSymbol(regX);
                                                        if(this.simplify>0 && this.isImm(regV))
                                                            dec.push(`${indent}if( ${this.getImmediateValue(regV)} > 0 )`);
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 3 hrs to fix
                                    src/Decompiler.js on lines 921..928
                                    src/Decompiler.js on lines 929..936
                                    src/Decompiler.js on lines 937..944

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.CONST_WIDE_HIGH16.byte:
                                                        regX = this.getRegisterName(oper.left);
                                                        regV = this.setSymbol(regX, DTYPE.IMM_NUMERIC, oper.right._value);
                                                        if(this.simplify<1)
                                                            dec.push(`${indent}${regX} = ${this.getImmediateValue(regV)};`);
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 2 hrs to fix
                                    src/Decompiler.js on lines 576..581
                                    src/Decompiler.js on lines 584..591
                                    src/Decompiler.js on lines 1009..1016

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.CONST_STRING.byte:
                                                        
                                                        regX = this.getRegisterName(oper.left);
                                                        regV = this.setSymbol(regX, DTYPE.IMM_STRING, oper.right._value);
                                    
                                    
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 2 hrs to fix
                                    src/Decompiler.js on lines 576..581
                                    src/Decompiler.js on lines 1001..1006
                                    src/Decompiler.js on lines 1009..1016

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.CONST_WIDE_HIGH16.byte:
                                                        regX = this.getRegisterName(oper.left);
                                                        regV = this.setSymbol(regX, DTYPE.IMM_NUMERIC, oper.right._value);
                                                        if(this.simplify<1)
                                                            dec.push(`${indent}${regX} = ${this.getImmediateValue(regV)};`);
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 2 hrs to fix
                                    src/Decompiler.js on lines 584..591
                                    src/Decompiler.js on lines 1001..1006
                                    src/Decompiler.js on lines 1009..1016

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                    case OPCODE.CONST_STRING.byte:
                                                        
                                                        regX = this.getRegisterName(oper.left);
                                                        regV = this.setSymbol(regX, DTYPE.IMM_STRING, oper.right._value);
                                    
                                    
                                    Severity: Major
                                    Found in src/Decompiler.js and 3 other locations - About 2 hrs to fix
                                    src/Decompiler.js on lines 576..581
                                    src/Decompiler.js on lines 584..591
                                    src/Decompiler.js on lines 1001..1006

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                        and(pValue, pType){
                                            switch(pType){
                                                case OPCODE.AND_INT_2ADDR.byte:
                                                case OPCODE.AND_LONG_2ADDR.byte:
                                                case OPCODE.AND_INT_LIT8.byte:
                                    Severity: Major
                                    Found in src/Decompiler.js and 5 other locations - About 2 hrs to fix
                                    src/Decompiler.js on lines 171..181
                                    src/Decompiler.js on lines 184..194
                                    src/Decompiler.js on lines 197..207
                                    src/Decompiler.js on lines 210..220
                                    src/Decompiler.js on lines 223..233

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                        or(pValue, pType){
                                            switch(pType){
                                                case OPCODE.OR_INT_2ADDR.byte:
                                                case OPCODE.OR_LONG_2ADDR.byte:
                                                case OPCODE.OR_INT_LIT8.byte:
                                    Severity: Major
                                    Found in src/Decompiler.js and 5 other locations - About 2 hrs to fix
                                    src/Decompiler.js on lines 158..168
                                    src/Decompiler.js on lines 184..194
                                    src/Decompiler.js on lines 197..207
                                    src/Decompiler.js on lines 210..220
                                    src/Decompiler.js on lines 223..233

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                        xor(pValue, pType){
                                            switch(pType){
                                                case OPCODE.XOR_INT_2ADDR.byte:
                                                case OPCODE.XOR_LONG_2ADDR.byte:
                                                case OPCODE.XOR_INT_LIT8.byte:
                                    Severity: Major
                                    Found in src/Decompiler.js and 5 other locations - About 2 hrs to fix
                                    src/Decompiler.js on lines 158..168
                                    src/Decompiler.js on lines 171..181
                                    src/Decompiler.js on lines 197..207
                                    src/Decompiler.js on lines 210..220
                                    src/Decompiler.js on lines 223..233

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                        shr(pValue, pType){
                                            switch(pType){
                                                case OPCODE.SHR_INT_2ADDR.byte:
                                                case OPCODE.SHR_LONG_2ADDR.byte:
                                                case OPCODE.SHR_INT_LIT8.byte:
                                    Severity: Major
                                    Found in src/Decompiler.js and 5 other locations - About 2 hrs to fix
                                    src/Decompiler.js on lines 158..168
                                    src/Decompiler.js on lines 171..181
                                    src/Decompiler.js on lines 184..194
                                    src/Decompiler.js on lines 197..207
                                    src/Decompiler.js on lines 223..233

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                        ushr(pValue, pType){
                                            switch(pType){
                                                case OPCODE.USHR_INT_2ADDR.byte:
                                                case OPCODE.USHR_LONG_2ADDR.byte:
                                                case OPCODE.USHR_INT_LIT8.byte:
                                    Severity: Major
                                    Found in src/Decompiler.js and 5 other locations - About 2 hrs to fix
                                    src/Decompiler.js on lines 158..168
                                    src/Decompiler.js on lines 171..181
                                    src/Decompiler.js on lines 184..194
                                    src/Decompiler.js on lines 197..207
                                    src/Decompiler.js on lines 210..220

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                        shl(pValue, pType){
                                            switch(pType){
                                                case OPCODE.SHL_INT_2ADDR.byte:
                                                case OPCODE.SHL_LONG_2ADDR.byte:
                                                case OPCODE.SHL_INT_LIT8.byte:
                                    Severity: Major
                                    Found in src/Decompiler.js and 5 other locations - About 2 hrs to fix
                                    src/Decompiler.js on lines 158..168
                                    src/Decompiler.js on lines 171..181
                                    src/Decompiler.js on lines 184..194
                                    src/Decompiler.js on lines 210..220
                                    src/Decompiler.js on lines 223..233

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                            if(this.isImm(regV)){
                                                                regX = this.getSymbol(this.getRegisterName(oper.left[0]));
                                    
                                                                v = `${this.getRegisterName(oper.left[0])} = ${this.getImmediateValue(oper.left[1])}+${this.getRegisterName(oper.right)};`;
                                                                regX.setCode(v);
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 1 hr to fix
                                    src/Decompiler.js on lines 1089..1101

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

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

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

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

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

                                    Refactorings

                                    Further Reading

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

                                                            if(this.isImm(regV)){
                                    
                                                                regX = this.getRegisterName(oper.left[0]);
                                                                regX = this.getSymbol(regX);
                                    
                                    
                                    Severity: Major
                                    Found in src/Decompiler.js and 1 other location - About 1 hr to fix
                                    src/Decompiler.js on lines 1062..1073

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

                                    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

                                                        if(this.simplify<1){
                                                            v = `${this.getRegisterName(oper.left[0])} = ${this.getRegisterName(oper.left[1])}+${this.getImmediateValue(oper.right)};`;
                                    
                                                        }else{
                                                            regX = this.getRegisterName(oper.left[1]);
                                    Severity: Major
                                    Found in src/Decompiler.js and 2 other locations - About 50 mins to fix
                                    src/Decompiler.js on lines 757..770
                                    src/Decompiler.js on lines 1040..1074

                                    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

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

                                                            if(this.isImm(regV)){
                                                                regX = this.getRegisterName(oper.left[0]);
                                                                this.setSymbol(regX, regV.add(this.getImmediateValue(oper.right), oper.opcode.byte));
                                                            }else{
                                                                v = `${this.getRegisterName(oper.left[0])} = ${this.getRegisterName(oper.left[1])}+${this.getImmediateValue(oper.right)};`;
                                    Severity: Minor
                                    Found in src/Decompiler.js and 1 other location - About 50 mins to fix
                                    src/Decompiler.js on lines 764..769

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

                                                        if(this.simplify<1){
                                                            v = `${this.getRegisterName(oper.left[0])} = ${this.getRegisterName(oper.left[1])}+${this.getImmediateValue(oper.right)};`;
                                    
                                                        }else{
                                                            regX = this.getRegisterName(oper.left[1]);
                                    Severity: Major
                                    Found in src/Decompiler.js and 2 other locations - About 50 mins to fix
                                    src/Decompiler.js on lines 1021..1034
                                    src/Decompiler.js on lines 1040..1074

                                    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

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

                                                            if(this.isImm(regV)){
                                                                regX = this.getRegisterName(oper.left[0]);
                                                                this.setSymbol(regX, regV.addInt8(this.getImmediateValue(oper.right)));
                                                            }else{
                                                               v = `${this.getRegisterName(oper.left[0])} = ${this.getRegisterName(oper.left[1])}+${this.getImmediateValue(oper.right)};`;
                                    Severity: Minor
                                    Found in src/Decompiler.js and 1 other location - About 50 mins to fix
                                    src/Decompiler.js on lines 1028..1033

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

                                                        if(this.simplify<1){
                                                            v = `${this.getRegisterName(oper.left[0])} = ${this.getRegisterName(oper.left[1])}+${this.getRegisterName(oper.right)};`;
                                                            
                                                        }else{
                                                            regX = this.getRegisterName(oper.right);
                                    Severity: Major
                                    Found in src/Decompiler.js and 2 other locations - About 50 mins to fix
                                    src/Decompiler.js on lines 757..770
                                    src/Decompiler.js on lines 1021..1034

                                    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

                                    There are no issues that match your filters.

                                    Category
                                    Status