FrenchYeti/dexcalibur

View on GitHub
src/CoreClass.js

Summary

Maintainability
F
3 wks
Test Coverage

File CoreClass.js has 2248 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var CONST = require("./CoreConst.js");
const NodeCompare = require("./NodeCompare.js");
const Accessor = require('./AccessFlags');

const EOL =  require('os').EOL ;
Severity: Major
Found in src/CoreClass.js - About 6 days to fix

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

    Method.prototype.toJsonObject = function(fields=[],exclude=[]){
        let obj = new Object();
        if(fields.length>0){
            for(let i=0; i<fields.length; i++){
                if(this[fields[i]] != null && this[fields[i]].toJsonObject != null){
    Severity: Minor
    Found in src/CoreClass.js - About 1 day 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 46 (exceeds 5 allowed). Consider refactoring.
    Open

    Class.prototype.toJsonObject = function(filter){
        let obj = new Object(), m=null;
        for(let i in this){
            if(["_","$"].indexOf(i[0])==-1 
                && (typeof this[i] != 'array')
    Severity: Minor
    Found in src/CoreClass.js - About 7 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

    BasicBlock has 49 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class BasicBlock
    {
        /**
        * @param {Object} config Optional, an object wich can be used in order to initialize the instance 
        * @constructor
    Severity: Minor
    Found in src/CoreClass.js - About 6 hrs to fix

      Function Method has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
      Open

      function Method(config){
          // corresponding stub type to use during export
          this.__stub_type__ = STUB_TYPE.METHOD;
          this.$ = STUB_TYPE.METHOD;
      
      
      Severity: Minor
      Found in src/CoreClass.js - About 6 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 Method has 123 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function Method(config){
          // corresponding stub type to use during export
          this.__stub_type__ = STUB_TYPE.METHOD;
          this.$ = STUB_TYPE.METHOD;
      
      
      Severity: Major
      Found in src/CoreClass.js - About 4 hrs to fix

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

        Field.prototype.toJsonObject = function(fields=null,exclude=null){
            let obj = new Object();
            /*if(fields.length>0){
                for(let i in fields){
                    if(this[fields[i]] != null && (typeof this[fields[i]] == "object")){
        Severity: Minor
        Found in src/CoreClass.js - About 4 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 81 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Method.prototype.toJsonObject = function(fields=[],exclude=[]){
            let obj = new Object();
            if(fields.length>0){
                for(let i=0; i<fields.length; i++){
                    if(this[fields[i]] != null && this[fields[i]].toJsonObject != null){
        Severity: Major
        Found in src/CoreClass.js - About 3 hrs to fix

          Function getMethod has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
          Open

          Class.prototype.getMethod = function(pattern, pExactMatch=0){
              let res0 = [], res1=[], rx={}, match=null;
              if(pExactMatch != CONST.EXACT_MATCH){
                  for(let i in pattern){
                      rx[i] = new RegExp(pattern[i]);
          Severity: Minor
          Found in src/CoreClass.js - About 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 compare has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
          Open

          Method.prototype.compare = function(meth){
              let diff = [];
          
              for(let i in this){
                  switch(i){
          Severity: Minor
          Found in src/CoreClass.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 53 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Class.prototype.toJsonObject = function(filter){
              let obj = new Object(), m=null;
              for(let i in this){
                  if(["_","$"].indexOf(i[0])==-1 
                      && (typeof this[i] != 'array')
          Severity: Major
          Found in src/CoreClass.js - About 2 hrs to fix

            Function MethodReference has 52 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function MethodReference(cfg){
                this.fqcn = null;
                this.name = null;
                this.args = null;
                this.ret = null;
            Severity: Major
            Found in src/CoreClass.js - About 2 hrs to fix

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

              Field.prototype.toJsonObject = function(fields=null,exclude=null){
                  let obj = new Object();
                  /*if(fields.length>0){
                      for(let i in fields){
                          if(this[fields[i]] != null && (typeof this[fields[i]] == "object")){
              Severity: Major
              Found in src/CoreClass.js - About 2 hrs to fix

                Function compare has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Method.prototype.compare = function(meth){
                    let diff = [];
                
                    for(let i in this){
                        switch(i){
                Severity: Minor
                Found in src/CoreClass.js - About 1 hr to fix

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

                      toJsonObject(include=null){
                          let o = new Object();
                          for(let i in this){
                  
                              if(include instanceof Array && include.indexOf(i)==-1) continue;
                  Severity: Minor
                  Found in src/CoreClass.js - About 1 hr 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 Class has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function Class(config){
                      // corresponding stub type to use during export
                      this.__stub_type__ = STUB_TYPE.CLASS;
                      this.$ = STUB_TYPE.CLASS;
                  
                  
                  Severity: Minor
                  Found in src/CoreClass.js - About 1 hr to fix

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

                        toJsonObject(exclude=[]){
                            let o = new Object();
                            for(let i in this){
                                if(exclude.indexOf(i)>-1) continue;
                                if(this[i]==null) continue;
                    Severity: Minor
                    Found in src/CoreClass.js - About 1 hr 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 MethodReference has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function MethodReference(cfg){
                        this.fqcn = null;
                        this.name = null;
                        this.args = null;
                        this.ret = null;
                    Severity: Minor
                    Found in src/CoreClass.js - About 1 hr 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 getBasicBlockByLabel has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                    Open

                    Method.prototype.getBasicBlockByLabel = function(pLabel, pType){
                        //if(pType == CONST.INSTR_TYPE.IF){
                        switch(pType)
                        {
                            case CONST.INSTR_TYPE.IF:
                    Severity: Minor
                    Found in src/CoreClass.js - About 1 hr 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 compare has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Field.prototype.compare = function(field){
                        let diff = [];
                    
                        for(let i in this){
                            switch(i){
                    Severity: Minor
                    Found in src/CoreClass.js - About 1 hr to fix

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

                          toJsonObject(exclude=[]){
                              let o = new Object();
                              for(let i in this){
                                  if(exclude.indexOf(i)>-1) continue;
                                  if(this[i]==null) continue;
                      Severity: Minor
                      Found in src/CoreClass.js - About 1 hr to fix

                        Function Call has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function Call(cfg){
                        
                            this.$ = STUB_TYPE.CALL;
                        
                            this.instr = null;
                        Severity: Minor
                        Found in src/CoreClass.js - About 1 hr to fix

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

                          Call.prototype.toJsonObject = function(){
                              let obj = new Object();
                              for(let i in this){
                                  if(["_","$"].indexOf(i[0])==-1 
                                      && (typeof this[i] != 'array')
                          Severity: Minor
                          Found in src/CoreClass.js - About 1 hr 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 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                          Package.prototype.toJsonObject = function(fields){
                              let o=new Object();
                              if(fields !== null){
                                  for(let i in fields){
                                      if(typeof this[fields[i]] == "object"){
                          Severity: Minor
                          Found in src/CoreClass.js - About 1 hr 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 getInstr has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                          Method.prototype.getInstr = function(offsetBB,offsetInstr){
                              for(let i in this.instr){
                                  if(i == offsetBB){
                                      for(let j in this.instr[i].stack){
                                          if(j == offsetInstr){
                          Severity: Minor
                          Found in src/CoreClass.js - About 1 hr 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 getInstrNearTo has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                          Method.prototype.getInstrNearTo = function(offsetBB,offsetInstr,windowSize=3){
                              let min = offsetInstr-windowSize;
                              let max = offsetInstr+windowSize;
                              let instr = [];
                          
                          
                          Severity: Minor
                          Found in src/CoreClass.js - About 1 hr 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 compare has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                          Field.prototype.compare = function(field){
                              let diff = [];
                          
                              for(let i in this){
                                  switch(i){
                          Severity: Minor
                          Found in src/CoreClass.js - About 1 hr 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 constructor has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              constructor(config=null){
                                  this.$ = STUB_TYPE.BASIC_BLOCK;
                          
                                  this.line = -1;
                                  this.prologue = false;
                          Severity: Minor
                          Found in src/CoreClass.js - About 1 hr to fix

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

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

                              Avoid deeply nested control flow statements.
                              Open

                                          for(let k in this.fields){
                                              m = this.fields[k].toJsonObject(["__signature__","__aliasedSignature__","alias","name","tags","type","modifiers"]);
                                              if(this.inherit[k] != null) m.__inherit = true;
                                              obj.fields.push(m);
                                          }
                              Severity: Major
                              Found in src/CoreClass.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                    if(this.supers[k] instanceof Class)
                                                        obj.supers.push({ 
                                                            name:this.supers[k].signature(),
                                                            alias: this.supers[k].getAlias()
                                                        }); // call signature
                                Severity: Major
                                Found in src/CoreClass.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                          else if(i == "package"){
                                              obj.package = this.package.toJsonObject(["name"]);
                                          }
                                          else if(i == "tags"){
                                              obj.tags = this.tags;
                                  Severity: Major
                                  Found in src/CoreClass.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                    if(this.inherit[k] != null) m.__inherit = true;
                                    Severity: Major
                                    Found in src/CoreClass.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                              if(this._callers[j] != undefined)
                                                                  if(this._callers[j] instanceof Method){
                                                                      //console.log("Callers -> ",this._callers[i].signature());
                                                                      obj._callers.push(this._callers[j].signature());
                                                                  }else{
                                      Severity: Major
                                      Found in src/CoreClass.js - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                if(this._useField[i] != undefined)
                                                                    obj._useField.push(this._useField[i].__signature__);
                                        Severity: Major
                                        Found in src/CoreClass.js - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                                  if(this._useMethod[i] != undefined){
                                                                      obj._useMethod.push(i); //this._useMethod[i].__signature__);
                                                                  }
                                          Severity: Major
                                          Found in src/CoreClass.js - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                    if(this._useClass[i] != undefined)
                                                                        obj._useClass.push(this._useClass[i].name);
                                            Severity: Major
                                            Found in src/CoreClass.js - About 45 mins to fix

                                              Function getField has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                              Class.prototype.getField = function(pattern){
                                                  let res0 = [], res1=[], rx={}, match=null;
                                                  for(let i in pattern){
                                                      rx[i] = new RegExp(pattern[i]);
                                                  }
                                              Severity: Minor
                                              Found in src/CoreClass.js - About 35 mins to fix

                                              Cognitive Complexity

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

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

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

                                              Further reading

                                              Function appendBlock has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                              Method.prototype.appendBlock = function(block, callback=null){
                                                  if(block instanceof BasicBlock){
                                                      block.offset = this.instr.length;
                                                      this.instr.push(block);
                                                      if(callback != null && callback.basicblock != null) 
                                              Severity: Minor
                                              Found in src/CoreClass.js - About 25 mins to fix

                                              Cognitive Complexity

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

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

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

                                              Further reading

                                              Function java_getMethod has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                              Class.prototype.java_getMethod = function(pName, pArgumentsTypes){
                                                  
                                                  for(let i in this.methods){
                                                      if(this.methods[i].name == pName){
                                                          for(let j=0; j<pArgumentsTypes.length; j++){
                                              Severity: Minor
                                              Found in src/CoreClass.js - About 25 mins to fix

                                              Cognitive Complexity

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

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

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

                                              Further reading

                                              Function import has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                              Method.prototype.import = function(obj){
                                                  // raw impport
                                                  this.raw_import(obj);
                                                  // estor modifiers
                                                  this.modifiers = new Accessor.AccessFlags(obj.modifiers);
                                              Severity: Minor
                                              Found in src/CoreClass.js - About 25 mins to fix

                                              Cognitive Complexity

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

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

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

                                              Further reading

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

                                                  if(fields !== null){
                                                      for(let i in fields){
                                                          if(typeof this[fields[i]] == "object"){
                                                              o[fields[i]] = this[fields[i]].toJsonObject();
                                                          }else{
                                              Severity: Major
                                              Found in src/CoreClass.js and 1 other location - About 7 hrs to fix
                                              src/ModelPackage.js on lines 145..160

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

                                              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

                                              Method.prototype.removeMissingTag = function(){
                                                  if(this.tags.length==1) 
                                                      this.tags = [];
                                                  else{
                                                      let i = this.tags.indexOf(CONST.TAG.MISSING);
                                              Severity: Major
                                              Found in src/CoreClass.js and 2 other locations - About 6 hrs to fix
                                              src/CoreClass.js on lines 982..993
                                              src/CoreClass.js on lines 2452..2463

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

                                              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

                                              Field.prototype.removeMissingTag = function(){
                                                  if(this.tags.length==1) 
                                                      this.tags = [];
                                                  else{
                                                      let i = this.tags.indexOf(CONST.TAG.MISSING);
                                              Severity: Major
                                              Found in src/CoreClass.js and 2 other locations - About 6 hrs to fix
                                              src/CoreClass.js on lines 982..993
                                              src/CoreClass.js on lines 1405..1416

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

                                              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

                                              Class.prototype.removeMissingTag = function(){
                                                  if(this.tags.length==1) 
                                                      this.tags = [];
                                                  else{
                                                      let i = this.tags.indexOf(CONST.TAG.MISSING);
                                              Severity: Major
                                              Found in src/CoreClass.js and 2 other locations - About 6 hrs to fix
                                              src/CoreClass.js on lines 1405..1416
                                              src/CoreClass.js on lines 2452..2463

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

                                              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.aliasedCallSignature = function(){
                                                      if(this.__aliasedCallSignature__===null){
                                                          let xargs = "";
                                              //            for(let i in this.args) xargs+="<"+this.args[i].signature()+">";
                                                          for(let i in this.args) xargs+=this.args[i].signature();
                                              Severity: Major
                                              Found in src/CoreClass.js and 1 other location - About 3 hrs to fix
                                              src/CoreClass.js on lines 1291..1301

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

                                              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.callSignature = function(){
                                                      if(this.__callSignature__===null){
                                                          let xargs = "";
                                              //            for(let i in this.args) xargs+="<"+this.args[i].signature()+">";
                                                          for(let i in this.args) xargs+=this.args[i].signature();
                                              Severity: Major
                                              Found in src/CoreClass.js and 1 other location - About 3 hrs to fix
                                              src/CoreClass.js on lines 1280..1290

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

                                              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

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

                                              Method.prototype.getTryEndBlock = function(pLabel){
                                                  let bb = this.getBasicBlocks();
                                                  for(let i=0; i<bb.length; i++){
                                                      if(bb[i].getTryEndLabel()==pLabel){
                                                          return bb[i];
                                              Severity: Major
                                              Found in src/CoreClass.js and 2 other locations - About 1 hr to fix
                                              src/CoreClass.js on lines 1776..1784
                                              src/CoreClass.js on lines 1797..1805

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

                                              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

                                              Method.prototype.getTryStartBlock = function(pLabel){
                                                  let bb = this.getBasicBlocks();
                                                  for(let i=0; i<bb.length; i++){
                                                      if(bb[i].getTryStartLabel()==pLabel){
                                                          return bb[i];
                                              Severity: Major
                                              Found in src/CoreClass.js and 2 other locations - About 1 hr to fix
                                              src/CoreClass.js on lines 1786..1794
                                              src/CoreClass.js on lines 1797..1805

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

                                              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

                                              Method.prototype.getCatchBlock = function(pLabel){
                                                  let bb = this.getBasicBlocks();
                                                  for(let i=0; i<bb.length; i++){
                                                      if(bb[i].getCatchLabel()==pLabel){
                                                          return bb[i];
                                              Severity: Major
                                              Found in src/CoreClass.js and 2 other locations - About 1 hr to fix
                                              src/CoreClass.js on lines 1776..1784
                                              src/CoreClass.js on lines 1786..1794

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

                                              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

                                              Package.prototype.getAbsoluteSize = function(obj){
                                                  let absz = 0;
                                                  for(let i in this.children){
                                                      if(this.children[i] instanceof Class)
                                                          absz++;
                                              Severity: Major
                                              Found in src/CoreClass.js and 1 other location - About 1 hr to fix
                                              src/ModelPackage.js on lines 94..103

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

                                              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

                                                      for(let i in pattern){
                                                          res0 = res1;
                                                          res1 = [];
                                                          for(let meth in res0){
                                                              match = rx[i].exec(res0[meth][i]);
                                              Severity: Major
                                              Found in src/CoreClass.js and 1 other location - About 1 hr to fix
                                              src/CoreClass.js on lines 940..947

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

                                              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

                                                  for(let i in pattern){
                                                      res0 = res1;
                                                      res1 = [];
                                                      for(let meth in res0){
                                                          match = rx[i].exec(res0[meth][i]);
                                              Severity: Major
                                              Found in src/CoreClass.js and 1 other location - About 1 hr to fix
                                              src/CoreClass.js on lines 895..902

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

                                              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

                                              var STUB_TYPE={
                                                  METHOD: 0x1,
                                                  FIELD: 0x2,
                                                  ANNOTATION: 0x3,
                                                  INSTR: 0x4,
                                              Severity: Major
                                              Found in src/CoreClass.js and 1 other location - About 1 hr to fix
                                              src/libs/BinaryXmlParser.js on lines 11..27

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

                                              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

                                                              case "_useField":
                                                                  obj._useField = [];
                                                                  for(let j in this._useField){
                                                                      if(this._useField[i] != undefined)
                                                                          obj._useField.push(this._useField[i].__signature__);
                                              Severity: Major
                                              Found in src/CoreClass.js and 1 other location - About 1 hr to fix
                                              src/CoreClass.js on lines 1545..1551

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

                                              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

                                                              case "_useClass":
                                                                  obj._useClass = [];
                                                                  for(let j in this._useClass){
                                                                      if(this._useClass[i] != undefined)
                                                                          obj._useClass.push(this._useClass[i].name);
                                              Severity: Major
                                              Found in src/CoreClass.js and 1 other location - About 1 hr to fix
                                              src/CoreClass.js on lines 1560..1566

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

                                              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

                                              Package.prototype.setMetadata = function(obj){
                                                  if(obj instanceof Metadata){
                                                      this.meta = obj;
                                                  }else if(typeof obj == 'object'){
                                                      this.meta = new Metadata(obj);
                                              Severity: Minor
                                              Found in src/CoreClass.js and 1 other location - About 55 mins to fix
                                              src/ModelPackage.js on lines 53..62

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

                                              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

                                              ObjectType.prototype.toJsonObject = function(){
                                                  let obj = new Object();
                                                  obj.name = this.name;
                                                  obj.arr = this.arr;
                                                  obj.primitive = false;
                                              Severity: Minor
                                              Found in src/CoreClass.js and 1 other location - About 55 mins to fix
                                              src/CoreClass.js on lines 262..268

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

                                              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

                                              BasicType.prototype.toJsonObject = function(){
                                                  let obj = new Object();
                                                  obj.name = this._name;
                                                  obj.arr = this.arr;
                                                  obj.primitive = true;
                                              Severity: Minor
                                              Found in src/CoreClass.js and 1 other location - About 55 mins to fix
                                              src/CoreClass.js on lines 325..331

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

                                              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

                                                  this.prettySignature = function(override=false){
                                                      if(!override && this.__pretty_signature__ != null){
                                                          return this.__pretty_signature__;
                                                      }
                                                      this.__pretty_signature__ = this.signatureFactory("__alias_signature__","alias");
                                              Severity: Minor
                                              Found in src/CoreClass.js and 1 other location - About 35 mins to fix
                                              src/CoreClass.js on lines 713..719

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

                                              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

                                               Class.prototype.prettySignature = function(override=false){
                                                      if(!override && this.__pretty_signature__ != null){
                                                          return this.__pretty_signature__;
                                                      }
                                                      this.__pretty_signature__ = this.signatureFactory("__alias_signature__","alias");
                                              Severity: Minor
                                              Found in src/CoreClass.js and 1 other location - About 35 mins to fix
                                              src/CoreClass.js on lines 1342..1348

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

                                              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

                                              There are no issues that match your filters.

                                              Category
                                              Status