Showing 446 of 948 total issues
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')
- 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 makeTree
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Analyzer.prototype.makeTree = function(bblocks){
let last = {};
for(let i=0; i<bblocks.length; i++){
bblocks[i].offset = i;
if(bblocks[i].stack.length > 0){
- 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 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 = [];
- 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 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){
- 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 import
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
import(data, force = false, overwrite = false) {
let isEmpty = null;
for (let i in data) {
if (this[i] !== undefined || force) {
if ((this[i] != null && overwrite) || this[i] == null) {
- 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 load
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
static load( pContext, pProjectUID, pConfigPath = null){
let project = new DexcaliburProject( pContext, pProjectUID);
let data = null;
- 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 fromJsonObject
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
static fromJsonObject( pJson){
let o = new DeviceProfile();
for(let i in pJson){
if(i == "profiles"){
- 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 fullscan
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
async fullscan( pPath){
let elemnt=null;
let success = false;
// scan OS/Platform
- 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 buildCustomScript
has a Cognitive Complexity of 10 (exceeds 5 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;
- 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 extract
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
static async extract(pApkPath, pDestination, pOption={}){
if(_fs_.existsSync(pApkPath)==false){
throw new Error("[APK HELPER] APK not found ");
}
Function invoke
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
invoke: function(src,raw_src){
let instr = new CLASS.Instruction();
let m = Core.RX.INVOKE.exec(raw_src), meth=null;
let regs = raw_src.substr(0,raw_src.lastIndexOf(","));
Function method
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
method: function(db, methRef, isStaticCall){
let meth = db.methods.getEntry(methRef.signature());
// 1. search into indexed method
Function showCFG_old
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Analyzer.prototype.showCFG_old = function(bblocks, prefix=""){
let pathTRUE = Chalk.green(prefix+" |\n"+prefix+" |\n"+prefix+" |\n"+prefix+" +-----[TRUE]-->");
let path_len = " +-----[TRUE]-->".length;
let pathFALSE = Chalk.red(prefix+" |\n"+prefix+" |\n"+prefix+" |\n"+prefix+" +-----[FALSE]->");
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;
Function Hook
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Hook(context){
this.id = null;
// ! important
// It is used in order to link in-hook method call with method declared outside of the hook
Function flatternGotoOf
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function flatternGotoOf(method){
let blocksToMove = null;
let singleGoto = findSingleGoto(method);
let ret = false;
Function print
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
print(){
let m=`
Call stack :
`;
Function getAndroidClasses
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
PlatformBuilder.prototype.getAndroidClasses = function(api_version){
let apiPath = Path.join(this.android_sdk,"platforms");
let availableApi = [], apiName = "", dstPath="", ret=null;
if(api_version != null){
Function type
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
type: function(src){
let i=0,l=-1,types=[],s=src,fqn=null,isArray=false,m=null;
while(i<src.length){
if(src[i]==CONST.LEX.TOKEN.ARRAY){
Function type
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
type(src){
let i=0,l=-1,types=[],s=src,fqn=null,isArray=false;
while(i<src.length){
if(src[i]==LEX.TOKEN.ARRAY){