FrenchYeti/dexcalibur

View on GitHub

Showing 948 of 948 total issues

Function type has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        type: function(src){
            let i=0,l=-1,types=[],s=src,fqn=null,isArray=false,m=null;
            
            while(i<src.length){
                if(src[i]==CONST.LEX.TOKEN.ARRAY){
Severity: Minor
Found in src/CoreParser.js - About 1 hr to fix

    Function type has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        type(src){
            let i=0,l=-1,types=[],s=src,fqn=null,isArray=false;
    
            while(i<src.length){
                if(src[i]==LEX.TOKEN.ARRAY){
    Severity: Minor
    Found in src/SmaliParser.js - About 1 hr to fix

      Function findBasicBlocks has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Analyzer.prototype.findBasicBlocks = function(instr){
          let bblocks = [], blk={};
      
          blk = {stack:[], next:[], label:null };
          for(let i in instr){
      Severity: Minor
      Found in src/Analyzer.js - About 1 hr to fix

        Function getMethod has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Class.prototype.getMethod = function(pattern, pExactMatch=0){
            let res0 = [], res1=[], rx={}, match=null;
            if(pExactMatch != CONST.EXACT_MATCH){
                for(let i in pattern){
                    rx[i] = new RegExp(pattern[i]);
        Severity: Minor
        Found in src/CoreClass.js - About 1 hr to fix

          Function searchInternalDependencies has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              static searchInternalDependencies(_context_, activity){
                  if(activity==null) return false;
          
                  let cls = activity.getImplementedBy();
                  if(cls == null){
          Severity: Minor
          Found in inspectors/ApplicationTopography/src/ClassAnalyzer.js - About 1 hr to fix

            Function toJsonObject has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            Hook.prototype.toJsonObject = function(){
                let o = new Object();
                o.id = this.id;
                o.parentID = this.parentID;
                o.color = this.color;
            Severity: Minor
            Found in src/HookManager.js - About 1 hr to fix

              Function toJsonObject has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              HookSet.prototype.toJsonObject = function(){
                  let o = new Object();
                  for(let i in this){
                      switch(i){
                          case "id":
              Severity: Minor
              Found in src/HookManager.js - About 1 hr to fix

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

                    move: function(src,raw_src){
                        let instr = new CLASS.Instruction(); 
                
                        instr.left = OpcodeParser.singleVar(src[1]);
                        instr.right = OpcodeParser.singleVar(src[2]);
                Severity: Major
                Found in src/Opcode.js and 1 other location - About 1 hr to fix
                src/Opcode.js on lines 118..125

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

                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

                        manifest.application.receivers.map(x => {
                            self.context.trigger({
                                type: "app.receiver.new",
                                data: x
                            });
                Severity: Major
                Found in src/AndroidAppAnalyzer.js and 3 other locations - About 1 hr to fix
                src/AndroidAppAnalyzer.js on lines 129..135
                src/AndroidAppAnalyzer.js on lines 136..142
                src/AndroidAppAnalyzer.js on lines 150..156

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

                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

                    performGet(req,res){
                        if(this.frontController.hasHandler(IFC.HANDLER.GET)){
                            return this.frontController.performGet(req,res);
                        }else{
                            return { error: true, msg:"Unavailable GET handler for this inspector" };
                Severity: Major
                Found in src/Inspector.js and 1 other location - About 1 hr to fix
                src/Inspector.js on lines 140..146

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

                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

                        manifest.application.services.map(x => {
                            self.context.trigger({
                                type: "app.service.new",
                                data: x
                            });
                Severity: Major
                Found in src/AndroidAppAnalyzer.js and 3 other locations - About 1 hr to fix
                src/AndroidAppAnalyzer.js on lines 129..135
                src/AndroidAppAnalyzer.js on lines 136..142
                src/AndroidAppAnalyzer.js on lines 143..149

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

                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

                        manifest.application.providers.map(x => {
                            self.context.trigger({
                                type: "app.provider.new",
                                data: x
                            });
                Severity: Major
                Found in src/AndroidAppAnalyzer.js and 3 other locations - About 1 hr to fix
                src/AndroidAppAnalyzer.js on lines 129..135
                src/AndroidAppAnalyzer.js on lines 143..149
                src/AndroidAppAnalyzer.js on lines 150..156

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

                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

                        manifest.application.activities.map(x => {
                            self.context.trigger({
                                type: "app.activity.new",
                                data: x
                            });
                Severity: Major
                Found in src/AndroidAppAnalyzer.js and 3 other locations - About 1 hr to fix
                src/AndroidAppAnalyzer.js on lines 136..142
                src/AndroidAppAnalyzer.js on lines 143..149
                src/AndroidAppAnalyzer.js on lines 150..156

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

                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

                    performPost(req,res){
                        if(this.frontController.hasHandler(IFC.HANDLER.POST)){
                            return this.frontController.performPost(req,res);
                        }else{
                            return { error: true, msg:"Unavailable POST handler for this inspector" };
                Severity: Major
                Found in src/Inspector.js and 1 other location - About 1 hr to fix
                src/Inspector.js on lines 127..133

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

                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

                    math: function(src,raw_src){
                        let instr = new CLASS.Instruction(); 
                
                        instr.left = OpcodeParser.singleVar(src[1]);
                        instr.right = OpcodeParser.singleVar(src[2]);
                Severity: Major
                Found in src/Opcode.js and 1 other location - About 1 hr to fix
                src/Opcode.js on lines 110..117

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

                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

                        if(this.usesPermissions.length > 0){
                            o['uses-permission'] = [];
                            this.usesPermissions.map(perm => {
                                o['uses-permission'].push(perm.toXml());
                            });
                Severity: Major
                Found in src/AndroidAppComponents.js and 3 other locations - About 55 mins to fix
                src/AndroidAppComponents.js on lines 1796..1801
                src/AndroidAppComponents.js on lines 1803..1808
                src/AndroidAppComponents.js on lines 1810..1815

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

                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

                        if(this.permissionGroups.length > 0){
                            o['permission-group'] = [];
                            this.permissionGroups.map(perm => {
                                o['permission-group'].push(perm.toXml());
                            });
                Severity: Major
                Found in src/AndroidAppComponents.js and 3 other locations - About 55 mins to fix
                src/AndroidAppComponents.js on lines 1789..1794
                src/AndroidAppComponents.js on lines 1796..1801
                src/AndroidAppComponents.js on lines 1810..1815

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

                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

                        if(this.permissions.length > 0){
                            o['permission'] = [];
                            this.permissions.map(perm => {
                                o['permission'].push(perm.toXml());
                            });
                Severity: Major
                Found in src/AndroidAppComponents.js and 3 other locations - About 55 mins to fix
                src/AndroidAppComponents.js on lines 1789..1794
                src/AndroidAppComponents.js on lines 1803..1808
                src/AndroidAppComponents.js on lines 1810..1815

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

                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

                        if(this.permissionTrees.length > 0){
                            o['permission-tree'] = [];
                            this.permissionTrees.map(perm => {
                                o['permission-tree'].push(perm.toXml());
                            });
                Severity: Major
                Found in src/AndroidAppComponents.js and 3 other locations - About 55 mins to fix
                src/AndroidAppComponents.js on lines 1789..1794
                src/AndroidAppComponents.js on lines 1796..1801
                src/AndroidAppComponents.js on lines 1803..1808

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

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

                function getDataTypeOf(pType){
                    //Logger.debug("getDataTypeOf: ",pType);
                    if(pType instanceof CLASS.ObjectType){
                        if(pType.isArray())
                            return DTYPE.ARRAY;
                Severity: Minor
                Found in src/SmaliVM.js - About 55 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