department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,805 of 12,805 total issues

Function nextQuestion has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

function nextQuestion(currentQuestion, answer, state) {
  let next;
  const noGeneralCourtMartial = ['2', '3'].includes(state['7_courtMartial']);
  const dischargeYear = state['2_dischargeYear'];
  const dischargeMonth = state['3_dischargeMonth'] || 1;
Severity: Minor
Found in src/applications/discharge-wizard/reducers/discharge-wizard.js - About 4 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function FileInput has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

const FileInput = props => {
  const {
    attachments,
    setAttachments,
    setAttachFileSuccess,

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function getDerivedAttributes has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

export function getDerivedAttributes(constant, eligibility, institution) {
  const your = eligibility;
  const its = institution;
  const chapter = Number(your.giBillChapter);
  let monthlyRate;
Severity: Minor
Found in src/applications/gi/selectors/estimator.js - About 4 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function SearchQueryReducer has 114 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const SearchQueryReducer = (state = INITIAL_STATE, action) => {
  switch (action.type) {
    case SEARCH_STARTED:
      return {
        ...state,
Severity: Major
Found in src/applications/facility-locator/reducers/searchQuery.js - About 4 hrs to fix

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

      render() {
        const { showWizard } = this.props;
    
        if (showWizard === undefined) return null;
        return (
    Severity: Major
    Found in src/applications/edu-benefits/5490/containers/IntroductionPage.jsx - About 4 hrs to fix

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

        render() {
          const { showWizard } = this.props;
      
          if (showWizard === undefined) return null;
          return (
      Severity: Major
      Found in src/applications/edu-benefits/5495/containers/IntroductionPage.jsx - About 4 hrs to fix

        Function UpcomingAppointmentsList has 114 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export default function UpcomingAppointmentsList() {
          const history = useHistory();
          const dispatch = useDispatch();
          const {
            showScheduleButton,

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

          const handleUserRequest = (req, res) => {
            // here we can customize the return of the user request
            // the main mechanism that we customize around is the query string passed to the request
          
            // handle test case of BAI being cleared on user request
          src/applications/_mock-form-ae-design-patterns/mocks/endpoints/user/index.js on lines 1530..1556
          src/applications/representative-appoint/mocks/endpoints/user/index.js on lines 1504..1530

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

          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

            schema: {
              type: 'object',
              properties: {
                areaOfDisagreement: {
                  type: 'array',
          src/applications/appeals/shared/pages/areaOfDisagreement.js on lines 74..107
          src/applications/appeals/testing/hlr/pages/areaOfDisagreement.js on lines 67..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 126.

          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 handleUserRequest = (req, res) => {
            // here we can customize the return of the user request
            // the main mechanism that we customize around is the query string passed to the request
          
            // handle test case of BAI being cleared on user request
          src/applications/_mock-form-ae-design-patterns/mocks/endpoints/user/index.js on lines 1530..1556
          src/applications/personalization/profile/mocks/endpoints/user/index.js on lines 1700..1726

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

          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

            schema: {
              type: 'object',
              properties: {
                areaOfDisagreement: {
                  type: 'array',
          Severity: Major
          Found in src/applications/appeals/shared/pages/areaOfDisagreement.js and 2 other locations - About 4 hrs to fix
          src/applications/appeals/testing/hlr/pages/areaOfDisagreement.js on lines 67..100
          src/applications/appeals/testing/nod-new/pages/areaOfDisagreement.jsx on lines 68..101

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

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

              {
                id: '8a4885896a22f88f016a36dc98460081',
                type: 'cc_appointments',
                attributes: {
                  appointmentRequestId: '8a4885896a22f88f016a36dc98460081',
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 5..27
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 28..50
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 51..73
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 74..97
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 98..120
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 144..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 126.

          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 handleUserRequest = (req, res) => {
            // here we can customize the return of the user request
            // the main mechanism that we customize around is the query string passed to the request
          
            // handle test case of BAI being cleared on user request
          src/applications/personalization/profile/mocks/endpoints/user/index.js on lines 1700..1726
          src/applications/representative-appoint/mocks/endpoints/user/index.js on lines 1504..1530

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

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

              {
                id: '8a4888116a45cbe3016a45f482fb0002',
                type: 'cc_appointments',
                attributes: {
                  appointmentRequestId: '8a4888116a45cbe3016a45f482fb0002',
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 5..27
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 28..50
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 51..73
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 98..120
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 121..143
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 144..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 126.

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

              {
                id: '8a4888506a7372fb016a791b01730037',
                type: 'cc_appointments',
                attributes: {
                  appointmentRequestId: '8a4888506a7372fb016a791b01730037',
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 5..27
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 28..50
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 51..73
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 74..97
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 98..120
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 121..143

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

          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

            schema: {
              type: 'object',
              properties: {
                areaOfDisagreement: {
                  type: 'array',
          src/applications/appeals/shared/pages/areaOfDisagreement.js on lines 74..107
          src/applications/appeals/testing/nod-new/pages/areaOfDisagreement.jsx on lines 68..101

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

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

              {
                id: '8a4885896a22f88f016a2c8834b1005d',
                type: 'cc_appointments',
                attributes: {
                  appointmentRequestId: '8a4885896a22f88f016a2c8834b1005d',
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 5..27
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 51..73
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 74..97
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 98..120
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 121..143
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 144..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 126.

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

              {
                id: '8a4888116a45cbe3016a4699b8b0000c',
                type: 'cc_appointments',
                attributes: {
                  appointmentRequestId: '8a4888116a45cbe3016a4699b8b0000c',
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 5..27
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 28..50
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 51..73
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 74..97
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 121..143
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 144..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 126.

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

              {
                id: '8a4812b77035101201703a2086750033',
                type: 'cc_appointments',
                attributes: {
                  appointmentRequestId: '8a4812b77035101201703a2086750033',
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 28..50
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 51..73
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 74..97
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 98..120
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 121..143
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 144..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 126.

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

              {
                id: '8a4885896a22f88f016a2cb7f5de0062',
                type: 'cc_appointments',
                attributes: {
                  appointmentRequestId: '8a4885896a22f88f016a2cb7f5de0062',
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 5..27
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 28..50
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 74..97
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 98..120
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 121..143
          src/applications/personalization/dashboard/mocks/appointments/MOCK_CC_APPOINTMENTS.js on lines 144..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 126.

          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