FrenchYeti/dexcalibur

View on GitHub

Showing 446 of 948 total issues

Avoid deeply nested control flow statements.
Open

                    if(f==0) 
                        this.pcmaker.push(`try{`);
                    else
                        this.pcmaker.push(`${CR}try{`);
Severity: Major
Found in src/SmaliVM.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        if(next.hasPredecessor(blocks[i])==false){
                            next.addPredecessor(blocks[i]);
                        }
    Severity: Major
    Found in src/Simplifier.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if(vArg.hasConcrete()){
                              v+= this.vm.pcmaker.renderConcrete(vArg);
                          }else{
                              v+= rArg;
                          }
      Severity: Major
      Found in src/SmaliVM.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                    if(regX.hasCode()){
                                        this.stack.setLocalSymbol(
                                            regV, 
                                            DTYPE.IMM_NUMERIC,
                                            null,
        Severity: Major
        Found in src/SmaliVM.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if(regV.getValue() instanceof VM_ClassInstance){
          
                                      v = `// ${regX}=(ClassInstance)${regV.getValue().parent.name} is not null, so "if(${regX} == 0)" was FALSE. Continue ...`;
                                      
                                      //v = `${indent}if( ${regV.getValue().getConcrete()} != null ) ${label}`;
          Severity: Major
          Found in src/SmaliVM.js - About 45 mins to fix

            Function constructor has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                constructor(config=null){
                    // the manifest data are stored here
            
                    this.attr = {};
            
            
            Severity: Minor
            Found in src/AndroidAppComponents.js - About 45 mins 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 table has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                table: function(header,array){
                    let out = "|", sep= "|";
                    for(let i in header){
                        out += header[i]+"|";
                        sep += "--|";   
            Severity: Minor
            Found in src/Markdown.js - About 45 mins 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

            Avoid deeply nested control flow statements.
            Open

                            else if(instr[k].opcode.type == CONST.INSTR_TYPE.RET){
                                //Logger.debug(`Block ${i} RETURN`)
                                jump = true;
                            }
            Severity: Major
            Found in src/SmaliVM.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if(f>0){
                                      //ssmali.push(`${bbs.getCatchLabel()}:`);
                                      this.pcmaker.push(`:${bbs.getCatchLabel()}`);
                                  }else{
                                      this.pcmaker.push(`${CR}${bbs.getCatchLabel()}`);
              Severity: Major
              Found in src/SmaliVM.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    if(bbs.hasMultiplePredecessors()){
                                        if(f>0) 
                                            this.pcmaker.push(`:goto_${bbs.getGotoLabel()}:`);
                                        else{
                                            this.pcmaker.push(`${CR}goto_${bbs.getGotoLabel()}:`);
                Severity: Major
                Found in src/SmaliVM.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if(d != null){
                                              devs[this.devices[i].uid] = this.devices[i];
                                          }
                  Severity: Major
                  Found in src/DeviceManager.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if(d == null){
                                                devs[this.devices[i].uid] = this.devices[i];
                                            }
                    Severity: Major
                    Found in src/DeviceManager.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              if(pArguments["p"+i].val != null){
                                                  if(getDataTypeOf(margs[i])==DTYPE.ARRAY){
                                                      // parse array string
                                                      arr = VM_VirtualArray.fromString( margs[i].type, pArguments["p"+i].val);
                      
                      
                      Severity: Major
                      Found in src/SmaliVM.js - About 45 mins to fix

                        Function constructor has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                        Open

                            constructor(config=null){
                                // the manifest data are stored here
                        
                                this.attr = {};
                        
                        
                        Severity: Minor
                        Found in src/AndroidAppComponents.js - About 45 mins 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 constructor has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                        Open

                            constructor(config=null){
                                // the manifest data are stored here
                        
                                this.attr = {};
                        
                        
                        Severity: Minor
                        Found in src/AndroidAppComponents.js - About 45 mins 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

                        Avoid deeply nested control flow statements.
                        Open

                                                if(blocks[i+1].hasPredecessor(blocks[i])==false){
                                                    blocks[i+1].addPredecessor(blocks[i]);
                                                }
                        Severity: Major
                        Found in src/SmaliVM.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if(this.stack.callstack.length==1) this.pcmaker.turnOff();
                          Severity: Major
                          Found in src/SmaliVM.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                if(next.hasPredecessor(blocks[i])==false){
                                                    next.addPredecessor(blocks[i]);
                                                }
                            Severity: Major
                            Found in src/SmaliVM.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                  if(arg.name != meths[i].args[j]._name) 
                                                      ok=false;
                              Severity: Major
                              Found in src/SmaliVM.js - About 45 mins to fix

                                Function getInstance has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function getInstance(config=null, override=false){
                                    if(loggerInstance===null || override){
                                        if(config===null){
                                            config={
                                                testMode: false,
                                Severity: Minor
                                Found in src/Logger.js - About 45 mins 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