FrenchYeti/dexcalibur

View on GitHub

Showing 948 of 948 total issues

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

    scan(path){
        let db = this.db;
        let detector = this.detector;
        let ctr = 0, file=null, ctx=this.context;
        //Logger.info("[DATA ANALYZER] Start scan of : ",path);
Severity: Minor
Found in src/DataAnalyzer.js - About 1 hr 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 SearchAPI has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

      function SearchAPI(data){
          
          // AnalyzerDatabase (specialize InMemoryDb)
          var _db = this._db = data;
          this._queryCache = [];
      Severity: Minor
      Found in src/Finder.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 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 gotoLocalXref has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

      function gotoLocalXref(method,goto_name){
          let xref = {
              name: null,
              ref: [],
              ctr: 0 
      Severity: Minor
      Found in inspectors/BytecodeCleaner/service/main.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 sprint has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

          sprint(){
              let dbg="["
      
              if(this.public) dbg += "public,";
              if(this.protected) dbg += "protected,";
      Severity: Minor
      Found in src/AccessFlags.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

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

              if(xmlobj.action != null && xmlobj.action instanceof Array){
                  for(let i=0; i<xmlobj.action.length; i++){
                      intf.action.push(IntentActionCriteria.fromXml(xmlobj.action[i].$));
                  }
              }
      Severity: Major
      Found in src/AndroidAppComponents.js and 2 other locations - About 1 hr to fix
      src/AndroidAppComponents.js on lines 264..268
      src/AndroidAppComponents.js on lines 271..275

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

      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

                              case "spawn":
                                  Logger.info(`[WEBSERVER] Start hooking [app=${req.body.app}, type=spawn]`);
                                  $.project.hook.startBySpawn(req.body.app);
                                  res.status(200).send(JSON.stringify({ enable: true }));
                                  break;
      Severity: Major
      Found in src/WebServer.js and 2 other locations - About 1 hr to fix
      src/WebServer.js on lines 1051..1055
      src/WebServer.js on lines 1056..1060

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

      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

                              case "attach-app":
                                  Logger.info(`[WEBSERVER] Start hooking [app=${req.body.app}, type=attach-app-x]`);
                                  $.project.hook.startByAttachToApp(req.body.app);
                                  res.status(200).send(JSON.stringify({ enable: true }));
                                  break;
      Severity: Major
      Found in src/WebServer.js and 2 other locations - About 1 hr to fix
      src/WebServer.js on lines 1036..1040
      src/WebServer.js on lines 1056..1060

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

      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

              if(xmlobj.category != null && xmlobj.category instanceof Array){
                  for(let i=0; i<xmlobj.category.length; i++){
                      intf.category.push(IntentCategoryCriteria.fromXml(xmlobj.category[i].$));
                  }
              }
      Severity: Major
      Found in src/AndroidAppComponents.js and 2 other locations - About 1 hr to fix
      src/AndroidAppComponents.js on lines 257..261
      src/AndroidAppComponents.js on lines 271..275

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

      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

                              case "attach-pid":
                                  Logger.info(`[WEBSERVER] Start hooking [pid=${req.body.pid}, type=attach-to-pid`);
                                  $.project.hook.startByAttachTo(req.body.pid);
                                  res.status(200).send(JSON.stringify({ enable: true }));
                                  break;
      Severity: Major
      Found in src/WebServer.js and 2 other locations - About 1 hr to fix
      src/WebServer.js on lines 1036..1040
      src/WebServer.js on lines 1051..1055

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

      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

              if(xmlobj.data != null && xmlobj.data instanceof Array){
                  for(let i=0; i<xmlobj.data.length; i++){
                      intf.data.push(IntentDataCriteria.fromXml(xmlobj.data[i].$));
                  }
              }
      Severity: Major
      Found in src/AndroidAppComponents.js and 2 other locations - About 1 hr to fix
      src/AndroidAppComponents.js on lines 257..261
      src/AndroidAppComponents.js on lines 264..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 93.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Function decodeSymbol has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function decodeSymbol() {
              var byte1;
              var byte2;
              var byte3;
              var byte4;
      Severity: Minor
      Found in src/UTF8.js - About 1 hr to fix

        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

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

              static fromXml(xmlobj){
                  let p = new AndroidScreen();
          
                  for(let i in xmlobj){
                      if(i.startsWith('android:')){
          Severity: Major
          Found in src/AndroidAppComponents.js and 6 other locations - About 1 hr to fix
          src/AndroidAppComponents.js on lines 174..186
          src/AndroidAppComponents.js on lines 319..331
          src/AndroidAppComponents.js on lines 355..367
          src/AndroidAppComponents.js on lines 438..450
          src/AndroidAppComponents.js on lines 479..491
          src/AndroidAppComponents.js on lines 539..551

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

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

              static fromXml(xmlobj){
                  let p = new AndroidInstrumentation();
          
                  for(let i in xmlobj){
                      if(i.startsWith('android:')){
          Severity: Major
          Found in src/AndroidAppComponents.js and 6 other locations - About 1 hr to fix
          src/AndroidAppComponents.js on lines 174..186
          src/AndroidAppComponents.js on lines 319..331
          src/AndroidAppComponents.js on lines 355..367
          src/AndroidAppComponents.js on lines 479..491
          src/AndroidAppComponents.js on lines 503..515
          src/AndroidAppComponents.js on lines 539..551

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

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

                static fromXml(xmlobj){
                    let p = new AndroidConfiguration();
            
                    for(let i in xmlobj){
                        if(i.startsWith('android:')){
          Severity: Major
          Found in src/AndroidAppComponents.js and 6 other locations - About 1 hr to fix
          src/AndroidAppComponents.js on lines 174..186
          src/AndroidAppComponents.js on lines 319..331
          src/AndroidAppComponents.js on lines 355..367
          src/AndroidAppComponents.js on lines 438..450
          src/AndroidAppComponents.js on lines 479..491
          src/AndroidAppComponents.js on lines 503..515

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

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

              static fromXml(xmlobj){
                  let o = new AndroidPermissionSdk23(); 
                  
                  for(let i in xmlobj){
                      if(i.startsWith('android:')){
          Severity: Major
          Found in src/AndroidAppComponents.js and 6 other locations - About 1 hr to fix
          src/AndroidAppComponents.js on lines 174..186
          src/AndroidAppComponents.js on lines 355..367
          src/AndroidAppComponents.js on lines 438..450
          src/AndroidAppComponents.js on lines 479..491
          src/AndroidAppComponents.js on lines 503..515
          src/AndroidAppComponents.js on lines 539..551

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

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

              static fromXml(xmlobj){
                  let p = new AndroidSupportedScreen();
          
                  for(let i in xmlobj){
                      if(i.startsWith('android:')){
          Severity: Major
          Found in src/AndroidAppComponents.js and 6 other locations - About 1 hr to fix
          src/AndroidAppComponents.js on lines 174..186
          src/AndroidAppComponents.js on lines 319..331
          src/AndroidAppComponents.js on lines 355..367
          src/AndroidAppComponents.js on lines 438..450
          src/AndroidAppComponents.js on lines 503..515
          src/AndroidAppComponents.js on lines 539..551

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

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

              static fromXml(xmlobj){
                  let p = new AndroidFeature();
                  
                  for(let i in xmlobj){
                      if(i.startsWith('android:')){
          Severity: Major
          Found in src/AndroidAppComponents.js and 6 other locations - About 1 hr to fix
          src/AndroidAppComponents.js on lines 174..186
          src/AndroidAppComponents.js on lines 319..331
          src/AndroidAppComponents.js on lines 438..450
          src/AndroidAppComponents.js on lines 479..491
          src/AndroidAppComponents.js on lines 503..515
          src/AndroidAppComponents.js on lines 539..551

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

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Severity
          Category
          Status
          Source
          Language