FrenchYeti/dexcalibur

View on GitHub

Showing 948 of 948 total issues

DexcaliburEngine has 32 functions (exceeds 20 allowed). Consider refactoring.
Open

class DexcaliburEngine
{
    /**
     * To instanciate DexcaliburEngine.
     * 
Severity: Minor
Found in src/DexcaliburEngine.js - About 4 hrs to fix

    DexcaliburProject has 32 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class DexcaliburProject
    {
    
        /**
         * 
    Severity: Minor
    Found in src/DexcaliburProject.js - About 4 hrs to fix

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

                  if(this.isImm(regV)){
                      if(regX.hasCode()){
                          this.stack.setLocalSymbol(
                              regV, 
                              DTYPE.IMM_NUMERIC,
      Severity: Major
      Found in src/SmaliVM.js and 1 other location - About 4 hrs to fix
      src/SmaliVM.js on lines 3117..3141

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

      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)){
                                  if(regX.hasCode()){
                                      this.stack.setLocalSymbol(
                                          regV, 
                                          DTYPE.IMM_NUMERIC,
      Severity: Major
      Found in src/SmaliVM.js and 1 other location - About 4 hrs to fix
      src/SmaliVM.js on lines 1995..2019

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

      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

      Function makeTable has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
      Open

          makeTable: function(array, fields){
              if(array.length == 0) return "";
      
              // filtre les colonnes
              let header = [], body=[], row={}, w=0, maxwidth={} ; 
      Severity: Minor
      Found in src/Utils.js - About 3 hrs to fix

      Cognitive Complexity

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

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

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

      Further reading

      Function method has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
      Open

      Disassembler.prototype.method = function(method){
      
              let bb=null, txt="", prefix="";
              
              console.log("\n  "+method.signature());
      Severity: Minor
      Found in src/Disassembler.js - About 3 hrs to fix

      Cognitive Complexity

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

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

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

      Further reading

      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/Simplifier.js and 1 other location - About 3 hrs to fix
      src/Decompiler.js on lines 1632..1639

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

      Function export has 96 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          export(pExclude=null){
              let data={}, coll=null, pData=null;
              let self=this;
      
              data.methods = {data:{}, size:self._db.getIndex("methods").size()};
      Severity: Major
      Found in inspectors/Saver/SaveManager.js - About 3 hrs to fix

        Function parseDeviceList has 94 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            async parseDeviceList( pDeviceListStr){
                let dev = [], ret=null,re=null, data=null, id=null, device=null, token=null;
                let bridge = null;
        
                Logger.debug(pDeviceListStr);
        Severity: Major
        Found in src/AdbWrapper.js - About 3 hrs to fix

          Function block has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

          Disassembler.prototype.block = function(method,bb,nested,tagged){
              let before = " ".repeat((nested*2)+1);
              let ignore = [];
              //before += "╚═";
          
          
          Severity: Minor
          Found in src/Disassembler.js - About 3 hrs to fix

          Cognitive Complexity

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

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

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

          Further reading

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

              this.callSignature = function(){
                  if(this.__callSignature__===null){
                      let xargs = "";
          //            for(let i in this.args) xargs+="<"+this.args[i].signature()+">";
                      for(let i in this.args) xargs+=this.args[i].signature();
          Severity: Major
          Found in src/CoreClass.js and 1 other location - About 3 hrs to fix
          src/CoreClass.js on lines 1280..1290

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

          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

              this.aliasedCallSignature = function(){
                  if(this.__aliasedCallSignature__===null){
                      let xargs = "";
          //            for(let i in this.args) xargs+="<"+this.args[i].signature()+">";
                      for(let i in this.args) xargs+=this.args[i].signature();
          Severity: Major
          Found in src/CoreClass.js and 1 other location - About 3 hrs to fix
          src/CoreClass.js on lines 1291..1301

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

          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

          Function writeInvoke has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
          Open

              writeInvoke( pMethodRef, pParamsReg){
                  let v = null, rThis=null, vThis=0, rArg=null, vArg=null;
          
                  if(pParamsReg.length > 0){
                      rThis = this.vm.getRegisterName(pParamsReg[0]);
          Severity: Minor
          Found in src/SmaliVM.js - About 3 hrs to fix

          Cognitive Complexity

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

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

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

          Further reading

          Function fromXml has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
          Open

              static fromXml(xmlobj){
                  let app = new AndroidApplication();
          
                  for(let i in xmlobj.$){
                      if(i.startsWith('android:')){
          Severity: Minor
          Found in src/AndroidAppComponents.js - About 3 hrs to fix

          Cognitive Complexity

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

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

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

          Further reading

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

                              if(this.isImm(regV)){
                                  // TRUE case
                                  if(regV.getValue() !== null){
                                      v = `// ${regX}=${this.getImmediateValue(regV)} is not null, so "if(${regX} != 0)" was TRUE. Continue ...`;
                                  }
          Severity: Major
          Found in src/SmaliVM.js and 1 other location - About 3 hrs to fix
          src/SmaliVM.js on lines 4163..4202

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

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

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

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

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

          Refactorings

          Further Reading

          Severity
          Category
          Status
          Source
          Language