Promact/slack-erp-custom-integration-mvc

View on GitHub
Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs

Summary

Maintainability
F
2 wks
Test Coverage

File SlackRepositoryTest.cs has 1193 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using Autofac;
using Microsoft.AspNet.Identity;
using Moq;
using Newtonsoft.Json;
using Promact.Core.Repository.AttachmentRepository;
Severity: Major
Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs - About 3 days to fix

    Class SlackRepositoryTest has 67 methods (exceeds 20 allowed). Consider refactoring.
    Open

        public class SlackRepositoryTest
        {
            #region Private Variables
            private readonly IComponentContext _componentContext;
            private readonly ISlackRepository _slackRepository;
    Severity: Major
    Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs - About 1 day to fix

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

              public void Initialize()
              {
                  user.Id = _stringConstant.StringIdForTest;
                  user.Email = _stringConstant.EmailForTest;
                  user.FirstName = _stringConstant.FirstNameForTest;
      Severity: Major
      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs - About 3 hrs to fix

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

                [Fact, Trait("Category", "Required")]
                public async Task UpdateLeaveSMTPExceptionAsync()
                {
                    SmtpException ex = new SmtpException();
                    await AddUser();
        Severity: Minor
        Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs - About 1 hr to fix

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

                  [Fact, Trait("Category", "Required")]
                  public async Task UpdateLeaveAsync()
                  {
                      await AddUser();
                      await AddThreeUserIncomingWebHookAsync();
          Severity: Minor
          Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs - About 1 hr to fix

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

                    [Fact, Trait("Category", "Required")]
                    public async Task UpdateLeaveRejectedAsync()
                    {
                        await AddUser();
                        await AddThreeUserIncomingWebHookAsync();
            Severity: Minor
            Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs - About 1 hr to fix

              Method LeaveUpdateSickAsync has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      [Fact, Trait("Category", "Required")]
                      public async Task LeaveUpdateSickAsync()
                      {
                          slackLeave.ResponseUrl = _stringConstant.IncomingWebHookUrl;
                          await AddThreeUserIncomingWebHookAsync();
              Severity: Minor
              Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs - About 1 hr to fix

                Method LeaveApplyForCLAsync has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        [Fact, Trait("Category", "Required")]
                        public async Task LeaveApplyForCLAsync()
                        {
                            await AddGroup();
                            await AddMailSetting();
                Severity: Minor
                Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs - About 1 hr to fix

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

                          [Fact, Trait("Category", "Required")]
                          public async Task LeaveApplyForSLForUserAsync()
                          {
                              await AddThreeUserIncomingWebHookAsync();
                              await AddUser();
                  Severity: Minor
                  Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs - About 1 hr to fix

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

                            [Fact, Trait("Category", "Required")]
                            public async Task LeaveApplyForSLAsync()
                            {
                                await AddGroup();
                                await AddMailSetting();
                    Severity: Minor
                    Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs - About 1 hr to fix

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

                              [Fact, Trait("Category", "Required")]
                              public async Task UpdateLeaveAsync()
                              {
                                  await AddUser();
                                  await AddThreeUserIncomingWebHookAsync();
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 1 other location - About 1 day to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 193..233

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

                      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

                              [Fact, Trait("Category", "Required")]
                              public async Task UpdateLeaveRejectedAsync()
                              {
                                  await AddUser();
                                  await AddThreeUserIncomingWebHookAsync();
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 1 other location - About 1 day to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 148..188

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

                      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

                              [Fact, Trait("Category", "Required")]
                              public async Task LeaveUpdateTryToUpdateCLAsync()
                              {
                                  await AddUser();
                                  await AddThreeUserIncomingWebHookAsync();
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 3 other locations - About 3 hrs to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 707..723
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 749..765
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 981..997

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

                      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

                              [Fact, Trait("Category", "Required")]
                              public async Task LeaveUpdateWrongIdAsync()
                              {
                                  await AddUser();
                                  await AddThreeUserIncomingWebHookAsync();
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 3 other locations - About 3 hrs to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 728..744
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 749..765
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 981..997

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

                      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

                              [Fact, Trait("Category", "Required")]
                              public async Task LeaveUpdateInValidIDAsync()
                              {
                                  await AddUser();
                                  await AddThreeUserIncomingWebHookAsync();
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 3 other locations - About 3 hrs to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 707..723
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 728..744
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 981..997

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

                      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

                              [Fact, Trait("Category", "Required")]
                              public async Task LeaveUpdateForBeyondStartDateAsync()
                              {
                                  await AddUser();
                                  await AddThreeUserIncomingWebHookAsync();
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 3 other locations - About 3 hrs to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 707..723
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 728..744
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 749..765

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

                      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

                              [Fact, Trait("Category", "Required")]
                              public async Task LeaveApplyForErrorDateFormatForCasualAsync()
                              {
                                  var dateFormat = Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern;
                                  await AddUser();
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 1 other location - About 2 hrs to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 580..592

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

                      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

                              [Fact, Trait("Category", "Required")]
                              public async Task LeaveApplyForErrorDateFormatAsync()
                              {
                                  var dateFormat = Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern;
                                  await AddUser();
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 1 other location - About 2 hrs to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 597..609

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

                      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

                              [Fact, Trait("Category", "Required")]
                              public async Task SlackLeaveStatusOwnFalseAsync()
                              {
                                  await AddUser();
                                  await AddThreeUserIncomingWebHookAsync();
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 1 other location - About 2 hrs to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 346..358

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

                      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

                              [Fact, Trait("Category", "Required")]
                              public async Task SlackLeaveCancelWrongAsync()
                              {
                                  await AddUser();
                                  await AddThreeUserIncomingWebHookAsync();
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 1 other location - About 2 hrs to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 421..433

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

                      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

                              [Fact, Trait("Category", "Required")]
                              public async Task LeaveApplyForCLWithBackDateAsync()
                              {
                                  await AddThreeUserIncomingWebHookAsync();
                                  await AddUser();
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 2 other locations - About 2 hrs to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 930..942
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 964..976

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

                      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

                              [Fact, Trait("Category", "Required")]
                              public async Task LeaveApplyForCLWithWrongDateFirstTestAsync()
                              {
                                  await AddUser();
                                  await AddThreeUserIncomingWebHookAsync();
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 2 other locations - About 2 hrs to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 913..925
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 964..976

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

                      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

                              [Fact, Trait("Category", "Required")]
                              public async Task LeaveApplyForSLWithBackDateAsync()
                              {
                                  await AddUser();
                                  await AddThreeUserIncomingWebHookAsync();
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 2 other locations - About 2 hrs to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 913..925
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 930..942

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

                      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

                              [Fact, Trait("Category", "Required")]
                              public async Task LeaveApplyForSLForNoUserAsync()
                              {
                                  await AddUser();
                                  await AddThreeUserIncomingWebHookAsync();
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 1 other location - About 2 hrs to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 462..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 157.

                      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

                              [Fact, Trait("Category", "Required")]
                              public async Task SlackLeaveHelpAsync()
                              {
                                  await AddThreeUserIncomingWebHookAsync();
                                  await AddUser();
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 1 other location - About 2 hrs to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 512..522

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

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

                              private void MockingOfTeamLeaderDetails()
                              {
                                  var teamLeaderResponse = Task.FromResult(_stringConstant.TeamLeaderDetailsFromOauthServer);
                                  var teamLeaderRequestUrl = string.Format(_stringConstant.FirstAndSecondIndexStringFormat, _stringConstant.TeamLeaderDetailsUrl, _stringConstant.StringIdForTest);
                                  _mockHttpClient.Setup(x => x.GetAsync(_stringConstant.ProjectUserUrl, teamLeaderRequestUrl, _stringConstant.AccessTokenForTest, _stringConstant.Bearer)).Returns(teamLeaderResponse);
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 4 other locations - About 1 hr to fix
                      Slack.Automation/Promact.Core.Test/ScrumReportRepositoryTest.cs on lines 280..285
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 1319..1324
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 1379..1384
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 1441..1446

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

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

                              private void UserMock()
                              {
                                  var response = Task.FromResult(_stringConstant.UserDetailsFromOauthServer);
                                  var requestUrl = string.Format(_stringConstant.FirstAndSecondIndexStringFormat, _stringConstant.UserDetailsUrl, _stringConstant.StringIdForTest);
                                  _mockHttpClient.Setup(x => x.GetAsync(_stringConstant.ProjectUserUrl, requestUrl, _stringConstant.AccessTokenForTest, _stringConstant.Bearer)).Returns(response);
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 4 other locations - About 1 hr to fix
                      Slack.Automation/Promact.Core.Test/ScrumReportRepositoryTest.cs on lines 280..285
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 1379..1384
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 1389..1394
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 1441..1446

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

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

                              private void MockingOfUserDetails()
                              {
                                  var response = Task.FromResult(_stringConstant.UserDetailsFromOauthServer);
                                  var requestUrl = string.Format(_stringConstant.FirstAndSecondIndexStringFormat, _stringConstant.DetailsAndSlashForUrl, _stringConstant.StringIdForTest);
                                  _mockHttpClient.Setup(x => x.GetAsync(_stringConstant.ProjectUserUrl, requestUrl, _stringConstant.AccessTokenForTest, _stringConstant.Bearer)).Returns(response);
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 4 other locations - About 1 hr to fix
                      Slack.Automation/Promact.Core.Test/ScrumReportRepositoryTest.cs on lines 280..285
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 1319..1324
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 1389..1394
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 1441..1446

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

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

                              private void MockingUserIsAdminBySlackId()
                              {
                                  var adminResponse = Task.FromResult(_stringConstant.True);
                                  var adminrequestUrl = string.Format(_stringConstant.FirstAndSecondIndexStringFormat, _stringConstant.UserIsAdmin, _stringConstant.StringIdForTest);
                                  _mockHttpClient.Setup(x => x.GetAsync(_stringConstant.ProjectUserUrl, adminrequestUrl, _stringConstant.AccessTokenForTest, _stringConstant.Bearer)).Returns(adminResponse);
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 4 other locations - About 1 hr to fix
                      Slack.Automation/Promact.Core.Test/ScrumReportRepositoryTest.cs on lines 280..285
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 1319..1324
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 1379..1384
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 1389..1394

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

                      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 void GetAsyncMethodMocking(string toReturn, string baseUrl, string contentUrl, string accessToken)
                              {
                                  var responseString = Task.FromResult(toReturn);
                                  _mockHttpClient.Setup(x => x.GetAsync(baseUrl, contentUrl, accessToken, _stringConstant.Bearer)).Returns(responseString);
                              }
                      Severity: Minor
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 1 other location - About 55 mins to fix
                      Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 672..676

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

                      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 replyText = string.Format(_stringConstant.ReplyTextForCasualLeaveList, leave.Id, leave.Reason, leave.FromDate.ToShortDateString(), leave.EndDate.Value.ToShortDateString(), leave.Status, System.Environment.NewLine);
                      Severity: Minor
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 1 other location - About 45 mins to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 280..280

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

                      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 replyText = string.Format(_stringConstant.ReplyTextForCasualLeaveList, leave.Id, leave.Reason, leave.FromDate.ToShortDateString(), leave.EndDate.Value.ToShortDateString(), leave.Status, System.Environment.NewLine);
                      Severity: Minor
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 1 other location - About 45 mins to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 245..245

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

                      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

                                  var replyText = string.Format(_stringConstant.ReplyTextForSickLeaveUpdate
                                                  , user.FirstName, leave.FromDate.ToShortDateString(), leave.EndDate.Value.ToShortDateString(),
                                                  leave.Reason, leave.RejoinDate.Value.ToShortDateString());
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 2 other locations - About 45 mins to fix
                      Slack.Automation/Promact.Core.Test/AttachmentRepositoryTest.cs on lines 68..73
                      Slack.Automation/Promact.Core.Test/AttachmentRepositoryTest.cs on lines 143..148

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

                      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 replyText = string.Format(_stringConstant.ReplyTextForCasualLeaveStatus, leave.Id, leave.FromDate.ToShortDateString(), leave.EndDate.Value.ToShortDateString(), leave.Reason, leave.Status);
                      Severity: Minor
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 1 other location - About 40 mins to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 409..409

                      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 replyText = string.Format(_stringConstant.ReplyTextForCasualLeaveStatus, leave.Id, leave.FromDate.ToShortDateString(), leave.EndDate.Value.ToShortDateString(), leave.Reason, leave.Status);
                      Severity: Minor
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 1 other location - About 40 mins to fix
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 371..371

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

                              private async Task AddMailSetting()
                              {
                                  _mailSettingDataRepository.Insert(mailSetting);
                                  await _mailSettingDataRepository.SaveChangesAsync();
                                  mailSettingMapping.MailSettingId = mailSetting.Id;
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 3 other locations - About 35 mins to fix
                      Slack.Automation/Promact.Core.Test/MailSettingDetailsByProjectAndModuleTest.cs on lines 184..191
                      Slack.Automation/Promact.Core.Test/MailSettingDetailsByProjectAndModuleTest.cs on lines 196..203
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 1471..1478

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

                      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

                              private async Task AddGroup()
                              {
                                  _groupDataRepository.Insert(group);
                                  await _groupDataRepository.SaveChangesAsync();
                                  groupEmailMapping.GroupId = group.Id;
                      Severity: Major
                      Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 3 other locations - About 35 mins to fix
                      Slack.Automation/Promact.Core.Test/MailSettingDetailsByProjectAndModuleTest.cs on lines 184..191
                      Slack.Automation/Promact.Core.Test/MailSettingDetailsByProjectAndModuleTest.cs on lines 196..203
                      Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 1459..1466

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

                      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