department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,811 of 12,811 total issues

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

  if (suffix) {
    newData[formFields.viewUserFullName].userFullName.suffix =
      state?.form?.pages?.applicantInformation?.schema?.properties[
        formFields.viewUserFullName
      ]?.properties?.userFullName?.properties?.suffix?.enum?.find(e =>
Severity: Major
Found in src/applications/my-education-benefits/helpers.js and 5 other locations - About 3 hrs to fix
src/applications/my-education-benefits/helpers.js on lines 490..497
src/applications/my-education-benefits/helpers.js on lines 639..646
src/applications/my-education-benefits/helpers.js on lines 777..784
src/applications/toe/helpers.jsx on lines 209..216
src/applications/toe/helpers.jsx on lines 339..346

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

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

  if (suffix) {
    newData[formFields.viewUserFullName].userFullName.suffix =
      state?.form?.pages?.applicantInformation?.schema?.properties[
        formFields.viewUserFullName
      ]?.properties?.userFullName?.properties?.suffix?.enum?.find(e =>
Severity: Major
Found in src/applications/my-education-benefits/helpers.js and 5 other locations - About 3 hrs to fix
src/applications/my-education-benefits/helpers.js on lines 360..367
src/applications/my-education-benefits/helpers.js on lines 639..646
src/applications/my-education-benefits/helpers.js on lines 777..784
src/applications/toe/helpers.jsx on lines 209..216
src/applications/toe/helpers.jsx on lines 339..346

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

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

  if (suffix) {
    newData[formFields.viewUserFullName].userFullName.suffix =
      state?.form?.pages?.applicantInformation?.schema?.properties[
        formFields.viewUserFullName
      ]?.properties?.userFullName?.properties?.suffix?.enum?.find(e =>
Severity: Major
Found in src/applications/my-education-benefits/helpers.js and 5 other locations - About 3 hrs to fix
src/applications/my-education-benefits/helpers.js on lines 360..367
src/applications/my-education-benefits/helpers.js on lines 490..497
src/applications/my-education-benefits/helpers.js on lines 777..784
src/applications/toe/helpers.jsx on lines 209..216
src/applications/toe/helpers.jsx on lines 339..346

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

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

  if (suffix) {
    newData[formFields.viewUserFullName].userFullName.suffix =
      state?.form?.pages?.applicantInformation?.schema?.properties[
        formFields.viewUserFullName
      ]?.properties?.userFullName?.properties?.suffix?.enum?.find(e =>
Severity: Major
Found in src/applications/toe/helpers.jsx and 5 other locations - About 3 hrs to fix
src/applications/my-education-benefits/helpers.js on lines 360..367
src/applications/my-education-benefits/helpers.js on lines 490..497
src/applications/my-education-benefits/helpers.js on lines 639..646
src/applications/my-education-benefits/helpers.js on lines 777..784
src/applications/toe/helpers.jsx on lines 209..216

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

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

  if (suffix) {
    newData[formFields.viewUserFullName].userFullName.suffix =
      state?.form?.pages?.applicantInformation?.schema?.properties[
        formFields.viewUserFullName
      ]?.properties?.userFullName?.properties?.suffix?.enum?.find(e =>
Severity: Major
Found in src/applications/toe/helpers.jsx and 5 other locations - About 3 hrs to fix
src/applications/my-education-benefits/helpers.js on lines 360..367
src/applications/my-education-benefits/helpers.js on lines 490..497
src/applications/my-education-benefits/helpers.js on lines 639..646
src/applications/my-education-benefits/helpers.js on lines 777..784
src/applications/toe/helpers.jsx on lines 339..346

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

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

          {
            resourceType: 'Observation',
            id: '12391',
            basedOn: [
              {
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 151..181
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 182..212
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 213..243
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 280..310
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 311..341
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 644..674
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 675..705
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 706..736
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 737..767
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 804..834
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2528..2558
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2590..2620
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2657..2687
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2760..2790

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

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

          {
            resourceType: 'Observation',
            id: '12397',
            basedOn: [
              {
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 151..181
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 182..212
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 213..243
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 280..310
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 311..341
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 644..674
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 675..705
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 706..736
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 737..767
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 804..834
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2528..2558
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2559..2589
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2590..2620
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2657..2687

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

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

          {
            resourceType: 'Observation',
            id: '12353',
            basedOn: [
              {
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 151..181
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 182..212
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 213..243
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 280..310
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 311..341
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 644..674
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 675..705
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 706..736
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 804..834
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2528..2558
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2559..2589
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2590..2620
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2657..2687
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2760..2790

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

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

          {
            resourceType: 'Observation',
            id: '12344',
            basedOn: [
              {
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 151..181
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 182..212
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 213..243
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 311..341
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 644..674
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 675..705
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 706..736
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 737..767
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 804..834
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2528..2558
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2559..2589
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2590..2620
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2657..2687
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2760..2790

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

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

          {
            resourceType: 'Observation',
            id: '12351',
            basedOn: [
              {
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 151..181
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 182..212
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 213..243
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 280..310
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 311..341
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 644..674
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 706..736
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 737..767
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 804..834
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2528..2558
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2559..2589
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2590..2620
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2657..2687
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2760..2790

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

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

          {
            resourceType: 'Observation',
            id: '12392',
            basedOn: [
              {
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 151..181
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 182..212
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 213..243
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 280..310
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 311..341
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 644..674
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 675..705
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 706..736
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 737..767
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 804..834
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2528..2558
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2559..2589
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2657..2687
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2760..2790

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

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

          {
            resourceType: 'Observation',
            id: '12394',
            basedOn: [
              {
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 151..181
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 182..212
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 213..243
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 280..310
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 311..341
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 644..674
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 675..705
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 706..736
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 737..767
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 804..834
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2528..2558
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2559..2589
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2590..2620
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2760..2790

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

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

          {
            resourceType: 'Observation',
            id: '12352',
            basedOn: [
              {
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 151..181
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 182..212
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 213..243
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 280..310
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 311..341
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 644..674
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 675..705
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 737..767
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 804..834
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2528..2558
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2559..2589
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2590..2620
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2657..2687
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2760..2790

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

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

function formatDateString(dateString) {
  const dateObj = new Date(dateString);
  const year = dateObj.getUTCFullYear();
  const month = dateObj.toLocaleString('en-US', {
    month: 'long',
src/applications/my-education-benefits/components/ApplicantIdentityView.jsx on lines 14..23
src/applications/my-education-benefits/components/ApplicantInformationReviewPage.jsx on lines 14..23
src/applications/toe/components/ApplicantIdentityView.jsx on lines 14..23

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

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

          {
            resourceType: 'Observation',
            id: '12345',
            basedOn: [
              {
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 151..181
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 182..212
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 213..243
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 280..310
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 644..674
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 675..705
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 706..736
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 737..767
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 804..834
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2528..2558
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2559..2589
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2590..2620
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2657..2687
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2760..2790

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

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

function formatDateString(dateString) {
  const dateObj = new Date(dateString);
  const year = dateObj.getUTCFullYear();
  const month = dateObj.toLocaleString('en-US', {
    month: 'long',
src/applications/my-education-benefits/components/ApplicantInformationReviewPage.jsx on lines 14..23
src/applications/toe/components/ApplicantIdentityView.jsx on lines 14..23
src/applications/toe/components/ApplicantInformationReviewPage.jsx on lines 13..22

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

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

          {
            resourceType: 'Observation',
            id: '12350',
            basedOn: [
              {
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 151..181
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 182..212
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 213..243
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 280..310
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 311..341
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 675..705
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 706..736
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 737..767
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 804..834
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2528..2558
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2559..2589
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2590..2620
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2657..2687
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2760..2790

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

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

          {
            resourceType: 'Observation',
            id: '12355',
            basedOn: [
              {
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 151..181
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 182..212
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 213..243
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 280..310
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 311..341
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 644..674
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 675..705
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 706..736
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 737..767
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2528..2558
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2559..2589
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2590..2620
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2657..2687
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2760..2790

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

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

          {
            resourceType: 'Observation',
            id: '12390',
            basedOn: [
              {
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 151..181
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 182..212
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 213..243
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 280..310
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 311..341
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 644..674
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 675..705
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 706..736
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 737..767
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 804..834
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2559..2589
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2590..2620
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2657..2687
src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 2760..2790

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

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

function formatDateString(dateString) {
  const dateObj = new Date(dateString);
  const year = dateObj.getUTCFullYear();
  const month = dateObj.toLocaleString('en-US', {
    month: 'long',
Severity: Major
Found in src/applications/toe/components/ApplicantIdentityView.jsx and 3 other locations - About 3 hrs to fix
src/applications/my-education-benefits/components/ApplicantIdentityView.jsx on lines 14..23
src/applications/my-education-benefits/components/ApplicantInformationReviewPage.jsx on lines 14..23
src/applications/toe/components/ApplicantInformationReviewPage.jsx on lines 13..22

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

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