department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,835 of 12,835 total issues

Function useTravelPayFlags has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const useTravelPayFlags = appointment => {
  const [travelPayClaimSent, setTravelPayClaimSent] = useState();
  const selectCurrentContext = useMemo(makeSelectCurrentContext, []);
  const context = useSelector(selectCurrentContext);
  const { token } = context;
Severity: Major
Found in src/applications/check-in/hooks/useTravelPayFlags.jsx - About 2 hrs to fix

    Function transform5490Form has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function transform5490Form(_formConfig, form) {
      const formFieldUserFullName = form?.data?.fullName;
      const viewComponentUserFullName = form?.loadedData?.formData?.fullName;
      // const formFieldDateOfBirth = form?.data?.dateOfBirth;
      // const viewComponentDateOfBirth = form?.loadedData?.formData.dateOfBirth;

      Function DebtError has 60 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const DebtError = () => {
        useEffect(() => {
          recordEvent({
            event: 'howToWizard-alert-displayed',
            'reason-for-alert': 'debt is due to an error',
      Severity: Major
      Found in src/applications/financial-status-report/wizard/pages/Error.jsx - About 2 hrs to fix

        Function OrientationWizardContainer has 60 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const OrientationWizardContainer = props => {
          const [showOrientation, setShowOrientation] = useState(false);
          const { wizardStateHandler } = props;
          // pass this down to wizard children so showOrientation can be updated once
          // a user makes it through a valid wizard flow

          Function dismissNotificationById has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const dismissNotificationById = id => async dispatch => {
            const dismissNotification = () => {
              const options = {
                method: 'PATCH',
                credentials: 'include',
          Severity: Major
          Found in src/applications/personalization/common/actions/notifications.js - About 2 hrs to fix

            Function renderResultsInformation has 60 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              renderResultsInformation() {
                const {
                  currentPage,
                  perPage,
                  totalPages,
            Severity: Major
            Found in src/applications/search/containers/SearchApp.jsx - About 2 hrs to fix

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

                        {
                          resourceType: 'Observation',
                          id: '12415',
                          status: 'Final',
                          code: {
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1805..1831
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3324..3350
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3451..3477
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3478..3504
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3505..3531
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3532..3558
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3559..3585
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3586..3612
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3613..3639

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

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

                        {
                          resourceType: 'Observation',
                          id: '12419',
                          status: 'Final',
                          code: {
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1805..1831
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3324..3350
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3402..3428
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3451..3477
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3478..3504
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3532..3558
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3559..3585
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3586..3612
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3613..3639

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

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

                        {
                          resourceType: 'Observation',
                          id: '12411',
                          status: 'Final',
                          code: {
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1805..1831
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3402..3428
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3451..3477
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3478..3504
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3505..3531
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3532..3558
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3559..3585
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3586..3612
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3613..3639

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

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

                        {
                          resourceType: 'Observation',
                          id: '12421',
                          status: 'Final',
                          code: {
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1805..1831
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3324..3350
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3402..3428
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3451..3477
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3478..3504
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3505..3531
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3532..3558
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3586..3612
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3613..3639

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

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

                        {
                          resourceType: 'Observation',
                          id: '12417',
                          status: 'Final',
                          code: {
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1805..1831
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3324..3350
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3402..3428
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3478..3504
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3505..3531
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3532..3558
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3559..3585
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3586..3612
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3613..3639

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

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

                        {
                          resourceType: 'Observation',
                          id: '12418',
                          status: 'Final',
                          code: {
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1805..1831
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3324..3350
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3402..3428
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3451..3477
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3505..3531
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3532..3558
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3559..3585
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3586..3612
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3613..3639

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

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

                        {
                          resourceType: 'Observation',
                          id: '12422',
                          status: 'Final',
                          code: {
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1805..1831
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3324..3350
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3402..3428
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3451..3477
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3478..3504
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3505..3531
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3532..3558
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3559..3585
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3613..3639

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

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

                        {
                          resourceType: 'Observation',
                          id: '12420',
                          status: 'Final',
                          code: {
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1805..1831
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3324..3350
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3402..3428
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3451..3477
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3478..3504
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3505..3531
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3559..3585
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3586..3612
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3613..3639

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

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

                        {
                          resourceType: 'Observation',
                          id: '12423',
                          status: 'Final',
                          code: {
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 1805..1831
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3324..3350
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3402..3428
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3451..3477
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3478..3504
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3505..3531
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3532..3558
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3559..3585
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3586..3612

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

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

                        {
                          resourceType: 'Observation',
                          id: '12379',
                          status: 'Final',
                          code: {
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3324..3350
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3402..3428
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3451..3477
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3478..3504
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3505..3531
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3532..3558
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3559..3585
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3586..3612
              src/platform/mhv/api/mocks/medical-records/labs-and-tests/index.js on lines 3613..3639

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

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

              const itfShape = {
                id: PropTypes.string,
                creationDate: PropTypes.string,
                expirationDate: PropTypes.string.isRequired,
                participantId: PropTypes.number,
              Severity: Major
              Found in src/applications/appeals/995/containers/ITFWrapper.jsx and 2 other locations - About 2 hrs to fix
              src/applications/appeals/testing/sc/containers/ITFWrapper.jsx on lines 160..168
              src/applications/disability-benefits/all-claims/containers/ITFWrapper.jsx on lines 158..166

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

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

                veteranFullName: {
                  first: {
                    'ui:title': 'Your first name',
                    'ui:errorMessages': {
                      required: 'Please enter a first name',
              src/applications/edu-benefits/10203/pages/applicantInformation.js on lines 6..28
              src/applications/edu-benefits/1995/pages/applicantInformation.js on lines 7..29

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

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

              export function getSearchIndex(params, array = []) {
                let indexToReturn = parseInt(params.get('index'), 10);
                if (Number.isNaN(indexToReturn) || indexToReturn > array.length) {
                  indexToReturn = array.length;
                }
              src/applications/ezr/utils/helpers/listloop-pattern.js on lines 42..48
              src/applications/hca/utils/helpers/index.js on lines 347..353

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

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

              export function getSearchIndex(params, array = []) {
                let indexToReturn = parseInt(params.get('index'), 10);
                if (Number.isNaN(indexToReturn) || indexToReturn > array.length) {
                  indexToReturn = array.length;
                }
              Severity: Major
              Found in src/applications/hca/utils/helpers/index.js and 2 other locations - About 2 hrs to fix
              src/applications/_mock-form-ae-design-patterns/utils/helpers/listloop-pattern.js on lines 42..48
              src/applications/ezr/utils/helpers/listloop-pattern.js on lines 42..48

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

              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