Method ProcessLogEntry
has a Cognitive Complexity of 52 (exceeds 20 allowed). Consider refactoring.
private void ProcessLogEntry(JournalOperation opCode, JObject logObject)
{
switch (opCode)
{
case JournalOperation.CreateStudy:
Method LoadDataFromFile
has 29 lines of code (exceeds 25 allowed). Consider refactoring.
private void LoadDataFromFile()
{
const int BufferSize = 65536;
var jsonBatch = new List<string>(1000);
Method ProcessLogEntry
has 139 lines of code (exceeds 25 allowed). Consider refactoring.
private void ProcessLogEntry(JournalOperation opCode, JObject logObject)
{
switch (opCode)
{
case JournalOperation.CreateStudy:
Similar blocks of code found in 4 locations. Consider refactoring.
public void SetStudySystemAttr(int studyId, string key, object value)
{
EnsureInitialized();
if (!_studies.TryGetValue(studyId, out Study.Study study))
Similar blocks of code found in 4 locations. Consider refactoring.
public void SetStudyUserAttr(int studyId, string key, object value)
{
EnsureInitialized();
if (!_studies.TryGetValue(studyId, out Study.Study study))
Similar blocks of code found in 4 locations. Consider refactoring.
public void SetTrialSystemAttr(int trialId, string key, object value)
{
EnsureInitialized();
if (!_trialCache.TryGetValue(trialId, out Trial.Trial trial))
Similar blocks of code found in 4 locations. Consider refactoring.
public void SetTrialUserAttr(int trialId, string key, object value)
{
EnsureInitialized();
if (!_trialCache.TryGetValue(trialId, out Trial.Trial trial))
Similar blocks of code found in 3 locations. Consider refactoring.
public Dictionary<string, object> GetTrialParams(int trialId)
{
EnsureInitialized();
if (!_trialCache.TryGetValue(trialId, out Trial.Trial trial))
Similar blocks of code found in 3 locations. Consider refactoring.
public Dictionary<string, object> GetTrialSystemAttrs(int trialId)
{
EnsureInitialized();
if (!_trialCache.TryGetValue(trialId, out Trial.Trial trial))
Similar blocks of code found in 3 locations. Consider refactoring.
public Dictionary<string, object> GetTrialUserAttrs(int trialId)
{
EnsureInitialized();
if (!_trialCache.TryGetValue(trialId, out Trial.Trial trial))
Similar blocks of code found in 2 locations. Consider refactoring.
public Dictionary<string, object> GetStudySystemAttrs(int studyId)
{
EnsureInitialized();
if (!_studies.TryGetValue(studyId, out Study.Study study))
Similar blocks of code found in 2 locations. Consider refactoring.
public Dictionary<string, object> GetStudyUserAttrs(int studyId)
{
EnsureInitialized();
if (!_studies.TryGetValue(studyId, out Study.Study study))
There are no issues that match your filters.