FrenchYeti/dexcalibur

View on GitHub

Showing 446 of 948 total issues

File Finder.js has 781 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var ut = require("./Utils.js");
const CLASS = require("./CoreClass.js");
const FILE = require("./File.js");
const Logger = require("./Logger.js")();
var CONST = require("./CoreConst.js");
Severity: Major
Found in src/Finder.js - About 1 day to fix

    Function decompileBasicBlock has 334 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        decompileBasicBlock(pBlock, pDepth=0){
            let ops = [], dec=[],  f={res:false}, v='', regX=null,  regV=null, oper=null, tmp=[];
            let indent = "    ".repeat(pDepth);
    
            ops = pBlock.getInstructions();  ;  
    Severity: Major
    Found in src/Decompiler.js - About 1 day to fix

      Function methodRaw has a Cognitive Complexity of 81 (exceeds 5 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: Minor
      Found in src/Disassembler.js - About 1 day 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 mapInstructionFrom has a Cognitive Complexity of 78 (exceeds 5 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: Minor
      Found in src/Analyzer.js - About 1 day 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 71 (exceeds 5 allowed). Consider refactoring.
      Open

      Method.prototype.toJsonObject = function(fields=[],exclude=[]){
          let obj = new Object();
          if(fields.length>0){
              for(let i=0; i<fields.length; i++){
                  if(this[fields[i]] != null && this[fields[i]].toJsonObject != null){
      Severity: Minor
      Found in src/CoreClass.js - About 1 day 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 restore has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
      Open

      function restore(filepath){
          let src=null, db=[];
      
          // unzip file
          Process.exec("unzip "+filepath);
      Severity: Minor
      Found in src/BackupManager.js - About 1 day 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 SmaliParser.js has 555 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      const _fs_ = require('fs');
      const _es_ = require('event-stream');
      
      
      var ut = require("./Utils.js"); 
      Severity: Major
      Found in src/SmaliParser.js - About 1 day to fix

        Function save has 230 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function save(data,file){
            let tab={}, src={}, block=null;
        
        
            for(let i in data.classes){
        Severity: Major
        Found in src/BackupManager.js - About 1 day to fix

          Function method has 199 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              method(src, raw_src, src_line){
                  if(this.state != SML_METH) return null;
                  
                  let sml=src, hdl=null, catchStmt=null, tmp=null;
          
          
          Severity: Major
          Found in src/SmaliParser.js - About 7 hrs to fix

            Function runDecompile has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
            Open

                runDecompile(pTree, pSource=[], pDepth=0, pStop=false, pClose=false){
                    let cont = true, source=pSource, res={ depth:0 }, succ=null, pred=[], d=null, tmp=null;
                    let next = [], ifelse=false;
                    
                    console.log(this.dump(pTree));
            Severity: Minor
            Found in src/Decompiler.js - About 7 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 toJsonObject has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
            Open

            Class.prototype.toJsonObject = function(filter){
                let obj = new Object(), m=null;
                for(let i in this){
                    if(["_","$"].indexOf(i[0])==-1 
                        && (typeof this[i] != 'array')
            Severity: Minor
            Found in src/CoreClass.js - About 7 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 main.js has 459 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            const IFC = require("../../../src/InspectorFrontController.js");
            var CONST = require("../../../src/CoreConst.js");
            const Disassembler = require("../../../src/Disassembler.js");
            
            var Controller =  new IFC.FrontController();
            Severity: Minor
            Found in inspectors/BytecodeCleaner/service/main.js - About 7 hrs to fix

              Function import has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
              Open

                  import(pData){
                      let index = null, o=null, hook=null, qflag=0;
              
                      if(pData.classes.size > 0){
                          index = this._db.getIndex("classes");
              Severity: Minor
              Found in inspectors/Saver/SaveManager.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

              BasicBlock has 49 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class BasicBlock
              {
                  /**
                  * @param {Object} config Optional, an object wich can be used in order to initialize the instance 
                  * @constructor
              Severity: Minor
              Found in src/CoreClass.js - About 6 hrs to fix

                File BinaryXmlParser.js has 450 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                'use strict';
                // Code extracted from https://github.com/openstf/adbkit-apkreader
                const debug = false;
                
                const NodeType = {
                Severity: Minor
                Found in src/libs/BinaryXmlParser.js - About 6 hrs to fix

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

                      analyzeBlocks(pMethod){
                          
                          let blocks =  pMethod.getBasicBlocks();
                  
                          if(blocks.length == 0) return null;
                  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

                  Function findTargetBasicBlocks has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function findTargetBasicBlocks(method, gotoLabel){
                      //console.log("Searching block at :goto_"+gotoLabel);
                      let targetBBs = null, found=false, offset=0, duplicate=false;
                      if( method.instr != null && method.instr.length > 0){
                          for(let i=0; i<method.instr.length ; i++){
                  Severity: Minor
                  Found in inspectors/BytecodeCleaner/service/main.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

                  Function MakeMap has 159 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function MakeMap(data,absoluteDB){
                      
                      Logger.raw("\n[*] Start object mapping ...\n------------------------------------------");
                      let step = data.classes.size(), /*data.classesCtr,*/ g=0;   
                      let overrided = [];
                  Severity: Major
                  Found in src/Analyzer.js - About 6 hrs to fix

                    Function writeIndirectInvoke has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
                    Open

                        writeIndirectInvoke( pInvokerObjRef, pInvokerArgRef, pInvokedMethod, pObj, pArgs){
                            let irObj=null, irArg=null, ivObj=null, ivArg=null,  v = null, rThis=null, vThis=0, rArg=null, vArg=null;
                    
                            irObj = this.vm.getRegisterName(pInvokerObjRef);
                            ivObj = this.vm.stack.getLocalSymbol(irObj); 
                    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

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

                    Severity
                    Category
                    Status
                    Source
                    Language