Showing 446 of 948 total issues
Function parse
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
parse(src){
let ls=src.split(EOL), ln=null, sml=null, obj=null;
//console.log(ls);
for(let l=0; l<ls.length; l++){
Function analyzeBlocks
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
analyzeBlocks(pMethod){
let blocks = pMethod.getBasicBlocks();
if(blocks.length == 0) return null;
Function merge
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
merge( pDevice){
for(let i in pDevice){
switch(i){
case 'enrolled':
if(pDevice.enrolled)
Function importManifest
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
async importManifest(path){
let codeAnal = this.context.getAnalyzer();
let self = this;
let data = null;
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')
Function verify
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
verify(){
let verif={ length:0, msg:{} };
for(let i in this){
switch(i)
- Read upRead up
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 16 (exceeds 5 allowed). Consider refactoring. Open
toJsonObject(){
let o = new Object();
o.visibility = this.visibility;
- Read upRead up
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 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;
Function analyzeBlocks
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
analyzeBlocks(pMethod){
let blocks = pMethod.getBasicBlocks();
if(blocks.length == 0) return null;
Function hook.dex.classloader.new
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
"hook.dex.classloader.new": function (ctx, event) {
// 1. save gathered bytecode to a file
// 2. disassemble this file
// 3. Analyze & update graph
// 4. Workspace cleanup
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")){
Function parse
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
parse() {
const xmlHeader = this.readChunkHeader();
if (xmlHeader.chunkType !== ChunkType.XML) {
throw new Error('Invalid XML header');
}
Function buildCustomScript
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Hook.prototype.buildCustomScript = function(method){
if(method instanceof CLASS.MissingReference){
console.log(Chalk.bold.yellow("TODO : implement MissingReference probing"));
this.enable = false;
return null;
Function writeInvoke
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
writeInvoke( pMethodRef, pParamsReg){
let v = null, rThis=null, vThis=0, rArg=null, vArg=null;
if(pParamsReg.length > 0){
rThis = this.vm.getRegisterName(pParamsReg[0]);
Function newDispatcher
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
newDispatcher( pHome){
let $ = this;
return function (req, res) {
//console.log(req.path);
Function enroll
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
async enroll( pDevice, pOtions = {}){
let device = null, success=false, pf=null, pm=PlatformManager.getInstance();
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);
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){
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 = [];
- Read upRead up
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;
- Read upRead up
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"