department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,839 of 12,839 total issues

Function mockGetRefreshStatus has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const mockGetRefreshStatus = () => {
  switch (scenario) {
    case 1: {
      return mockStatusResponse(0, 80, 70, 70); // STALE
    }
Severity: Minor
Found in src/applications/mhv-medical-records/util/testHelper.js - About 1 hr to fix

    Function getLabsAndTestsList has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const getLabsAndTestsList = (isCurrent = false) => async dispatch => {
      dispatch({
        type: Actions.LabsAndTests.UPDATE_LIST_STATE,
        payload: Constants.loadStates.FETCHING,
      });
    Severity: Minor
    Found in src/applications/mhv-medical-records/actions/labsAndTests.js - About 1 hr to fix

      Function dropdownContent has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              const dropdownContent = () => {
                return (
                  <>
                    <p
                      className="vads-u-padding-bottom--1"

        Function content has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          const content = () => {
            return (
              <>
                {page ? (
                  <PrintOnlyPage

          Function prefillPersonalInformation has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            const prefillPersonalInformation = data => {
              const newData = _.omit(['personalInformation'], data);
              const { personalInformation } = data;
          
              if (personalInformation) {
          Severity: Minor
          Found in src/applications/representative-appoint/prefill-transformer.js - About 1 hr to fix

            Function getServiceAvailability has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function getServiceAvailability() {
              return dispatch => {
                dispatch({
                  type: SET_SERVICE_AVAILABILITY,
                  serviceAvailability: SERVICE_AVAILABILITY_STATES.pending,
            Severity: Minor
            Found in src/applications/post-911-gib-status/actions/post-911-gib-status.js - About 1 hr to fix

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

              function isMilitaryCity(city = '') {
                const lowerCity = city.toLowerCase().trim();
              
                return lowerCity === 'apo' || lowerCity === 'fpo' || lowerCity === 'dpo';
              }
              Severity: Major
              Found in src/platform/forms/definitions/address.js and 7 other locations - About 1 hr to fix
              src/applications/ask-a-question/form/contactInformation/address/address.js on lines 128..132
              src/applications/ask-va/config/schema-helpers/addressHelper.js on lines 33..37
              src/applications/pre-need-integration/definitions/address.js on lines 102..106
              src/applications/pre-need/definitions/address.js on lines 89..93
              src/applications/simple-forms/shared/definitions/pdfAddress.js on lines 78..82
              src/applications/vaos/new-appointment/fields/addressFields.js on lines 39..43
              src/platform/forms-system/src/js/definitions/address.js on lines 75..79

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

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

              ListItem.propTypes = {
                downloadLinkLabel: PropTypes.string,
                downloadUrl: PropTypes.string,
                fileName: PropTypes.string,
                sentDate: PropTypes.string,
              src/applications/ask-va/components/YourPersonalInformationAuthenticated.jsx on lines 80..86
              src/applications/ask-va/containers/SubTopicSelectPage.jsx on lines 115..121
              src/applications/ask-va/containers/TopicSelectPage.jsx on lines 147..153
              src/applications/caregivers/components/FormFields/FacilitySearch.jsx on lines 311..317
              src/applications/caregivers/components/FormFields/VaMedicalCenter.jsx on lines 126..132
              src/applications/claims-status/components/claim-status-tab/WhatWeAreDoing.jsx on lines 86..92
              src/applications/combined-debt-portal/medical-copays/components/BalanceCard.jsx on lines 103..109
              src/applications/disability-benefits/view-payments/components/view-payments-lists/ViewPaymentsLists.jsx on lines 226..232
              src/applications/ezr/components/PreSubmitNotice/index.jsx on lines 54..60
              src/applications/facility-locator/components/SearchResultMessage.jsx on lines 61..67
              src/applications/facility-locator/containers/FacilityDetail.jsx on lines 158..164
              src/applications/financial-status-report/components/household/DependentAges.jsx on lines 230..236
              src/applications/financial-status-report/components/resolution/ResolutionOptions.jsx on lines 163..169
              src/applications/gi/containers/search/FilterByLocation.jsx on lines 144..150
              src/applications/hca/components/FormFields/DemographicViewField.jsx on lines 36..42
              src/applications/hca/components/FormPages/DependentInformation.jsx on lines 217..223
              src/applications/hca/components/FormPages/VeteranInformation.jsx on lines 39..45
              src/applications/hca/components/PreSubmitNotice/index.jsx on lines 120..126
              src/applications/ivc-champva/10-10D/pages/SupportingDocumentsPage.jsx on lines 27..33
              src/applications/ivc-champva/10-7959C/components/SupportingDocumentsPage.jsx on lines 32..38
              src/applications/ivc-champva/shared/components/applicantLists/ApplicantRelationshipPage.jsx on lines 310..316
              src/applications/lgy/coe/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/mhv-medical-records/components/shared/DateSubheading.jsx on lines 26..32
              src/applications/mhv-secure-messaging/components/ComposeForm/ElectronicSignature.jsx on lines 49..55
              src/applications/mhv-secure-messaging/components/FacilityCheckboxGroup.jsx on lines 75..81
              src/applications/mhv-secure-messaging/components/MessageThread/MessageThreadItem.jsx on lines 166..172
              src/applications/mhv-secure-messaging/components/Modals/RemoveAttachmentModal.jsx on lines 74..80
              src/applications/mhv-secure-messaging/components/Search/SearchForm.jsx on lines 351..357
              src/applications/my-education-benefits/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/personalization/view-dependents/components/ViewDependentsList/ViewDependentsList.jsx on lines 73..79
              src/applications/representative-appoint/containers/App.jsx on lines 63..69
              src/applications/survivor-dependent-education-benefit/22-5490/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/toe/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/vaos/components/VAOSApp/DowntimeMessage.jsx on lines 95..101
              src/applications/vaos/new-appointment/components/VAFacilityPage/FacilitiesRadioWidget.jsx on lines 197..203
              src/applications/verify-your-enrollment/components/CurrentBenefitsStatus.jsx on lines 47..53
              src/applications/verify-your-enrollment/components/PageLink.jsx on lines 29..35
              src/applications/verify-your-enrollment/components/PeriodsToVerify.jsx on lines 113..119
              src/applications/verify/components/verifyButton.jsx on lines 40..46
              src/platform/forms-system/src/js/components/BackLink.jsx on lines 99..105
              src/platform/forms-system/src/js/components/ContactInfoReview.jsx on lines 300..306
              src/platform/forms-system/src/js/components/EditContactInfo.jsx on lines 90..96
              src/platform/forms-system/src/js/review/submit-states/ThrottledError.jsx on lines 57..63
              src/platform/forms-system/src/js/review/submit-states/ValidationError.jsx on lines 64..70
              src/platform/forms/components/common/alerts/ErrorMessage.jsx on lines 30..36
              src/platform/site-wide/loading-button/LoadingButton.jsx on lines 35..41
              src/applications/vaos/appointment-list/components/PageLayout.jsx on lines 40..46
              src/applications/vaos/components/AddToCalendar.jsx on lines 76..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 57.

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

              PreSubmitNotice.propTypes = {
                formData: PropTypes.object,
                preSubmitInfo: PropTypes.object,
                showError: PropTypes.bool,
                submission: PropTypes.object,
              Severity: Major
              Found in src/applications/hca/components/PreSubmitNotice/index.jsx and 48 other locations - About 1 hr to fix
              src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskRed/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/ask-va/components/YourPersonalInformationAuthenticated.jsx on lines 80..86
              src/applications/ask-va/containers/SubTopicSelectPage.jsx on lines 115..121
              src/applications/ask-va/containers/TopicSelectPage.jsx on lines 147..153
              src/applications/caregivers/components/FormFields/FacilitySearch.jsx on lines 311..317
              src/applications/caregivers/components/FormFields/VaMedicalCenter.jsx on lines 126..132
              src/applications/claims-status/components/claim-status-tab/WhatWeAreDoing.jsx on lines 86..92
              src/applications/combined-debt-portal/medical-copays/components/BalanceCard.jsx on lines 103..109
              src/applications/disability-benefits/view-payments/components/view-payments-lists/ViewPaymentsLists.jsx on lines 226..232
              src/applications/ezr/components/PreSubmitNotice/index.jsx on lines 54..60
              src/applications/facility-locator/components/SearchResultMessage.jsx on lines 61..67
              src/applications/facility-locator/containers/FacilityDetail.jsx on lines 158..164
              src/applications/financial-status-report/components/household/DependentAges.jsx on lines 230..236
              src/applications/financial-status-report/components/resolution/ResolutionOptions.jsx on lines 163..169
              src/applications/gi/containers/search/FilterByLocation.jsx on lines 144..150
              src/applications/hca/components/FormFields/DemographicViewField.jsx on lines 36..42
              src/applications/hca/components/FormPages/DependentInformation.jsx on lines 217..223
              src/applications/hca/components/FormPages/VeteranInformation.jsx on lines 39..45
              src/applications/ivc-champva/10-10D/pages/SupportingDocumentsPage.jsx on lines 27..33
              src/applications/ivc-champva/10-7959C/components/SupportingDocumentsPage.jsx on lines 32..38
              src/applications/ivc-champva/shared/components/applicantLists/ApplicantRelationshipPage.jsx on lines 310..316
              src/applications/lgy/coe/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/mhv-medical-records/components/shared/DateSubheading.jsx on lines 26..32
              src/applications/mhv-secure-messaging/components/ComposeForm/ElectronicSignature.jsx on lines 49..55
              src/applications/mhv-secure-messaging/components/FacilityCheckboxGroup.jsx on lines 75..81
              src/applications/mhv-secure-messaging/components/MessageThread/MessageThreadItem.jsx on lines 166..172
              src/applications/mhv-secure-messaging/components/Modals/RemoveAttachmentModal.jsx on lines 74..80
              src/applications/mhv-secure-messaging/components/Search/SearchForm.jsx on lines 351..357
              src/applications/my-education-benefits/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/personalization/view-dependents/components/ViewDependentsList/ViewDependentsList.jsx on lines 73..79
              src/applications/representative-appoint/containers/App.jsx on lines 63..69
              src/applications/survivor-dependent-education-benefit/22-5490/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/toe/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/vaos/components/VAOSApp/DowntimeMessage.jsx on lines 95..101
              src/applications/vaos/new-appointment/components/VAFacilityPage/FacilitiesRadioWidget.jsx on lines 197..203
              src/applications/verify-your-enrollment/components/CurrentBenefitsStatus.jsx on lines 47..53
              src/applications/verify-your-enrollment/components/PageLink.jsx on lines 29..35
              src/applications/verify-your-enrollment/components/PeriodsToVerify.jsx on lines 113..119
              src/applications/verify/components/verifyButton.jsx on lines 40..46
              src/platform/forms-system/src/js/components/BackLink.jsx on lines 99..105
              src/platform/forms-system/src/js/components/ContactInfoReview.jsx on lines 300..306
              src/platform/forms-system/src/js/components/EditContactInfo.jsx on lines 90..96
              src/platform/forms-system/src/js/review/submit-states/ThrottledError.jsx on lines 57..63
              src/platform/forms-system/src/js/review/submit-states/ValidationError.jsx on lines 64..70
              src/platform/forms/components/common/alerts/ErrorMessage.jsx on lines 30..36
              src/platform/site-wide/loading-button/LoadingButton.jsx on lines 35..41
              src/applications/vaos/appointment-list/components/PageLayout.jsx on lines 40..46
              src/applications/vaos/components/AddToCalendar.jsx on lines 76..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 57.

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

              DuplicateContactInfoModal.propTypes = {
                duplicateEmail: PropTypes.array,
                duplicatePhone: PropTypes.array,
                toggleModal: PropTypes.func,
                openModal: PropTypes.bool,
              src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskRed/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/ask-va/components/YourPersonalInformationAuthenticated.jsx on lines 80..86
              src/applications/ask-va/containers/SubTopicSelectPage.jsx on lines 115..121
              src/applications/ask-va/containers/TopicSelectPage.jsx on lines 147..153
              src/applications/caregivers/components/FormFields/FacilitySearch.jsx on lines 311..317
              src/applications/caregivers/components/FormFields/VaMedicalCenter.jsx on lines 126..132
              src/applications/claims-status/components/claim-status-tab/WhatWeAreDoing.jsx on lines 86..92
              src/applications/combined-debt-portal/medical-copays/components/BalanceCard.jsx on lines 103..109
              src/applications/disability-benefits/view-payments/components/view-payments-lists/ViewPaymentsLists.jsx on lines 226..232
              src/applications/ezr/components/PreSubmitNotice/index.jsx on lines 54..60
              src/applications/facility-locator/components/SearchResultMessage.jsx on lines 61..67
              src/applications/facility-locator/containers/FacilityDetail.jsx on lines 158..164
              src/applications/financial-status-report/components/household/DependentAges.jsx on lines 230..236
              src/applications/financial-status-report/components/resolution/ResolutionOptions.jsx on lines 163..169
              src/applications/gi/containers/search/FilterByLocation.jsx on lines 144..150
              src/applications/hca/components/FormFields/DemographicViewField.jsx on lines 36..42
              src/applications/hca/components/FormPages/DependentInformation.jsx on lines 217..223
              src/applications/hca/components/FormPages/VeteranInformation.jsx on lines 39..45
              src/applications/hca/components/PreSubmitNotice/index.jsx on lines 120..126
              src/applications/ivc-champva/10-10D/pages/SupportingDocumentsPage.jsx on lines 27..33
              src/applications/ivc-champva/10-7959C/components/SupportingDocumentsPage.jsx on lines 32..38
              src/applications/ivc-champva/shared/components/applicantLists/ApplicantRelationshipPage.jsx on lines 310..316
              src/applications/lgy/coe/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/mhv-medical-records/components/shared/DateSubheading.jsx on lines 26..32
              src/applications/mhv-secure-messaging/components/ComposeForm/ElectronicSignature.jsx on lines 49..55
              src/applications/mhv-secure-messaging/components/FacilityCheckboxGroup.jsx on lines 75..81
              src/applications/mhv-secure-messaging/components/MessageThread/MessageThreadItem.jsx on lines 166..172
              src/applications/mhv-secure-messaging/components/Modals/RemoveAttachmentModal.jsx on lines 74..80
              src/applications/mhv-secure-messaging/components/Search/SearchForm.jsx on lines 351..357
              src/applications/my-education-benefits/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/personalization/view-dependents/components/ViewDependentsList/ViewDependentsList.jsx on lines 73..79
              src/applications/representative-appoint/containers/App.jsx on lines 63..69
              src/applications/survivor-dependent-education-benefit/22-5490/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/vaos/components/VAOSApp/DowntimeMessage.jsx on lines 95..101
              src/applications/vaos/new-appointment/components/VAFacilityPage/FacilitiesRadioWidget.jsx on lines 197..203
              src/applications/verify-your-enrollment/components/CurrentBenefitsStatus.jsx on lines 47..53
              src/applications/verify-your-enrollment/components/PageLink.jsx on lines 29..35
              src/applications/verify-your-enrollment/components/PeriodsToVerify.jsx on lines 113..119
              src/applications/verify/components/verifyButton.jsx on lines 40..46
              src/platform/forms-system/src/js/components/BackLink.jsx on lines 99..105
              src/platform/forms-system/src/js/components/ContactInfoReview.jsx on lines 300..306
              src/platform/forms-system/src/js/components/EditContactInfo.jsx on lines 90..96
              src/platform/forms-system/src/js/review/submit-states/ThrottledError.jsx on lines 57..63
              src/platform/forms-system/src/js/review/submit-states/ValidationError.jsx on lines 64..70
              src/platform/forms/components/common/alerts/ErrorMessage.jsx on lines 30..36
              src/platform/site-wide/loading-button/LoadingButton.jsx on lines 35..41
              src/applications/vaos/appointment-list/components/PageLayout.jsx on lines 40..46
              src/applications/vaos/components/AddToCalendar.jsx on lines 76..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 57.

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

              VaMedicalCenter.propTypes = {
                formContext: PropTypes.object,
                id: PropTypes.string,
                value: PropTypes.string,
                veteranFacilityState: PropTypes.string,
              src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskRed/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/ask-va/components/YourPersonalInformationAuthenticated.jsx on lines 80..86
              src/applications/ask-va/containers/SubTopicSelectPage.jsx on lines 115..121
              src/applications/ask-va/containers/TopicSelectPage.jsx on lines 147..153
              src/applications/caregivers/components/FormFields/FacilitySearch.jsx on lines 311..317
              src/applications/claims-status/components/claim-status-tab/WhatWeAreDoing.jsx on lines 86..92
              src/applications/combined-debt-portal/medical-copays/components/BalanceCard.jsx on lines 103..109
              src/applications/disability-benefits/view-payments/components/view-payments-lists/ViewPaymentsLists.jsx on lines 226..232
              src/applications/ezr/components/PreSubmitNotice/index.jsx on lines 54..60
              src/applications/facility-locator/components/SearchResultMessage.jsx on lines 61..67
              src/applications/facility-locator/containers/FacilityDetail.jsx on lines 158..164
              src/applications/financial-status-report/components/household/DependentAges.jsx on lines 230..236
              src/applications/financial-status-report/components/resolution/ResolutionOptions.jsx on lines 163..169
              src/applications/gi/containers/search/FilterByLocation.jsx on lines 144..150
              src/applications/hca/components/FormFields/DemographicViewField.jsx on lines 36..42
              src/applications/hca/components/FormPages/DependentInformation.jsx on lines 217..223
              src/applications/hca/components/FormPages/VeteranInformation.jsx on lines 39..45
              src/applications/hca/components/PreSubmitNotice/index.jsx on lines 120..126
              src/applications/ivc-champva/10-10D/pages/SupportingDocumentsPage.jsx on lines 27..33
              src/applications/ivc-champva/10-7959C/components/SupportingDocumentsPage.jsx on lines 32..38
              src/applications/ivc-champva/shared/components/applicantLists/ApplicantRelationshipPage.jsx on lines 310..316
              src/applications/lgy/coe/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/mhv-medical-records/components/shared/DateSubheading.jsx on lines 26..32
              src/applications/mhv-secure-messaging/components/ComposeForm/ElectronicSignature.jsx on lines 49..55
              src/applications/mhv-secure-messaging/components/FacilityCheckboxGroup.jsx on lines 75..81
              src/applications/mhv-secure-messaging/components/MessageThread/MessageThreadItem.jsx on lines 166..172
              src/applications/mhv-secure-messaging/components/Modals/RemoveAttachmentModal.jsx on lines 74..80
              src/applications/mhv-secure-messaging/components/Search/SearchForm.jsx on lines 351..357
              src/applications/my-education-benefits/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/personalization/view-dependents/components/ViewDependentsList/ViewDependentsList.jsx on lines 73..79
              src/applications/representative-appoint/containers/App.jsx on lines 63..69
              src/applications/survivor-dependent-education-benefit/22-5490/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/toe/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/vaos/components/VAOSApp/DowntimeMessage.jsx on lines 95..101
              src/applications/vaos/new-appointment/components/VAFacilityPage/FacilitiesRadioWidget.jsx on lines 197..203
              src/applications/verify-your-enrollment/components/CurrentBenefitsStatus.jsx on lines 47..53
              src/applications/verify-your-enrollment/components/PageLink.jsx on lines 29..35
              src/applications/verify-your-enrollment/components/PeriodsToVerify.jsx on lines 113..119
              src/applications/verify/components/verifyButton.jsx on lines 40..46
              src/platform/forms-system/src/js/components/BackLink.jsx on lines 99..105
              src/platform/forms-system/src/js/components/ContactInfoReview.jsx on lines 300..306
              src/platform/forms-system/src/js/components/EditContactInfo.jsx on lines 90..96
              src/platform/forms-system/src/js/review/submit-states/ThrottledError.jsx on lines 57..63
              src/platform/forms-system/src/js/review/submit-states/ValidationError.jsx on lines 64..70
              src/platform/forms/components/common/alerts/ErrorMessage.jsx on lines 30..36
              src/platform/site-wide/loading-button/LoadingButton.jsx on lines 35..41
              src/applications/vaos/appointment-list/components/PageLayout.jsx on lines 40..46
              src/applications/vaos/components/AddToCalendar.jsx on lines 76..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 57.

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

              ValidationError.propTypes = {
                appType: PropTypes.string,
                buttonText: PropTypes.string,
                formConfig: PropTypes.object,
                onBack: PropTypes.func,
              src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskRed/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/ask-va/components/YourPersonalInformationAuthenticated.jsx on lines 80..86
              src/applications/ask-va/containers/SubTopicSelectPage.jsx on lines 115..121
              src/applications/ask-va/containers/TopicSelectPage.jsx on lines 147..153
              src/applications/caregivers/components/FormFields/FacilitySearch.jsx on lines 311..317
              src/applications/caregivers/components/FormFields/VaMedicalCenter.jsx on lines 126..132
              src/applications/claims-status/components/claim-status-tab/WhatWeAreDoing.jsx on lines 86..92
              src/applications/combined-debt-portal/medical-copays/components/BalanceCard.jsx on lines 103..109
              src/applications/disability-benefits/view-payments/components/view-payments-lists/ViewPaymentsLists.jsx on lines 226..232
              src/applications/ezr/components/PreSubmitNotice/index.jsx on lines 54..60
              src/applications/facility-locator/components/SearchResultMessage.jsx on lines 61..67
              src/applications/facility-locator/containers/FacilityDetail.jsx on lines 158..164
              src/applications/financial-status-report/components/household/DependentAges.jsx on lines 230..236
              src/applications/financial-status-report/components/resolution/ResolutionOptions.jsx on lines 163..169
              src/applications/gi/containers/search/FilterByLocation.jsx on lines 144..150
              src/applications/hca/components/FormFields/DemographicViewField.jsx on lines 36..42
              src/applications/hca/components/FormPages/DependentInformation.jsx on lines 217..223
              src/applications/hca/components/FormPages/VeteranInformation.jsx on lines 39..45
              src/applications/hca/components/PreSubmitNotice/index.jsx on lines 120..126
              src/applications/ivc-champva/10-10D/pages/SupportingDocumentsPage.jsx on lines 27..33
              src/applications/ivc-champva/10-7959C/components/SupportingDocumentsPage.jsx on lines 32..38
              src/applications/ivc-champva/shared/components/applicantLists/ApplicantRelationshipPage.jsx on lines 310..316
              src/applications/lgy/coe/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/mhv-medical-records/components/shared/DateSubheading.jsx on lines 26..32
              src/applications/mhv-secure-messaging/components/ComposeForm/ElectronicSignature.jsx on lines 49..55
              src/applications/mhv-secure-messaging/components/FacilityCheckboxGroup.jsx on lines 75..81
              src/applications/mhv-secure-messaging/components/MessageThread/MessageThreadItem.jsx on lines 166..172
              src/applications/mhv-secure-messaging/components/Modals/RemoveAttachmentModal.jsx on lines 74..80
              src/applications/mhv-secure-messaging/components/Search/SearchForm.jsx on lines 351..357
              src/applications/my-education-benefits/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/personalization/view-dependents/components/ViewDependentsList/ViewDependentsList.jsx on lines 73..79
              src/applications/representative-appoint/containers/App.jsx on lines 63..69
              src/applications/survivor-dependent-education-benefit/22-5490/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/toe/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/vaos/components/VAOSApp/DowntimeMessage.jsx on lines 95..101
              src/applications/vaos/new-appointment/components/VAFacilityPage/FacilitiesRadioWidget.jsx on lines 197..203
              src/applications/verify-your-enrollment/components/CurrentBenefitsStatus.jsx on lines 47..53
              src/applications/verify-your-enrollment/components/PageLink.jsx on lines 29..35
              src/applications/verify-your-enrollment/components/PeriodsToVerify.jsx on lines 113..119
              src/applications/verify/components/verifyButton.jsx on lines 40..46
              src/platform/forms-system/src/js/components/BackLink.jsx on lines 99..105
              src/platform/forms-system/src/js/components/ContactInfoReview.jsx on lines 300..306
              src/platform/forms-system/src/js/components/EditContactInfo.jsx on lines 90..96
              src/platform/forms-system/src/js/review/submit-states/ThrottledError.jsx on lines 57..63
              src/platform/forms/components/common/alerts/ErrorMessage.jsx on lines 30..36
              src/platform/site-wide/loading-button/LoadingButton.jsx on lines 35..41
              src/applications/vaos/appointment-list/components/PageLayout.jsx on lines 40..46
              src/applications/vaos/components/AddToCalendar.jsx on lines 76..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 57.

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

              ElectronicSignature.propTypes = {
                checkboxError: PropTypes.string,
                checked: PropTypes.bool,
                nameError: PropTypes.string,
                onCheckboxCheck: PropTypes.func,
              src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskRed/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/ask-va/components/YourPersonalInformationAuthenticated.jsx on lines 80..86
              src/applications/ask-va/containers/SubTopicSelectPage.jsx on lines 115..121
              src/applications/ask-va/containers/TopicSelectPage.jsx on lines 147..153
              src/applications/caregivers/components/FormFields/FacilitySearch.jsx on lines 311..317
              src/applications/caregivers/components/FormFields/VaMedicalCenter.jsx on lines 126..132
              src/applications/claims-status/components/claim-status-tab/WhatWeAreDoing.jsx on lines 86..92
              src/applications/combined-debt-portal/medical-copays/components/BalanceCard.jsx on lines 103..109
              src/applications/disability-benefits/view-payments/components/view-payments-lists/ViewPaymentsLists.jsx on lines 226..232
              src/applications/ezr/components/PreSubmitNotice/index.jsx on lines 54..60
              src/applications/facility-locator/components/SearchResultMessage.jsx on lines 61..67
              src/applications/facility-locator/containers/FacilityDetail.jsx on lines 158..164
              src/applications/financial-status-report/components/household/DependentAges.jsx on lines 230..236
              src/applications/financial-status-report/components/resolution/ResolutionOptions.jsx on lines 163..169
              src/applications/gi/containers/search/FilterByLocation.jsx on lines 144..150
              src/applications/hca/components/FormFields/DemographicViewField.jsx on lines 36..42
              src/applications/hca/components/FormPages/DependentInformation.jsx on lines 217..223
              src/applications/hca/components/FormPages/VeteranInformation.jsx on lines 39..45
              src/applications/hca/components/PreSubmitNotice/index.jsx on lines 120..126
              src/applications/ivc-champva/10-10D/pages/SupportingDocumentsPage.jsx on lines 27..33
              src/applications/ivc-champva/10-7959C/components/SupportingDocumentsPage.jsx on lines 32..38
              src/applications/ivc-champva/shared/components/applicantLists/ApplicantRelationshipPage.jsx on lines 310..316
              src/applications/lgy/coe/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/mhv-medical-records/components/shared/DateSubheading.jsx on lines 26..32
              src/applications/mhv-secure-messaging/components/FacilityCheckboxGroup.jsx on lines 75..81
              src/applications/mhv-secure-messaging/components/MessageThread/MessageThreadItem.jsx on lines 166..172
              src/applications/mhv-secure-messaging/components/Modals/RemoveAttachmentModal.jsx on lines 74..80
              src/applications/mhv-secure-messaging/components/Search/SearchForm.jsx on lines 351..357
              src/applications/my-education-benefits/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/personalization/view-dependents/components/ViewDependentsList/ViewDependentsList.jsx on lines 73..79
              src/applications/representative-appoint/containers/App.jsx on lines 63..69
              src/applications/survivor-dependent-education-benefit/22-5490/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/toe/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/vaos/components/VAOSApp/DowntimeMessage.jsx on lines 95..101
              src/applications/vaos/new-appointment/components/VAFacilityPage/FacilitiesRadioWidget.jsx on lines 197..203
              src/applications/verify-your-enrollment/components/CurrentBenefitsStatus.jsx on lines 47..53
              src/applications/verify-your-enrollment/components/PageLink.jsx on lines 29..35
              src/applications/verify-your-enrollment/components/PeriodsToVerify.jsx on lines 113..119
              src/applications/verify/components/verifyButton.jsx on lines 40..46
              src/platform/forms-system/src/js/components/BackLink.jsx on lines 99..105
              src/platform/forms-system/src/js/components/ContactInfoReview.jsx on lines 300..306
              src/platform/forms-system/src/js/components/EditContactInfo.jsx on lines 90..96
              src/platform/forms-system/src/js/review/submit-states/ThrottledError.jsx on lines 57..63
              src/platform/forms-system/src/js/review/submit-states/ValidationError.jsx on lines 64..70
              src/platform/forms/components/common/alerts/ErrorMessage.jsx on lines 30..36
              src/platform/site-wide/loading-button/LoadingButton.jsx on lines 35..41
              src/applications/vaos/appointment-list/components/PageLayout.jsx on lines 40..46
              src/applications/vaos/components/AddToCalendar.jsx on lines 76..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 57.

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

              App.propTypes = {
                children: PropTypes.node,
                formData: PropTypes.object,
                loggedIn: PropTypes.bool,
                location: PropTypes.object,
              src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskRed/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/ask-va/components/YourPersonalInformationAuthenticated.jsx on lines 80..86
              src/applications/ask-va/containers/SubTopicSelectPage.jsx on lines 115..121
              src/applications/ask-va/containers/TopicSelectPage.jsx on lines 147..153
              src/applications/caregivers/components/FormFields/FacilitySearch.jsx on lines 311..317
              src/applications/caregivers/components/FormFields/VaMedicalCenter.jsx on lines 126..132
              src/applications/claims-status/components/claim-status-tab/WhatWeAreDoing.jsx on lines 86..92
              src/applications/combined-debt-portal/medical-copays/components/BalanceCard.jsx on lines 103..109
              src/applications/disability-benefits/view-payments/components/view-payments-lists/ViewPaymentsLists.jsx on lines 226..232
              src/applications/ezr/components/PreSubmitNotice/index.jsx on lines 54..60
              src/applications/facility-locator/components/SearchResultMessage.jsx on lines 61..67
              src/applications/facility-locator/containers/FacilityDetail.jsx on lines 158..164
              src/applications/financial-status-report/components/household/DependentAges.jsx on lines 230..236
              src/applications/financial-status-report/components/resolution/ResolutionOptions.jsx on lines 163..169
              src/applications/gi/containers/search/FilterByLocation.jsx on lines 144..150
              src/applications/hca/components/FormFields/DemographicViewField.jsx on lines 36..42
              src/applications/hca/components/FormPages/DependentInformation.jsx on lines 217..223
              src/applications/hca/components/FormPages/VeteranInformation.jsx on lines 39..45
              src/applications/hca/components/PreSubmitNotice/index.jsx on lines 120..126
              src/applications/ivc-champva/10-10D/pages/SupportingDocumentsPage.jsx on lines 27..33
              src/applications/ivc-champva/10-7959C/components/SupportingDocumentsPage.jsx on lines 32..38
              src/applications/ivc-champva/shared/components/applicantLists/ApplicantRelationshipPage.jsx on lines 310..316
              src/applications/lgy/coe/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/mhv-medical-records/components/shared/DateSubheading.jsx on lines 26..32
              src/applications/mhv-secure-messaging/components/ComposeForm/ElectronicSignature.jsx on lines 49..55
              src/applications/mhv-secure-messaging/components/FacilityCheckboxGroup.jsx on lines 75..81
              src/applications/mhv-secure-messaging/components/MessageThread/MessageThreadItem.jsx on lines 166..172
              src/applications/mhv-secure-messaging/components/Modals/RemoveAttachmentModal.jsx on lines 74..80
              src/applications/mhv-secure-messaging/components/Search/SearchForm.jsx on lines 351..357
              src/applications/my-education-benefits/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/personalization/view-dependents/components/ViewDependentsList/ViewDependentsList.jsx on lines 73..79
              src/applications/survivor-dependent-education-benefit/22-5490/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/toe/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/vaos/components/VAOSApp/DowntimeMessage.jsx on lines 95..101
              src/applications/vaos/new-appointment/components/VAFacilityPage/FacilitiesRadioWidget.jsx on lines 197..203
              src/applications/verify-your-enrollment/components/CurrentBenefitsStatus.jsx on lines 47..53
              src/applications/verify-your-enrollment/components/PageLink.jsx on lines 29..35
              src/applications/verify-your-enrollment/components/PeriodsToVerify.jsx on lines 113..119
              src/applications/verify/components/verifyButton.jsx on lines 40..46
              src/platform/forms-system/src/js/components/BackLink.jsx on lines 99..105
              src/platform/forms-system/src/js/components/ContactInfoReview.jsx on lines 300..306
              src/platform/forms-system/src/js/components/EditContactInfo.jsx on lines 90..96
              src/platform/forms-system/src/js/review/submit-states/ThrottledError.jsx on lines 57..63
              src/platform/forms-system/src/js/review/submit-states/ValidationError.jsx on lines 64..70
              src/platform/forms/components/common/alerts/ErrorMessage.jsx on lines 30..36
              src/platform/site-wide/loading-button/LoadingButton.jsx on lines 35..41
              src/applications/vaos/appointment-list/components/PageLayout.jsx on lines 40..46
              src/applications/vaos/components/AddToCalendar.jsx on lines 76..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 57.

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

              VerifyButton.propTypes = {
                className: PropTypes.string,
                image: PropTypes.node,
                label: PropTypes.string,
                policy: PropTypes.string,
              Severity: Major
              Found in src/applications/verify/components/verifyButton.jsx and 48 other locations - About 1 hr to fix
              src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskRed/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/ask-va/components/YourPersonalInformationAuthenticated.jsx on lines 80..86
              src/applications/ask-va/containers/SubTopicSelectPage.jsx on lines 115..121
              src/applications/ask-va/containers/TopicSelectPage.jsx on lines 147..153
              src/applications/caregivers/components/FormFields/FacilitySearch.jsx on lines 311..317
              src/applications/caregivers/components/FormFields/VaMedicalCenter.jsx on lines 126..132
              src/applications/claims-status/components/claim-status-tab/WhatWeAreDoing.jsx on lines 86..92
              src/applications/combined-debt-portal/medical-copays/components/BalanceCard.jsx on lines 103..109
              src/applications/disability-benefits/view-payments/components/view-payments-lists/ViewPaymentsLists.jsx on lines 226..232
              src/applications/ezr/components/PreSubmitNotice/index.jsx on lines 54..60
              src/applications/facility-locator/components/SearchResultMessage.jsx on lines 61..67
              src/applications/facility-locator/containers/FacilityDetail.jsx on lines 158..164
              src/applications/financial-status-report/components/household/DependentAges.jsx on lines 230..236
              src/applications/financial-status-report/components/resolution/ResolutionOptions.jsx on lines 163..169
              src/applications/gi/containers/search/FilterByLocation.jsx on lines 144..150
              src/applications/hca/components/FormFields/DemographicViewField.jsx on lines 36..42
              src/applications/hca/components/FormPages/DependentInformation.jsx on lines 217..223
              src/applications/hca/components/FormPages/VeteranInformation.jsx on lines 39..45
              src/applications/hca/components/PreSubmitNotice/index.jsx on lines 120..126
              src/applications/ivc-champva/10-10D/pages/SupportingDocumentsPage.jsx on lines 27..33
              src/applications/ivc-champva/10-7959C/components/SupportingDocumentsPage.jsx on lines 32..38
              src/applications/ivc-champva/shared/components/applicantLists/ApplicantRelationshipPage.jsx on lines 310..316
              src/applications/lgy/coe/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/mhv-medical-records/components/shared/DateSubheading.jsx on lines 26..32
              src/applications/mhv-secure-messaging/components/ComposeForm/ElectronicSignature.jsx on lines 49..55
              src/applications/mhv-secure-messaging/components/FacilityCheckboxGroup.jsx on lines 75..81
              src/applications/mhv-secure-messaging/components/MessageThread/MessageThreadItem.jsx on lines 166..172
              src/applications/mhv-secure-messaging/components/Modals/RemoveAttachmentModal.jsx on lines 74..80
              src/applications/mhv-secure-messaging/components/Search/SearchForm.jsx on lines 351..357
              src/applications/my-education-benefits/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/personalization/view-dependents/components/ViewDependentsList/ViewDependentsList.jsx on lines 73..79
              src/applications/representative-appoint/containers/App.jsx on lines 63..69
              src/applications/survivor-dependent-education-benefit/22-5490/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/toe/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/vaos/components/VAOSApp/DowntimeMessage.jsx on lines 95..101
              src/applications/vaos/new-appointment/components/VAFacilityPage/FacilitiesRadioWidget.jsx on lines 197..203
              src/applications/verify-your-enrollment/components/CurrentBenefitsStatus.jsx on lines 47..53
              src/applications/verify-your-enrollment/components/PageLink.jsx on lines 29..35
              src/applications/verify-your-enrollment/components/PeriodsToVerify.jsx on lines 113..119
              src/platform/forms-system/src/js/components/BackLink.jsx on lines 99..105
              src/platform/forms-system/src/js/components/ContactInfoReview.jsx on lines 300..306
              src/platform/forms-system/src/js/components/EditContactInfo.jsx on lines 90..96
              src/platform/forms-system/src/js/review/submit-states/ThrottledError.jsx on lines 57..63
              src/platform/forms-system/src/js/review/submit-states/ValidationError.jsx on lines 64..70
              src/platform/forms/components/common/alerts/ErrorMessage.jsx on lines 30..36
              src/platform/site-wide/loading-button/LoadingButton.jsx on lines 35..41
              src/applications/vaos/appointment-list/components/PageLayout.jsx on lines 40..46
              src/applications/vaos/components/AddToCalendar.jsx on lines 76..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 57.

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

              ViewDependentsList.propTypes = {
                dependents: PropTypes.array,
                header: PropTypes.string,
                subHeader: PropTypes.object,
                manageDependentsToggle: PropTypes.bool,
              src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskRed/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/ask-va/components/YourPersonalInformationAuthenticated.jsx on lines 80..86
              src/applications/ask-va/containers/SubTopicSelectPage.jsx on lines 115..121
              src/applications/ask-va/containers/TopicSelectPage.jsx on lines 147..153
              src/applications/caregivers/components/FormFields/FacilitySearch.jsx on lines 311..317
              src/applications/caregivers/components/FormFields/VaMedicalCenter.jsx on lines 126..132
              src/applications/claims-status/components/claim-status-tab/WhatWeAreDoing.jsx on lines 86..92
              src/applications/combined-debt-portal/medical-copays/components/BalanceCard.jsx on lines 103..109
              src/applications/disability-benefits/view-payments/components/view-payments-lists/ViewPaymentsLists.jsx on lines 226..232
              src/applications/ezr/components/PreSubmitNotice/index.jsx on lines 54..60
              src/applications/facility-locator/components/SearchResultMessage.jsx on lines 61..67
              src/applications/facility-locator/containers/FacilityDetail.jsx on lines 158..164
              src/applications/financial-status-report/components/household/DependentAges.jsx on lines 230..236
              src/applications/financial-status-report/components/resolution/ResolutionOptions.jsx on lines 163..169
              src/applications/gi/containers/search/FilterByLocation.jsx on lines 144..150
              src/applications/hca/components/FormFields/DemographicViewField.jsx on lines 36..42
              src/applications/hca/components/FormPages/DependentInformation.jsx on lines 217..223
              src/applications/hca/components/FormPages/VeteranInformation.jsx on lines 39..45
              src/applications/hca/components/PreSubmitNotice/index.jsx on lines 120..126
              src/applications/ivc-champva/10-10D/pages/SupportingDocumentsPage.jsx on lines 27..33
              src/applications/ivc-champva/10-7959C/components/SupportingDocumentsPage.jsx on lines 32..38
              src/applications/ivc-champva/shared/components/applicantLists/ApplicantRelationshipPage.jsx on lines 310..316
              src/applications/lgy/coe/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/mhv-medical-records/components/shared/DateSubheading.jsx on lines 26..32
              src/applications/mhv-secure-messaging/components/ComposeForm/ElectronicSignature.jsx on lines 49..55
              src/applications/mhv-secure-messaging/components/FacilityCheckboxGroup.jsx on lines 75..81
              src/applications/mhv-secure-messaging/components/MessageThread/MessageThreadItem.jsx on lines 166..172
              src/applications/mhv-secure-messaging/components/Modals/RemoveAttachmentModal.jsx on lines 74..80
              src/applications/mhv-secure-messaging/components/Search/SearchForm.jsx on lines 351..357
              src/applications/my-education-benefits/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/representative-appoint/containers/App.jsx on lines 63..69
              src/applications/survivor-dependent-education-benefit/22-5490/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/toe/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/vaos/components/VAOSApp/DowntimeMessage.jsx on lines 95..101
              src/applications/vaos/new-appointment/components/VAFacilityPage/FacilitiesRadioWidget.jsx on lines 197..203
              src/applications/verify-your-enrollment/components/CurrentBenefitsStatus.jsx on lines 47..53
              src/applications/verify-your-enrollment/components/PageLink.jsx on lines 29..35
              src/applications/verify-your-enrollment/components/PeriodsToVerify.jsx on lines 113..119
              src/applications/verify/components/verifyButton.jsx on lines 40..46
              src/platform/forms-system/src/js/components/BackLink.jsx on lines 99..105
              src/platform/forms-system/src/js/components/ContactInfoReview.jsx on lines 300..306
              src/platform/forms-system/src/js/components/EditContactInfo.jsx on lines 90..96
              src/platform/forms-system/src/js/review/submit-states/ThrottledError.jsx on lines 57..63
              src/platform/forms-system/src/js/review/submit-states/ValidationError.jsx on lines 64..70
              src/platform/forms/components/common/alerts/ErrorMessage.jsx on lines 30..36
              src/platform/site-wide/loading-button/LoadingButton.jsx on lines 35..41
              src/applications/vaos/appointment-list/components/PageLayout.jsx on lines 40..46
              src/applications/vaos/components/AddToCalendar.jsx on lines 76..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 57.

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

              function isMilitaryCity(city = '') {
                const lowerCity = city.toLowerCase().trim();
              
                return lowerCity === 'apo' || lowerCity === 'fpo' || lowerCity === 'dpo';
              }
              Severity: Major
              Found in src/platform/forms-system/src/js/definitions/address.js and 7 other locations - About 1 hr to fix
              src/applications/ask-a-question/form/contactInformation/address/address.js on lines 128..132
              src/applications/ask-va/config/schema-helpers/addressHelper.js on lines 33..37
              src/applications/pre-need-integration/definitions/address.js on lines 102..106
              src/applications/pre-need/definitions/address.js on lines 89..93
              src/applications/simple-forms/shared/definitions/pdfAddress.js on lines 78..82
              src/applications/vaos/new-appointment/fields/addressFields.js on lines 39..43
              src/platform/forms/definitions/address.js on lines 100..104

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

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

              ThrottledError.propTypes = {
                buttonText: PropTypes.string,
                formConfig: PropTypes.object,
                when: PropTypes.object,
                onBack: PropTypes.func,
              src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskRed/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/ask-va/components/YourPersonalInformationAuthenticated.jsx on lines 80..86
              src/applications/ask-va/containers/SubTopicSelectPage.jsx on lines 115..121
              src/applications/ask-va/containers/TopicSelectPage.jsx on lines 147..153
              src/applications/caregivers/components/FormFields/FacilitySearch.jsx on lines 311..317
              src/applications/caregivers/components/FormFields/VaMedicalCenter.jsx on lines 126..132
              src/applications/claims-status/components/claim-status-tab/WhatWeAreDoing.jsx on lines 86..92
              src/applications/combined-debt-portal/medical-copays/components/BalanceCard.jsx on lines 103..109
              src/applications/disability-benefits/view-payments/components/view-payments-lists/ViewPaymentsLists.jsx on lines 226..232
              src/applications/ezr/components/PreSubmitNotice/index.jsx on lines 54..60
              src/applications/facility-locator/components/SearchResultMessage.jsx on lines 61..67
              src/applications/facility-locator/containers/FacilityDetail.jsx on lines 158..164
              src/applications/financial-status-report/components/household/DependentAges.jsx on lines 230..236
              src/applications/financial-status-report/components/resolution/ResolutionOptions.jsx on lines 163..169
              src/applications/gi/containers/search/FilterByLocation.jsx on lines 144..150
              src/applications/hca/components/FormFields/DemographicViewField.jsx on lines 36..42
              src/applications/hca/components/FormPages/DependentInformation.jsx on lines 217..223
              src/applications/hca/components/FormPages/VeteranInformation.jsx on lines 39..45
              src/applications/hca/components/PreSubmitNotice/index.jsx on lines 120..126
              src/applications/ivc-champva/10-10D/pages/SupportingDocumentsPage.jsx on lines 27..33
              src/applications/ivc-champva/10-7959C/components/SupportingDocumentsPage.jsx on lines 32..38
              src/applications/ivc-champva/shared/components/applicantLists/ApplicantRelationshipPage.jsx on lines 310..316
              src/applications/lgy/coe/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/mhv-medical-records/components/shared/DateSubheading.jsx on lines 26..32
              src/applications/mhv-secure-messaging/components/ComposeForm/ElectronicSignature.jsx on lines 49..55
              src/applications/mhv-secure-messaging/components/FacilityCheckboxGroup.jsx on lines 75..81
              src/applications/mhv-secure-messaging/components/MessageThread/MessageThreadItem.jsx on lines 166..172
              src/applications/mhv-secure-messaging/components/Modals/RemoveAttachmentModal.jsx on lines 74..80
              src/applications/mhv-secure-messaging/components/Search/SearchForm.jsx on lines 351..357
              src/applications/my-education-benefits/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/personalization/view-dependents/components/ViewDependentsList/ViewDependentsList.jsx on lines 73..79
              src/applications/representative-appoint/containers/App.jsx on lines 63..69
              src/applications/survivor-dependent-education-benefit/22-5490/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/toe/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/vaos/components/VAOSApp/DowntimeMessage.jsx on lines 95..101
              src/applications/vaos/new-appointment/components/VAFacilityPage/FacilitiesRadioWidget.jsx on lines 197..203
              src/applications/verify-your-enrollment/components/CurrentBenefitsStatus.jsx on lines 47..53
              src/applications/verify-your-enrollment/components/PageLink.jsx on lines 29..35
              src/applications/verify-your-enrollment/components/PeriodsToVerify.jsx on lines 113..119
              src/applications/verify/components/verifyButton.jsx on lines 40..46
              src/platform/forms-system/src/js/components/BackLink.jsx on lines 99..105
              src/platform/forms-system/src/js/components/ContactInfoReview.jsx on lines 300..306
              src/platform/forms-system/src/js/components/EditContactInfo.jsx on lines 90..96
              src/platform/forms-system/src/js/review/submit-states/ValidationError.jsx on lines 64..70
              src/platform/forms/components/common/alerts/ErrorMessage.jsx on lines 30..36
              src/platform/site-wide/loading-button/LoadingButton.jsx on lines 35..41
              src/applications/vaos/appointment-list/components/PageLayout.jsx on lines 40..46
              src/applications/vaos/components/AddToCalendar.jsx on lines 76..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 57.

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

              function isMilitaryCity(city = '') {
                const lowerCity = city.toLowerCase().trim();
              
                return lowerCity === 'apo' || lowerCity === 'fpo' || lowerCity === 'dpo';
              }
              src/applications/ask-a-question/form/contactInformation/address/address.js on lines 128..132
              src/applications/ask-va/config/schema-helpers/addressHelper.js on lines 33..37
              src/applications/pre-need/definitions/address.js on lines 89..93
              src/applications/simple-forms/shared/definitions/pdfAddress.js on lines 78..82
              src/applications/vaos/new-appointment/fields/addressFields.js on lines 39..43
              src/platform/forms-system/src/js/definitions/address.js on lines 75..79
              src/platform/forms/definitions/address.js on lines 100..104

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

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

              ApplicantRelationshipReviewPage.propTypes = {
                data: PropTypes.object,
                editPage: PropTypes.func,
                genOp: PropTypes.func,
                keyname: PropTypes.string,
              src/applications/_mock-form-ae-design-patterns/patterns/pattern2/TaskRed/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/ask-va/components/YourPersonalInformationAuthenticated.jsx on lines 80..86
              src/applications/ask-va/containers/SubTopicSelectPage.jsx on lines 115..121
              src/applications/ask-va/containers/TopicSelectPage.jsx on lines 147..153
              src/applications/caregivers/components/FormFields/FacilitySearch.jsx on lines 311..317
              src/applications/caregivers/components/FormFields/VaMedicalCenter.jsx on lines 126..132
              src/applications/claims-status/components/claim-status-tab/WhatWeAreDoing.jsx on lines 86..92
              src/applications/combined-debt-portal/medical-copays/components/BalanceCard.jsx on lines 103..109
              src/applications/disability-benefits/view-payments/components/view-payments-lists/ViewPaymentsLists.jsx on lines 226..232
              src/applications/ezr/components/PreSubmitNotice/index.jsx on lines 54..60
              src/applications/facility-locator/components/SearchResultMessage.jsx on lines 61..67
              src/applications/facility-locator/containers/FacilityDetail.jsx on lines 158..164
              src/applications/financial-status-report/components/household/DependentAges.jsx on lines 230..236
              src/applications/financial-status-report/components/resolution/ResolutionOptions.jsx on lines 163..169
              src/applications/gi/containers/search/FilterByLocation.jsx on lines 144..150
              src/applications/hca/components/FormFields/DemographicViewField.jsx on lines 36..42
              src/applications/hca/components/FormPages/DependentInformation.jsx on lines 217..223
              src/applications/hca/components/FormPages/VeteranInformation.jsx on lines 39..45
              src/applications/hca/components/PreSubmitNotice/index.jsx on lines 120..126
              src/applications/ivc-champva/10-10D/pages/SupportingDocumentsPage.jsx on lines 27..33
              src/applications/ivc-champva/10-7959C/components/SupportingDocumentsPage.jsx on lines 32..38
              src/applications/lgy/coe/status/components/DocumentList/ListItem.jsx on lines 24..30
              src/applications/mhv-medical-records/components/shared/DateSubheading.jsx on lines 26..32
              src/applications/mhv-secure-messaging/components/ComposeForm/ElectronicSignature.jsx on lines 49..55
              src/applications/mhv-secure-messaging/components/FacilityCheckboxGroup.jsx on lines 75..81
              src/applications/mhv-secure-messaging/components/MessageThread/MessageThreadItem.jsx on lines 166..172
              src/applications/mhv-secure-messaging/components/Modals/RemoveAttachmentModal.jsx on lines 74..80
              src/applications/mhv-secure-messaging/components/Search/SearchForm.jsx on lines 351..357
              src/applications/my-education-benefits/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/personalization/view-dependents/components/ViewDependentsList/ViewDependentsList.jsx on lines 73..79
              src/applications/representative-appoint/containers/App.jsx on lines 63..69
              src/applications/survivor-dependent-education-benefit/22-5490/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/toe/components/DuplicateContactInfoModal.jsx on lines 101..107
              src/applications/vaos/components/VAOSApp/DowntimeMessage.jsx on lines 95..101
              src/applications/vaos/new-appointment/components/VAFacilityPage/FacilitiesRadioWidget.jsx on lines 197..203
              src/applications/verify-your-enrollment/components/CurrentBenefitsStatus.jsx on lines 47..53
              src/applications/verify-your-enrollment/components/PageLink.jsx on lines 29..35
              src/applications/verify-your-enrollment/components/PeriodsToVerify.jsx on lines 113..119
              src/applications/verify/components/verifyButton.jsx on lines 40..46
              src/platform/forms-system/src/js/components/BackLink.jsx on lines 99..105
              src/platform/forms-system/src/js/components/ContactInfoReview.jsx on lines 300..306
              src/platform/forms-system/src/js/components/EditContactInfo.jsx on lines 90..96
              src/platform/forms-system/src/js/review/submit-states/ThrottledError.jsx on lines 57..63
              src/platform/forms-system/src/js/review/submit-states/ValidationError.jsx on lines 64..70
              src/platform/forms/components/common/alerts/ErrorMessage.jsx on lines 30..36
              src/platform/site-wide/loading-button/LoadingButton.jsx on lines 35..41
              src/applications/vaos/appointment-list/components/PageLayout.jsx on lines 40..46
              src/applications/vaos/components/AddToCalendar.jsx on lines 76..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 57.

              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