department-of-veterans-affairs/vets-website

View on GitHub

Showing 14,709 of 14,709 total issues

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

    {
      fullUrl:
        'https://mhv-sysb-api.myhealth.va.gov/fhir/DocumentReference/1000',
      resource: {
        id: '123413',
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 307..451
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 452..596
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 597..741
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 742..886
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 887..1031
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1626..1770
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1916..2060

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

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

    {
      fullUrl:
        'https://mhv-sysb-api.myhealth.va.gov/fhir/DocumentReference/1000',
      resource: {
        id: '12347',
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 307..451
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 452..596
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 597..741
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 742..886
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1626..1770
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1771..1915
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1916..2060

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

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

    {
      fullUrl:
        'https://mhv-sysb-api.myhealth.va.gov/fhir/DocumentReference/1000',
      resource: {
        id: '12343',
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 452..596
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 597..741
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 742..886
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 887..1031
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1626..1770
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1771..1915
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1916..2060

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

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

    {
      fullUrl:
        'https://mhv-sysb-api.myhealth.va.gov/fhir/DocumentReference/1000',
      resource: {
        id: '123414',
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 307..451
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 452..596
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 597..741
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 742..886
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 887..1031
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1626..1770
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1771..1915

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

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

    {
      fullUrl:
        'https://mhv-sysb-api.myhealth.va.gov/fhir/DocumentReference/1000',
      resource: {
        id: '12344',
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 307..451
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 597..741
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 742..886
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 887..1031
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1626..1770
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1771..1915
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1916..2060

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

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

    {
      fullUrl:
        'https://mhv-sysb-api.myhealth.va.gov/fhir/DocumentReference/1000',
      resource: {
        id: '12345',
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 307..451
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 452..596
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 742..886
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 887..1031
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1626..1770
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1771..1915
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1916..2060

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

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

    {
      fullUrl:
        'https://mhv-sysb-api.myhealth.va.gov/fhir/DocumentReference/1000',
      resource: {
        id: '123412',
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 307..451
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 452..596
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 597..741
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 742..886
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 887..1031
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1771..1915
src/platform/mhv/api/mocks/medical-records/care-summaries-and-notes/index.js on lines 1916..2060

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

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

Function ReplyDraftItem has 502 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ReplyDraftItem = props => {
  const {
    draft,
    drafts,
    cannotReply,

    Function FileField has 501 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const FileField = props => {
      const {
        errorSchema,
        formContext,
        formData = [],
    Severity: Major
    Found in src/applications/appeals/shared/components/FileField.jsx - About 2 days to fix

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

      const mapStateToProps = (state, ownProps) => {
        const supplies = state.form?.data?.supplies;
        const batterySupplies = supplies
          ?.filter(battery => battery.productGroup?.includes('Battery'))
          .filter(battery => moment().diff(battery.nextAvailabilityDate) >= 0);
      src/applications/health-care-supply-reordering/components/ReviewPageSupplies.jsx on lines 162..199

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

      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

      const mapStateToProps = (state, ownProps) => {
        const supplies = state.form?.data?.supplies;
        const batterySupplies = supplies
          ?.filter(battery => battery.productGroup?.includes('Battery'))
          .filter(battery => moment().diff(battery.nextAvailabilityDate) >= 0);
      src/applications/disability-benefits/2346/components/ReviewPageSupplies.jsx on lines 162..199

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

      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

      const UpgradeFailed = () => {
        const content = {
          heading: 'We couldn’t upgrade your My HealtheVet account',
          alertText: (
            <>
      src/applications/static-pages/cta-widget/components/messages/RegisterFailed.jsx on lines 5..76

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

      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

      const RegisterFailed = () => {
        const content = {
          heading: 'We couldn’t create a MyHealtheVet account for you',
          alertText: (
            <>
      src/applications/static-pages/cta-widget/components/messages/UpgradeFailed.jsx on lines 5..77

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

      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

              ...arrayBuilderPages(veteranMarriageHistoryOptions, pageBuilder => ({
                veteranMarriageHistorySummary: pageBuilder.summaryPage({
                  title:
                    'Information needed to add your spouse: Former spouse information',
                  path: 'veteran-marriage-history',
      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 322..391

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

      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

              ...arrayBuilderPages(spouseMarriageHistoryOptions, pageBuilder => ({
                spouseMarriageHistorySummary: pageBuilder.summaryPage({
                  title:
                    'Information needed to add your spouse: Former spouse information',
                  path: 'current-spouse-marriage-history',
      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 393..460

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

      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

            items: {
              ...titleUI(({ formData }) => createCauseFollowUpTitles(formData)),
              primaryDescription: textareaUI({
                title:
                  'Briefly describe the injury or exposure that caused your condition. For example, I operated loud machinery while in the service, and this caused me to lose my hearing.',
      src/applications/user-testing/new-conditions/pages/conditionByConditionPages/causeFollowUp.js on lines 58..125

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

      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

        uiSchema: {
          ...arrayBuilderItemSubsequentPageTitleUI(({ formData }) =>
            createCauseFollowUpTitles(formData),
          ),
          primaryDescription: textareaUI({
      src/applications/user-testing/new-conditions/pages/followUpCauseDescription.js on lines 39..105

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

      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

      Function getDebtDetailsCardContent has 488 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const getDebtDetailsCardContent = (debt, dateOfLetter, amountDue) => {
        const endDateText = endDate(dateOfLetter, debt.diaryCode);
      
        switch (debt.diaryCode) {
          case '71':

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

        export default {
          uiSchema: {
            'ui:title': ' ',
            'ui:options': {
              forceDivWrapper: true,
        src/applications/appeals/996/pages/informalConferenceRep.js on lines 24..111

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 425.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

        export default {
          uiSchema: {
            'ui:title': ' ',
            'ui:options': {
              forceDivWrapper: true,
        Severity: Major
        Found in src/applications/appeals/996/pages/informalConferenceRep.js and 1 other location - About 2 days to fix
        src/applications/appeals/testing/hlr/pages/informalConferenceRep.js on lines 24..111

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 425.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Severity
        Category
        Status
        Source
        Language