Showing 1,102 of 1,102 total issues
Function isSchemeAbleUser
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function isSchemeAbleUser(schemeName, user, callback){
var able = false;
security.admins.forEach(function(admin){
if (admin == user)
able = true;
Function isAbleUser
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function isAbleUser(schemeName, user, callback){
var able = false;
security.admins.forEach(function(admin){
if (admin == user)
able = true;
Function isSchemeAbleUser
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function isSchemeAbleUser(schemeName, user, callback){
var able = false;
security.admins.forEach(function(admin){
if (admin == user)
able = true;
Function isAbleUser
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function isAbleUser(schemeName, user, callback){
var able = false;
security.admins.forEach(function(admin){
if (admin == user)
able = true;
Function getSctids
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var getSctids=function (sctidArray, callback) {
sctidArray.forEach(function (sctId) {
if (!sctIdHelper.validSCTId(sctId)) {
Function registerSchemeId
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var registerSchemeId=function (scheme, operation, callback){
if (!operation.autoSysId) {
getSchemeIdBySystemId(scheme, operation.systemId, function (err, schemeId) {
if (err) {
Function registerSctid
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var registerSctid=function (operation, callback) {
if (!operation.autoSysId) {
getSctidBySystemId(operation.namespace, operation.systemId, function (err, sctid) {
if (err) {
Method callCis
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private List<Long> callCis(String operation, CISBulkRequest request, boolean includeSchemeName) throws CISClientException {
String bulkJobId;
String jobInfo = operation;
try {
CISBulkRequestResponse responseBody;
Function runner
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var runner = function (){
namespaceDm.getNamespaces(function(err, namespaces) {
if (err) {
console.log("[ERROR] " + (new Date()).getTime() + ": namespace=" + namespace + ", partition=" + partitionId + ". " + err);
return;
Function getJobRecords
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getJobRecords(jobId, callback) {
bulkJob.findById({id: parseInt(jobId)}, function (err, jobRecord) {
if (err) {
callback(err, null);
Function getNamespacesForUser
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports.getNamespacesForUser = function getNamespacesForUser (req, res, next) {
var token = req.swagger.params.token.value;
var username = req.swagger.params.username.value;
security.authenticate(token, function(err, data) {
if (err)
Function publishSctids
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports.publishSctids = function publishSctids (req, res, next) {
var token = req.swagger.params.token.value;
var publicationData = req.swagger.params.publicationData.value;
security.authenticate(token, function(err, data) {
if (err) {
Function registerSctids
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports.registerSctids = function registerSctids (req, res, next) {
var token = req.swagger.params.token.value;
var registrationData = req.swagger.params.registrationData.value;
security.authenticate(token, function(err, data) {
if (err) {
Function releaseSctids
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports.releaseSctids = function releaseSctids (req, res, next) {
var token = req.swagger.params.token.value;
var releaseData = req.swagger.params.releaseData.value;
security.authenticate(token, function(err, data) {
if (err) {
Function deprecateSctids
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports.deprecateSctids = function deprecateSctids (req, res, next) {
var token = req.swagger.params.token.value;
var deprecationData = req.swagger.params.deprecationData.value;
security.authenticate(token, function(err, data) {
if (err) {
Function setAvailableSCTIDRecord2NewStatus
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setAvailableSCTIDRecord2NewStatus(operation, callback){
Sync(function () {
try {
var query = {
namespace: parseInt(operation.namespace),
Function getUsers
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports.getUsers = function getUsers (req, res, next) {
var token = req.swagger.params.token.value;
security.authenticate(token, function(err, data) {
if (err) {
return next({message: err.message, statusCode: 401});
Function counterMode
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function counterMode(operation, action, callback){
getNextNumber(operation, function (err, seq) {
if (err) {
callback(err, null);
Function counterMode
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function counterMode(scheme, operation, action, callback){
getNextSchemeId(scheme, operation, function (err, newSchemeId) {
if (err) {
callback(err, null);
Function authenticate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports.authenticate = function authenticate (token, callback) {
if (authenticationCache[token]) {
var now = Date.now();
var ago = (Date.now() - authenticationCache[token].timestamp);
if (ago < (60000*60)) {