department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,804 of 12,804 total issues

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

        {!haveAccessoriesBeenOrderedInLastTwoYears &&
          !areAccessorySuppliesEligible && (
            <va-alert status="info" visible>
              <h3 slot="headline">
                You can’t add accessories to your order at this time
src/applications/disability-benefits/2346/components/Accessories.jsx on lines 78..97

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

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

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

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

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

Refactorings

Further Reading

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

        {(data.statementOfTruthSignature || data.signature) && (
          <>
            <span className="veterans-full-name">
              <strong>Applicant’s name</strong>
              <br />
src/applications/ivc-champva/10-7959a/containers/ConfirmationPage.jsx on lines 38..53

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

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

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

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

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

Refactorings

Further Reading

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

    {
      id: '202106221300984000118400000000000000',
      type: 'va_appointments',
      attributes: {
        char4: null,
src/applications/personalization/dashboard/utils/mocks/appointments/MOCK_VA_APPOINTMENTS_PARTIAL_ERROR.js on lines 69..100

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

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

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

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

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

Refactorings

Further Reading

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

export const ConfirmationPage = () => {
  const form = useSelector(state => state.form || {});
  const { submission } = form;
  const submitDate = submission.timestamp;
  const confirmationNumber = submission.response?.confirmationNumber;
src/applications/simple-forms/40-0247/containers/ConfirmationPage.jsx on lines 14..30

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

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

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

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

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

Refactorings

Further Reading

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

          {data.applicantName && (
            <>
              <span className="veterans-full-name">
                <strong>Applicant’s name</strong>
                <br />
src/applications/ivc-champva/10-7959C/containers/ConfirmationPage.jsx on lines 115..130

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

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

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

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

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

Refactorings

Further Reading

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

export const ConfirmationPage = () => {
  const form = useSelector(state => state.form || {});
  const { submission } = form;
  const submitDate = submission.timestamp;
  const confirmationNumber = submission.response?.confirmationNumber;
src/applications/simple-forms/20-10206/containers/ConfirmationPage.jsx on lines 13..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 133.

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

File index.js has 370 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import * as VAP_SERVICE from 'platform/user/profile/vap-svc/constants';

import { isEmpty, isEqual, pickBy } from 'lodash';

import { COPY_ADDRESS_MODAL_STATUS } from 'platform/user/profile/vap-svc/constants';
Severity: Minor
Found in src/platform/user/profile/vap-svc/reducers/index.js - About 4 hrs to fix

    Function DebtLettersSummary has 122 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const DebtLettersSummary = () => {
      const { debtLetters, mcp } = useSelector(
        ({ combinedPortal }) => combinedPortal,
      );
      const showDebtLetterDownload = useSelector(state =>

      Function render has 122 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        render() {
          const {
            value: items,
            id,
            options,

        Function Compose has 122 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const Compose = () => {
          const dispatch = useDispatch();
          const recipients = useSelector(state => state.sm.recipients);
          const { drafts, saveError } = useSelector(state => state.sm.threadDetails);
          const signature = useSelector(state => state.sm.preferences.signature);
        Severity: Major
        Found in src/applications/mhv-secure-messaging/containers/Compose.jsx - About 4 hrs to fix

          Function DirectDeposit has 122 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const DirectDeposit = () => {
            const directDepositHookResult = useDirectDeposit();
          
            const {
              ui,

            Function RadiologyDetails has 122 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const RadiologyDetails = props => {
              const { record, fullState, runningUnitTest } = props;
              const user = useSelector(state => state.user.profile);
              const allowTxtDownloads = useSelector(
                state =>

              Function prescriptionsReducer has 122 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const prescriptionsReducer = (state = initialState, action) => {
                switch (action.type) {
                  case Actions.Prescriptions.SET_DETAILS:
                  case Actions.Prescriptions.GET_DETAILS: {
                    return {
              Severity: Major
              Found in src/applications/mhv-medications/reducers/prescriptions.js - About 4 hrs to fix

                File SearchControls.jsx has 369 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import React, { useEffect, useRef, useState } from 'react';
                import recordEvent from 'platform/monitoring/record-event';
                import { focusElement } from 'platform/utilities/ui';
                import classNames from 'classnames';
                import {
                Severity: Minor
                Found in src/applications/facility-locator/components/SearchControls.jsx - About 4 hrs to fix

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

                      {
                        id: '3579883',
                        type: 'message_details',
                        attributes: {
                          messageId: 3579883,
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 5..33
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 121..149
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 208..236
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 298..328
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 360..390
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 830..860
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 921..951
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1137..1165
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1166..1194
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1195..1223
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1224..1254
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1284..1312
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1431..1459
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1520..1548
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1549..1577
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1607..1635
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1723..1751

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

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

                      {
                        id: '3550437',
                        type: 'message_details',
                        attributes: {
                          messageId: 3550437,
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 5..33
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 121..149
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 208..236
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 298..328
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 360..390
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 830..860
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 921..951
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1137..1165
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1166..1194
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1195..1223
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1224..1254
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1284..1312
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1431..1459
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1520..1548
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1549..1577
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1578..1606
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1723..1751

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

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

                      {
                        id: '3549574',
                        type: 'message_details',
                        attributes: {
                          messageId: 3549574,
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 5..33
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 121..149
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 208..236
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 298..328
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 360..390
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 830..860
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 921..951
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1137..1165
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1166..1194
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1195..1223
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1224..1254
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1284..1312
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1431..1459
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1520..1548
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1549..1577
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1578..1606
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1607..1635

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

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

                      {
                        id: '3579897',
                        type: 'message_details',
                        attributes: {
                          messageId: 3579897,
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 5..33
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 121..149
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 208..236
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 298..328
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 360..390
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 830..860
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 921..951
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1166..1194
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1195..1223
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1224..1254
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1284..1312
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1431..1459
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1520..1548
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1549..1577
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1578..1606
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1607..1635
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1723..1751

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

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

                      {
                        id: '2993398',
                        type: 'message_details',
                        attributes: {
                          messageId: 2993398,
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 5..33
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 121..149
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 208..236
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 298..328
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 360..390
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 830..860
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 921..951
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1137..1165
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1166..1194
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1224..1254
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1284..1312
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1431..1459
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1520..1548
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1549..1577
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1578..1606
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1607..1635
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1723..1751

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

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

                      {
                        id: '3580278',
                        type: 'message_details',
                        attributes: {
                          messageId: 3580278,
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 5..33
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 121..149
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 208..236
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 298..328
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 360..390
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 830..860
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 921..951
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1137..1165
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1166..1194
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1195..1223
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1224..1254
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1284..1312
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1431..1459
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1549..1577
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1578..1606
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1607..1635
                  src/platform/mhv/api/mocks/secure-messaging/messages/messageDetails.js on lines 1723..1751

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

                  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