FrenchYeti/dexcalibur

View on GitHub

Showing 948 of 948 total issues

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

Analyzer.prototype.showCFG = function(bblocks, offset=0, prefix="", fn=null){

    if(bblocks.length==0 || bblocks[offset]==undefined){
        Logger.debug(offset+" => not block");
        return null;
Severity: Minor
Found in src/Analyzer.js - About 1 hr to fix

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

        parsePackageList( pPackageListStr, pOptions=''){
            var reg = new RegExp("^package:(?<apk_name>.*)");
            var packages = [];
    
            if(pPackageListStr.indexOf("error:")==0){
    Severity: Minor
    Found in src/AdbWrapper.js - About 1 hr to fix

      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

                        Similar blocks of code found in 4 locations. Consider refactoring.
                        Open

                                                    case STUB_TYPE.FIELD:
                                                        fied = db[bb.stack[l].right.id];
                                                        bb.stack[l].right = src[fied.enclosingClass.id].fields[fied.id];
                                                        break;
                        Severity: Major
                        Found in src/BackupManager.js and 3 other locations - About 1 hr to fix
                        src/BackupManager.js on lines 516..519
                        src/BackupManager.js on lines 529..532
                        src/BackupManager.js on lines 533..536

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 79.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 4 locations. Consider refactoring.
                        Open

                                                            case STUB_TYPE.METHOD:
                                                                meth = src[bb.stack[l].right.id];
                                                                bb.stack[l].right = db[meth.enclosingClass.id].methods[meth.id];
                                                                break;
                        Severity: Major
                        Found in src/BackupManager.js and 3 other locations - About 1 hr to fix
                        src/BackupManager.js on lines 516..519
                        src/BackupManager.js on lines 520..523
                        src/BackupManager.js on lines 533..536

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 79.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                                            }else if(regV.type == DTYPE.OBJECT_REF){
                                                console.log(regV);
                                                // FALSE case
                                                if(regV.getValue() instanceof VM_ClassInstance){
                        
                        
                        Severity: Major
                        Found in src/SmaliVM.js and 1 other location - About 1 hr to fix
                        src/SmaliVM.js on lines 4233..4255

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 79.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                          readXmlNamespaceStart(/* header */) {
                            /* const line = */ this.readU32();
                            /* const commentRef = */ this.readU32();
                            /* const prefixRef = */ this.readS32();
                            /* const uriRef = */ this.readS32();
                        Severity: Major
                        Found in src/libs/BinaryXmlParser.js and 1 other location - About 1 hr to fix
                        src/libs/BinaryXmlParser.js on lines 389..402

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 79.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                            async enumerateInspectors(){
                               
                                var response = null;
                                try {
                                    response = await _got_(this.api+"/inspectors");
                        Severity: Major
                        Found in src/DexcaliburRegistry.js and 1 other location - About 1 hr to fix
                        src/DexcaliburRegistry.js on lines 56..69

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 79.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                                            }else if(regV.type == DTYPE.OBJECT_REF){
                                                // TRUE case
                                                if(regV.getValue() instanceof VM_ClassInstance){
                        
                                                    v = `// ${regX}=(ClassInstance)${regV.getValue().parent.name} is not null, so "if(${regX} != 0)" was TRUE. Continue ...`;
                        Severity: Major
                        Found in src/SmaliVM.js and 1 other location - About 1 hr to fix
                        src/SmaliVM.js on lines 4173..4202

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 79.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 4 locations. Consider refactoring.
                        Open

                                                            case STUB_TYPE.FIELD:
                                                                field = src[bb.stack[l].right.id];
                                                                bb.stack[l].right = db[field.enclosingClass.id].fields[field.id];
                                                                break;
                        Severity: Major
                        Found in src/BackupManager.js and 3 other locations - About 1 hr to fix
                        src/BackupManager.js on lines 516..519
                        src/BackupManager.js on lines 520..523
                        src/BackupManager.js on lines 529..532

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 79.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                            async enumeratePlatforms(){
                               
                                var response = null;
                                try {
                                    response = await _got_(this.api+"/platforms");
                        Severity: Major
                        Found in src/DexcaliburRegistry.js and 1 other location - About 1 hr to fix
                        src/DexcaliburRegistry.js on lines 71..84

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 79.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 4 locations. Consider refactoring.
                        Open

                                                    case STUB_TYPE.METHOD:
                                                        meth = db[bb.stack[l].right.id];
                                                        bb.stack[l].right = src[meth.enclosingClass.id].methods[meth.id];
                                                        break;
                        Severity: Major
                        Found in src/BackupManager.js and 3 other locations - About 1 hr to fix
                        src/BackupManager.js on lines 520..523
                        src/BackupManager.js on lines 529..532
                        src/BackupManager.js on lines 533..536

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 79.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Severity
                        Category
                        Status
                        Source
                        Language