microting/eform-sdk-dotnet

View on GitHub
eFormCore/Core.cs

Summary

Maintainability
F
2 mos
Test Coverage

File Core.cs has 5448 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
Severity: Major
Found in eFormCore/Core.cs - About 2 wks to fix

    Method DownloadUploadedData has a Cognitive Complexity of 346 (exceeds 20 allowed). Consider refactoring.
    Open

            public async Task<bool> DownloadUploadedData(int uploadedDataId)
            {
                string methodName = "Core.DownloadUploadedData";
                Microting.eForm.Infrastructure.Data.Entities.UploadedData uploadedData =
                    await _sqlController.GetUploadedData(uploadedDataId).ConfigureAwait(false);
    Severity: Minor
    Found in eFormCore/Core.cs - About 6 days to fix

    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

    Class Core has 151 methods (exceeds 20 allowed). Consider refactoring.
    Open

        public class Core : CoreBase
        {
            // events
            public event EventHandler HandleCaseCreated;
            public event EventHandler HandleCaseRetrived;
    Severity: Major
    Found in eFormCore/Core.cs - About 2 days to fix

      Method DocxToPdf has a Cognitive Complexity of 125 (exceeds 20 allowed). Consider refactoring.
      Open

              private async Task<string> DocxToPdf(int caseId, string templateId, string timeStamp,
                  Microting.eForm.Infrastructure.Data.Entities.Case dbCase, CaseDto cDto, string customPathForUploadedData,
                  string customXmlContent, string fileType, Language language)
              {
                  SortedDictionary<string, string> valuePairs = new SortedDictionary<string, string>();
      Severity: Minor
      Found in eFormCore/Core.cs - About 2 days to fix

      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

      Method GenerateDataSetFromCasesSubSet has a Cognitive Complexity of 108 (exceeds 20 allowed). Consider refactoring.
      Open

              private async Task<List<string>> GenerateDataSetFromCasesSubSet(List<string> lstReturn, int? checkListId,
                  string preLabel, Language language, bool includeCheckListText)
              {
                  string sep = " / ";
                  await using MicrotingDbContext dbContext = DbContextHelper.GetDbContext();
      Severity: Minor
      Found in eFormCore/Core.cs - About 1 day to fix

      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

      Method DocxToPdf has 309 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              private async Task<string> DocxToPdf(int caseId, string templateId, string timeStamp,
                  Microting.eForm.Infrastructure.Data.Entities.Case dbCase, CaseDto cDto, string customPathForUploadedData,
                  string customXmlContent, string fileType, Language language)
              {
                  SortedDictionary<string, string> valuePairs = new SortedDictionary<string, string>();
      Severity: Major
      Found in eFormCore/Core.cs - About 1 day to fix

        Method DownloadUploadedData has 287 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public async Task<bool> DownloadUploadedData(int uploadedDataId)
                {
                    string methodName = "Core.DownloadUploadedData";
                    Microting.eForm.Infrastructure.Data.Entities.UploadedData uploadedData =
                        await _sqlController.GetUploadedData(uploadedDataId).ConfigureAwait(false);
        Severity: Major
        Found in eFormCore/Core.cs - About 1 day to fix

          Method GenerateDataSetFromCases has a Cognitive Complexity of 76 (exceeds 20 allowed). Consider refactoring.
          Open

                  public async Task<List<List<string>>> GenerateDataSetFromCases(int? checkListId, DateTime? start, DateTime? end,
                      string customPathForUploadedData, string decimalSeparator, string thousandSeparator, bool utcTime,
                      CultureInfo cultureInfo, TimeZoneInfo timeZoneInfo, Language language, bool includeCheckListText,
                      bool gpsCoordinates)
                  {
          Severity: Minor
          Found in eFormCore/Core.cs - About 1 day to fix

          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

          Method SaveAnswer has a Cognitive Complexity of 67 (exceeds 20 allowed). Consider refactoring.
          Open

                  private async Task SaveAnswer(JToken subItem, int questionSetId)
                  {
                      Log.LogStandard("Core.SaveAnswer", $"called {DateTime.UtcNow}");
                      var settings = new JsonSerializerSettings { Error = (se, ev) => { ev.ErrorContext.Handled = true; } };
                      await using (var db = DbContextHelper.GetDbContext())
          Severity: Minor
          Found in eFormCore/Core.cs - About 1 day to fix

          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

          Method GetQuestionSet has 149 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public async Task<bool> GetQuestionSet(int microtingUid, int questionSetId, int threadNumber)
                  {
                      var jsonSerializerSettings = new JsonSerializerSettings
                      {
                          NullValueHandling = NullValueHandling.Ignore,
          Severity: Major
          Found in eFormCore/Core.cs - About 5 hrs to fix

            Method TemplateFromXml has 146 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public async Task<MainElement> TemplateFromXml(string xmlString)
            #pragma warning restore 1998
                    {
                        if (string.IsNullOrEmpty(xmlString))
                            throw new ArgumentNullException("xmlString cannot be null or empty");
            Severity: Major
            Found in eFormCore/Core.cs - About 5 hrs to fix

              Method StartSqlOnly has 140 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public async Task<bool> StartSqlOnly(string connectionString)
                      {
                          string methodName = "Core.StartSqlOnly";
                          try
                          {
              Severity: Major
              Found in eFormCore/Core.cs - About 5 hrs to fix

                Method GenerateDataSetFromCases has 139 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public async Task<List<List<string>>> GenerateDataSetFromCases(int? checkListId, DateTime? start, DateTime? end,
                            string customPathForUploadedData, string decimalSeparator, string thousandSeparator, bool utcTime,
                            CultureInfo cultureInfo, TimeZoneInfo timeZoneInfo, Language language, bool includeCheckListText,
                            bool gpsCoordinates)
                        {
                Severity: Major
                Found in eFormCore/Core.cs - About 5 hrs to fix

                  Method GetExtraFieldValues has 138 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          private async Task<string> GetExtraFieldValues(int caseId, string customPathForUploadedData, Language language)
                          {
                              var token = await GetSdkSetting(Settings.token);
                              var db = DbContextHelper.GetDbContext();
                              StringBuilder jasperFieldXml = new StringBuilder();
                  Severity: Major
                  Found in eFormCore/Core.cs - About 5 hrs to fix

                    Method StartSqlOnly has a Cognitive Complexity of 49 (exceeds 20 allowed). Consider refactoring.
                    Open

                            public async Task<bool> StartSqlOnly(string connectionString)
                            {
                                string methodName = "Core.StartSqlOnly";
                                try
                                {
                    Severity: Minor
                    Found in eFormCore/Core.cs - About 5 hrs to fix

                    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

                    Method SaveAnswer has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            private async Task SaveAnswer(JToken subItem, int questionSetId)
                            {
                                Log.LogStandard("Core.SaveAnswer", $"called {DateTime.UtcNow}");
                                var settings = new JsonSerializerSettings { Error = (se, ev) => { ev.ErrorContext.Handled = true; } };
                                await using (var db = DbContextHelper.GetDbContext())
                    Severity: Major
                    Found in eFormCore/Core.cs - About 5 hrs to fix

                      Method TemplateUploadData has a Cognitive Complexity of 45 (exceeds 20 allowed). Consider refactoring.
                      Open

                              public async Task<MainElement> TemplateUploadData(MainElement mainElement)
                              {
                                  if (mainElement == null)
                                      throw new ArgumentNullException(nameof(mainElement), "mainElement not allowed to be null");
                      
                      
                      Severity: Minor
                      Found in eFormCore/Core.cs - About 4 hrs to fix

                      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

                      Method GetExtraFieldValues has a Cognitive Complexity of 44 (exceeds 20 allowed). Consider refactoring.
                      Open

                              private async Task<string> GetExtraFieldValues(int caseId, string customPathForUploadedData, Language language)
                              {
                                  var token = await GetSdkSetting(Settings.token);
                                  var db = DbContextHelper.GetDbContext();
                                  StringBuilder jasperFieldXml = new StringBuilder();
                      Severity: Minor
                      Found in eFormCore/Core.cs - About 4 hrs to fix

                      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

                      Method GetAnswersForQuestionSet has a Cognitive Complexity of 43 (exceeds 20 allowed). Consider refactoring.
                      Open

                              public async Task GetAnswersForQuestionSet(int? apiQuestionSetId)
                              {
                                  if (apiQuestionSetId == null)
                                      return;
                      
                      
                      Severity: Minor
                      Found in eFormCore/Core.cs - About 4 hrs to fix

                      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

                      Method CaseDelete has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              public async Task<bool> CaseDelete(int microtingUId)
                              {
                                  string methodName = "Core.CaseDelete";
                      
                                  Log.LogVariable(methodName, nameof(microtingUId), microtingUId);
                      Severity: Major
                      Found in eFormCore/Core.cs - About 3 hrs to fix

                        Method CheckStatusByMicrotingUid has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                public async Task<bool> CheckStatusByMicrotingUid(int microtingUid)
                                {
                                    string methodName = "Core.CheckStatusByMicrotingUid";
                                    List<CaseDto> lstCase = new List<CaseDto>();
                                    MainElement mainElement = new MainElement();
                        Severity: Major
                        Found in eFormCore/Core.cs - About 3 hrs to fix

                          Method GetAllSurveyConfigurations has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  public async Task<bool> GetAllSurveyConfigurations()
                                  {
                                      var parsedData = JObject.Parse(await _communicator.GetAllSurveyConfigurations().ConfigureAwait(false));
                          
                                      var jsonSerializerSettings = new JsonSerializerSettings
                          Severity: Major
                          Found in eFormCore/Core.cs - About 3 hrs to fix

                            Method TemplateUploadData has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    public async Task<MainElement> TemplateUploadData(MainElement mainElement)
                                    {
                                        if (mainElement == null)
                                            throw new ArgumentNullException(nameof(mainElement), "mainElement not allowed to be null");
                            
                            
                            Severity: Major
                            Found in eFormCore/Core.cs - About 3 hrs to fix

                              Method GetAnswersForQuestionSet has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      public async Task GetAnswersForQuestionSet(int? apiQuestionSetId)
                                      {
                                          if (apiQuestionSetId == null)
                                              return;
                              
                              
                              Severity: Major
                              Found in eFormCore/Core.cs - About 3 hrs to fix

                                Method SiteCreate has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        public async Task<SiteDto> SiteCreate(string name, string userFirstName, string userLastName, string userEmail,
                                            string languageCode)
                                        {
                                            string methodName = "Core.SiteCreate";
                                            await using var db = DbContextHelper.GetDbContext();
                                Severity: Major
                                Found in eFormCore/Core.cs - About 3 hrs to fix

                                  Method GetAllSurveyConfigurations has a Cognitive Complexity of 38 (exceeds 20 allowed). Consider refactoring.
                                  Open

                                          public async Task<bool> GetAllSurveyConfigurations()
                                          {
                                              var parsedData = JObject.Parse(await _communicator.GetAllSurveyConfigurations().ConfigureAwait(false));
                                  
                                              var jsonSerializerSettings = new JsonSerializerSettings
                                  Severity: Minor
                                  Found in eFormCore/Core.cs - About 3 hrs to fix

                                  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

                                  Method CheckStatusByMicrotingUid has a Cognitive Complexity of 38 (exceeds 20 allowed). Consider refactoring.
                                  Open

                                          public async Task<bool> CheckStatusByMicrotingUid(int microtingUid)
                                          {
                                              string methodName = "Core.CheckStatusByMicrotingUid";
                                              List<CaseDto> lstCase = new List<CaseDto>();
                                              MainElement mainElement = new MainElement();
                                  Severity: Minor
                                  Found in eFormCore/Core.cs - About 3 hrs to fix

                                  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

                                  Method GenerateDataSetFromCasesSubSet has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          private async Task<List<string>> GenerateDataSetFromCasesSubSet(List<string> lstReturn, int? checkListId,
                                              string preLabel, Language language, bool includeCheckListText)
                                          {
                                              string sep = " / ";
                                              await using MicrotingDbContext dbContext = DbContextHelper.GetDbContext();
                                  Severity: Major
                                  Found in eFormCore/Core.cs - About 3 hrs to fix

                                    Method JasperToPdf has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            private async Task<string> JasperToPdf(int caseId, string jasperTemplate, string timeStamp)
                                            {
                                                string methodName = "Core.JasperToPdf";
                                                // run jar
                                                // Start the child process.
                                    Severity: Major
                                    Found in eFormCore/Core.cs - About 2 hrs to fix

                                      Method GetQuestionSet has a Cognitive Complexity of 35 (exceeds 20 allowed). Consider refactoring.
                                      Open

                                              public async Task<bool> GetQuestionSet(int microtingUid, int questionSetId, int threadNumber)
                                              {
                                                  var jsonSerializerSettings = new JsonSerializerSettings
                                                  {
                                                      NullValueHandling = NullValueHandling.Ignore,
                                      Severity: Minor
                                      Found in eFormCore/Core.cs - About 2 hrs to fix

                                      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

                                      Method ReplaceDataElementsAndDataItems has a Cognitive Complexity of 35 (exceeds 20 allowed). Consider refactoring.
                                      Open

                                              private async Task<List<Element>> ReplaceDataElementsAndDataItems(int caseId, List<Element> elementList,
                                                  List<FieldValue> lstAnswers)
                                              {
                                                  List<Element> elementListReplaced = new List<Element>();
                                      
                                      
                                      Severity: Minor
                                      Found in eFormCore/Core.cs - About 2 hrs to fix

                                      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

                                      Method Advanced_SiteItemUpdate has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              public async Task<bool> Advanced_SiteItemUpdate(int siteId, string name, string languageCode)
                                              {
                                                  string methodName = "Core.Advanced_SiteItemUpdate";
                                                  try
                                                  {
                                      Severity: Major
                                      Found in eFormCore/Core.cs - About 2 hrs to fix

                                        Method GetJasperFieldValue has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                private async Task<string> GetJasperFieldValue(Field field, FieldValue answer, string customPathForUploadedData)
                                                {
                                                    var token = await GetSdkSetting(Settings.token);
                                                    StringBuilder jasperFieldXml = new StringBuilder();
                                                    string latitude = answer.Latitude;
                                        Severity: Major
                                        Found in eFormCore/Core.cs - About 2 hrs to fix

                                          Method CasesToCsv has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                                  public async Task<string> CasesToCsv(int templateId, DateTime? start, DateTime? end, string pathAndName,
                                                      string customPathForUploadedData, string decimalSeparator, string thousandSeparator, bool utcTime,
                                                      CultureInfo cultureInfo, TimeZoneInfo timeZoneInfo, Language language, bool gpsCoordinates,
                                                      bool includeCheckListText)
                                                  {
                                          Severity: Major
                                          Found in eFormCore/Core.cs - About 2 hrs to fix

                                            Method CaseToJasperXml has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                    public async Task<string> CaseToJasperXml(CaseDto cDto, ReplyElement reply, int caseId, string timeStamp,
                                                        string customPathForUploadedData, string customXMLContent, Language language)
                                                    {
                                                        string methodName = "Core.CaseToJasperXml";
                                                        try
                                            Severity: Major
                                            Found in eFormCore/Core.cs - About 2 hrs to fix

                                              Method GetChecksAndFields has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                      private void GetChecksAndFields(ref string clsLst, ref string fldLst, List<Element> elementLst,
                                                          string customPathForUploadedData)
                                                      {
                                                          var db = DbContextHelper.GetDbContext();
                                                          string jasperFieldXml = "";
                                              Severity: Major
                                              Found in eFormCore/Core.cs - About 2 hrs to fix

                                                Method GetChecksAndFields has a Cognitive Complexity of 32 (exceeds 20 allowed). Consider refactoring.
                                                Open

                                                        private void GetChecksAndFields(ref string clsLst, ref string fldLst, List<Element> elementLst,
                                                            string customPathForUploadedData)
                                                        {
                                                            var db = DbContextHelper.GetDbContext();
                                                            string jasperFieldXml = "";
                                                Severity: Minor
                                                Found in eFormCore/Core.cs - About 2 hrs to fix

                                                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

                                                Method CaseCreate has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                        public async Task<List<int>> CaseCreate(MainElement mainElement, string caseUId, List<int> siteUids,
                                                            string custom, int? folderId)
                                                        {
                                                            string methodName = "Core.CaseCreate";
                                                            try
                                                Severity: Major
                                                Found in eFormCore/Core.cs - About 2 hrs to fix

                                                  Method Start has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                          public async Task<bool> Start(string connectionString)
                                                          {
                                                              string methodName = "Core.Start";
                                                  
                                                              try
                                                  Severity: Major
                                                  Found in eFormCore/Core.cs - About 2 hrs to fix

                                                    Method Close has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                            public async Task<bool> Close()
                                                    #pragma warning restore 1998
                                                            {
                                                                string methodName = "Core.Close";
                                                                Log.LogStandard(methodName, "Close called");
                                                    Severity: Major
                                                    Found in eFormCore/Core.cs - About 2 hrs to fix

                                                      Method EntityItemCreate has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                              private async Task<EntityItem> EntityItemCreate(int entitItemGroupId, string name, string description,
                                                                  string ownUuid, int displayIndex)
                                                              {
                                                                  EntityGroup eg = await _sqlController.EntityGroupRead(entitItemGroupId).ConfigureAwait(false);
                                                                  EntityItem et = await _sqlController.EntityItemRead(entitItemGroupId, name, description)
                                                      Severity: Major
                                                      Found in eFormCore/Core.cs - About 2 hrs to fix

                                                        Method FolderUpdate has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                                public async Task FolderUpdate(int id, List<CommonTranslationsModel> translations, int? parentId)
                                                                {
                                                                    string methodName = "Core.FolderUpdate";
                                                                    try
                                                                    {
                                                        Severity: Major
                                                        Found in eFormCore/Core.cs - About 2 hrs to fix

                                                          Method GetAllQuestionSets has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                                  public async Task<bool> GetAllQuestionSets()
                                                                  {
                                                                      var parsedData = JObject.Parse(await _communicator.GetAllQuestionSets().ConfigureAwait(false));
                                                          
                                                                      if (!parsedData.HasValues)
                                                          Severity: Major
                                                          Found in eFormCore/Core.cs - About 2 hrs to fix

                                                            Method FolderUpdate has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                                    public async Task FolderUpdate(int id, List<KeyValuePair<string, string>> name,
                                                                        List<KeyValuePair<string, string>> description, int? parentId)
                                                                    {
                                                                        string methodName = "Core.FolderUpdate";
                                                                        try
                                                            Severity: Major
                                                            Found in eFormCore/Core.cs - About 2 hrs to fix

                                                              Method Restart has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                                      public override async Task Restart(int sameExceptionCount, int sameExceptionCountMax)
                                                                      {
                                                                          string methodName = "Core.Restart";
                                                                          try
                                                                          {
                                                              Severity: Minor
                                                              Found in eFormCore/Core.cs - About 2 hrs to fix

                                                                Method ReplaceDataElementsAndDataItems has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                        private async Task<List<Element>> ReplaceDataElementsAndDataItems(int caseId, List<Element> elementList,
                                                                            List<FieldValue> lstAnswers)
                                                                        {
                                                                            List<Element> elementListReplaced = new List<Element>();
                                                                
                                                                
                                                                Severity: Minor
                                                                Found in eFormCore/Core.cs - About 1 hr to fix

                                                                  Method FieldValidation has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                          private async Task<List<string>> FieldValidation(MainElement mainElement)
                                                                          {
                                                                              string methodName = "Core.FieldValidation";
                                                                  
                                                                              Log.LogStandard(methodName, "called");
                                                                  Severity: Minor
                                                                  Found in eFormCore/Core.cs - About 1 hr to fix

                                                                    Method EntityItemUpdate has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                            public async Task EntityItemUpdate(int id, string name, string description, string ownUuid, int displayIndex)
                                                                            {
                                                                                await using var dbContext = DbContextHelper.GetDbContext();
                                                                                Microting.eForm.Infrastructure.Data.Entities.EntityItem et =
                                                                                    await dbContext.EntityItems.FirstOrDefaultAsync(x => x.Id == id);
                                                                    Severity: Minor
                                                                    Found in eFormCore/Core.cs - About 1 hr to fix

                                                                      Method TemplateFromXml has a Cognitive Complexity of 29 (exceeds 20 allowed). Consider refactoring.
                                                                      Open

                                                                              public async Task<MainElement> TemplateFromXml(string xmlString)
                                                                      #pragma warning restore 1998
                                                                              {
                                                                                  if (string.IsNullOrEmpty(xmlString))
                                                                                      throw new ArgumentNullException("xmlString cannot be null or empty");
                                                                      Severity: Minor
                                                                      Found in eFormCore/Core.cs - About 1 hr to fix

                                                                      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

                                                                      Method FolderCreate has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                              public async Task<int> FolderCreate(List<CommonTranslationsModel> translations, int? parentId)
                                                                              {
                                                                                  string methodName = "Core.FolderCreate";
                                                                                  try
                                                                                  {
                                                                      Severity: Minor
                                                                      Found in eFormCore/Core.cs - About 1 hr to fix

                                                                        Method CaseToPdf has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                                public async Task<string> CaseToPdf(int caseId, string jasperTemplate, string timeStamp,
                                                                                    string customPathForUploadedData, string fileType, string customXmlContent, Language language)
                                                                                {
                                                                                    if (fileType != "pdf" && fileType != "docx" && fileType != "pptx")
                                                                                    {
                                                                        Severity: Minor
                                                                        Found in eFormCore/Core.cs - About 1 hr to fix

                                                                          Method FolderCreate has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                          Open

                                                                                  public async Task<int> FolderCreate(List<KeyValuePair<string, string>> name,
                                                                                      List<KeyValuePair<string, string>> description, int? parentId)
                                                                                  {
                                                                                      string methodName = "Core.FolderCreate";
                                                                                      try
                                                                          Severity: Minor
                                                                          Found in eFormCore/Core.cs - About 1 hr to fix

                                                                            Method CasesToCsv has 13 arguments (exceeds 4 allowed). Consider refactoring.
                                                                            Open

                                                                                    public async Task<string> CasesToCsv(int templateId, DateTime? start, DateTime? end, string pathAndName,
                                                                                        string customPathForUploadedData, string decimalSeparator, string thousandSeparator, bool utcTime,
                                                                                        CultureInfo cultureInfo, TimeZoneInfo timeZoneInfo, Language language, bool gpsCoordinates,
                                                                                        bool includeCheckListText)
                                                                            Severity: Major
                                                                            Found in eFormCore/Core.cs - About 1 hr to fix

                                                                              Method CasesToCsv has a Cognitive Complexity of 28 (exceeds 20 allowed). Consider refactoring.
                                                                              Open

                                                                                      public async Task<string> CasesToCsv(int templateId, DateTime? start, DateTime? end, string pathAndName,
                                                                                          string customPathForUploadedData, string decimalSeparator, string thousandSeparator, bool utcTime,
                                                                                          CultureInfo cultureInfo, TimeZoneInfo timeZoneInfo, Language language, bool gpsCoordinates,
                                                                                          bool includeCheckListText)
                                                                                      {
                                                                              Severity: Minor
                                                                              Found in eFormCore/Core.cs - About 1 hr to fix

                                                                              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

                                                                              Method CaseDelete has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                              Open

                                                                                      public async Task<bool> CaseDelete(int templateId, int siteUId, string workflowState)
                                                                                      {
                                                                                          string methodName = "Core.CaseDelete";
                                                                                          try
                                                                                          {
                                                                              Severity: Minor
                                                                              Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                Method GenerateDataSetFromCases has 12 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                Open

                                                                                        public async Task<List<List<string>>> GenerateDataSetFromCases(int? checkListId, DateTime? start, DateTime? end,
                                                                                            string customPathForUploadedData, string decimalSeparator, string thousandSeparator, bool utcTime,
                                                                                            CultureInfo cultureInfo, TimeZoneInfo timeZoneInfo, Language language, bool includeCheckListText,
                                                                                            bool gpsCoordinates)
                                                                                Severity: Major
                                                                                Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                  Method Advanced_TemplateDisplayIndexChangeServer has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                          public async Task<bool> Advanced_TemplateDisplayIndexChangeServer(int templateId, int siteUId,
                                                                                              int newDisplayIndex)
                                                                                          {
                                                                                              string methodName = "Core.Advanced_TemplateDisplayIndexChangeServer";
                                                                                              try
                                                                                  Severity: Minor
                                                                                  Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                    Method PutFileToS3Storage has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                    Open

                                                                                            public async Task PutFileToS3Storage(Stream stream, string fileName)
                                                                                            {
                                                                                                string methodName = "Core.PutFileToS3Storage";
                                                                                                string bucketName = await _sqlController.SettingRead(Settings.s3BucketName);
                                                                                                Log.LogStandard(methodName, $"Trying to upload file {fileName} to {bucketName}");
                                                                                    Severity: Minor
                                                                                    Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                      Method Advanced_TemplateUpdateFieldIdsForColumns has 11 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                      Open

                                                                                              public async Task<bool> Advanced_TemplateUpdateFieldIdsForColumns(int templateId, int? fieldId1, int? fieldId2,
                                                                                                  int? fieldId3, int? fieldId4, int? fieldId5, int? fieldId6, int? fieldId7, int? fieldId8, int? fieldId9,
                                                                                                  int? fieldId10)
                                                                                      Severity: Major
                                                                                      Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                        Method CaseUpdate has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                        Open

                                                                                                public async Task<bool> CaseUpdate(int caseId, List<string> newFieldValuePairLst,
                                                                                                    List<string> newCheckListValuePairLst)
                                                                                                {
                                                                                                    string methodName = "Core.CaseUpdate";
                                                                                                    try
                                                                                        Severity: Minor
                                                                                        Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                          Method Advanced_SiteItemDelete has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                          Open

                                                                                                  public async Task<bool> Advanced_SiteItemDelete(int microtingUid)
                                                                                                  {
                                                                                                      string methodName = "Core.Advanced_SiteItemDelete";
                                                                                                      try
                                                                                                      {
                                                                                          Severity: Minor
                                                                                          Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                            Method EntityGroupCreate has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                            Open

                                                                                                    public async Task<Microting.eForm.Infrastructure.Data.Entities.EntityGroup> EntityGroupCreate(string entityType,
                                                                                                        string name, string description, bool locked, bool editable)
                                                                                                    {
                                                                                                        string methodName = "Core.EntityGroupCreate";
                                                                                                        try
                                                                                            Severity: Minor
                                                                                            Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                              Method TranscribeUploadedData has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                              Open

                                                                                                      public async Task<bool> TranscribeUploadedData(int uploadedDataId)
                                                                                                      {
                                                                                                          string methodName = "Core.TranscribeUploadedData";
                                                                                                          try
                                                                                                          {
                                                                                              Severity: Minor
                                                                                              Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                Method GenerateDataSetFromCases has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                Open

                                                                                                        public async Task<List<List<string>>> GenerateDataSetFromCases(int? checkListId, DateTime? start, DateTime? end,
                                                                                                            string customPathForUploadedData, string decimalSeparator, string thousandSeparator, bool utcTime,
                                                                                                            CultureInfo cultureInfo, TimeZoneInfo timeZoneInfo, Language language)
                                                                                                Severity: Major
                                                                                                Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                  Method CaseReadAll has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                          public async Task<CaseList> CaseReadAll(int? templateId, DateTime? start, DateTime? end, string workflowState,
                                                                                                              string searchKey, bool descendingSort, string sortParameter, int pageIndex, int pageSize,
                                                                                                              TimeZoneInfo timeZoneInfo)
                                                                                                  Severity: Major
                                                                                                  Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                    Method Advanced_EntityGroupAll has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                    Open

                                                                                                            public async Task<EntityGroupList> Advanced_EntityGroupAll(string sort, string nameFilter, int pageIndex,
                                                                                                                int pageSize, string entityType, bool desc, string workflowState)
                                                                                                            {
                                                                                                                if (entityType != Constants.FieldTypes.EntitySearch && entityType != Constants.FieldTypes.EntitySelect)
                                                                                                                    throw new Exception("EntityGroupAll failed. EntityType:" + entityType + " is not an known type");
                                                                                                    Severity: Minor
                                                                                                    Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                      Method CaseReadAll has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                      Open

                                                                                                              public Task<CaseList> CaseReadAll(int? templateId, DateTime? start, DateTime? end, string workflowState,
                                                                                                                  string searchKey, bool descendingSort, string sortParameter, int pageIndex, int pageSize)
                                                                                                      Severity: Major
                                                                                                      Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                        Method DocxToPdf has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                                private async Task<string> DocxToPdf(int caseId, string templateId, string timeStamp,
                                                                                                                    Microting.eForm.Infrastructure.Data.Entities.Case dbCase, CaseDto cDto, string customPathForUploadedData,
                                                                                                                    string customXmlContent, string fileType, Language language)
                                                                                                        Severity: Major
                                                                                                        Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                          Method TemplateFromJson has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                                  public MainElement TemplateFromJson(string json)
                                                                                                                  {
                                                                                                                      if (string.IsNullOrEmpty(json))
                                                                                                                          throw new ArgumentNullException("json cannot be null or empty");
                                                                                                                      string methodName = "Core.TemplateFromXml";
                                                                                                          Severity: Minor
                                                                                                          Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                            Method Advanced_TemplateUpdateFieldIdsForColumns has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                            Open

                                                                                                                    public async Task<bool> Advanced_TemplateUpdateFieldIdsForColumns(int templateId, int? fieldId1, int? fieldId2,
                                                                                                                        int? fieldId3, int? fieldId4, int? fieldId5, int? fieldId6, int? fieldId7, int? fieldId8, int? fieldId9,
                                                                                                                        int? fieldId10)
                                                                                                                    {
                                                                                                                        string methodName = "Core.Advanced_TemplateUpdateFieldIdsForColumns";
                                                                                                            Severity: Minor
                                                                                                            Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                              Method EntityGroupRead has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                              Open

                                                                                                                      public async Task<EntityGroup> EntityGroupRead(string entityGroupMuId, string sort, string nameFilter)
                                                                                                                      {
                                                                                                                          string methodName = "Core.EntityGroupRead";
                                                                                                                          if (string.IsNullOrEmpty(entityGroupMuId))
                                                                                                                              throw new ArgumentNullException(nameof(entityGroupMuId));
                                                                                                              Severity: Minor
                                                                                                              Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                                Method EntityItemDelete has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                        public async Task EntityItemDelete(int id)
                                                                                                                        {
                                                                                                                            EntityItem et = await _sqlController.EntityItemRead(id);
                                                                                                                            if (et == null)
                                                                                                                            {
                                                                                                                Severity: Minor
                                                                                                                Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                                  Method Advanced_UnitRequestOtp has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                  Open

                                                                                                                          public async Task<UnitDto> Advanced_UnitRequestOtp(int microtingUid)
                                                                                                                          {
                                                                                                                              string methodName = "Core.Advanced_UnitRequestOtp";
                                                                                                                              try
                                                                                                                              {
                                                                                                                  Severity: Minor
                                                                                                                  Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                                    Method GetFileFromS3Storage has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                            public async Task<GetObjectResponse> GetFileFromS3Storage(string fileName, bool isRetry = false)
                                                                                                                            {
                                                                                                                                try
                                                                                                                                {
                                                                                                                                    GetObjectRequest request = new GetObjectRequest
                                                                                                                    Severity: Minor
                                                                                                                    Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                                      Method CaseRead has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                      Open

                                                                                                                              public async Task<ReplyElement> CaseRead(int microtingUId, int checkUId, Language language)
                                                                                                                              {
                                                                                                                                  string methodName = "Core.CaseRead";
                                                                                                                                  try
                                                                                                                                  {
                                                                                                                      Severity: Minor
                                                                                                                      Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                                        Method FolderDelete has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                                public async Task FolderDelete(int id)
                                                                                                                                {
                                                                                                                                    string methodName = "Core.FolderDelete";
                                                                                                                                    try
                                                                                                                                    {
                                                                                                                        Severity: Minor
                                                                                                                        Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                                          Method Advanced_UploadedDataRead has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                          Open

                                                                                                                                  public async Task<UploadedData> Advanced_UploadedDataRead(int id)
                                                                                                                                  {
                                                                                                                                      string methodName = "Core.Advanced_UploadedDataRead";
                                                                                                                                      try
                                                                                                                                      {
                                                                                                                          Severity: Minor
                                                                                                                          Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                                            Method CoreThread has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                            Open

                                                                                                                                    private async Task CoreThread()
                                                                                                                                    {
                                                                                                                                        _coreThreadRunning = true;
                                                                                                                            
                                                                                                                                        string methodName = "Core.CoreThread";
                                                                                                                            Severity: Minor
                                                                                                                            Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                                              Method TemplateItemReadAll has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                              Open

                                                                                                                                      public async Task<List<Template_Dto>> TemplateItemReadAll(bool includeRemoved, string siteWorkflowState,
                                                                                                                                          string searchKey, bool descendingSort, string sortParameter, List<int> tagIds, TimeZoneInfo timeZoneInfo,
                                                                                                                                          Language language)
                                                                                                                              Severity: Major
                                                                                                                              Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                                                Method CaseReadAll has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                Open

                                                                                                                                        public async Task<List<Case>> CaseReadAll(int? templateId, DateTime? start, DateTime? end, string workflowState,
                                                                                                                                            string searchKey, bool descendingSort, string sortParameter, TimeZoneInfo timeZoneInfo)
                                                                                                                                Severity: Major
                                                                                                                                Found in eFormCore/Core.cs - About 1 hr to fix

                                                                                                                                  Method CaseDelete has a Cognitive Complexity of 24 (exceeds 20 allowed). Consider refactoring.
                                                                                                                                  Open

                                                                                                                                          public async Task<bool> CaseDelete(int microtingUId)
                                                                                                                                          {
                                                                                                                                              string methodName = "Core.CaseDelete";
                                                                                                                                  
                                                                                                                                              Log.LogVariable(methodName, nameof(microtingUId), microtingUId);
                                                                                                                                  Severity: Minor
                                                                                                                                  Found in eFormCore/Core.cs - About 55 mins to fix

                                                                                                                                  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

                                                                                                                                  Method CaseToJasperXml has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                  Open

                                                                                                                                          public async Task<string> CaseToJasperXml(CaseDto cDto, ReplyElement reply, int caseId, string timeStamp,
                                                                                                                                              string customPathForUploadedData, string customXMLContent, Language language)
                                                                                                                                  Severity: Major
                                                                                                                                  Found in eFormCore/Core.cs - About 50 mins to fix

                                                                                                                                    Method CaseToPdf has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                            public async Task<string> CaseToPdf(int caseId, string jasperTemplate, string timeStamp,
                                                                                                                                                string customPathForUploadedData, string fileType, string customXmlContent, Language language)
                                                                                                                                    Severity: Major
                                                                                                                                    Found in eFormCore/Core.cs - About 50 mins to fix

                                                                                                                                      Method Advanced_EntityGroupAll has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                              public async Task<EntityGroupList> Advanced_EntityGroupAll(string sort, string nameFilter, int pageIndex,
                                                                                                                                                  int pageSize, string entityType, bool desc, string workflowState)
                                                                                                                                      Severity: Major
                                                                                                                                      Found in eFormCore/Core.cs - About 50 mins to fix

                                                                                                                                        Method SiteUpdate has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                        Open

                                                                                                                                                public async Task<bool> SiteUpdate(int siteMicrotingUid, string siteName, string userFirstName,
                                                                                                                                                    string userLastName, string userEmail, string languageCode)
                                                                                                                                        Severity: Minor
                                                                                                                                        Found in eFormCore/Core.cs - About 45 mins to fix

                                                                                                                                          Method CaseToPdf has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                          Open

                                                                                                                                                  public Task<string> CaseToPdf(int caseId, string jasperTemplate, string timeStamp,
                                                                                                                                                      string customPathForUploadedData, string customXmlContent, Language language)
                                                                                                                                          Severity: Minor
                                                                                                                                          Found in eFormCore/Core.cs - About 45 mins to fix

                                                                                                                                            Method Close has a Cognitive Complexity of 23 (exceeds 20 allowed). Consider refactoring.
                                                                                                                                            Open

                                                                                                                                                    public async Task<bool> Close()
                                                                                                                                            #pragma warning restore 1998
                                                                                                                                                    {
                                                                                                                                                        string methodName = "Core.Close";
                                                                                                                                                        Log.LogStandard(methodName, "Close called");
                                                                                                                                            Severity: Minor
                                                                                                                                            Found in eFormCore/Core.cs - About 45 mins to fix

                                                                                                                                            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

                                                                                                                                            Method CaseReadAll has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                            Open

                                                                                                                                                    public async Task<List<Case>> CaseReadAll(int? templateId, DateTime? start, DateTime? end, string workflowState,
                                                                                                                                                        string searchKey, TimeZoneInfo timeZoneInfo)
                                                                                                                                            Severity: Minor
                                                                                                                                            Found in eFormCore/Core.cs - About 45 mins to fix

                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                              Open

                                                                                                                                                                                      foreach (var value in profile.Values)
                                                                                                                                                                                      {
                                                                                                                                                                                          Console.WriteLine("{0}({1}): {2}", value.Tag, value.DataType, value);
                                                                                                                                              
                                                                                                                                                                                          if (value.Tag == ExifTag.Orientation)
                                                                                                                                              Severity: Major
                                                                                                                                              Found in eFormCore/Core.cs - About 45 mins to fix

                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                Open

                                                                                                                                                                            if (preLabel != "")
                                                                                                                                                                            {
                                                                                                                                                                                CheckListTranslation checkListTranslation =
                                                                                                                                                                                    await dbContext.CheckListTranslations.FirstAsync(x =>
                                                                                                                                                                                        x.CheckListId == parentCheckList.Id && x.LanguageId == language.Id);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in eFormCore/Core.cs - About 45 mins to fix

                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                  Open

                                                                                                                                                                                              if (value.Tag == ExifTag.Orientation)
                                                                                                                                                                                              {
                                                                                                                                                                                                  if (unit.Manufacturer == "iOS")
                                                                                                                                                                                                  {
                                                                                                                                                                                                      Console.WriteLine($"rotate value is {value.GetValue()}");
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in eFormCore/Core.cs - About 45 mins to fix

                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                    Open

                                                                                                                                                                                        if (preLabel != "")
                                                                                                                                                                                            lstReturn.Add(subField.Id + "|" + preLabel + sep + fieldTranslation.Text +
                                                                                                                                                                                                          sep +
                                                                                                                                                                                                          subFieldTranslation.Text);
                                                                                                                                                                                        else
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in eFormCore/Core.cs - About 45 mins to fix

                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                      Open

                                                                                                                                                                                                  if (value.Tag == ExifTag.Orientation)
                                                                                                                                                                                                  {
                                                                                                                                                                                                      if (unit.Manufacturer == "iOS")
                                                                                                                                                                                                      {
                                                                                                                                                                                                          Console.WriteLine($"rotate value is {value.GetValue()}");
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in eFormCore/Core.cs - About 45 mins to fix

                                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                                        Open

                                                                                                                                                                                                    if (unit.Manufacturer == "iOS")
                                                                                                                                                                                                    {
                                                                                                                                                                                                        // CW90, Normal, 270 CW, Rotate 180
                                                                                                                                                                                                        if (value.GetValue().ToString() == "6")
                                                                                                                                                                                                        {
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in eFormCore/Core.cs - About 45 mins to fix

                                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                                          Open

                                                                                                                                                                                      foreach (Check check in resp.Checks)
                                                                                                                                                                                      {
                                                                                                                                                                                          int unitUId = _sqlController.UnitRead(int.Parse(check.UnitId)).GetAwaiter().GetResult()
                                                                                                                                                                                              .UnitUId;
                                                                                                                                                                                          Log.LogVariable(methodName, nameof(unitUId), unitUId);
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in eFormCore/Core.cs - About 45 mins to fix

                                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                                            Open

                                                                                                                                                                                                if (hash != null)
                                                                                                                                                                                                {
                                                                                                                                                                                                    //rename local file
                                                                                                                                                                                                    FileInfo fileInfo = new FileInfo(filePathAndFileName);
                                                                                                                                                            
                                                                                                                                                            
                                                                                                                                                            Severity: Major
                                                                                                                                                            Found in eFormCore/Core.cs - About 45 mins to fix

                                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                                              Open

                                                                                                                                                                                          foreach (var answer in lstAnswers)
                                                                                                                                                                                          {
                                                                                                                                                                                              if (dataItem.Id == answer.Id)
                                                                                                                                                                                              {
                                                                                                                                                                                                  dataItemListTemp.Add(answer);
                                                                                                                                                              Severity: Major
                                                                                                                                                              Found in eFormCore/Core.cs - About 45 mins to fix

                                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                                Open

                                                                                                                                                                                                if (uploadedData.FileName != null)
                                                                                                                                                                                                {
                                                                                                                                                                                                    jasperFieldXml.Append(Environment.NewLine);
                                                                                                                                                                                                    string bigFilename =
                                                                                                                                                                                                        $"{uploadedData.Id}_700_{uploadedData.Checksum}{uploadedData.Extension}";
                                                                                                                                                                Severity: Major
                                                                                                                                                                Found in eFormCore/Core.cs - About 45 mins to fix

                                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                                  Open

                                                                                                                                                                                                      foreach (KeyValuePair kvP in tempList)
                                                                                                                                                                                                      {
                                                                                                                                                                                                          if (kvP.Key == i.ToString())
                                                                                                                                                                                                          {
                                                                                                                                                                                                              value = kvP.Value;
                                                                                                                                                                  Severity: Major
                                                                                                                                                                  Found in eFormCore/Core.cs - About 45 mins to fix

                                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                                    Open

                                                                                                                                                                                                foreach (FieldValue answer in field.FieldValues)
                                                                                                                                                                                                {
                                                                                                                                                                                                    jasperFieldXml += GetJasperFieldValue(field, answer, customPathForUploadedData)
                                                                                                                                                                                                        .GetAwaiter().GetResult();
                                                                                                                                                                                                }
                                                                                                                                                                    Severity: Major
                                                                                                                                                                    Found in eFormCore/Core.cs - About 45 mins to fix

                                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                                      Open

                                                                                                                                                                                                  if (dataItem.Id == answer.FieldId)
                                                                                                                                                                                                  {
                                                                                                                                                                                                      dataItemListTemp2.Add(answer);
                                                                                                                                                                                                      break;
                                                                                                                                                                                                  }
                                                                                                                                                                      Severity: Major
                                                                                                                                                                      Found in eFormCore/Core.cs - About 45 mins to fix

                                                                                                                                                                        Method EntityItemUpdate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                        Open

                                                                                                                                                                                public async Task EntityItemUpdate(int id, string name, string description, string ownUuid, int displayIndex)
                                                                                                                                                                        Severity: Minor
                                                                                                                                                                        Found in eFormCore/Core.cs - About 35 mins to fix

                                                                                                                                                                          Method CaseCreate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                          Open

                                                                                                                                                                                  public async Task<List<int>> CaseCreate(MainElement mainElement, string caseUId, List<int> siteUids,
                                                                                                                                                                                      string custom, int? folderId)
                                                                                                                                                                          Severity: Minor
                                                                                                                                                                          Found in eFormCore/Core.cs - About 35 mins to fix

                                                                                                                                                                            Method Advanced_WorkerUpdate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                            Open

                                                                                                                                                                                    public async Task<bool> Advanced_WorkerUpdate(int workerId, string firstName, string lastName, string email,
                                                                                                                                                                                        string legacyEmail)
                                                                                                                                                                            Severity: Minor
                                                                                                                                                                            Found in eFormCore/Core.cs - About 35 mins to fix

                                                                                                                                                                              Method EntityGroupCreate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                              Open

                                                                                                                                                                                      public async Task<Microting.eForm.Infrastructure.Data.Entities.EntityGroup> EntityGroupCreate(string entityType,
                                                                                                                                                                                          string name, string description, bool locked, bool editable)
                                                                                                                                                                              Severity: Minor
                                                                                                                                                                              Found in eFormCore/Core.cs - About 35 mins to fix

                                                                                                                                                                                Method EntityItemCreate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                        private async Task<EntityItem> EntityItemCreate(int entitItemGroupId, string name, string description,
                                                                                                                                                                                            string ownUuid, int displayIndex)
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in eFormCore/Core.cs - About 35 mins to fix

                                                                                                                                                                                  Method GenerateDataSetFromCasesSubSet has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                          private async Task<List<string>> GenerateDataSetFromCasesSubSet(List<string> lstReturn, int? checkListId,
                                                                                                                                                                                              string preLabel, Language language, bool includeCheckListText)
                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                  Found in eFormCore/Core.cs - About 35 mins to fix

                                                                                                                                                                                    Method SiteCreate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                    Open

                                                                                                                                                                                            public async Task<SiteDto> SiteCreate(string name, string userFirstName, string userLastName, string userEmail,
                                                                                                                                                                                                string languageCode)
                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                    Found in eFormCore/Core.cs - About 35 mins to fix

                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                      Open

                                                                                                                                                                                                  return false;
                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                      Found in eFormCore/Core.cs - About 30 mins to fix

                                                                                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                                        try
                                                                                                                                                                                                                        {
                                                                                                                                                                                                                            var profile = image.GetExifProfile();
                                                                                                                                                                                                                            if (profile != null)
                                                                                                                                                                                                                            {
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 5 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 6153..6207

                                                                                                                                                                                        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 374.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                                        try
                                                                                                                                                                                                                        {
                                                                                                                                                                                                                            var profile = image.GetExifProfile();
                                                                                                                                                                                                                            if (profile != null)
                                                                                                                                                                                                                            {
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 5 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 6226..6280

                                                                                                                                                                                        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 374.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                    foreach (JToken child in parsedQuestionTranslations.Children())
                                                                                                                                                                                                    {
                                                                                                                                                                                                        var questionTranslation =
                                                                                                                                                                                                            JsonConvert.DeserializeObject<QuestionTranslation>(child.ToString(), jsonSerializerSettings);
                                                                                                                                                                                                        Log.LogStandard("Core.GetAllQuestionSets",
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 4 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 3984..4010

                                                                                                                                                                                        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 321.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                    foreach (JToken child in parsedOptionTranslations.Children())
                                                                                                                                                                                                    {
                                                                                                                                                                                                        var optionTranslation =
                                                                                                                                                                                                            JsonConvert.DeserializeObject<OptionTranslation>(child.ToString(), jsonSerializerSettings);
                                                                                                                                                                                                        Log.LogStandard("Core.GetAllQuestionSets",
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 4 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 3900..3926

                                                                                                                                                                                        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 321.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                private async Task<int> SendXml(MainElement mainElement, int siteId)
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.SendXml";
                                                                                                                                                                                                    Log.LogEverything(methodName, "siteId:" + siteId + ", requested sent eForm");
                                                                                                                                                                                        
                                                                                                                                                                                        
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 3 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 5325..5348

                                                                                                                                                                                        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 243.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                private async Task<int> SendJson(MainElement mainElement, int siteId)
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.SendJson";
                                                                                                                                                                                                    Log.LogEverything(methodName, "siteId:" + siteId + ", requested sent eForm");
                                                                                                                                                                                        
                                                                                                                                                                                        
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 3 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 5300..5323

                                                                                                                                                                                        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 243.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                            if (site.SelectableEntityItemId == 0)
                                                                                                                                                                                                            {
                                                                                                                                                                                                                Microting.eForm.Infrastructure.Data.Entities.EntityGroup selectableList = await db.EntityGroups
                                                                                                                                                                                                                        .FirstOrDefaultAsync(x =>
                                                                                                                                                                                                                            x.Name == "Device users" && x.Type == Constants.FieldTypes.EntitySelect) ??
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 3 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 4550..4567

                                                                                                                                                                                        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 242.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                            if (site.SearchableEntityItemId == 0)
                                                                                                                                                                                                            {
                                                                                                                                                                                                                Microting.eForm.Infrastructure.Data.Entities.EntityGroup searchableList = await db.EntityGroups
                                                                                                                                                                                                                        .FirstOrDefaultAsync(x =>
                                                                                                                                                                                                                            x.Name == "Device users" && x.Type == Constants.FieldTypes.EntitySearch) ??
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 3 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 4569..4586

                                                                                                                                                                                        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 242.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task<List<SiteDto>> Advanced_SiteReadAll(string workflowState, int? offSet, int? limit)
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.Advanced_SiteReadAll";
                                                                                                                                                                                                    try
                                                                                                                                                                                                    {
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 3 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 4713..4731

                                                                                                                                                                                        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 236.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task<List<WorkerDto>> Advanced_WorkerReadAll(string workflowState, int? offSet, int? limit)
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.Advanced_WorkerReadAll";
                                                                                                                                                                                                    try
                                                                                                                                                                                                    {
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 3 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 4462..4480

                                                                                                                                                                                        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 236.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task<bool> Advanced_SiteWorkerDelete(int workerId)
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.Advanced_SiteWorkerDelete";
                                                                                                                                                                                                    try
                                                                                                                                                                                                    {
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 2 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 4940..4960

                                                                                                                                                                                        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 192.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task<bool> Advanced_UnitDelete(int unitId)
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.Advanced_UnitDelete";
                                                                                                                                                                                                    try
                                                                                                                                                                                                    {
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 2 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 4845..4865

                                                                                                                                                                                        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 192.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                                {
                                                                                                                                                                                                                    lastAnswer = await db.Answers.OrderByDescending(x => x.Id)
                                                                                                                                                                                                                        .FirstOrDefaultAsync(x =>
                                                                                                                                                                                                                            x.QuestionSetId == questionSetId
                                                                                                                                                                                                                            && x.WorkflowState != Constants.WorkflowStates.PreCreated
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 2 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 4315..4333

                                                                                                                                                                                        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 184.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                                {
                                                                                                                                                                                                                    lastAnswer = await db.Answers.OrderByDescending(x => x.Id)
                                                                                                                                                                                                                        .FirstOrDefaultAsync(x =>
                                                                                                                                                                                                                            x.QuestionSetId == questionSetId
                                                                                                                                                                                                                            && x.WorkflowState != Constants.WorkflowStates.PreCreated
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 2 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 4280..4298

                                                                                                                                                                                        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 184.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task<SiteDto> SiteRead(int microtingUid)
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.SiteRead";
                                                                                                                                                                                                    try
                                                                                                                                                                                                    {
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 2 other locations - About 2 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 4482..4498
                                                                                                                                                                                        eFormCore/Core.cs on lines 4695..4711

                                                                                                                                                                                        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 152.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task<SiteNameDto> Advanced_SiteItemRead(int microting_uuid)
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.Advanced_SiteItemRead";
                                                                                                                                                                                                    try
                                                                                                                                                                                                    {
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 2 other locations - About 2 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 2894..2910
                                                                                                                                                                                        eFormCore/Core.cs on lines 4695..4711

                                                                                                                                                                                        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 152.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task<string> Advanced_WorkerNameRead(int workerId)
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.Advanced_WorkerNameRead";
                                                                                                                                                                                                    try
                                                                                                                                                                                                    {
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 2 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 1147..1163

                                                                                                                                                                                        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 152.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task<WorkerDto> Advanced_WorkerRead(int workerId)
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.Advanced_WorkerRead";
                                                                                                                                                                                                    try
                                                                                                                                                                                                    {
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 2 other locations - About 2 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 2894..2910
                                                                                                                                                                                        eFormCore/Core.cs on lines 4482..4498

                                                                                                                                                                                        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 152.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task<bool> TemplateDelete(int templateId)
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.TemplateDelete";
                                                                                                                                                                                                    try
                                                                                                                                                                                                    {
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 2 hrs to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 4677..4693

                                                                                                                                                                                        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 152.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task<CaseDto> CaseReadByCaseId(int id)
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.CaseReadByCaseId";
                                                                                                                                                                                                    try
                                                                                                                                                                                                    {
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 3 other locations - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 1903..1919
                                                                                                                                                                                        eFormCore/Core.cs on lines 1925..1942
                                                                                                                                                                                        eFormCore/Core.cs on lines 4869..4885

                                                                                                                                                                                        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 142.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task<UnitDto> Advanced_UnitRead(int microtingUid)
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.Advanced_UnitRead";
                                                                                                                                                                                                    try
                                                                                                                                                                                                    {
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 3 other locations - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 1480..1496
                                                                                                                                                                                        eFormCore/Core.cs on lines 1903..1919
                                                                                                                                                                                        eFormCore/Core.cs on lines 1925..1942

                                                                                                                                                                                        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 142.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task<CaseDto> CaseLookupCaseId(int caseId)
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.CaseLookupCaseId";
                                                                                                                                                                                        
                                                                                                                                                                                                    try
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 3 other locations - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 1480..1496
                                                                                                                                                                                        eFormCore/Core.cs on lines 1903..1919
                                                                                                                                                                                        eFormCore/Core.cs on lines 4869..4885

                                                                                                                                                                                        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 142.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task<CaseDto> CaseLookupMUId(int microtingUId)
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.CaseLookupMUId";
                                                                                                                                                                                                    try
                                                                                                                                                                                                    {
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 3 other locations - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 1480..1496
                                                                                                                                                                                        eFormCore/Core.cs on lines 1925..1942
                                                                                                                                                                                        eFormCore/Core.cs on lines 4869..4885

                                                                                                                                                                                        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 142.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                    {
                                                                                                                                                                                                        if (!Running()) throw new Exception("Core is not running");
                                                                                                                                                                                                        Log.LogStandard(methodName, "called");
                                                                                                                                                                                                        Log.LogVariable(methodName, nameof(microtingUId), microtingUId);
                                                                                                                                                                                                        Log.LogVariable(methodName, nameof(checkUId), checkUId);
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 4353..4361

                                                                                                                                                                                        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 116.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                    {
                                                                                                                                                                                                        if (!Running()) throw new Exception("Core is not running");
                                                                                                                                                                                                        Log.LogStandard(methodName, "called");
                                                                                                                                                                                                        Log.LogVariable(methodName, nameof(templateId), templateId);
                                                                                                                                                                                                        Log.LogVariable(methodName, nameof(newDisplayIndex), newDisplayIndex);
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 1884..1891

                                                                                                                                                                                        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 116.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task<List<SiteNameDto>> Advanced_SiteItemReadAll(bool includeRemoved)
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.Advanced_SiteItemReadAll";
                                                                                                                                                                                                    try
                                                                                                                                                                                                    {
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 3627..3640

                                                                                                                                                                                        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 114.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task<List<Tag>> GetAllTags(bool includeRemoved)
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.GetAllTags";
                                                                                                                                                                                                    try
                                                                                                                                                                                                    {
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 4505..4518

                                                                                                                                                                                        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 114.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                            switch (lastType)
                                                                                                                                                                                                            {
                                                                                                                                                                                                                case "picture":
                                                                                                                                                                                                                    jasperFieldXml.Append(Environment.NewLine);
                                                                                                                                                                                                                    jasperFieldXml.Append("</pictures>");
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 5871..5885

                                                                                                                                                                                        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 108.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                    switch (lastType)
                                                                                                                                                                                                    {
                                                                                                                                                                                                        case "picture":
                                                                                                                                                                                                            jasperFieldXml.Append(Environment.NewLine);
                                                                                                                                                                                                            jasperFieldXml.Append("</pictures>");
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 5749..5763

                                                                                                                                                                                        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 108.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                                        if (question.QuestionType == Constants.QuestionTypes.Buttons ||
                                                                                                                                                                                                                            question.QuestionType == Constants.QuestionTypes.List ||
                                                                                                                                                                                                                            question.QuestionType == Constants.QuestionTypes.Multi)
                                                                                                                                                                                                                        {
                                                                                                                                                                                                                            OptionTranslation optionTranslation =
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 4228..4236

                                                                                                                                                                                        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 106.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                                        if (question.QuestionType == Constants.QuestionTypes.Buttons ||
                                                                                                                                                                                                                            question.QuestionType == Constants.QuestionTypes.List ||
                                                                                                                                                                                                                            question.QuestionType == Constants.QuestionTypes.Multi)
                                                                                                                                                                                                                        {
                                                                                                                                                                                                                            OptionTranslation optionTranslation =
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 4183..4191

                                                                                                                                                                                        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 106.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task FireHandleCaseProcessingError(CaseDto caseDto)
                                                                                                                                                                                        #pragma warning restore 1998
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.FireHandleCaseProcessingError";
                                                                                                                                                                                                    Log.LogStandard(methodName, $"HandleCaseProcessingError for MicrotingUId {caseDto.MicrotingUId}");
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 3 other locations - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 6650..6665
                                                                                                                                                                                        eFormCore/Core.cs on lines 6713..6729
                                                                                                                                                                                        eFormCore/Core.cs on lines 6751..6767

                                                                                                                                                                                        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 101.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task FireHandleCaseProcessedByServer(CaseDto caseDto)
                                                                                                                                                                                        #pragma warning restore 1998
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.FireHandleCaseProcessedByServer";
                                                                                                                                                                                                    Log.LogStandard(methodName, $"HandleCaseProcessedByServer for MicrotingUId {caseDto.MicrotingUId}");
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 3 other locations - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 6650..6665
                                                                                                                                                                                        eFormCore/Core.cs on lines 6732..6748
                                                                                                                                                                                        eFormCore/Core.cs on lines 6751..6767

                                                                                                                                                                                        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 101.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task FireHandleCaseRetrived(CaseDto caseDto)
                                                                                                                                                                                        #pragma warning restore 1998
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.FireHandleCaseRetrived";
                                                                                                                                                                                                    Log.LogStandard(methodName, $"FireHandleCaseRetrived for MicrotingUId {caseDto.MicrotingUId}");
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 3 other locations - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 6650..6665
                                                                                                                                                                                        eFormCore/Core.cs on lines 6713..6729
                                                                                                                                                                                        eFormCore/Core.cs on lines 6732..6748

                                                                                                                                                                                        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 101.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task FireHandleCaseCompleted(CaseDto caseDto)
                                                                                                                                                                                        #pragma warning restore 1998
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.FireHandleCaseCompleted";
                                                                                                                                                                                                    Log.LogStandard(methodName, $"FireHandleCaseCompleted for MicrotingUId {caseDto.MicrotingUId}");
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 3 other locations - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 6713..6729
                                                                                                                                                                                        eFormCore/Core.cs on lines 6732..6748
                                                                                                                                                                                        eFormCore/Core.cs on lines 6751..6767

                                                                                                                                                                                        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 101.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                        foreach (string str in newFieldValuePairLst)
                                                                                                                                                                                                        {
                                                                                                                                                                                                            id = int.Parse(_t.SplitToList(str, 0, false));
                                                                                                                                                                                                            value = _t.SplitToList(str, 1, false);
                                                                                                                                                                                                            await _sqlController.FieldValueUpdate(caseId, id, value).ConfigureAwait(false);
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 1639..1644

                                                                                                                                                                                        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 91.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                        foreach (string str in newCheckListValuePairLst)
                                                                                                                                                                                                        {
                                                                                                                                                                                                            id = int.Parse(_t.SplitToList(str, 0, false));
                                                                                                                                                                                                            value = _t.SplitToList(str, 1, false);
                                                                                                                                                                                                            await _sqlController.CheckListValueStatusUpdate(caseId, id, value).ConfigureAwait(false);
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 1632..1637

                                                                                                                                                                                        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 91.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                    {
                                                                                                                                                                                                        if (!Running()) throw new Exception("Core is not running");
                                                                                                                                                                                                        Log.LogStandard(methodName, "called");
                                                                                                                                                                                                        Log.LogVariable(methodName, nameof(templateId), templateId);
                                                                                                                                                                                        
                                                                                                                                                                                        
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 2 other locations - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 4447..4453
                                                                                                                                                                                        eFormCore/Core.cs on lines 5024..5030

                                                                                                                                                                                        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 90.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                    {
                                                                                                                                                                                                        if (!Running()) throw new Exception("Core is not running");
                                                                                                                                                                                                        Log.LogStandard(methodName, "called");
                                                                                                                                                                                                        Log.LogVariable(methodName, nameof(templateId), templateId);
                                                                                                                                                                                        
                                                                                                                                                                                        
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 2 other locations - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 1175..1181
                                                                                                                                                                                        eFormCore/Core.cs on lines 5024..5030

                                                                                                                                                                                        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 90.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                    {
                                                                                                                                                                                                        if (!Running()) throw new Exception("Core is not running");
                                                                                                                                                                                                        Log.LogStandard(methodName, "called");
                                                                                                                                                                                                        Log.LogVariable(methodName, nameof(id), id);
                                                                                                                                                                                        
                                                                                                                                                                                        
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 2 other locations - About 1 hr to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 1175..1181
                                                                                                                                                                                        eFormCore/Core.cs on lines 4447..4453

                                                                                                                                                                                        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 90.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                        if (dataItem.GetType() == typeof(EntitySelect))
                                                                                                                                                                                                        {
                                                                                                                                                                                                            EntitySelect entitySelect = (EntitySelect)dataItem;
                                                                                                                                                                                                            var temp = _sqlController.EntityGroupRead(entitySelect.Source.ToString());
                                                                                                                                                                                                            if (temp == null)
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 55 mins to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 898..905

                                                                                                                                                                                        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 86.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                        if (dataItem.GetType() == typeof(EntitySearch))
                                                                                                                                                                                                        {
                                                                                                                                                                                                            EntitySearch entitySearch = (EntitySearch)dataItem;
                                                                                                                                                                                                            var temp = _sqlController.EntityGroupRead(entitySearch.EntityTypeId.ToString());
                                                                                                                                                                                                            if (temp == null)
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 55 mins to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 907..914

                                                                                                                                                                                        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 86.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                    catch (Exception ex)
                                                                                                                                                                                                    {
                                                                                                                                                                                                        try
                                                                                                                                                                                                        {
                                                                                                                                                                                                            Log.LogException(methodName, "(bool " + includeRemoved + ") failed", ex);
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 40 mins to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 1182..1194

                                                                                                                                                                                        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 72.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                    catch (Exception ex)
                                                                                                                                                                                                    {
                                                                                                                                                                                                        try
                                                                                                                                                                                                        {
                                                                                                                                                                                                            Log.LogException(methodName, "(int " + templateId + ") failed", ex);
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 40 mins to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 1216..1228

                                                                                                                                                                                        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 72.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                        UploadedData uD = new UploadedData
                                                                                                                                                                                                        {
                                                                                                                                                                                                            Checksum = ud.Checksum,
                                                                                                                                                                                                            CurrentFile = ud.CurrentFile,
                                                                                                                                                                                                            Extension = ud.Extension,
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in eFormCore/Core.cs and 2 other locations - About 40 mins to fix
                                                                                                                                                                                        eFormCore/Infrastructure/SqlController.cs on lines 2070..2080
                                                                                                                                                                                        eFormCore/Infrastructure/SqlController.cs on lines 2862..2872

                                                                                                                                                                                        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 70.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                    if (!acceptedColors.Contains(mainElement.Color) && !string.IsNullOrEmpty(mainElement.Color))
                                                                                                                                                                                                    {
                                                                                                                                                                                                        errorLst.Add(
                                                                                                                                                                                                            $"mainElement with label {mainElement.Label} did supply color {mainElement.Color}, but the only allowed colors are: grey, red, green or leave it blank.");
                                                                                                                                                                                                    }
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 35 mins to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 935..939

                                                                                                                                                                                        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 67.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                        if (!acceptedColors.Contains(dataItem.Color) && !string.IsNullOrEmpty(dataItem.Color))
                                                                                                                                                                                                        {
                                                                                                                                                                                                            errorLst.Add(
                                                                                                                                                                                                                $"DataItem with label {dataItem.Label} did supply color {dataItem.Color}, but the only allowed values are: e8eaf6 for grey, ffe4e4 for red, f0f8db for green, e2f4fb for blue, e2f4fb for purple, fff6df for yellow, None for default or leave it blank.");
                                                                                                                                                                                                        }
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 35 mins to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 960..964

                                                                                                                                                                                        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 67.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task FireHandleCaseDeleted(CaseDto caseDto)
                                                                                                                                                                                        #pragma warning restore 1998
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.FireHandleCaseDeleted";
                                                                                                                                                                                                    try
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 2 other locations - About 35 mins to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 6683..6695
                                                                                                                                                                                        eFormCore/Core.cs on lines 6698..6710

                                                                                                                                                                                        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 65.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task FireHandleSiteActivated(NoteDto notification)
                                                                                                                                                                                        #pragma warning restore 1998
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.FireHandleSiteActivated";
                                                                                                                                                                                                    try
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 2 other locations - About 35 mins to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 6668..6680
                                                                                                                                                                                        eFormCore/Core.cs on lines 6683..6695

                                                                                                                                                                                        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 65.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                public async Task FireHandleNotificationNotFound(NoteDto notification)
                                                                                                                                                                                        #pragma warning restore 1998
                                                                                                                                                                                                {
                                                                                                                                                                                                    string methodName = "Core.FireHandleNotificationNotFound";
                                                                                                                                                                                                    try
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 2 other locations - About 35 mins to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 6668..6680
                                                                                                                                                                                        eFormCore/Core.cs on lines 6698..6710

                                                                                                                                                                                        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 65.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                            await _communicator.FolderUpdate((int)folder.MicrotingUid, name[i].Value, description[i].Value,
                                                                                                                                                                                                                name[i].Key, apiParentId);
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 35 mins to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 3454..3455

                                                                                                                                                                                        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 63.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                    PutObjectRequest putObjectRequest = new PutObjectRequest
                                                                                                                                                                                                    {
                                                                                                                                                                                                        BucketName =
                                                                                                                                                                                                            $"{await _sqlController.SettingRead(Settings.s3BucketName).ConfigureAwait(false)}",
                                                                                                                                                                                                        Key = $"{_customerNo}/{fileName}",
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 35 mins to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 6511..6517

                                                                                                                                                                                        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 63.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                    PutObjectRequest putObjectRequest = new PutObjectRequest
                                                                                                                                                                                                    {
                                                                                                                                                                                                        BucketName =
                                                                                                                                                                                                            $"{await _sqlController.SettingRead(Settings.s3BucketName).ConfigureAwait(false)}",
                                                                                                                                                                                                        Key = $"{_customerNo}/{fileName}",
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 35 mins to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 6472..6478

                                                                                                                                                                                        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 63.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                            await _communicator.FolderUpdate((int)folder.MicrotingUid, name[i].Value, description[i].Value,
                                                                                                                                                                                                                name[i].Key, apiParentId);
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 35 mins to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 3552..3553

                                                                                                                                                                                        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 63.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                                            foreach (int i in caseIds)
                                                                                                                                                                                                                            {
                                                                                                                                                                                                                                string value = "";
                                                                                                                                                                                                                                foreach (KeyValuePair kvP in lst)
                                                                                                                                                                                                                                {
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 30 mins to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 5468..5480

                                                                                                                                                                                        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 61.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                                        foreach (int i in caseIds)
                                                                                                                                                                                                                        {
                                                                                                                                                                                                                            string value = "";
                                                                                                                                                                                                                            foreach (KeyValuePair kvP in tempList)
                                                                                                                                                                                                                            {
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 30 mins to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 5493..5505

                                                                                                                                                                                        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 61.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                                        {
                                                                                                                                                                                                                            CheckListTranslation checkListTranslation =
                                                                                                                                                                                                                                await dbContext.CheckListTranslations.FirstAsync(x =>
                                                                                                                                                                                                                                    x.CheckListId == field.CheckListId && x.LanguageId == language.Id);
                                                                                                                                                                                                                            preLabel = checkListTranslation.Text;
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 30 mins to fix
                                                                                                                                                                                        eFormCore/Infrastructure/SqlController.cs on lines 3771..3778

                                                                                                                                                                                        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 60.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                        try
                                                                                                                                                                                                        {
                                                                                                                                                                                                            await _s3Client.PutObjectAsync(putObjectRequest).ConfigureAwait(false);
                                                                                                                                                                                                        }
                                                                                                                                                                                                        catch (Exception ex)
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 30 mins to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 6518..6525

                                                                                                                                                                                        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 60.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                                    try
                                                                                                                                                                                                    {
                                                                                                                                                                                                        await _s3Client.PutObjectAsync(putObjectRequest).ConfigureAwait(false);
                                                                                                                                                                                                    }
                                                                                                                                                                                                    catch (Exception ex)
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in eFormCore/Core.cs and 1 other location - About 30 mins to fix
                                                                                                                                                                                        eFormCore/Core.cs on lines 6492..6499

                                                                                                                                                                                        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 60.

                                                                                                                                                                                        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

                                                                                                                                                                                        Further Reading

                                                                                                                                                                                        There are no issues that match your filters.

                                                                                                                                                                                        Category
                                                                                                                                                                                        Status