FrenchYeti/dexcalibur

View on GitHub

Showing 446 of 948 total issues

Function SearchAPI has 153 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function SearchAPI(data){
    
    // AnalyzerDatabase (specialize InMemoryDb)
    var _db = this._db = data;
    this._queryCache = [];
Severity: Major
Found in src/Finder.js - About 6 hrs to fix

    Function start has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
    Open

        start( pMethod, pThis, pArguments=null, pClearHeap=false){
            let opt = null, margs=null, arr=null;
    
            // clean StackMemory 
            this.stack.clear();
    Severity: Minor
    Found in src/SmaliVM.js - About 6 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 BackupManager.js has 414 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    var fs = require('fs');
    var Chalk = require("chalk");
    var Process = require("child_process");
    const Path = require("path");
    
    
    Severity: Minor
    Found in src/BackupManager.js - About 5 hrs to fix

      File main.js has 413 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      const Fs = require("fs");
      const Path = require("path")
      
      const HOOK = require("../../src/HookManager.js");
      const CLASS = require("../../src/CoreClass.js");
      Severity: Minor
      Found in inspectors/DynamicLoader/main.js - About 5 hrs to fix

        File Device.js has 408 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        
        const Logger = require("./Logger.js")();
        const _MD5_ = require("md5");
        const _FS_ = require('fs');
        const _path_ = require('path');
        Severity: Minor
        Found in src/Device.js - About 5 hrs to fix

          VM has 42 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class VM
          {
          
              /**
               * Instance of the VM  
          Severity: Minor
          Found in src/SmaliVM.js - About 5 hrs to fix

            File DexcaliburProject.js has 402 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            var Process = require("child_process");
            const _path_ = require("path");
            const Fs = require("fs");
            
            var Logger = require("./Logger.js")();
            Severity: Minor
            Found in src/DexcaliburProject.js - About 5 hrs to fix

              Function run has 136 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  run( pStack, pDepth=0){
                      let i=0, f=0, dec=null, msg=null, ctxRST=null, bbs=null, mode=SINGLE_MODE ;
                      let indent = "    ".repeat(this.depth);
              
                      // add emulated method to callstack;
              Severity: Major
              Found in src/SmaliVM.js - About 5 hrs to fix

                Function updateDeviceList has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
                Open

                    updateDeviceList( pCandidateList){
                        let active = 0, b=null, d=null, id=null, dev=null;
                        let devs = {};
                
                        for(let i=0; i<pCandidateList.length; i++){
                Severity: Minor
                Found in src/DeviceManager.js - About 5 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 setupHooks has 131 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    setupHooks( ){
                        // getMethod => should return method from  pThis class 
                        this.vm.defineHook(
                            "java.lang.Class.getMethod(<java.lang.String><java.lang.Class>[])<java.lang.reflect.Method>",
                            function( pVM, pThis, pArgs){
                Severity: Major
                Found in src/Simplifier.js - About 5 hrs to fix

                  Device has 39 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class Device
                  {
                      /**
                       * 
                       * @param {*} config 
                  Severity: Minor
                  Found in src/Device.js - About 5 hrs to fix

                    AccessFlags has 39 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class AccessFlags
                    {
                        /**
                         * To create a new AccessFlags 
                         * @param {*} pVisibility Visiblity bitmap. Default is PUBLIC (only)
                    Severity: Minor
                    Found in src/AccessFlags.js - About 5 hrs to fix

                      Function merge has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                      Open

                          merge( pDevice){
                              for(let i in pDevice){
                                  switch(i){
                                      case 'enrolled':
                                          if(pDevice.enrolled)
                      Severity: Minor
                      Found in src/Device.js - About 5 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 123 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function Method(config){
                          // corresponding stub type to use during export
                          this.__stub_type__ = STUB_TYPE.METHOD;
                          this.$ = STUB_TYPE.METHOD;
                      
                      
                      Severity: Major
                      Found in src/CoreClass.js - About 4 hrs to fix

                        Function __checkDeepField has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                        Open

                            __checkDeepField(object,search, offset=0){
                                let ref=object, i=offset;
                        
                                if(object == null) return false;
                        
                        
                        Severity: Minor
                        Found in src/Finder.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 methodRaw has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        Disassembler.prototype.methodRaw = function(method){
                        
                            let bb=null, txt="", prefix="", bbe={}, line={}, result=[], c={};
                            
                            for(let i in method.instr){
                        Severity: Major
                        Found in src/Disassembler.js - About 4 hrs to fix

                          Function mapInstructionFrom has 121 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function mapInstructionFrom(method, data, stats){
                              let bb = null, instruct = null, obj = null, x = null, success=false, stmt=null, tmp=null, t=0,t1=0;
                          
                              if(! method instanceof CLASS.Method){
                                  Logger.error("[!] mapping failed : method provided is not an instance of Method.");
                          Severity: Major
                          Found in src/Analyzer.js - About 4 hrs to fix

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

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

                                performBinaryOp( pOpCode, pType, pDest, pSrc1, pSrc2=null){
                            
                                    let dst = null, src1 = null, src2 = null;
                            
                                    src1 = { 
                            Severity: Minor
                            Found in src/SmaliVM.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 createInstance has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                            Open

                                createInstance( pProject){
                                    let ins = new Inspector.Inspector();
                                    let hs = null;
                                    let hooks = null;
                            
                            
                            Severity: Minor
                            Found in src/InspectorFactory.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

                            Severity
                            Category
                            Status
                            Source
                            Language