Showing 446 of 948 total issues
Function renameStaticInterface
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renameStaticInterface(database, method, pContext){
if(!hasSingleCall(method)) return false;
if(method.args.length==0) return false;
Function load
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
load( pClass, pExecClinit=true){
let clz = null;
if(pClass instanceof CLASS.Class){
if(this.classes[pClass.name] != undefined)
Function simplify
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
simplify(pMethod, pLevel=0){
let blocks = [], cs = {
tag: null,
intr: [],
logs: [],
Function fromJsonObject
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
static fromJsonObject( pJsonObject, pOverride = {}){
let dev = new Device();
for(let i in pJsonObject){
switch(i){
case 'type':
Function readDimension
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
readDimension() {
const dimension = {
value: null,
unit: null,
rawUnit: null
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;
Function constructor
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(pContext, pConnectorType=null){
this.ctx = pContext;
/**
* DB connector
Function setup
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
setup(pDeviceID = null, pReturnString = true){
let cmd=null;
if(pReturnString)
cmd = this.path;
Function toIntercept
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
HookPrimitive.prototype.toIntercept = function(context,set){
let hook = new Hook(context);
hook.variables = this.variables;
Function invoke
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
invoke( pMethod, pObj, pArgs){
let opt = null;
// execute hooks
if(this.isHooked(pMethod)){
Function Call
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Call(cfg){
this.$ = STUB_TYPE.CALL;
this.instr = null;
Function getIntentFilter
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
getIntentFilter(type,cmp,uid){
let result = null;
switch(type)
{
Function constructor
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(pContext, pMethod = null, pLocalSize = null, pParamSize = null){
this.context = pContext;
this.logs = new VM_Log();
Function init
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
init(){
if(!_fs_.existsSync(this.path)){
_fs_.mkdirSync(this.path, {recursive: true});
}
if(!_fs_.existsSync(_path_.join(this.path, DIR_NAME.SAVE))){
Function callgraph_from
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
GraphMaker.prototype.callgraph_from = function(obj, n=1, m=2){
let tree={
fqcn:obj.signature(),
tags: obj.tags,
//internal:obj.hasTag(AnalysisHelper.TAG.Discover.Internal),
Function addIntercept
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
HookSet.prototype.addIntercept = function(interceptConfig){
if(interceptConfig.method == null && interceptConfig.raw == null){
Logger.error("[HOOK MANAGER] addIntercept(): The method to hook is not defined");
return null;
}
Function toJsonObject
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
toJsonObject( pFields){
let o= {};
if(pFields !== null){
for(let i in pFields){
if(typeof this[pFields[i]] == "object"){
- 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 isEmpty
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
isEmpty: function( pVar, pFlags=NO_FLAG){
let f=null, p=null;
switch(typeof pVar){
case 'array':
if(pFlags != 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 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){
- 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 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"){
- 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"