FrenchYeti/dexcalibur

View on GitHub

Showing 446 of 948 total issues

Function parseDeviceList has a Cognitive Complexity of 31 (exceeds 5 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: Minor
Found in src/AdbWrapper.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

File DexcaliburEngine.js has 356 lines of code (exceeds 250 allowed). Consider refactoring.
Open

const _fs_ = require('fs');
const _path_ = require('path');
const _os_ = require("os");
const _url_ = require("url");

Severity: Minor
Found in src/DexcaliburEngine.js - About 4 hrs to fix

    File AdbWrapper.js has 356 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    const Process = require("child_process");
    const _path_ = require('path');
    
    const UT = require("./Utils.js");
    const Device = require("./Device.js");
    Severity: Minor
    Found in src/AdbWrapper.js - About 4 hrs to fix

      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

      HookManager has 34 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class HookManager
      {
          /**
           * 
           * @param {*} pProject 
      Severity: Minor
      Found in src/HookManager.js - About 4 hrs to fix

        Function performBinaryOp has 108 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            performBinaryOp( pOpCode, pType, pDest, pSrc1, pSrc2=null){
        
                let dst = null, src1 = null, src2 = null;
        
                src1 = { 
        Severity: Major
        Found in src/SmaliVM.js - About 4 hrs to fix

          Function restore has 107 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function restore(filepath){
              let src=null, db=[];
          
              // unzip file
              Process.exec("unzip "+filepath);
          Severity: Major
          Found in src/BackupManager.js - About 4 hrs to fix

            Function toJsonObject has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
            Open

            Field.prototype.toJsonObject = function(fields=null,exclude=null){
                let obj = new Object();
                /*if(fields.length>0){
                    for(let i in fields){
                        if(this[fields[i]] != null && (typeof this[fields[i]] == "object")){
            Severity: Minor
            Found in src/CoreClass.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

            File DeviceManager.js has 337 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            const _path_ = require("path");
            const _fs_ = require("fs");
            const _os_ = require('os');
            
            var ut = require("./Utils.js");
            Severity: Minor
            Found in src/DeviceManager.js - About 4 hrs to fix

              File SaveManager.js has 336 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              const _fs_ = require("fs");
              const _path_ = require("path");
              
              const Logger = require('../../src/Logger.js')(); 
              const DB = require('../../connectors/inmemory/InMemoryDb.js');
              Severity: Minor
              Found in inspectors/Saver/SaveManager.js - About 4 hrs to fix

                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

                    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

                    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

                        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

                        Severity
                        Category
                        Status
                        Source
                        Language