FrenchYeti/dexcalibur

View on GitHub

Showing 948 of 948 total issues

Function initInstaller has 61 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    initInstaller(){
        if(gAdmZip == null){
            gAdmZip = require('adm-zip');
        }

Severity: Major
Found in src/DexcaliburEngine.js - About 2 hrs to fix

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

        toJsonObject( pOverride = {}, pExcludeList={}){
            let json = new Object();
            for(let i in this){
                if(pExcludeList[i] === false) continue;
                
    Severity: Minor
    Found in src/Device.js - About 2 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 showCFG has a Cognitive Complexity of 18 (exceeds 5 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 2 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 nextSingleGoto has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
    Open

    function nextSingleGoto(method){
        let found = {}, singles = [];
        
    
        // count GOTOs
    Severity: Minor
    Found in inspectors/BytecodeCleaner/service/main.js - About 2 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 18 (exceeds 5 allowed). Consider refactoring.
    Open

        toJsonObject( pInclude=Configuration.PLATFORMS) {
            let o = new Object();
    
            for (let i in this) {
                if(i=='ready') continue;
    Severity: Minor
    Found in src/Configuration.js - About 2 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 deploy has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
    Open

    HookSet.prototype.deploy = function(){
        let hookManager = this.context.hook; //ctx.hook;
        let hook, method, hconfig;
    
        // if the hookset is already deployed only not deployed hooks are generated
    Severity: Minor
    Found in src/HookManager.js - About 2 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

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

                    v = `${indent}${oper.right.enclosingClass.alias!=null?oper.right.enclosingClass.alias:oper.right.enclosingClass.name}.${oper.right.alias!=null?oper.right.alias:oper.right.name}( `;
    Severity: Major
    Found in src/SmaliVM.js and 1 other location - About 2 hrs to fix
    src/SmaliVM.js on lines 3589..3589

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

    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

                    v = `${indent}${oper.right.enclosingClass.alias!=null?oper.right.enclosingClass.alias:oper.right.enclosingClass.name}.${oper.right.alias!=null?oper.right.alias:oper.right.name}( `;
    Severity: Major
    Found in src/SmaliVM.js and 1 other location - About 2 hrs to fix
    src/SmaliVM.js on lines 3630..3630

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

    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

            args.map( pLocation => {
                let instr = method.getInstr(pLocation.bb,pLocation.instr);
                if(instr != null){
                    instr.left.map( vParam => {
                        if(vParam.t !== CONST.LEX.TOKEN.PARAM) paramOnly = false;
    Severity: Major
    Found in inspectors/BytecodeCleaner/service/main.js and 1 other location - About 2 hrs to fix
    inspectors/BytecodeCleaner/service/main.js on lines 572..579

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

    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

            args.map( pLocation => {
                let instr = method.getInstr(pLocation.bb,pLocation.instr);
                if(instr != null){
                    instr.left.map( vParam => {
                        if(vParam.t !== CONST.LEX.TOKEN.PARAM) paramOnly = false;
    Severity: Major
    Found in inspectors/BytecodeCleaner/service/main.js and 1 other location - About 2 hrs to fix
    inspectors/BytecodeCleaner/service/main.js on lines 644..651

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

    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

        removeHooksOf(hookset){
            let npro = [];
            for(let i=0; i<this.hooks.length; i++){
                if(this.hooks[i].parentID != hookset.getID()){
                    npro.push(this.hooks[i]);
    Severity: Major
    Found in src/HookManager.js and 1 other location - About 2 hrs to fix
    src/HookManager.js on lines 1729..1737

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

    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

            this.app.route('/api/inspectors/:inspectorID')
                .get(function (req, res) {
                    let insp = InspectorManager.getInstance().getEnabledInspector( $.project, req.params.inspectorID);
    
    
    
    Severity: Major
    Found in src/WebServer.js and 1 other location - About 2 hrs to fix
    src/WebServer.js on lines 266..287

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

    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

        removePrologueOf(hookset){
            let npro = [];
            for(let i=0; i<this.prologues.length; i++){
                if(this.prologues[i].parentID != hookset.getID()){
                    npro.push(this.prologues[i]);
    Severity: Major
    Found in src/HookManager.js and 1 other location - About 2 hrs to fix
    src/HookManager.js on lines 1740..1748

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

    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

    File Disassembler.js has 265 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    var Chalk = require("chalk");
    var Op = require("./Opcode.js");
    const CONST = require("./CoreConst.js");
    const CLASS = require("./CoreClass.js");
    
    
    Severity: Minor
    Found in src/Disassembler.js - About 2 hrs to fix

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

          SGET_CHAR:{ 
              byte:0x65, 
              instr:"sget-char", 
              parse: MainParser.regField,
              type: CONST.INSTR_TYPE.GETTER,
      Severity: Major
      Found in src/Opcode.js and 3 other locations - About 2 hrs to fix
      src/Opcode.js on lines 841..849
      src/Opcode.js on lines 850..858
      src/Opcode.js on lines 868..875

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

      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

          SGET_BOOLEAN:{ 
              byte:0x63, 
              instr:"sget-boolean", 
              parse: MainParser.regField,
              type: CONST.INSTR_TYPE.GETTER,
      Severity: Major
      Found in src/Opcode.js and 3 other locations - About 2 hrs to fix
      src/Opcode.js on lines 850..858
      src/Opcode.js on lines 859..867
      src/Opcode.js on lines 868..875

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

      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

          SGET_BYTE:{ 
              byte:0x64, 
              instr:"sget-byte", 
              parse: MainParser.regField,
              type: CONST.INSTR_TYPE.GETTER,
      Severity: Major
      Found in src/Opcode.js and 3 other locations - About 2 hrs to fix
      src/Opcode.js on lines 841..849
      src/Opcode.js on lines 859..867
      src/Opcode.js on lines 868..875

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

      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

          SGET_SHORT:{ 
              byte:0x66, 
              instr:"sget-short", 
              parse: MainParser.regField,
              type: CONST.INSTR_TYPE.GETTER,
      Severity: Major
      Found in src/Opcode.js and 3 other locations - About 2 hrs to fix
      src/Opcode.js on lines 841..849
      src/Opcode.js on lines 850..858
      src/Opcode.js on lines 859..867

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

      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

      Util has 22 functions (exceeds 20 allowed). Consider refactoring.
      Open

      const Util = {
          ALPHA: 'abcdefghijklmnopqrstuvwxyz',
          ALPHANUM: 'abcdefghijklmnopqrstuvwxyz0123456789',
          FLAG_CR: FLAG_CR,
          FLAG_WS: FLAG_WS,
      Severity: Minor
      Found in src/Utils.js - About 2 hrs to fix

        Function dxc.fullscan.post_deploy has 58 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                "dxc.fullscan.post_deploy": function (ctx, event) {
                    Logger.info("[INSPECTOR][TASK] Trying to restore previous data of DynLoaderInspector ... ");
                    let currentInspector = ctx.getInspector("DynamicLoader");
        
                    currentInspector.restore();
        Severity: Major
        Found in inspectors/DynamicLoader/main.js - About 2 hrs to fix
          Severity
          Category
          Status
          Source
          Language