department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,805 of 12,805 total issues

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

const familyMembersLocationOfResidencePage = {
  uiSchema: {
    ...titleUI(CHAPTER_3.FAMILY_MEMBERS_LOCATION_OF_RESIDENCE.TITLE),
    familyMembersLocationOfResidence: selectUI({
      title: CHAPTER_3.FAMILY_MEMBERS_LOCATION_OF_RESIDENCE.QUESTION_1,
src/applications/ask-va/config/chapters/personalInformation/veteransLocationOfResidence.js on lines 8..28

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

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 veteransLocationOfResidencePage = {
  uiSchema: {
    ...titleUI(CHAPTER_3.VETERAN_LOCATION_OF_RESIDENCE.TITLE),
    veteransLocationOfResidence: selectUI({
      title: CHAPTER_3.VETERAN_LOCATION_OF_RESIDENCE.QUESTION_1,
src/applications/ask-va/config/chapters/personalInformation/familyMembersLocationOfResidence.js on lines 8..28

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

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

  return showCoe ? (
    <article
      id="form-26-1880"
      data-location={`${location?.pathname?.slice(1)}`}
    >
src/applications/lgy/coe/form/containers/App.jsx on lines 45..61

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

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

  return showCoe ? (
    <article
      id="form-26-1880"
      data-location={`${location?.pathname?.slice(1)}`}
    >
Severity: Major
Found in src/applications/lgy/coe/form/containers/App.jsx and 1 other location - About 4 hrs to fix
src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskRed/form/containers/App.jsx on lines 45..61

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

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 const maskBankInformation = (string, unmaskedLength) => {
  // If no string is given, tell the screen reader users the account or routing number is blank
  if (!string) {
    return srSubstitute('', 'is blank');
  }
Severity: Major
Found in src/applications/edu-benefits/0994/utils.jsx and 1 other location - About 4 hrs to fix
src/applications/disability-benefits/all-claims/components/PaymentView.jsx on lines 14..31

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

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

  return (
    <div className={errorMessage ? 'usa-input-error' : ''}>
      <fieldset>
        <div className={checkBoxStyleGrid}>
          <span id={`${inputId}-legend`} className="gibct-legend">
Severity: Major
Found in src/applications/gi/components/CheckboxGroup.jsx and 1 other location - About 4 hrs to fix
src/applications/gi/components/VaCheckboxGroupGi.jsx on lines 71..82

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

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 mask = (string, unmaskedLength) => {
  // If no string is given, tell the screen reader users the account or routing number is blank
  if (!string) {
    return srSubstitute('', 'is blank');
  }
src/applications/edu-benefits/0994/utils.jsx on lines 17..34

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

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

      describe('Day-of check-in ineligible appointment', () => {
        it('Renders the check-in button and no message', () => {
          const { getByTestId, queryByTestId } = render(
            <CheckInProvider
              store={dayOfCheckInStore}
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 593..606

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

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

      describe('Day-of check-in eligible appointment', () => {
        it('Renders the check-in button and no message', () => {
          const { getByTestId, queryByTestId } = render(
            <CheckInProvider
              store={dayOfCheckInStore}
src/applications/check-in/components/pages/AppointmentDetails/AppointmentDetails.unit.spec.jsx on lines 607..620

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

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 RequiredLoginView has 109 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const RequiredLoginView = props => {
  const { user, verify, useSiS, showProfileErrorMessage = false } = props;

  const shouldSignIn = useCallback(() => !user.login.currentlyLoggedIn, [
    user.login.currentlyLoggedIn,
Severity: Major
Found in src/platform/user/authorization/components/RequiredLoginView.jsx - About 4 hrs to fix

    Function getUiSchema has 109 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const getUiSchema = () => {
      return {
        'view:livesOnMilitaryBase': {
          'ui:title': 'I live on a United States military base outside of the U.S.',
          'ui:webComponentField': VaCheckboxField,

      File index.jsx has 348 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import React, { useEffect } from 'react';
      import { connect, useDispatch, useSelector } from 'react-redux';
      import { useHistory } from 'react-router-dom';
      import SchemaForm from '@department-of-veterans-affairs/platform-forms-system/SchemaForm';
      import { usePrevious } from '@department-of-veterans-affairs/platform-utilities/exports';

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

          if (profile?.userFullName?.first && profile?.userFullName?.last) {
            firstName = profile.userFullName.first;
            middleName = profile.userFullName.middle;
            lastName = profile.userFullName.last;
            // suffix = ???
        Severity: Major
        Found in src/applications/toe/helpers.jsx and 6 other locations - About 4 hrs to fix
        src/applications/my-education-benefits/helpers.js on lines 263..273
        src/applications/my-education-benefits/helpers.js on lines 392..402
        src/applications/my-education-benefits/helpers.js on lines 528..538
        src/applications/my-education-benefits/helpers.js on lines 673..683
        src/applications/survivor-dependent-education-benefit/22-5490/helpers.jsx on lines 105..115
        src/applications/toe/helpers.jsx on lines 240..250

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

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

          if (profile?.userFullName?.first && profile?.userFullName?.last) {
            firstName = profile.userFullName.first;
            middleName = profile.userFullName.middle;
            lastName = profile.userFullName.last;
            // suffix = ???
        Severity: Major
        Found in src/applications/toe/helpers.jsx and 6 other locations - About 4 hrs to fix
        src/applications/my-education-benefits/helpers.js on lines 263..273
        src/applications/my-education-benefits/helpers.js on lines 392..402
        src/applications/my-education-benefits/helpers.js on lines 528..538
        src/applications/my-education-benefits/helpers.js on lines 673..683
        src/applications/survivor-dependent-education-benefit/22-5490/helpers.jsx on lines 105..115
        src/applications/toe/helpers.jsx on lines 115..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 122.

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

          if (profile?.userFullName?.first && profile?.userFullName?.last) {
            firstName = profile.userFullName.first;
            middleName = profile.userFullName.middle;
            lastName = profile.userFullName.last;
            // suffix = ???
        Severity: Major
        Found in src/applications/my-education-benefits/helpers.js and 6 other locations - About 4 hrs to fix
        src/applications/my-education-benefits/helpers.js on lines 263..273
        src/applications/my-education-benefits/helpers.js on lines 392..402
        src/applications/my-education-benefits/helpers.js on lines 673..683
        src/applications/survivor-dependent-education-benefit/22-5490/helpers.jsx on lines 105..115
        src/applications/toe/helpers.jsx on lines 115..125
        src/applications/toe/helpers.jsx on lines 240..250

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

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

          if (profile?.userFullName?.first && profile?.userFullName?.last) {
            firstName = profile.userFullName.first;
            middleName = profile.userFullName.middle;
            lastName = profile.userFullName.last;
            // suffix = ???
        Severity: Major
        Found in src/applications/my-education-benefits/helpers.js and 6 other locations - About 4 hrs to fix
        src/applications/my-education-benefits/helpers.js on lines 263..273
        src/applications/my-education-benefits/helpers.js on lines 528..538
        src/applications/my-education-benefits/helpers.js on lines 673..683
        src/applications/survivor-dependent-education-benefit/22-5490/helpers.jsx on lines 105..115
        src/applications/toe/helpers.jsx on lines 115..125
        src/applications/toe/helpers.jsx on lines 240..250

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

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

          if (profile?.userFullName?.first && profile?.userFullName?.last) {
            firstName = profile.userFullName.first;
            middleName = profile.userFullName.middle;
            lastName = profile.userFullName.last;
            // suffix = ???
        Severity: Major
        Found in src/applications/my-education-benefits/helpers.js and 6 other locations - About 4 hrs to fix
        src/applications/my-education-benefits/helpers.js on lines 263..273
        src/applications/my-education-benefits/helpers.js on lines 392..402
        src/applications/my-education-benefits/helpers.js on lines 528..538
        src/applications/survivor-dependent-education-benefit/22-5490/helpers.jsx on lines 105..115
        src/applications/toe/helpers.jsx on lines 115..125
        src/applications/toe/helpers.jsx on lines 240..250

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

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

          if (profile?.userFullName?.first && profile?.userFullName?.last) {
            firstName = profile.userFullName.first;
            middleName = profile.userFullName.middle;
            lastName = profile.userFullName.last;
            // suffix = ???
        Severity: Major
        Found in src/applications/my-education-benefits/helpers.js and 6 other locations - About 4 hrs to fix
        src/applications/my-education-benefits/helpers.js on lines 392..402
        src/applications/my-education-benefits/helpers.js on lines 528..538
        src/applications/my-education-benefits/helpers.js on lines 673..683
        src/applications/survivor-dependent-education-benefit/22-5490/helpers.jsx on lines 105..115
        src/applications/toe/helpers.jsx on lines 115..125
        src/applications/toe/helpers.jsx on lines 240..250

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

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

          if (profile?.userFullName?.first && profile?.userFullName?.last) {
            firstName = profile.userFullName.first;
            middleName = profile.userFullName.middle;
            lastName = profile.userFullName.last;
            // suffix = ???
        src/applications/my-education-benefits/helpers.js on lines 263..273
        src/applications/my-education-benefits/helpers.js on lines 392..402
        src/applications/my-education-benefits/helpers.js on lines 528..538
        src/applications/my-education-benefits/helpers.js on lines 673..683
        src/applications/toe/helpers.jsx on lines 115..125
        src/applications/toe/helpers.jsx on lines 240..250

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

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

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

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

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

        Refactorings

        Further Reading

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

            {
              resource: {
                code: {
                  coding: [
                    {
        Severity: Major
        Found in src/platform/mhv/api/mocks/medical-records/vitals/index.js and 5 other locations - About 4 hrs to fix
        src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 659..696
        src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 1425..1462
        src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 1808..1845
        src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 2191..2228
        src/platform/mhv/api/mocks/medical-records/vitals/index.js on lines 2574..2611

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

        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