department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,843 of 12,843 total issues

Function handleConfirmMoveFolderTo has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const handleConfirmMoveFolderTo = () => {
    if (selectedFolder === null) {
      setFolderInputError(
        Constants.ErrorMessages.MoveConversation.FOLDER_REQUIRED,
      );

    Function GiBillBreadcrumbs has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const GiBillBreadcrumbs = () => {
      const profileMatch = useRouteMatch('/institution/:facilityCode');
      const compareMatch = useRouteMatch('/compare');
      const crumbLiEnding = giDocumentTitle();
      const crumbs = [
    Severity: Minor
    Found in src/applications/gi/components/GiBillBreadcrumbs.jsx - About 1 hr to fix

      Function renderInState has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        const renderInState = () => {
          if (!displayedInputs.inState) return null;
          const { inStateTuitionInformation } = profile.attributes;
          const radioButtonsLabelText = 'Are you an in-state student?';
          const options = [

        Function fetchSearchByLocationResults has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function fetchSearchByLocationResults(
          location,
          distance,
          filters,
          version,
        Severity: Minor
        Found in src/applications/gi/actions/index.js - About 1 hr to fix

          Function getTab has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            const getTab = (tabName, label) => {
              const activeTab = tabName === tab;
              const tabClasses = classNames(
                {
                  'active-search-tab': activeTab,
          Severity: Minor
          Found in src/applications/gi/components/search/SearchTabs.jsx - About 1 hr to fix

            Function mapStateToProps has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const mapStateToProps = state => {
              const allLoaded =
                _.difference(state.compare.selected, state.compare.details.loaded)
                  .length === 0;
              const estimated = {};
            Severity: Minor
            Found in src/applications/gi/containers/ComparePage.jsx - About 1 hr to fix

              Function handleAdd has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                handleAdd() {
                  const numberOfItems = this.props.formData.length;
                  const lastIndex = numberOfItems - 1;
              
                  if (errorSchemaIsValid(this.props.errorSchema[lastIndex])) {

                Function fetchRepStatus has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const fetchRepStatus = async () => {
                  const requestUrl = `${
                    environment.BASE_URL === 'http://localhost:3001'
                      ? `https://staging-api.va.gov`
                      : `${environment.API_URL}`
                Severity: Minor
                Found in src/applications/representative-appoint/api/fetchRepStatus.js - About 1 hr to fix

                  Function buildPrescriptionsTXT has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const buildPrescriptionsTXT = prescriptions => {
                    let result = `
                  ---------------------------------------------------------------------------------
                  
                    `;
                  Severity: Minor
                  Found in src/applications/mhv-medications/util/txtConfigs.js - About 1 hr to fix

                    Function generateFeatureToggles has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const generateFeatureToggles = (toggles = {}) => {
                      const {
                        mhvLandingPagePersonalization = true,
                        mhvMedicationsToVaGovRelease = true,
                        mhvMedicationsDisplayRefillContent = true,
                    Severity: Minor
                    Found in src/applications/mhv-medications/mocks/api/feature-toggles/index.js - About 1 hr to fix

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

                              studentAdditionalInformation: {
                                depends: formData =>
                                  isChapterFieldRequired(formData, TASK_KEYS.report674),
                                title: 'Add one or more students between ages 18 and 23',
                                path: 'report-674/:index/student-identification',
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 545..554
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 555..564
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 565..574
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 575..584
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 585..594
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 595..604
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 605..614
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 615..624
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 625..634
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 635..644
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 645..654
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 655..664

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

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

                              studentAdditionalInformationPartEight: {
                                depends: formData =>
                                  isChapterFieldRequired(formData, TASK_KEYS.report674),
                                title: 'Add one or more students between ages 18 and 23',
                                path: 'report-674/:index/school-term-dates',
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 535..544
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 545..554
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 555..564
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 565..574
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 575..584
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 585..594
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 595..604
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 615..624
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 625..634
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 635..644
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 645..654
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 655..664

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

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

                              studentAdditionalInformationPartSix: {
                                depends: formData =>
                                  isChapterFieldRequired(formData, TASK_KEYS.report674),
                                title: 'Add one or more students between ages 18 and 23',
                                path: 'report-674/:index/student-attendance',
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 535..544
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 545..554
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 555..564
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 565..574
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 575..584
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 595..604
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 605..614
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 615..624
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 625..634
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 635..644
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 645..654
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 655..664

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

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

                              studentAdditionalInformationPartTwo: {
                                depends: formData =>
                                  isChapterFieldRequired(formData, TASK_KEYS.report674),
                                title: 'Add one or more students between ages 18 and 23',
                                path: 'report-674/:index/student-address',
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 535..544
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 555..564
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 565..574
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 575..584
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 585..594
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 595..604
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 605..614
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 615..624
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 625..634
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 635..644
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 645..654
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 655..664

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

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

                              studentAdditionalInformationPartFive: {
                                depends: formData =>
                                  isChapterFieldRequired(formData, TASK_KEYS.report674),
                                title: 'Add one or more students between ages 18 and 23',
                                path: 'report-674/:index/school-name',
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 535..544
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 545..554
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 555..564
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 565..574
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 585..594
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 595..604
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 605..614
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 615..624
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 625..634
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 635..644
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 645..654
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 655..664

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

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

                              studentAdditionalInformationPartNine: {
                                depends: formData =>
                                  isChapterFieldRequired(formData, TASK_KEYS.report674),
                                title: 'Add one or more students between ages 18 and 23',
                                path: 'report-674/:index/student-previous-term',
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 535..544
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 545..554
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 555..564
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 565..574
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 575..584
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 585..594
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 595..604
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 605..614
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 625..634
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 635..644
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 645..654
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 655..664

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

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

                              studentAdditionalInformationPartThirteen: {
                                depends: formData =>
                                  isChapterFieldRequired(formData, TASK_KEYS.report674),
                                title: 'Add one or more students between ages 18 and 23',
                                path: 'report-674/:index/additional-remarks',
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 535..544
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 545..554
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 555..564
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 565..574
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 575..584
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 585..594
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 595..604
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 605..614
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 615..624
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 625..634
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 635..644
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 645..654

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

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

                              studentAdditionalInformationPartEleven: {
                                depends: formData =>
                                  isChapterFieldRequired(formData, TASK_KEYS.report674),
                                title: 'Add one or more students between ages 18 and 23',
                                path: 'report-674/:index/student-expected-income-at-school',
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 535..544
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 545..554
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 555..564
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 565..574
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 575..584
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 585..594
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 595..604
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 605..614
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 615..624
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 625..634
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 645..654
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 655..664

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

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

                              studentAdditionalInformationPartThree: {
                                depends: formData =>
                                  isChapterFieldRequired(formData, TASK_KEYS.report674),
                                title: 'Add one or more students between ages 18 and 23',
                                path: 'report-674/:index/student-marriage',
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 535..544
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 545..554
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 565..574
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 575..584
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 585..594
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 595..604
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 605..614
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 615..624
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 625..634
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 635..644
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 645..654
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 655..664

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

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

                              studentAdditionalInformationPartFour: {
                                depends: formData =>
                                  isChapterFieldRequired(formData, TASK_KEYS.report674),
                                title: 'Add one or more students between ages 18 and 23',
                                path: 'report-674/:index/student-education-benefits',
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 535..544
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 545..554
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 555..564
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 575..584
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 585..594
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 595..604
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 605..614
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 615..624
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 625..634
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 635..644
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 645..654
                      src/applications/disability-benefits/686c-674-v2/config/form.js on lines 655..664

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

                      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