microting/eform-sdk-dotnet

View on GitHub
eFormCore/Communication/Http.cs

Summary

Maintainability
F
1 wk
Test Coverage

File Http.cs has 897 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using System;
using System.CodeDom.Compiler;
using System.IO;
using System.Net;
using System.Net.Http;
Severity: Major
Found in eFormCore/Communication/Http.cs - About 2 days to fix

    Class Http has 55 methods (exceeds 20 allowed). Consider refactoring.
    Open

        public class Http : IHttp
        {
            private const string ProtocolXml = "6";
            private const string ProtocolEntitySearch = "1";
            private const string ProtocolEntitySelect = "4";
    Severity: Major
    Found in eFormCore/Communication/Http.cs - About 7 hrs to fix

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

              private async Task<string> HttpPost(string url, StringContent content, string contentType = null,
                  bool addToken = false, bool followRedirect = false)
              {
                  try
                  {
      Severity: Minor
      Found in eFormCore/Communication/Http.cs - About 1 hr to fix

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

                private async Task<string> HttpDelete(string url, string contentType = null, bool addToken = false,
                    bool followRedirect = false)
                {
                    try
                    {
        Severity: Minor
        Found in eFormCore/Communication/Http.cs - About 1 hr to fix

          Method HttpPut has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  private async Task<string> HttpPut(string url, StringContent content, string contentType = null,
                      bool addToken = false, bool followRedirect = false)
                  {
                      try
                      {
          Severity: Minor
          Found in eFormCore/Communication/Http.cs - About 1 hr to fix

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

                    public async Task<string> Delete(string elementId, string siteId)
                    {
                        try
                        {if (_addressNewApi != "none")
                            {
            Severity: Minor
            Found in eFormCore/Communication/Http.cs - About 1 hr to fix

              Method SpeechToText has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public async Task<int> SpeechToText(Stream pathToAudioFile, string language, string extension)
                      {
                          try
                          {
                              var url = $"{_addressSpeechToText}/audio/?token={_token}&sdk_ver={_dllVersion}&lang={language}";
              Severity: Minor
              Found in eFormCore/Communication/Http.cs - About 1 hr to fix

                Method Post has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public async Task<string> Post(string data, string siteId, string contentType = "application/xml")
                        {
                            try
                            {
                                WriteDebugConsoleLogEntry($"{GetType()}.{MethodBase.GetCurrentMethod()?.Name}",
                Severity: Minor
                Found in eFormCore/Communication/Http.cs - About 1 hr to fix

                  Method HttpGet has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          private async Task<string> HttpGet(string url, string contentType = null, bool addToken = false)
                          {
                              try
                              {
                                  var start = DateTime.UtcNow;
                  Severity: Minor
                  Found in eFormCore/Communication/Http.cs - About 1 hr to fix

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

                            public async Task<string> UnitUpdate(int id, bool newOtp, int siteId, bool pushEnabled, bool syncDelayEnabled,
                                bool syncDialogEnabled)
                    Severity: Minor
                    Found in eFormCore/Communication/Http.cs - About 45 mins to fix

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

                              private async Task<string> HttpPost(string url, StringContent content, string contentType = null,
                                  bool addToken = false, bool followRedirect = false)
                      Severity: Minor
                      Found in eFormCore/Communication/Http.cs - About 35 mins to fix

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

                                public async Task<bool> EntitySelectItemUpdate(string entitySelectGroupId, string entitySelectItemId,
                                    string name, int displayIndex, string ownUuid)
                        Severity: Minor
                        Found in eFormCore/Communication/Http.cs - About 35 mins to fix

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

                                  public async Task<bool> FolderUpdate(int id, string name, string description, string languageCode,
                                      int? parentId)
                          Severity: Minor
                          Found in eFormCore/Communication/Http.cs - About 35 mins to fix

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

                                    private async Task<string> HttpPut(string url, StringContent content, string contentType = null,
                                        bool addToken = false, bool followRedirect = false)
                            Severity: Minor
                            Found in eFormCore/Communication/Http.cs - About 35 mins to fix

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

                                      public async Task<bool> EntitySearchItemUpdate(string entitySearchGroupId, string entitySearchItemId,
                                          string name, string description, string id)
                              Severity: Minor
                              Found in eFormCore/Communication/Http.cs - About 35 mins to fix

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

                                        private async Task<string> HttpPut(string url, StringContent content, string contentType = null,
                                            bool addToken = false, bool followRedirect = false)
                                        {
                                            try
                                            {
                                Severity: Major
                                Found in eFormCore/Communication/Http.cs and 1 other location - About 4 hrs to fix
                                eFormCore/Communication/Http.cs on lines 77..118

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

                                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<string> HttpPost(string url, StringContent content, string contentType = null,
                                            bool addToken = false, bool followRedirect = false)
                                        {
                                            try
                                            {
                                Severity: Major
                                Found in eFormCore/Communication/Http.cs and 1 other location - About 4 hrs to fix
                                eFormCore/Communication/Http.cs on lines 120..160

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

                                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> WorkerDelete(int id)
                                        {
                                            try
                                            {
                                                var url =
                                Severity: Major
                                Found in eFormCore/Communication/Http.cs and 1 other location - About 2 hrs to fix
                                eFormCore/Communication/Http.cs on lines 831..846

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

                                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> FolderDelete(int id)
                                        {
                                            try
                                            {
                                                var url =
                                Severity: Major
                                Found in eFormCore/Communication/Http.cs and 1 other location - About 2 hrs to fix
                                eFormCore/Communication/Http.cs on lines 748..762

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

                                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

                                            {
                                                var url =
                                                    $"{_addressApi}/gwt/inspection_app/searchable_item_groups/{entityGroupId}.json?token={_token}&protocol={ProtocolEntitySelect}&organization_id={_organizationId}&sdk_ver={_dllVersion}";
                                                var newUrl =
                                                    await HttpDelete(url, "application/json").ConfigureAwait(false); // todo maybe not need content type
                                Severity: Major
                                Found in eFormCore/Communication/Http.cs and 1 other location - About 1 hr to fix
                                eFormCore/Communication/Http.cs on lines 593..600

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

                                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

                                        {
                                            var url =
                                                $"{_addressApi}/gwt/inspection_app/searchable_items/{entitySelectItemId}.json?token={_token}&protocol={ProtocolEntitySelect}&organization_id={_organizationId}&sdk_ver={_dllVersion}";
                                            var newUrl =
                                                await HttpDelete(url, "application/json").ConfigureAwait(false); // todo maybe not need content type
                                Severity: Major
                                Found in eFormCore/Communication/Http.cs and 1 other location - About 1 hr to fix
                                eFormCore/Communication/Http.cs on lines 532..539

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

                                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 static void WriteErrorConsoleLogEntry(string classMethodName, string message)
                                        {
                                            var oldColor = Console.ForegroundColor;
                                            Console.ForegroundColor = ConsoleColor.Red;
                                            Console.WriteLine($"[ERR] {classMethodName}: {message}");
                                Severity: Minor
                                Found in eFormCore/Communication/Http.cs and 1 other location - About 40 mins to fix
                                eFormCore/Communication/Http.cs on lines 1021..1027

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

                                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 static void WriteDebugConsoleLogEntry(string classMethodName, string message)
                                        {
                                            var oldColor = Console.ForegroundColor;
                                            Console.ForegroundColor = ConsoleColor.Gray;
                                            Console.WriteLine($"[DBG] {classMethodName}: {message}");
                                Severity: Minor
                                Found in eFormCore/Communication/Http.cs and 1 other location - About 40 mins to fix
                                eFormCore/Communication/Http.cs on lines 1029..1035

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

                                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

                                            var content = new StringContent("<Entities><Entity>" +
                                                                            $"<EntityTypeId>{entitySearchGroupId}</EntityTypeId>" +
                                                                            $"<Identifier><![CDATA[{name}]]></Identifier>" +
                                                                            $"<Description><![CDATA[{description}]]></Description>" +
                                                                            "<Km></Km><Colour></Colour><Radiocode></Radiocode>" + // todo Legacy. To be removed server side
                                Severity: Minor
                                Found in eFormCore/Communication/Http.cs and 1 other location - About 40 mins to fix
                                eFormCore/Communication/Http.cs on lines 466..472

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

                                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

                                            var content = new StringContent("<Entities><Entity>" +
                                                                            $"<EntityTypeId>{entitySearchGroupId}</EntityTypeId>" +
                                                                            $"<Identifier><![CDATA[{name}]]></Identifier>" +
                                                                            $"<Description><![CDATA[{description}]]></Description>" +
                                                                            "<Km></Km><Colour></Colour><Radiocode></Radiocode>" + // todo Legacy. To be removed server side
                                Severity: Minor
                                Found in eFormCore/Communication/Http.cs and 1 other location - About 40 mins to fix
                                eFormCore/Communication/Http.cs on lines 443..449

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

                                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> GetQuestionSet(int id)
                                        {
                                            var url = $"{_addressBasic}/v1/question_sets/{id}?token={_token}&sdk_ver={_dllVersion}";
                                            return await HttpGet(url).ConfigureAwait(false);
                                        }
                                Severity: Minor
                                Found in eFormCore/Communication/Http.cs and 1 other location - About 30 mins to fix
                                eFormCore/Communication/Http.cs on lines 989..993

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

                                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> GetSurveyConfiguration(int id)
                                        {
                                            var url = $"{_addressBasic}/v1/survey_configurations/{id}?token={_token}&sdk_ver={_dllVersion}";
                                            return await HttpGet(url).ConfigureAwait(false);
                                        }
                                Severity: Minor
                                Found in eFormCore/Communication/Http.cs and 1 other location - About 30 mins to fix
                                eFormCore/Communication/Http.cs on lines 1001..1005

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

                                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 6 locations. Consider refactoring.
                                Open

                                        public async Task<string> SiteLoadAllFromRemote()
                                        {
                                            var url =
                                                $"{_newAddressBasic}/Site?token={_token}&sdkVersion={_dllVersion}";
                                            return await HttpGet(url, null, true).ConfigureAwait(false);
                                Severity: Major
                                Found in eFormCore/Communication/Http.cs and 5 other locations - About 30 mins to fix
                                eFormCore/Communication/Http.cs on lines 764..768
                                eFormCore/Communication/Http.cs on lines 800..804
                                eFormCore/Communication/Http.cs on lines 806..810
                                eFormCore/Communication/Http.cs on lines 862..866
                                eFormCore/Communication/Http.cs on lines 916..920

                                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

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

                                        public async Task<string> WorkerLoadAllFromRemote()
                                        {
                                            var url = $"{_newAddressBasic}/User?token={_token}&sdkVersion={_dllVersion}";
                                            return await HttpGet(url, null, true).ConfigureAwait(false);
                                        }
                                Severity: Major
                                Found in eFormCore/Communication/Http.cs and 5 other locations - About 30 mins to fix
                                eFormCore/Communication/Http.cs on lines 714..719
                                eFormCore/Communication/Http.cs on lines 800..804
                                eFormCore/Communication/Http.cs on lines 806..810
                                eFormCore/Communication/Http.cs on lines 862..866
                                eFormCore/Communication/Http.cs on lines 916..920

                                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

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

                                        public async Task<string> OrganizationLoadAllFromRemote()
                                        {
                                            var url = $"{_newAddressBasic}/Organization?token={_token}&sdkVersion={_dllVersion}";
                                            return await HttpGet(url, null, true).ConfigureAwait(false);
                                        }
                                Severity: Major
                                Found in eFormCore/Communication/Http.cs and 5 other locations - About 30 mins to fix
                                eFormCore/Communication/Http.cs on lines 714..719
                                eFormCore/Communication/Http.cs on lines 764..768
                                eFormCore/Communication/Http.cs on lines 800..804
                                eFormCore/Communication/Http.cs on lines 806..810
                                eFormCore/Communication/Http.cs on lines 862..866

                                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

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

                                            var newUrl = await HttpPost(url,
                                                new StringContent(contentToServer.ToString(), Encoding.UTF8, "application/json"), "application/json",
                                                true).ConfigureAwait(false); // todo maybe not need content type
                                Severity: Minor
                                Found in eFormCore/Communication/Http.cs and 1 other location - About 30 mins to fix
                                eFormCore/Communication/Http.cs on lines 692..694

                                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

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

                                        public async Task<string> FolderLoadAllFromRemote()
                                        {
                                            var url = $"{_newAddressBasic}/Folder?token={_token}&sdkVersion={_dllVersion}";
                                            return await HttpGet(url, null, true).ConfigureAwait(false);
                                        }
                                Severity: Major
                                Found in eFormCore/Communication/Http.cs and 5 other locations - About 30 mins to fix
                                eFormCore/Communication/Http.cs on lines 714..719
                                eFormCore/Communication/Http.cs on lines 764..768
                                eFormCore/Communication/Http.cs on lines 800..804
                                eFormCore/Communication/Http.cs on lines 862..866
                                eFormCore/Communication/Http.cs on lines 916..920

                                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

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

                                            var newUrl = await HttpPut(url,
                                                new StringContent(contentToServer.ToString(), Encoding.UTF8, "application/json"), "application/json",
                                                true).ConfigureAwait(false); // todo maybe not need content type
                                Severity: Minor
                                Found in eFormCore/Communication/Http.cs and 1 other location - About 30 mins to fix
                                eFormCore/Communication/Http.cs on lines 678..680

                                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

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

                                        public async Task<string> SiteWorkerLoadAllFromRemote()
                                        {
                                            var url = $"{_newAddressBasic}/Worker?token={_token}&sdkVersion={_dllVersion}";
                                            return await HttpGet(url, null, true).ConfigureAwait(false);
                                        }
                                Severity: Major
                                Found in eFormCore/Communication/Http.cs and 5 other locations - About 30 mins to fix
                                eFormCore/Communication/Http.cs on lines 714..719
                                eFormCore/Communication/Http.cs on lines 764..768
                                eFormCore/Communication/Http.cs on lines 806..810
                                eFormCore/Communication/Http.cs on lines 862..866
                                eFormCore/Communication/Http.cs on lines 916..920

                                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

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

                                        public async Task<string> UnitLoadAllFromRemote()
                                        {
                                            var url = $"{_newAddressBasic}/Unit?token={_token}&sdkVersion={_dllVersion}";
                                            return await HttpGet(url, null, true).ConfigureAwait(false);
                                        }
                                Severity: Major
                                Found in eFormCore/Communication/Http.cs and 5 other locations - About 30 mins to fix
                                eFormCore/Communication/Http.cs on lines 714..719
                                eFormCore/Communication/Http.cs on lines 764..768
                                eFormCore/Communication/Http.cs on lines 800..804
                                eFormCore/Communication/Http.cs on lines 806..810
                                eFormCore/Communication/Http.cs on lines 916..920

                                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