Showing 213 of 1,102 total issues
Function insertRecords
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
var insertRecords=function(records, scheme, key, autoSysId, callback) {
Sync(function () {
var err;
try {
schemeid.bulkInsert.sync(null, records);
Function relationshipIdBulkCreation
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
var relationshipIdBulkCreation = function (namespace, partitionId, idsTotal, request, callback) {
//console.log("step relationshipIdBulkCreation");
Method run
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void run(ApplicationArguments args) throws Exception {
System.out.println("\nThis process will synchronise the sequence of every partition within every namespace\n" +
"from the source CIS instance to the target CIS instance\n" +
"where the partition is available on both sides.\n");
Function getSctid
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports.getSctid = function getSctid (req, res, next) {
var token = req.swagger.params.token.value;
var sctid = req.swagger.params.sctid.value;
var includeAdditionalIds = req.swagger.params.includeAdditionalIds.value;
security.authenticate(token, function(err, data) {
Function conceptIdBulkCreation
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
var conceptIdBulkCreation = function (namespace, partitionId, idsTotal, request, callback) {
//console.log("step conceptIdBulkCreation");
Function descriptionIdBulkCreation
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
var descriptionIdBulkCreation = function (namespace, partitionId, idsTotal, request, callback) {
//console.log("step descriptionIdBulkCreation");
Function createNamespace
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports.createNamespace = function createNamespace(objNamespace, callback){
dbInit.getDB(function (err, pdb, model) {
if (err)
throw err;
else{
Function find
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
job.find=function(query, limit, skip, callback){
db.getDB(function (err,connection)
{
if (err) throw err;
if (!query){
- 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 getNamespaces
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
module.exports.getNamespaces = function getNamespaces (req, res, next) {
namespace.getNamespaces(function(err, namespaces) {
if (err)
return next(err.message);
else{
- 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 updateSchemeIds
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
var updateSchemeIds=function ( operation, callback){
var cont=0;
var records=[];
var error=false;
var scheme=operation.scheme;
Function generateSchemeIdSmallRequest
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
var generateSchemeIdSmallRequest=function ( operation, callback) {
getModel(function (err) {
if (err) {
console.log("error model:" + err);
callback(err);
Function updateSctids
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
var updateSctids=function (operation, callback){
var cont=0;
var records=[];
var error=false;
for (var i=0;i<operation.sctids.length;i++) {
Function find
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
job.find=function(query, limit, skip, callback){
db.getDB(function (err,connection)
{
if (err) throw err;
if (!query){
Function save
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
schemeid.save=function(schemeIdRecord,callback){
db.getDB(function (err,connection)
{
if (err) throw err;
- 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 idsRetrieve
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
var idsRetrieve = function (request, callback) {
if (request.partitionId.substr(1,1)=="0") {
conceptIdBulkCreation( request.namespace, request.partitionId, request.quantity, request, function(err, result){
- 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 find
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
schemeid.find=function(query, limit, skip, callback){
db.getDB(function (err,connection)
{
if (err) throw err;
var swhere="";
Function find
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
sctid.find=function(query, limit, skip, callback){
db.getDB(function (err,connection)
{
if (err) throw err;
var swhere="";
Function getSchemeIds
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
var getSchemeIds=function (scheme, schemeIdArray, callback) {
schemeIdArray.forEach(function (schemeId) {
if (schemeId == null || schemeId == "") {
callback(throwErrMessage("SchemeId is null."), null);
Function save
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
sctid.save=function(sctIdRecord,callback){
db.getDB(function (err,connection)
{
if (err) throw err;
- 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 runner
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
var runner = function (){
namespaceDm.getNamespaces(function(err, namespaces) {
if (err) {
console.log("[ERROR] " + (new Date()).getTime() + ": namespace=" + namespace + ", partition=" + partitionId + ". " + err);
return;
- 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"