File moog-graze.js
has 3263 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Created by stephen on 17/05/2016.
*/
// Export the options and the graze methods
Function callGrazeEndpoint
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function callGrazeEndpoint(opts, body)
{
return new Promise(function (resolve, reject)
{
Function setSituationProcesses
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.setSituationProcesses = function (sitnId, processList, primaryProcess, callback)
{
debug("Entering setSituationProcesses");
var opts = this.connectOptions;
var self = this;
Function setSituationServices
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.setSituationServices = function (sitnId, serviceList, primaryService, callback)
{
debug("Entering setSituationServices");
var opts = this.connectOptions;
var self = this;
Function createUser
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.createUser = function (userObj, callback)
{
debug("Entering createUser");
var opts = this.connectOptions;
var self = this;
Function assignSituation
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.assignSituation = function (sitnId, user, callback)
{
debug("Entering assignSituation");
var opts = this.connectOptions;
var self = this;
Function assignAndAcknowledgeAlert
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.assignAndAcknowledgeAlert = function (alertId, user, callback)
{
debug("Entering assignAndAcknowledgeAlert");
var opts = this.connectOptions;
var self = this;
Function assignAndAcknowledgeSituation
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.assignAndAcknowledgeSituation = function (sitnId, user, callback)
{
debug("Entering assignAndAcknowledgeSituation");
var opts = this.connectOptions;
var self = this;
Function assignAlert
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.assignAlert = function (alertId, user, callback)
{
debug("Entering assignAlert");
var opts = this.connectOptions;
var self = this;
Function mergeSituations
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.mergeSituations = function (situations, supersedeOriginal, callback)
{
debug("Entering mergeSituations");
var opts = this.connectOptions;
var self = this;
Function createTeam
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.createTeam = function (teamObj, callback)
{
debug("Entering createTeam");
var opts = this.connectOptions;
var self = this;
Function createMaintenanceWindow
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.createMaintenanceWindow = function (maintObj, callback)
{
debug("Entering createMaintenanceWindow");
var opts = this.connectOptions;
var self = this;
Function updateTeam
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.updateTeam = function (teamObj, callback)
{
debug("Entering updateTeam");
var opts = this.connectOptions;
var self = this;
Function setAlertSeverity
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.setAlertSeverity = function (alertId, severity, callback)
{
debug("Entering setAlertSeverity");
var opts = this.connectOptions;
var self = this;
Function removeAlertFromSituation
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.removeAlertFromSituation = function (alertId, sitnId, callback)
{
debug("Entering removeAlertFromSituation");
var opts = this.connectOptions;
var self = this;
Function setSituationDescription
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.setSituationDescription = function (sitnId, description, callback)
{
debug("Entering setSituationDescription");
var opts = this.connectOptions;
var self = this;
Function setAlertAcknowledgeState
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.setAlertAcknowledgeState = function (alertId, acknowledged, callback)
{
debug("Entering setAlertAcknowledgeState");
var opts = this.connectOptions;
var self = this;
Function setSituationExternalSeverity
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.setSituationExternalSeverity = function (sitnId, severity, callback)
{
debug("Entering setSituationExternalSeverity **WARNING** Deprecated 5.2.3+");
var opts = this.connectOptions;
var self = this;
Function addSigCorrelationInfo
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.addSigCorrelationInfo = function (sitnId, serviceName, resourceId, callback)
{
debug("Entering addSigCorrelationInfo");
var opts = this.connectOptions;
var self = this;
Function setSituationAcknowledgeState
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.setSituationAcknowledgeState = function (sitnId, acknowledged, callback)
{
debug("Entering setSituationAcknowledgeState");
var opts = this.connectOptions;
var self = this;
Function authenticate
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function authenticate(opts)
{
return new Promise(function (resolve, reject)
{
Function addThreadEntry
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.addThreadEntry = function (sitnId, threadName, entry, callback)
{
debug("Entering addThreadEntry");
var opts = this.connectOptions;
var self = this;
Function closeSituation
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.closeSituation = function (sitnId, resolution, callback)
{
debug("Entering closeSituation");
var opts = this.connectOptions;
var self = this;
Function createThread
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.createThread = function (sitnId, threadName, callback)
{
debug("Entering createThread");
var opts = this.connectOptions;
var self = this;
Function addSituationCustomInfo
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.addSituationCustomInfo = function (sitnId, customInfo, callback)
{
debug("Entering addSituationCustomInfo");
var opts = this.connectOptions;
var self = this;
Function addProcess
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.addProcess = function (name, description, callback)
{
debug("Entering addProcess");
var opts = this.connectOptions;
var self = this;
Function resolveSituation
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.resolveSituation = function (sitnId, callback)
{
debug("Entering resolveSituation");
var opts = this.connectOptions;
var self = this;
Function addService
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.addService = function (name, description, callback)
{
debug("Entering addService");
var opts = this.connectOptions;
var self = this;
Function addAlertCustomInfo
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.addAlertCustomInfo = function (alertId, customInfo, callback)
{
debug("Entering addAlertCustomInfo");
var opts = this.connectOptions;
var self = this;
Function addAlertToSituation
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.addAlertToSituation = function (alertId, sitnId, callback)
{
debug("Entering addAlertToSituation");
var opts = this.connectOptions;
var self = this;
Function deleteMaintenanceWindows
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.deleteMaintenanceWindows = function (filter, limit, callback)
{
debug("Entering deleteMaintenanceWindows");
var opts = this.connectOptions;
var self = this;
Function deleteMaintenanceWindow
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.deleteMaintenanceWindow = function (window, callback)
{
debug("Entering deleteMaintenanceWindow");
var opts = this.connectOptions;
var self = this;
Function closeAlert
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.closeAlert = function (alertId, callback)
{
debug("Entering closeAlert");
var opts = this.connectOptions;
var self = this;
Function findMaintenanceWindows
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.findMaintenanceWindows = function (filter, limit, callback)
{
debug("Entering findMaintenanceWindows");
var opts = this.connectOptions;
var self = this;
Function createSituation
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.createSituation = function (description, callback)
{
debug("Entering createSituation");
var opts = this.connectOptions;
var self = this;
Function deassignSituation
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.deassignSituation = function (sitnId, callback)
{
debug("Entering deassignSituation");
var opts = this.connectOptions;
var self = this;
Function deassignAlert
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.deassignAlert = function (alertId, callback)
{
debug("Entering deassignAlert");
var opts = this.connectOptions;
var self = this;
Function getUserRoles
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getUserRoles = function (user, callback)
{
debug("Entering getUserRoles");
var opts = this.connectOptions;
var self = this;
Function getUserTeams
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getUserTeams = function (user, callback)
{
debug("Entering getUserTeams");
var opts = this.connectOptions;
var self = this;
Function getThreadEntries
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getThreadEntries = function (sitnId, threadName, callback)
{
debug("Entering getThreadEntries");
var opts = this.connectOptions;
var self = this;
Function getSituationAlertIds
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getSituationAlertIds = function (sitnId, uniqueOnly, callback)
{
debug("Entering getSituationAlertIds");
var opts = this.connectOptions;
var self = this;
Function req
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
var req = https.request(opts, (res) =>
{
res.setEncoding('utf8');
var resData = {};
var returnString = "";
Function getSituationHosts
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getSituationHosts = function (sitnId, uniqueOnly, callback)
{
debug("Entering getSituationHosts");
var opts = this.connectOptions;
var self = this;
Function getSituationDetails
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getSituationDetails = function (sitnId, callback)
{
debug("Entering getSituationDetails");
var opts = this.connectOptions;
var self = this;
Function getTeamSituationIds
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getTeamSituationIds = function (teamName, callback)
{
debug("Entering getTeamSituationIds");
var opts = this.connectOptions;
var self = this;
Function getMaintenanceWindows
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getMaintenanceWindows = function (start, limit, callback)
{
debug("Entering getMaintenanceWindows");
var opts = this.connectOptions;
var self = this;
Function getSituationServices
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getSituationServices = function (sitnId, callback)
{
debug("Entering getSituationServices");
var opts = this.connectOptions;
var self = this;
Function getUserInfo
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getUserInfo = function (user, callback)
{
debug("Entering getUserInfo");
var opts = this.connectOptions;
var self = this;
Function getSituationProcesses
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getSituationProcesses = function (sitnId, callback)
{
debug("Entering getSituationProcesses");
var opts = this.connectOptions;
var self = this;
Function getAlertIds
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getAlertIds = function (query, limit, callback)
{
debug("Entering getAlertIds");
var opts = this.connectOptions;
var self = this;
Function getSituationIds
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getSituationIds = function (query, limit, callback)
{
debug("Entering getSituationIds");
var opts = this.connectOptions;
var self = this;
Function getSituationDescription
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getSituationDescription = function (sitnId, callback)
{
debug("Entering getSituationDescription");
var opts = this.connectOptions;
var self = this;
Function getSystemSummary
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getSystemSummary = function (callback)
{
debug("Entering getSystemSummary");
var opts = this.connectOptions;
var self = this;
Function getAlertDetails
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getAlertDetails = function (alertId, callback)
{
debug("Entering getAlertDetails");
var opts = this.connectOptions;
var self = this;
Function getActiveSituationIds
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getActiveSituationIds = function (callback)
{
debug("Entering getActiveSituationIds");
var opts = this.connectOptions;
var self = this;
Function getSystemStatus
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Graze.prototype.getSystemStatus = function (callback)
{
debug("Entering getSystemStatus");
var opts = this.connectOptions;
var self = this;
Function _createUser
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _createUser = function (userObj)
{
debug('Entering _createUser');
debug('_createUser authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _setSituationProcesses
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _setSituationProcesses = function (sitnId, processList, primaryProcess)
{
debug('Entering _setSituationProcesses sitn_id:' + sitnId +
' process_list:' + processList + ' [optional primary_process:' + primaryProcess + ']');
debug('_setSituationProcesses authToken: ' + opts.authToken);
Function _setSituationServices
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _setSituationServices = function (sitnId, serviceList, primaryService)
{
debug('Entering _setSituationServices sitn_id:' + sitnId +
' process_list:' + serviceList + ' [optional primary_process:' + primaryService + ']');
debug('_setSituationServices authToken: ' + opts.authToken);
Function _assignAlert
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _assignAlert = function (alertId, user)
{
debug('Entering _assignAlert');
debug('_assignAlert authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _assignAndAcknowledgeSituation
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _assignAndAcknowledgeSituation = function (sitnId, user)
{
debug('Entering _assignAndAcknowledgeSituation');
debug('_assignAndAcknowledgeSituation authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _assignSituation
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _assignSituation = function (sitnId, user)
{
debug('Entering _assignSituation');
debug('_assignSituation authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _assignAndAcknowledgeAlert
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _assignAndAcknowledgeAlert = function (alertId, user)
{
debug('Entering _assignAndAcknowledgeAlert');
debug('_assignAndAcknowledgeAlert authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _createMaintenanceWindow
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _createMaintenanceWindow = function (maintObj)
{
debug('Entering _createMaintenanceWindow');
debug('_createMaintenanceWindow authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _createTeam
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _createTeam = function (teamObj)
{
debug('Entering _createTeam');
debug('_createTeam authToken: ' + opts.authToken);
delete(teamObj.teamId);
Function _updateTeam
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _updateTeam = function (teamObj)
{
debug('Entering _updateTeam');
return new Promise(function (resolve, reject)
{
Function _mergeSituations
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _mergeSituations = function (situations, supersedeOriginal)
{
debug('Entering _mergeSituations situations:' + situations +
' supersede_original:' + supersedeOriginal);
debug('_mergeSituations authToken: ' + opts.authToken);
Function _setAlertSeverity
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _setAlertSeverity = function (alertId, severity)
{
debug('Entering _setAlertSeverity alert:' + alertId +
' severity:' + severity);
debug('_setAlertSeverity authToken: ' + opts.authToken);
Function _addSigCorrelationInfo
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _addSigCorrelationInfo = function (sitnId, serviceName, resourceId)
{
debug('Entering _addSigCorrelationInfo sitn_id:' + sitnId +
' service_name:' + serviceName + ' resource_id:' + resourceId);
debug('_addSigCorrelationInfo authToken: ' + opts.authToken);
Function _setSituationDescription
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _setSituationDescription = function (sitnId, description)
{
debug('Entering _setSituationDescription situation:' + sitnId +
' description:' + description);
debug('_setSituationDescription authToken: ' + opts.authToken);
Function _removeAlertFromSituation
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _removeAlertFromSituation = function (alertId, sitnId)
{
debug('Entering _removeAlertFromSituation situation:' + sitnId +
' alert:' + alertId);
debug('_removeAlertFromSituation authToken: ' + opts.authToken);
Function _setSituationExternalSeverity
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _setSituationExternalSeverity = function (sitnId, severity)
{
debug('Entering _setSituationExternalSeverity situation:' + sitnId +
' severity:' + severity);
debug('_setSituationExternalSeverity authToken: ' + opts.authToken);
Function _setAlertAcknowledgeState
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _setAlertAcknowledgeState = function (alertId, acknowledged)
{
debug('Entering _setAlertAcknowledgeState alert:' + alertId +
' acknowledged:' + acknowledged);
debug('_setAlertAcknowledgeState authToken: ' + opts.authToken);
Function _setSituationAcknowledgeState
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _setSituationAcknowledgeState = function (sitnId, acknowledged)
{
debug('Entering _setSituationAcknowledgeState situation:' + sitnId +
' acknowledged:' + acknowledged);
debug('_setSituationAcknowledgeState authToken: ' + opts.authToken);
Function _addThreadEntry
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _addThreadEntry = function (sitnId, threadName, entry)
{
debug('Entering _addThreadEntry sitn_id:' + sitnId);
debug('_addThreadEntry authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _addAlertToSituation
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _addAlertToSituation = function (alertId, sitnId)
{
debug('Entering _addAlertToSituation alert_id:' + alertId + ' sitn_id:' + sitnId);
debug('_addAlertToSituation authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _addAlertCustomInfo
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _addAlertCustomInfo = function (alertId, customInfo)
{
debug('Entering _addAlertCustomInfo');
debug('_addAlertCustomInfo authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _createThread
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _createThread = function (sitnId, threadName)
{
debug('Entering _createThread sitn_id:' + sitnId);
debug('_createThread authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _addService
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _addService = function (name, description)
{
debug('Entering _addService');
debug('_addService authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _closeSituation
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _closeSituation = function (sitnId, resolution)
{
debug('Entering _closeSituation sitn_id:' + sitnId);
debug('_closeSituation authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _resolveSituation
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _resolveSituation = function (sitnId)
{
debug('Entering _resolveSituation situation:' + sitnId);
debug('_resolveSituation authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _addProcess
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _addProcess = function (name, description)
{
debug('Entering _addProcess');
debug('_addProcess authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _addSituationCustomInfo
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _addSituationCustomInfo = function (sitnId, customInfo)
{
debug('Entering _addSituationCustomInfo sitn_id:' + sitnId);
debug('_addSituationCustomInfo authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _findMaintenanceWindows
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _findMaintenanceWindows = function (filter, limit)
{
debug('Entering _findMaintenanceWindows');
debug('_findMaintenanceWindows authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _createSituation
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _createSituation = function (description)
{
debug('Entering _createSituation description:' + description);
debug('_createSituation authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _deassignAlert
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _deassignAlert = function (alertId)
{
debug('Entering _deassignAlert');
debug('_deassignAlert authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _deleteMaintenanceWindows
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _deleteMaintenanceWindows = function (filter, limit)
{
debug('Entering _deleteMaintenanceWindows');
debug('_deleteMaintenanceWindows authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _closeAlert
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _closeAlert = function (alertId)
{
debug('Entering _closeAlert');
debug('_closeAlert authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _deleteMaintenanceWindow
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _deleteMaintenanceWindow = function (window)
{
debug('Entering _deleteMaintenanceWindow');
debug('_deleteMaintenanceWindow authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function _deassignSituation
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _deassignSituation = function (sitnId)
{
debug('Entering _deassignSituation');
debug('_deassignSituation authToken: ' + opts.authToken);
return new Promise(function (resolve, reject)
Function Graze
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Graze(grazeOpts)
{
if (!(this instanceof Graze))
{
return new Graze(grazeOpts);
Function setSituationProcesses
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Graze.prototype.setSituationProcesses = function (sitnId, processList, primaryProcess, callback)
{
debug("Entering setSituationProcesses");
var opts = this.connectOptions;
var self = this;
- 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 setSituationServices
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Graze.prototype.setSituationServices = function (sitnId, serviceList, primaryService, callback)
{
debug("Entering setSituationServices");
var opts = this.connectOptions;
var self = this;
- 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 assignAndAcknowledgeAlert
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Graze.prototype.assignAndAcknowledgeAlert = function (alertId, user, callback)
{
debug("Entering assignAndAcknowledgeAlert");
var opts = this.connectOptions;
var self = this;
- 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 assignSituation
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Graze.prototype.assignSituation = function (sitnId, user, callback)
{
debug("Entering assignSituation");
var opts = this.connectOptions;
var self = this;
- 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 assignAlert
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Graze.prototype.assignAlert = function (alertId, user, callback)
{
debug("Entering assignAlert");
var opts = this.connectOptions;
var self = this;
- 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 assignAndAcknowledgeSituation
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Graze.prototype.assignAndAcknowledgeSituation = function (sitnId, user, callback)
{
debug("Entering assignAndAcknowledgeSituation");
var opts = this.connectOptions;
var self = this;
- 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 setOps
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Graze.prototype.setOps = function (opts)
{
debug('Entering setOps');
var localOps = opts || {};
var keysUpdated = 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
Similar blocks of code found in 2 locations. Consider refactoring. Open
Graze.prototype.setSituationServices = function (sitnId, serviceList, primaryService, callback)
{
debug("Entering setSituationServices");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 649.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
Graze.prototype.setSituationProcesses = function (sitnId, processList, primaryProcess, callback)
{
debug("Entering setSituationProcesses");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 649.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
Graze.prototype.assignAlert = function (alertId, user, callback)
{
debug("Entering assignAlert");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 604.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
Graze.prototype.assignAndAcknowledgeAlert = function (alertId, user, callback)
{
debug("Entering assignAndAcknowledgeAlert");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 604.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
Graze.prototype.assignAndAcknowledgeSituation = function (sitnId, user, callback)
{
debug("Entering assignAndAcknowledgeSituation");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 604.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
Graze.prototype.assignSituation = function (sitnId, user, callback)
{
debug("Entering assignSituation");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 604.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
Graze.prototype.setAlertAcknowledgeState = function (alertId, acknowledged, callback)
{
debug("Entering setAlertAcknowledgeState");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 549.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
Graze.prototype.setSituationAcknowledgeState = function (sitnId, acknowledged, callback)
{
debug("Entering setSituationAcknowledgeState");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 549.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
Graze.prototype.setSituationExternalSeverity = function (sitnId, severity, callback)
{
debug("Entering setSituationExternalSeverity **WARNING** Deprecated 5.2.3+");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 549.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
Graze.prototype.removeAlertFromSituation = function (alertId, sitnId, callback)
{
debug("Entering removeAlertFromSituation");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 549.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
Graze.prototype.setAlertSeverity = function (alertId, severity, callback)
{
debug("Entering setAlertSeverity");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 549.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
Graze.prototype.setSituationDescription = function (sitnId, description, callback)
{
debug("Entering setSituationDescription");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 549.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
Graze.prototype.createThread = function (sitnId, threadName, callback)
{
debug("Entering createThread");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 530.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
Graze.prototype.addSituationCustomInfo = function (sitnId, customInfo, callback)
{
debug("Entering addSituationCustomInfo");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 530.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
Graze.prototype.closeSituation = function (sitnId, resolution, callback)
{
debug("Entering closeSituation");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 530.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
Graze.prototype.addProcess = function (name, description, callback)
{
debug("Entering addProcess");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 526.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
Graze.prototype.addService = function (name, description, callback)
{
debug("Entering addService");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 526.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
Graze.prototype.deassignAlert = function (alertId, callback)
{
debug("Entering deassignAlert");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 516.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
Graze.prototype.deassignSituation = function (sitnId, callback)
{
debug("Entering deassignSituation");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 516.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
Graze.prototype.deleteMaintenanceWindows = function (filter, limit, callback)
{
debug("Entering deleteMaintenanceWindows");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 515.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
Graze.prototype.findMaintenanceWindows = function (filter, limit, callback)
{
debug("Entering findMaintenanceWindows");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 515.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
Graze.prototype.closeAlert = function (alertId, callback)
{
debug("Entering closeAlert");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 512.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
Graze.prototype.deleteMaintenanceWindow = function (window, callback)
{
debug("Entering deleteMaintenanceWindow");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 512.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
Graze.prototype.getUserRoles = function (user, callback)
{
debug("Entering getUserRoles");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 467.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
Graze.prototype.getUserTeams = function (user, callback)
{
debug("Entering getUserTeams");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 467.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
Graze.prototype.getSituationAlertIds = function (sitnId, uniqueOnly, callback)
{
debug("Entering getSituationAlertIds");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 458.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
Graze.prototype.getSituationHosts = function (sitnId, uniqueOnly, callback)
{
debug("Entering getSituationHosts");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 458.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
Graze.prototype.getSituationIds = function (query, limit, callback)
{
debug("Entering getSituationIds");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 451.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
Graze.prototype.getAlertIds = function (query, limit, callback)
{
debug("Entering getAlertIds");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 451.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
Graze.prototype.getMaintenanceWindows = function (start, limit, callback)
{
debug("Entering getMaintenanceWindows");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 451.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
Graze.prototype.getSituationServices = function (sitnId, callback)
{
debug("Entering getSituationServices");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 436.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
Graze.prototype.getSituationDetails = function (sitnId, callback)
{
debug("Entering getSituationDetails");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 436.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
Graze.prototype.getSituationDescription = function (sitnId, callback)
{
debug("Entering getSituationDescription");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 436.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
Graze.prototype.getAlertDetails = function (alertId, callback)
{
debug("Entering getAlertDetails");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 436.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
Graze.prototype.getSituationProcesses = function (sitnId, callback)
{
debug("Entering getSituationProcesses");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 436.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
Graze.prototype.getUserInfo = function (user, callback)
{
debug("Entering getUserInfo");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 436.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
Graze.prototype.getSystemStatus = function (callback)
{
debug("Entering getSystemStatus");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 425.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
Graze.prototype.getSystemSummary = function (callback)
{
debug("Entering getSystemSummary");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 425.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
Graze.prototype.getActiveSituationIds = function (callback)
{
debug("Entering getActiveSituationIds");
var opts = this.connectOptions;
var self = this;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 425.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
return new Promise(function (resolve, reject)
{
var grazePath = opts.grazeBasePath + "/updateTeam";
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 330.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
return new Promise(function (resolve, reject)
{
var grazePath = opts.grazeBasePath + "/createMaintenanceWindow";
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 330.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
return new Promise(function (resolve, reject)
{
var grazePath = opts.grazeBasePath + "/addSigCorrelationInfo";
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 239.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
return new Promise(function (resolve, reject)
{
var grazePath = opts.grazeBasePath + "/addThreadEntry";
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 239.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76