FrenchYeti/dexcalibur

View on GitHub

Showing 446 of 948 total issues

Function renameStaticInterface has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function renameStaticInterface(database, method, pContext){

    if(!hasSingleCall(method)) return false;
    if(method.args.length==0) return false;

Severity: Minor
Found in inspectors/BytecodeCleaner/service/main.js - About 1 hr to fix

    Function load has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        load( pClass, pExecClinit=true){
            let clz = null;
            
            if(pClass instanceof CLASS.Class){
                if(this.classes[pClass.name] != undefined) 
    Severity: Minor
    Found in src/SmaliVM.js - About 1 hr to fix

      Function simplify has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          simplify(pMethod, pLevel=0){
              let blocks = [], cs = {
                  tag: null,
                  intr: [],
                  logs: [],
      Severity: Minor
      Found in src/Simplifier.js - About 1 hr to fix

        Function fromJsonObject has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            static fromJsonObject( pJsonObject, pOverride = {}){
                let dev = new Device();
                for(let i in pJsonObject){
                    switch(i){
                        case 'type':
        Severity: Minor
        Found in src/Device.js - About 1 hr to fix

          Function readDimension has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            readDimension() {
              const dimension = {
                value: null,
                unit: null,
                rawUnit: null
          Severity: Minor
          Found in src/libs/BinaryXmlParser.js - About 1 hr to fix

            Function toJsonObject has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                toJsonObject(exclude=[]){
                    let o = new Object();
                    for(let i in this){
                        if(exclude.indexOf(i)>-1) continue;
                        if(this[i]==null) continue;
            Severity: Minor
            Found in src/CoreClass.js - About 1 hr to fix

              Function constructor has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  constructor(pContext, pConnectorType=null){
                      this.ctx = pContext;
              
                      /**
                       * DB connector
              Severity: Minor
              Found in src/AnalyzerDatabase.js - About 1 hr to fix

                Function setup has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    setup(pDeviceID = null, pReturnString =  true){
                        let cmd=null;
                
                        if(pReturnString)
                            cmd = this.path;
                Severity: Minor
                Found in src/AdbWrapper.js - About 1 hr to fix

                  Function toIntercept has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  HookPrimitive.prototype.toIntercept = function(context,set){
                  
                      let hook = new Hook(context);
                  
                      hook.variables = this.variables;
                  Severity: Minor
                  Found in src/HookManager.js - About 1 hr to fix

                    Function invoke has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        invoke( pMethod, pObj, pArgs){
                            let opt = null;
                    
                            // execute hooks 
                            if(this.isHooked(pMethod)){
                    Severity: Minor
                    Found in src/SmaliVM.js - About 1 hr to fix

                      Function Call has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function Call(cfg){
                      
                          this.$ = STUB_TYPE.CALL;
                      
                          this.instr = null;
                      Severity: Minor
                      Found in src/CoreClass.js - About 1 hr to fix

                        Function getIntentFilter has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            getIntentFilter(type,cmp,uid){
                                let result = null;
                        
                                switch(type)
                                {
                        Severity: Minor
                        Found in src/AndroidAppAnalyzer.js - About 1 hr to fix

                          Function constructor has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              constructor(pContext, pMethod = null, pLocalSize = null, pParamSize = null){
                                  
                                  this.context = pContext;
                          
                                  this.logs = new VM_Log();
                          Severity: Minor
                          Found in src/SmaliVM.js - About 1 hr to fix

                            Function init has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                init(){
                                    if(!_fs_.existsSync(this.path)){
                                        _fs_.mkdirSync(this.path, {recursive: true});
                                    }    
                                    if(!_fs_.existsSync(_path_.join(this.path, DIR_NAME.SAVE))){
                            Severity: Minor
                            Found in src/Workspace.js - About 1 hr to fix

                              Function callgraph_from has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              GraphMaker.prototype.callgraph_from = function(obj, n=1, m=2){
                                  let tree={ 
                                      fqcn:obj.signature(), 
                                      tags: obj.tags,
                                      //internal:obj.hasTag(AnalysisHelper.TAG.Discover.Internal), 
                              Severity: Minor
                              Found in src/Graph.js - About 1 hr to fix

                                Function addIntercept has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                HookSet.prototype.addIntercept = function(interceptConfig){
                                    if(interceptConfig.method == null && interceptConfig.raw == null){
                                        Logger.error("[HOOK MANAGER] addIntercept(): The method to hook is not defined");
                                        return null;
                                    }
                                Severity: Minor
                                Found in src/HookManager.js - About 1 hr to fix

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

                                      toJsonObject( pFields){
                                          let o= {};
                                          if(pFields !== null){
                                              for(let i in pFields){
                                                  if(typeof this[pFields[i]] == "object"){
                                  Severity: Minor
                                  Found in src/ModelPackage.js - About 1 hr to fix

                                  Cognitive Complexity

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

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

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

                                  Further reading

                                  Function isEmpty has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      isEmpty: function( pVar, pFlags=NO_FLAG){
                                          let f=null, p=null;
                                          switch(typeof pVar){
                                              case 'array':
                                                  if(pFlags != null)
                                  Severity: Minor
                                  Found in src/Utils.js - About 1 hr to fix

                                  Cognitive Complexity

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

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

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

                                  Further reading

                                  Function compare has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  Field.prototype.compare = function(field){
                                      let diff = [];
                                  
                                      for(let i in this){
                                          switch(i){
                                  Severity: Minor
                                  Found in src/CoreClass.js - About 1 hr to fix

                                  Cognitive Complexity

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

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

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

                                  Further reading

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

                                  Package.prototype.toJsonObject = function(fields){
                                      let o=new Object();
                                      if(fields !== null){
                                          for(let i in fields){
                                              if(typeof this[fields[i]] == "object"){
                                  Severity: Minor
                                  Found in src/CoreClass.js - About 1 hr to fix

                                  Cognitive Complexity

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

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

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

                                  Further reading

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language