FrenchYeti/dexcalibur

View on GitHub

Showing 948 of 948 total issues

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

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

                            else if(this.__tmp_block.stack.length>0){
                                this.__tmp_meth.appendBlock(this.__tmp_block, this.__appendBlock_callback);
                                this.__tmp_block = new CLASS.BasicBlock();
                                this.__tmp_block.setAsGotoBlock(sml[0].split('_')[1]);
                            }
        Severity: Major
        Found in src/SmaliParser.js and 1 other location - About 1 hr to fix
        src/SmaliParser.js on lines 480..491

        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 77.

        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 'instrumentation':
                            if(self.instrumentation===null) self.instrumentation = [];
        
                            config['instrumentation'].map(function(k){
                                self.instrumentation.push(AndroidInstrumentation.fromXml(k.$));
        Severity: Major
        Found in src/AndroidAppComponents.js and 3 other locations - About 1 hr to fix
        src/AndroidAppComponents.js on lines 1731..1736
        src/AndroidAppComponents.js on lines 1737..1743
        src/AndroidAppComponents.js on lines 1744..1750

        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 77.

        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

                        case "_useClass":
                            obj._useClass = [];
                            for(let j in this._useClass){
                                if(this._useClass[i] != undefined)
                                    obj._useClass.push(this._useClass[i].name);
        Severity: Major
        Found in src/CoreClass.js and 1 other location - About 1 hr to fix
        src/CoreClass.js on lines 1560..1566

        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 77.

        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 'supports-screens':
                        if(self.supportsScreens===null) self.supportsScreens = [];
                            config['supports-screens'].map(function(k){
                                self.supportsScreens.push(AndroidSupportedScreen.fromXml(k.$));
                            });
        Severity: Major
        Found in src/AndroidAppComponents.js and 3 other locations - About 1 hr to fix
        src/AndroidAppComponents.js on lines 1737..1743
        src/AndroidAppComponents.js on lines 1744..1750
        src/AndroidAppComponents.js on lines 1751..1757

        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 77.

        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

                        case "_useField":
                            obj._useField = [];
                            for(let j in this._useField){
                                if(this._useField[i] != undefined)
                                    obj._useField.push(this._useField[i].__signature__);
        Severity: Major
        Found in src/CoreClass.js and 1 other location - About 1 hr to fix
        src/CoreClass.js on lines 1545..1551

        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 77.

        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

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

                                if(this.__tmp_block.width!=null){
                                    this.__tmp_meth.appendBlock(this.__tmp_block, this.__appendBlock_callback);
                                    this.__tmp_block = new CLASS.BasicBlock();
                                    this.__tmp_block.setAsGotoBlock(sml[0].split('_')[1]);
                                }else{
        Severity: Major
        Found in src/SmaliParser.js and 1 other location - About 1 hr to fix
        src/SmaliParser.js on lines 493..501

        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 77.

        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 'uses-configuration':
                            if(self.usesConfiguration===null) self.usesConfiguration = [];
        
                            config['uses-configuration'].map(function(k){
                                self.usesConfiguration.push(AndroidConfiguration.fromXml(k.$));
        Severity: Major
        Found in src/AndroidAppComponents.js and 3 other locations - About 1 hr to fix
        src/AndroidAppComponents.js on lines 1731..1736
        src/AndroidAppComponents.js on lines 1744..1750
        src/AndroidAppComponents.js on lines 1751..1757

        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 77.

        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 'uses-permission-sdk-23':
                            if(self.usesPermissionsSdk23===null) self.usesPermissionsSdk23 = [];
        
                            config['uses-permission-sdk-23'].map(function(k){
                                self.usesPermissionsSdk23.push(AndroidPermissionSdk23.fromXml(k.$));
        Severity: Major
        Found in src/AndroidAppComponents.js and 3 other locations - About 1 hr to fix
        src/AndroidAppComponents.js on lines 1731..1736
        src/AndroidAppComponents.js on lines 1737..1743
        src/AndroidAppComponents.js on lines 1751..1757

        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 77.

        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

        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

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

        Call.prototype.toJsonObject = function(){
            let obj = new Object();
            for(let i in this){
                if(["_","$"].indexOf(i[0])==-1 
                    && (typeof this[i] != 'array')
        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 makeTree has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

        Analyzer.prototype.makeTree = function(bblocks){
            let last = {};
            for(let i=0; i<bblocks.length; i++){
                bblocks[i].offset = i;
                if(bblocks[i].stack.length > 0){
        Severity: Minor
        Found in src/Analyzer.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 getInstrNearTo has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

        Method.prototype.getInstrNearTo = function(offsetBB,offsetInstr,windowSize=3){
            let min = offsetInstr-windowSize;
            let max = offsetInstr+windowSize;
            let instr = [];
        
        
        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 getInstr has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

        Method.prototype.getInstr = function(offsetBB,offsetInstr){
            for(let i in this.instr){
                if(i == offsetBB){
                    for(let j in this.instr[i].stack){
                        if(j == offsetInstr){
        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 import has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

            import(data, force = false, overwrite = false) {
                let isEmpty = null;
                for (let i in data) {
                    if (this[i] !== undefined || force) {
                        if ((this[i] != null && overwrite) || this[i] == null) {
        Severity: Minor
        Found in src/Configuration.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