FrenchYeti/dexcalibur

View on GitHub

Showing 948 of 948 total issues

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

                    if(this.isImm(regV)){
                        // FALSE case
                        if(regV.getValue() !== null){
                            v = `// ${regX}=${this.getImmediateValue(regV)} is not null, so "if(${regX} == 0)" was FALSE. Continue ...`;
                        }
Severity: Major
Found in src/SmaliVM.js and 1 other location - About 3 hrs to fix
src/SmaliVM.js on lines 4223..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 126.

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 toXml has 88 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    toXml(){
        let o = new Object();

        o.$ = {};
        for(let i in this.attributes){
Severity: Major
Found in src/AndroidAppComponents.js - About 3 hrs to fix

    AdbWrapper has 29 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class AdbWrapper
    {
        static USB_TRANSPORT = 'U';
        static TCP_TRANSPORT = 'T';
        
    Severity: Minor
    Found in src/AdbWrapper.js - About 3 hrs to fix

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

          xor(pValue, pType, pOption=null){
              switch(pType){
                  case OPCODE.XOR_LONG_2ADDR.byte:
                  case OPCODE.XOR_LONG.byte:
                      return ((this.value << 32) | (pOption & 0x00000000FFFFFFFF)) ^ pValue;
      Severity: Major
      Found in src/SmaliVM.js and 5 other locations - About 3 hrs to fix
      src/SmaliVM.js on lines 382..393
      src/SmaliVM.js on lines 396..407
      src/SmaliVM.js on lines 424..435
      src/SmaliVM.js on lines 438..449
      src/SmaliVM.js on lines 452..463

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

      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 6 locations. Consider refactoring.
      Open

          shl(pValue, pType, pOption=null){
              switch(pType){
                  case OPCODE.SHL_LONG_2ADDR.byte:
                  case OPCODE.SHL_LONG.byte:
                      return ((this.value << 32) | (pOption & 0x00000000FFFFFFFF)) << pValue;
      Severity: Major
      Found in src/SmaliVM.js and 5 other locations - About 3 hrs to fix
      src/SmaliVM.js on lines 382..393
      src/SmaliVM.js on lines 396..407
      src/SmaliVM.js on lines 410..421
      src/SmaliVM.js on lines 438..449
      src/SmaliVM.js on lines 452..463

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

      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 6 locations. Consider refactoring.
      Open

          and(pValue, pType, pOption=null){
              switch(pType){
                  case OPCODE.AND_LONG_2ADDR.byte:
                  case OPCODE.AND_LONG.byte:
                      return ((this.value << 32) | (pOption & 0x00000000FFFFFFFF)) & pValue;
      Severity: Major
      Found in src/SmaliVM.js and 5 other locations - About 3 hrs to fix
      src/SmaliVM.js on lines 396..407
      src/SmaliVM.js on lines 410..421
      src/SmaliVM.js on lines 424..435
      src/SmaliVM.js on lines 438..449
      src/SmaliVM.js on lines 452..463

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

      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 6 locations. Consider refactoring.
      Open

          or(pValue, pType, pOption=null){
              switch(pType){
                  case OPCODE.OR_LONG_2ADDR.byte:
                  case OPCODE.OR_LONG.byte:
                      return ((this.value << 32) | (pOption & 0x00000000FFFFFFFF)) | pValue;
      Severity: Major
      Found in src/SmaliVM.js and 5 other locations - About 3 hrs to fix
      src/SmaliVM.js on lines 382..393
      src/SmaliVM.js on lines 410..421
      src/SmaliVM.js on lines 424..435
      src/SmaliVM.js on lines 438..449
      src/SmaliVM.js on lines 452..463

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

      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 6 locations. Consider refactoring.
      Open

          shr(pValue, pType, pOption=null){
              switch(pType){
                  case OPCODE.SHR_LONG_2ADDR.byte:
                  case OPCODE.SHR_LONG.byte:
                      return ((this.value << 32) | (pOption & 0x00000000FFFFFFFF)) >> pValue;
      Severity: Major
      Found in src/SmaliVM.js and 5 other locations - About 3 hrs to fix
      src/SmaliVM.js on lines 382..393
      src/SmaliVM.js on lines 396..407
      src/SmaliVM.js on lines 410..421
      src/SmaliVM.js on lines 424..435
      src/SmaliVM.js on lines 452..463

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

      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 6 locations. Consider refactoring.
      Open

          ushr(pValue, pType, pOption=null){
              switch(pType){
                  case OPCODE.USHR_LONG_2ADDR.byte:
                  case OPCODE.USHR_LONG.byte:
                      return ((this.value << 32) | (pOption & 0x00000000FFFFFFFF)) >>> pValue;
      Severity: Major
      Found in src/SmaliVM.js and 5 other locations - About 3 hrs to fix
      src/SmaliVM.js on lines 382..393
      src/SmaliVM.js on lines 396..407
      src/SmaliVM.js on lines 410..421
      src/SmaliVM.js on lines 424..435
      src/SmaliVM.js on lines 438..449

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

      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 fromXml has 87 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          static fromXml(config, context){
              let self = new AndroidManifest();
              // init manifest attributes 
              for(let i in config){
                  switch(i){
      Severity: Major
      Found in src/AndroidAppComponents.js - About 3 hrs to fix

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

                if(data.category==null && force==false){
                    if(pIntentFilter.getCategories().length-1 > 0){
                        callbacks.error("This intent filter has several categories, and none is given");
                        return;
                    }
        Severity: Major
        Found in src/Device.js and 1 other location - About 3 hrs to fix
        src/Device.js on lines 575..585

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

        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

                if(data.action==null && force == false){
                    if(pIntentFilter.getActions().length-1 > 0){
                        callbacks.error("This intent filter has several action, and none is given");
                        return;
                    }
        Severity: Major
        Found in src/Device.js and 1 other location - About 3 hrs to fix
        src/Device.js on lines 563..573

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

        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 readTypedValue has 86 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          readTypedValue() {
            const typedValue = {
              value: null,
              type: null,
              rawType: null
        Severity: Major
        Found in src/libs/BinaryXmlParser.js - About 3 hrs to fix

          Function _getTestFn has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
          Open

              _getTestFn(dataModel, pattern, caseSensitive, lazy=false){
                  
                  //if(lazy===true) console.debug("LAZY mode detected !");
          
                  if(pattern==undefined || pattern.length==0){
          Severity: Minor
          Found in src/Finder.js - About 3 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 makeHookFor has 85 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Hook.prototype.makeHookFor = function(method){
              /*if(method instanceof CLASS.MissingReference){
                  console.log(Chalk.bold.yellow("TODO : implement MissingReference probing"));
                  this.enable = false;
                  return null;
          Severity: Major
          Found in src/HookManager.js - About 3 hrs to fix

            Symbol has 28 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class Symbol
            {
                static SKIPPED = true;
            
                constructor(pVisibility, pType, pValue, pCode=null, pSkipped=false){
            Severity: Minor
            Found in src/SmaliVM.js - About 3 hrs to fix

              Function import has 83 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  import(pData){
                      let index = null, o=null, hook=null, qflag=0;
              
                      if(pData.classes.size > 0){
                          index = this._db.getIndex("classes");
              Severity: Major
              Found in inspectors/Saver/SaveManager.js - About 3 hrs to fix

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

                    toXmlObject(){
                        let o = {};
                
                        o.$ = {};
                        for(let i in this.attr){
                Severity: Major
                Found in src/AndroidAppComponents.js and 1 other location - About 3 hrs to fix
                src/AndroidAppComponents.js on lines 54..66

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

                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

                    toXmlObject(){
                        let o = {};
                
                        o.$ = {};
                        for(let i in this.attr){
                Severity: Major
                Found in src/AndroidAppComponents.js and 1 other location - About 3 hrs to fix
                src/AndroidAppComponents.js on lines 123..135

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

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

                function VM() {
                    this._reg= [];
                    this._regSize= 0;
                    this._local= [];
                    this._localSize= 0;
                Severity: Minor
                Found in src/VM.js - About 3 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Severity
                Category
                Status
                Source
                Language