FrenchYeti/dexcalibur

View on GitHub

Showing 948 of 948 total issues

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

    REM_LONG:{ byte:0x9f, instr:"rem-long", ope: CONST.LEX.TOKEN.REM, parse: MainParser.Format23x, type: CONST.INSTR_TYPE.MATH, reftype: ReferenceType.NONE, format: Format.Format23x, flag:Opcode.CAN_THROW | Opcode.CAN_CONTINUE | Opcode.SETS_REGISTER | Opcode.SETS_WIDE_REGISTER },
Severity: Major
Found in src/Opcode.js and 3 other locations - About 2 hrs to fix
src/Opcode.js on lines 943..943
src/Opcode.js on lines 976..976
src/Opcode.js on lines 977..977

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

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

    REM_LONG_2ADDR:{ byte:0xbf, instr:"rem-long/2addr", ope: CONST.LEX.TOKEN.REM, parse: MainParser.move, type: CONST.INSTR_TYPE.MATH, reftype:ReferenceType.NONE, format:Format.Format12x, flag:Opcode.CAN_THROW | Opcode.CAN_CONTINUE | Opcode.SETS_REGISTER | Opcode.SETS_WIDE_REGISTER },
Severity: Major
Found in src/Opcode.js and 3 other locations - About 2 hrs to fix
src/Opcode.js on lines 943..943
src/Opcode.js on lines 944..944
src/Opcode.js on lines 976..976

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

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

    DIV_LONG_2ADDR:{ byte:0xbe, instr:"div-long/2addr", ope: CONST.LEX.TOKEN.DIV, parse: MainParser.move, type: CONST.INSTR_TYPE.MATH, reftype:ReferenceType.NONE, format:Format.Format12x, flag:Opcode.CAN_THROW | Opcode.CAN_CONTINUE | Opcode.SETS_REGISTER | Opcode.SETS_WIDE_REGISTER },
Severity: Major
Found in src/Opcode.js and 3 other locations - About 2 hrs to fix
src/Opcode.js on lines 943..943
src/Opcode.js on lines 944..944
src/Opcode.js on lines 977..977

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

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

                for(let l in src.methods[k]._useField){
                    tab[id]._useField[l] = [];
                    for(let m in src.methods[k]._useField[l]){
                        tab[id]._useField[l][m] = new CircularReference(
                            STUB.FIELD,
Severity: Major
Found in src/BackupManager.js and 2 other locations - About 2 hrs to fix
src/BackupManager.js on lines 306..314
src/BackupManager.js on lines 328..336

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

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

                for(let l in src.methods[k]._useMethod){
                    tab[id]._useMethod[l] = [];
                    for(let m in src.methods[k]._useMethod[l]){
                        tab[id]._useMethod[l][m] = new CircularReference(
                            STUB.METHOD,
Severity: Major
Found in src/BackupManager.js and 2 other locations - About 2 hrs to fix
src/BackupManager.js on lines 317..325
src/BackupManager.js on lines 328..336

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

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

                for(let l in src.methods[k]._useClass){
                    tab[id]._useClass[l] = [];
                    for(let m in src.methods[k]._useClass[l]){
                        tab[id]._useClass[l][m] = new CircularReference(
                            STUB.CLASS,
Severity: Major
Found in src/BackupManager.js and 2 other locations - About 2 hrs to fix
src/BackupManager.js on lines 306..314
src/BackupManager.js on lines 317..325

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

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

FinderResult.prototype.show = function(){
    let sub = [];
    this.data.map((k,x)=>{

        if(x instanceof CLASS.Method){
Severity: Major
Found in src/Finder.js - About 2 hrs to fix

    Function fullscan has 63 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        async fullscan( pPath){
            let elemnt=null;
            let success  = false;
    
            // scan OS/Platform
    Severity: Major
    Found in src/DexcaliburProject.js - About 2 hrs to fix

      AndroidActivity has 23 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class AndroidActivity
      {
          static MODEL = {
              allowEmbedded:["true" , "false"],
              allowTaskReparenting:["true" , "false"],
      Severity: Minor
      Found in src/AndroidAppComponents.js - About 2 hrs to fix

        InspectorManager has 23 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class InspectorManager
        {
            /**
             * 
             * @param {DexcaliburProject} pProject Project instance
        Severity: Minor
        Found in src/InspectorManager.js - About 2 hrs to fix

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

              xor(pValue, pType){
                  switch(pType){
                      case OPCODE.XOR_INT_2ADDR.byte:
                      case OPCODE.XOR_LONG_2ADDR.byte:
                      case OPCODE.XOR_INT_LIT8.byte:
          Severity: Major
          Found in src/Decompiler.js and 5 other locations - About 2 hrs to fix
          src/Decompiler.js on lines 158..168
          src/Decompiler.js on lines 171..181
          src/Decompiler.js on lines 197..207
          src/Decompiler.js on lines 210..220
          src/Decompiler.js on lines 223..233

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

          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){
                  switch(pType){
                      case OPCODE.USHR_INT_2ADDR.byte:
                      case OPCODE.USHR_LONG_2ADDR.byte:
                      case OPCODE.USHR_INT_LIT8.byte:
          Severity: Major
          Found in src/Decompiler.js and 5 other locations - About 2 hrs to fix
          src/Decompiler.js on lines 158..168
          src/Decompiler.js on lines 171..181
          src/Decompiler.js on lines 184..194
          src/Decompiler.js on lines 197..207
          src/Decompiler.js on lines 210..220

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

          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){
                  switch(pType){
                      case OPCODE.OR_INT_2ADDR.byte:
                      case OPCODE.OR_LONG_2ADDR.byte:
                      case OPCODE.OR_INT_LIT8.byte:
          Severity: Major
          Found in src/Decompiler.js and 5 other locations - About 2 hrs to fix
          src/Decompiler.js on lines 158..168
          src/Decompiler.js on lines 184..194
          src/Decompiler.js on lines 197..207
          src/Decompiler.js on lines 210..220
          src/Decompiler.js on lines 223..233

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

          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){
                  switch(pType){
                      case OPCODE.AND_INT_2ADDR.byte:
                      case OPCODE.AND_LONG_2ADDR.byte:
                      case OPCODE.AND_INT_LIT8.byte:
          Severity: Major
          Found in src/Decompiler.js and 5 other locations - About 2 hrs to fix
          src/Decompiler.js on lines 171..181
          src/Decompiler.js on lines 184..194
          src/Decompiler.js on lines 197..207
          src/Decompiler.js on lines 210..220
          src/Decompiler.js on lines 223..233

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

          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){
                  switch(pType){
                      case OPCODE.SHL_INT_2ADDR.byte:
                      case OPCODE.SHL_LONG_2ADDR.byte:
                      case OPCODE.SHL_INT_LIT8.byte:
          Severity: Major
          Found in src/Decompiler.js and 5 other locations - About 2 hrs to fix
          src/Decompiler.js on lines 158..168
          src/Decompiler.js on lines 171..181
          src/Decompiler.js on lines 184..194
          src/Decompiler.js on lines 210..220
          src/Decompiler.js on lines 223..233

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

          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){
                  switch(pType){
                      case OPCODE.SHR_INT_2ADDR.byte:
                      case OPCODE.SHR_LONG_2ADDR.byte:
                      case OPCODE.SHR_INT_LIT8.byte:
          Severity: Major
          Found in src/Decompiler.js and 5 other locations - About 2 hrs to fix
          src/Decompiler.js on lines 158..168
          src/Decompiler.js on lines 171..181
          src/Decompiler.js on lines 184..194
          src/Decompiler.js on lines 197..207
          src/Decompiler.js on lines 223..233

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

          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

                  src2 = { 
                      m: this.stack.getLocalSymbol( this.getRegisterName({ t:pSrc2.t, i:pSrc2.i+1 })), 
                      l: this.stack.getLocalSymbol( this.getRegisterName({ t:pSrc2.t, i:pSrc2.i })),
                      v: null
                  };
          Severity: Major
          Found in src/SmaliVM.js and 1 other location - About 2 hrs to fix
          src/SmaliVM.js on lines 1890..1894

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

          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

                  src1 = { 
                      m: this.stack.getLocalSymbol( this.getRegisterName({ t:pSrc1.t, i:pSrc1.i+1 })), 
                      l: this.stack.getLocalSymbol( this.getRegisterName({ t:pSrc1.t, i:pSrc1.i })),
                      v: null
                  };
          Severity: Major
          Found in src/SmaliVM.js and 1 other location - About 2 hrs to fix
          src/SmaliVM.js on lines 1896..1900

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

          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 Utils.js has 270 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          const fs = require("fs");
          const Process = require("child_process");
          const Chalk = require("chalk");
          const Path = require("path");
          const crypto = require("crypto");
          Severity: Minor
          Found in src/Utils.js - About 2 hrs to fix

            Function Analyzer has 62 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function Analyzer(encoding, finder, ctx=null){
                SmaliParser.setContext(ctx);
            
                var db = this.db = new AnalyzerDatabase(ctx);
            
            
            Severity: Major
            Found in src/Analyzer.js - About 2 hrs to fix
              Severity
              Category
              Status
              Source
              Language