FrenchYeti/dexcalibur

View on GitHub

Showing 446 of 948 total issues

Function gotoLocalXref has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function gotoLocalXref(method,goto_name){
    let xref = {
        name: null,
        ref: [],
        ctr: 0 
Severity: Minor
Found in inspectors/BytecodeCleaner/service/main.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 sprint has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    sprint(){
        let dbg="["

        if(this.public) dbg += "public,";
        if(this.protected) dbg += "protected,";
Severity: Minor
Found in src/AccessFlags.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 decodeSymbol has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function decodeSymbol() {
        var byte1;
        var byte2;
        var byte3;
        var byte4;
Severity: Minor
Found in src/UTF8.js - About 1 hr to fix

    Function Class has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function Class(config){
        // corresponding stub type to use during export
        this.__stub_type__ = STUB_TYPE.CLASS;
        this.$ = STUB_TYPE.CLASS;
    
    
    Severity: Minor
    Found in src/CoreClass.js - About 1 hr to fix

      Function sshow has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      FinderResult.prototype.sshow = function(){
          let sub = [];
          this.data.map((k,x)=>{
              if(x instanceof CLASS.Method){
                  sub.push({ 
      Severity: Minor
      Found in src/Finder.js - About 1 hr to fix

        Function updateDeviceList has 45 lines of code (exceeds 25 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 1 hr to fix

          Function findCyclicRef has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function findCyclicRef(obj,fullPath=[],endPath=[],cycle=0){
              let path = fullPath, end=endPath, k=0;
              if(cycle>cycleMax){
                  //console.log("[E] Max cycle : "+path.join('.'));
                  return false;
          Severity: Minor
          Found in src/BackupManager.js - About 1 hr to fix

            Function block has 45 lines of code (exceeds 25 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 1 hr to fix

              Function method has 45 lines of code (exceeds 25 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 1 hr to fix

                Function scan has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                Open

                    async scan(){
                        let dev=[], wrapper=null, activeDev = 0, latestDefault=null;
                
                        latestDefault = this.getDefault();
                
                
                Severity: Minor
                Found in src/DeviceManager.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 fromJsonObject has a Cognitive Complexity of 14 (exceeds 5 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

                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 fromString has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                Open

                    static fromString( pType, pArrayStr){
                        const RE  = new RegExp('[\s\t]*\[[\s\t]*(?<ctn>.*)[\s\t]*\][\s\t]*');
                        let m = RE.exec(pArrayStr);
                        if(m == null){
                            throw new VM_Exception('VM002','Unable to parse bytearray parameter: invalid format');
                Severity: Minor
                Found in src/SmaliVM.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 fromXml has 43 lines of code (exceeds 25 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 1 hr to fix

                  Function makeTable has 42 lines of code (exceeds 25 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 1 hr 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

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

                          static load( pContext, pProjectUID, pConfigPath = null){
                              
                              let project = new DexcaliburProject( pContext, pProjectUID);
                              let data = null;
                      
                      
                      Severity: Minor
                      Found in src/DexcaliburProject.js - About 1 hr to fix

                        Function caller has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        FinderResult.prototype.caller = function(){
                            let meth = new MemoryDb.Index(), obj=null;
                            this.data.map((k,v)=>{
                                obj=this.data[i];
                        
                        
                        Severity: Minor
                        Found in src/Finder.js - About 1 hr to fix

                          Function load has a Cognitive Complexity of 13 (exceeds 5 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

                          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 getApktoolArg has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                          Open

                              static getApktoolArg(pOption, pValue){
                                  
                                  switch(pOption){
                                      case 'no_res':
                                          return (pValue==true ? '-r' : '');
                          Severity: Minor
                          Found in src/ApkHelper.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 MethodReference has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function MethodReference(cfg){
                              this.fqcn = null;
                              this.name = null;
                              this.args = null;
                              this.ret = null;
                          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