FrenchYeti/dexcalibur

View on GitHub

Showing 948 of 948 total issues

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

Class.prototype.updateField = function(field, override=false){
    let diff = this.fields[field.signature()].compare(field);
    // if not identic => update, else nothiong to do
    if(!diff.isIdentic()){
        if(override)
Severity: Major
Found in src/CoreClass.js and 1 other location - About 2 hrs to fix
src/CoreClass.js on lines 675..682

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

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

Class.prototype.updateMethod = function(meth, override=false){
    let diff = this.methods[meth.signature()].compare(meth);
    // if not identic => update, else nothiong to do
    if(!diff.isIdentic()){
        if(override)
Severity: Major
Found in src/CoreClass.js and 1 other location - About 2 hrs to fix
src/CoreClass.js on lines 651..658

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

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

    analyzeBlocks(pMethod){
        
        let blocks =  pMethod.getBasicBlocks();

        if(blocks.length == 0) return null;
Severity: Major
Found in src/SmaliVM.js - About 2 hrs to fix

    Function toXml has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

        toXml(){
            let o = new Object();
    
            o.$ = {};
            for(let i in this.attributes){
    Severity: Minor
    Found in src/AndroidAppComponents.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 sendIntent has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

        sendIntent(data, callbacks=null, pIntentFilter=null, force=false){
            let msg = {stdout:null, stderr:null};
            let pkg='', cmd='am start ';
            let act = null, cat=null;
            let cb = null;
    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 findCyclicRef has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

    function findCyclicRef(obj,fullPath=[],endPath=[],cycle=0){
        let path = fullPath, end=endPath, k=0;
        if(cycle>cycleMax){
            //console.log("[E] Max cycle : "+path.join('.'));
            return false;
    Severity: Minor
    Found in src/BackupManager.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 setup has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

        setup(pDeviceID = null, pReturnString =  true){
            let cmd=null;
    
            if(pReturnString)
                cmd = this.path;
    Severity: Minor
    Found in src/AdbWrapper.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 callgraph_from has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

    GraphMaker.prototype.callgraph_from = function(obj, n=1, m=2){
        let tree={ 
            fqcn:obj.signature(), 
            tags: obj.tags,
            //internal:obj.hasTag(AnalysisHelper.TAG.Discover.Internal), 
    Severity: Minor
    Found in src/Graph.js - About 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 sendIntent has 56 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        sendIntent(data, callbacks=null, pIntentFilter=null, force=false){
            let msg = {stdout:null, stderr:null};
            let pkg='', cmd='am start ';
            let act = null, cat=null;
            let cb = null;
    Severity: Major
    Found in src/Device.js - About 2 hrs to fix

      File Simplifier.js has 260 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      'use strict';
      
      const CONST = require("./CoreConst.js");
      const CLASS = require("./CoreClass.js");
      const SmaliVM = require("./SmaliVM.js");
      Severity: Minor
      Found in src/Simplifier.js - About 2 hrs to fix

        Function hookRoutine has 56 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                var hookRoutine = co.wrap(function *() {
                    let session = null, pid=null, applications=null, bridge=null;
                    
                    let device = null;
        
        
        Severity: Major
        Found in src/HookManager.js - About 2 hrs to fix

          Function start has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              start( pMethod, pThis, pArguments=null, pClearHeap=false){
                  let opt = null, margs=null, arr=null;
          
                  // clean StackMemory 
                  this.stack.clear();
          Severity: Major
          Found in src/SmaliVM.js - About 2 hrs to fix

            Function parse has 55 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                parse(src){
                    let ls=src.split(EOL), ln=null, sml=null, obj=null;
                
                    //console.log(ls);
                    for(let l=0; l<ls.length; l++){
            Severity: Major
            Found in src/SmaliParser.js - About 2 hrs to fix

              Function analyzeBlocks has 54 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  analyzeBlocks(pMethod){
                      
                      let blocks =  pMethod.getBasicBlocks();
              
                      if(blocks.length == 0) return null;
              Severity: Major
              Found in src/Simplifier.js - About 2 hrs to fix

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

                    NEG_LONG:{ byte:0x7d, instr:"neg-long", ope: CONST.LEX.TOKEN.NEG, parse: MainParser.move, type: CONST.INSTR_TYPE.MATH, reftype:ReferenceType.NONE, format:Format.Format12x, flag:Opcode.CAN_CONTINUE | Opcode.SETS_REGISTER | Opcode.SETS_WIDE_REGISTER },
                Severity: Major
                Found in src/Opcode.js and 38 other locations - About 2 hrs to fix
                src/Opcode.js on lines 907..907
                src/Opcode.js on lines 909..909
                src/Opcode.js on lines 932..932
                src/Opcode.js on lines 933..933
                src/Opcode.js on lines 940..940
                src/Opcode.js on lines 941..941
                src/Opcode.js on lines 942..942
                src/Opcode.js on lines 945..945
                src/Opcode.js on lines 946..946
                src/Opcode.js on lines 947..947
                src/Opcode.js on lines 948..948
                src/Opcode.js on lines 949..949
                src/Opcode.js on lines 950..950
                src/Opcode.js on lines 956..956
                src/Opcode.js on lines 957..957
                src/Opcode.js on lines 958..958
                src/Opcode.js on lines 959..959
                src/Opcode.js on lines 960..960
                src/Opcode.js on lines 965..965
                src/Opcode.js on lines 966..966
                src/Opcode.js on lines 973..973
                src/Opcode.js on lines 974..974
                src/Opcode.js on lines 975..975
                src/Opcode.js on lines 978..978
                src/Opcode.js on lines 979..979
                src/Opcode.js on lines 980..980
                src/Opcode.js on lines 981..981
                src/Opcode.js on lines 982..982
                src/Opcode.js on lines 983..983
                src/Opcode.js on lines 989..989
                src/Opcode.js on lines 990..990
                src/Opcode.js on lines 991..991
                src/Opcode.js on lines 992..992
                src/Opcode.js on lines 993..993
                src/Opcode.js on lines 998..998
                src/Opcode.js on lines 999..999
                src/Opcode.js on lines 1006..1006
                src/Opcode.js on lines 1007..1007

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

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

                    DIV_INT:{ byte:0x93, instr:"div-int", ope: CONST.LEX.TOKEN.DIV, parse: MainParser.Format23x, type: CONST.INSTR_TYPE.MATH, reftype:ReferenceType.NONE, format:Format.Format23x, flag:Opcode.CAN_THROW | Opcode.CAN_CONTINUE | Opcode.SETS_REGISTER },
                Severity: Major
                Found in src/Opcode.js and 38 other locations - About 2 hrs to fix
                src/Opcode.js on lines 906..906
                src/Opcode.js on lines 907..907
                src/Opcode.js on lines 909..909
                src/Opcode.js on lines 933..933
                src/Opcode.js on lines 940..940
                src/Opcode.js on lines 941..941
                src/Opcode.js on lines 942..942
                src/Opcode.js on lines 945..945
                src/Opcode.js on lines 946..946
                src/Opcode.js on lines 947..947
                src/Opcode.js on lines 948..948
                src/Opcode.js on lines 949..949
                src/Opcode.js on lines 950..950
                src/Opcode.js on lines 956..956
                src/Opcode.js on lines 957..957
                src/Opcode.js on lines 958..958
                src/Opcode.js on lines 959..959
                src/Opcode.js on lines 960..960
                src/Opcode.js on lines 965..965
                src/Opcode.js on lines 966..966
                src/Opcode.js on lines 973..973
                src/Opcode.js on lines 974..974
                src/Opcode.js on lines 975..975
                src/Opcode.js on lines 978..978
                src/Opcode.js on lines 979..979
                src/Opcode.js on lines 980..980
                src/Opcode.js on lines 981..981
                src/Opcode.js on lines 982..982
                src/Opcode.js on lines 983..983
                src/Opcode.js on lines 989..989
                src/Opcode.js on lines 990..990
                src/Opcode.js on lines 991..991
                src/Opcode.js on lines 992..992
                src/Opcode.js on lines 993..993
                src/Opcode.js on lines 998..998
                src/Opcode.js on lines 999..999
                src/Opcode.js on lines 1006..1006
                src/Opcode.js on lines 1007..1007

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

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

                    NEG_DOUBLE:{ byte:0x80, instr:"neg-double", ope: CONST.LEX.TOKEN.NEG, parse: MainParser.move, type: CONST.INSTR_TYPE.MATH, reftype:ReferenceType.NONE, format:Format.Format12x, flag:Opcode.CAN_CONTINUE | Opcode.SETS_REGISTER | Opcode.SETS_WIDE_REGISTER },
                Severity: Major
                Found in src/Opcode.js and 38 other locations - About 2 hrs to fix
                src/Opcode.js on lines 906..906
                src/Opcode.js on lines 907..907
                src/Opcode.js on lines 932..932
                src/Opcode.js on lines 933..933
                src/Opcode.js on lines 940..940
                src/Opcode.js on lines 941..941
                src/Opcode.js on lines 942..942
                src/Opcode.js on lines 945..945
                src/Opcode.js on lines 946..946
                src/Opcode.js on lines 947..947
                src/Opcode.js on lines 948..948
                src/Opcode.js on lines 949..949
                src/Opcode.js on lines 950..950
                src/Opcode.js on lines 956..956
                src/Opcode.js on lines 957..957
                src/Opcode.js on lines 958..958
                src/Opcode.js on lines 959..959
                src/Opcode.js on lines 960..960
                src/Opcode.js on lines 965..965
                src/Opcode.js on lines 966..966
                src/Opcode.js on lines 973..973
                src/Opcode.js on lines 974..974
                src/Opcode.js on lines 975..975
                src/Opcode.js on lines 978..978
                src/Opcode.js on lines 979..979
                src/Opcode.js on lines 980..980
                src/Opcode.js on lines 981..981
                src/Opcode.js on lines 982..982
                src/Opcode.js on lines 983..983
                src/Opcode.js on lines 989..989
                src/Opcode.js on lines 990..990
                src/Opcode.js on lines 991..991
                src/Opcode.js on lines 992..992
                src/Opcode.js on lines 993..993
                src/Opcode.js on lines 998..998
                src/Opcode.js on lines 999..999
                src/Opcode.js on lines 1006..1006
                src/Opcode.js on lines 1007..1007

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

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

                    ADD_LONG:{ byte:0x9b, instr:"add-long", ope: CONST.LEX.TOKEN.ADD, parse: MainParser.Format23x, type: CONST.INSTR_TYPE.MATH, reftype: ReferenceType.NONE, format: Format.Format23x, flag:Opcode.CAN_CONTINUE | Opcode.SETS_REGISTER | Opcode.SETS_WIDE_REGISTER },
                Severity: Major
                Found in src/Opcode.js and 38 other locations - About 2 hrs to fix
                src/Opcode.js on lines 906..906
                src/Opcode.js on lines 907..907
                src/Opcode.js on lines 909..909
                src/Opcode.js on lines 932..932
                src/Opcode.js on lines 933..933
                src/Opcode.js on lines 941..941
                src/Opcode.js on lines 942..942
                src/Opcode.js on lines 945..945
                src/Opcode.js on lines 946..946
                src/Opcode.js on lines 947..947
                src/Opcode.js on lines 948..948
                src/Opcode.js on lines 949..949
                src/Opcode.js on lines 950..950
                src/Opcode.js on lines 956..956
                src/Opcode.js on lines 957..957
                src/Opcode.js on lines 958..958
                src/Opcode.js on lines 959..959
                src/Opcode.js on lines 960..960
                src/Opcode.js on lines 965..965
                src/Opcode.js on lines 966..966
                src/Opcode.js on lines 973..973
                src/Opcode.js on lines 974..974
                src/Opcode.js on lines 975..975
                src/Opcode.js on lines 978..978
                src/Opcode.js on lines 979..979
                src/Opcode.js on lines 980..980
                src/Opcode.js on lines 981..981
                src/Opcode.js on lines 982..982
                src/Opcode.js on lines 983..983
                src/Opcode.js on lines 989..989
                src/Opcode.js on lines 990..990
                src/Opcode.js on lines 991..991
                src/Opcode.js on lines 992..992
                src/Opcode.js on lines 993..993
                src/Opcode.js on lines 998..998
                src/Opcode.js on lines 999..999
                src/Opcode.js on lines 1006..1006
                src/Opcode.js on lines 1007..1007

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

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

                    SHR_LONG:{ byte:0xa4, instr:"shr-long", ope: CONST.LEX.TOKEN.SHR, parse: MainParser.Format23x, type: CONST.INSTR_TYPE.MATH, reftype: ReferenceType.NONE, format: Format.Format23x, flag:Opcode.CAN_CONTINUE | Opcode.SETS_REGISTER | Opcode.SETS_WIDE_REGISTER },
                Severity: Major
                Found in src/Opcode.js and 38 other locations - About 2 hrs to fix
                src/Opcode.js on lines 906..906
                src/Opcode.js on lines 907..907
                src/Opcode.js on lines 909..909
                src/Opcode.js on lines 932..932
                src/Opcode.js on lines 933..933
                src/Opcode.js on lines 940..940
                src/Opcode.js on lines 941..941
                src/Opcode.js on lines 942..942
                src/Opcode.js on lines 945..945
                src/Opcode.js on lines 946..946
                src/Opcode.js on lines 947..947
                src/Opcode.js on lines 948..948
                src/Opcode.js on lines 950..950
                src/Opcode.js on lines 956..956
                src/Opcode.js on lines 957..957
                src/Opcode.js on lines 958..958
                src/Opcode.js on lines 959..959
                src/Opcode.js on lines 960..960
                src/Opcode.js on lines 965..965
                src/Opcode.js on lines 966..966
                src/Opcode.js on lines 973..973
                src/Opcode.js on lines 974..974
                src/Opcode.js on lines 975..975
                src/Opcode.js on lines 978..978
                src/Opcode.js on lines 979..979
                src/Opcode.js on lines 980..980
                src/Opcode.js on lines 981..981
                src/Opcode.js on lines 982..982
                src/Opcode.js on lines 983..983
                src/Opcode.js on lines 989..989
                src/Opcode.js on lines 990..990
                src/Opcode.js on lines 991..991
                src/Opcode.js on lines 992..992
                src/Opcode.js on lines 993..993
                src/Opcode.js on lines 998..998
                src/Opcode.js on lines 999..999
                src/Opcode.js on lines 1006..1006
                src/Opcode.js on lines 1007..1007

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

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

                    DIV_DOUBLE_2ADDR:{ byte:0xce, instr:"div-double/2addr", ope: CONST.LEX.TOKEN.DIV, parse: MainParser.move, type: CONST.INSTR_TYPE.MATH, reftype:ReferenceType.NONE, format:Format.Format12x, flag:Opcode.CAN_CONTINUE | Opcode.SETS_REGISTER | Opcode.SETS_WIDE_REGISTER },
                Severity: Major
                Found in src/Opcode.js and 38 other locations - About 2 hrs to fix
                src/Opcode.js on lines 906..906
                src/Opcode.js on lines 907..907
                src/Opcode.js on lines 909..909
                src/Opcode.js on lines 932..932
                src/Opcode.js on lines 933..933
                src/Opcode.js on lines 940..940
                src/Opcode.js on lines 941..941
                src/Opcode.js on lines 942..942
                src/Opcode.js on lines 945..945
                src/Opcode.js on lines 946..946
                src/Opcode.js on lines 947..947
                src/Opcode.js on lines 948..948
                src/Opcode.js on lines 949..949
                src/Opcode.js on lines 950..950
                src/Opcode.js on lines 956..956
                src/Opcode.js on lines 957..957
                src/Opcode.js on lines 958..958
                src/Opcode.js on lines 959..959
                src/Opcode.js on lines 960..960
                src/Opcode.js on lines 965..965
                src/Opcode.js on lines 966..966
                src/Opcode.js on lines 973..973
                src/Opcode.js on lines 974..974
                src/Opcode.js on lines 975..975
                src/Opcode.js on lines 978..978
                src/Opcode.js on lines 979..979
                src/Opcode.js on lines 980..980
                src/Opcode.js on lines 981..981
                src/Opcode.js on lines 982..982
                src/Opcode.js on lines 983..983
                src/Opcode.js on lines 989..989
                src/Opcode.js on lines 990..990
                src/Opcode.js on lines 991..991
                src/Opcode.js on lines 993..993
                src/Opcode.js on lines 998..998
                src/Opcode.js on lines 999..999
                src/Opcode.js on lines 1006..1006
                src/Opcode.js on lines 1007..1007

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

                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

                Severity
                Category
                Status
                Source
                Language