cityssm/parking-ticket-system

View on GitHub

Showing 360 of 360 total issues

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

                    linkElement.innerHTML = `${cityssm.escapeHTML(bylaw.bylawNumber)}<br />
            <span class="is-size-7">
            ${cityssm.escapeHTML(bylaw.bylawDescription)}
            </span>`;
Severity: Minor
Found in public/javascripts/offence-maint.js and 1 other location - About 40 mins to fix
public/javascripts/offence-maint.js on lines 178..181

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

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

Function createStatus has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

function createStatus(batchId, ticketId, statusKey, sessionUser, connectedDatabase) {
Severity: Minor
Found in database/parkingDB/addParkingTicketToConvictionBatch.js - About 35 mins to fix

    Function getLicencePlateOwner has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      licencePlateCountry: string,
      licencePlateProvince: string,
      licencePlateNumber: string,
      recordDateOrBefore: number,
      connectedDatabase?: sqlite.Database
    Severity: Minor
    Found in database/parkingDB/getLicencePlateOwner.ts - About 35 mins to fix

      Function getLicencePlateOwner has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      export default async function getLicencePlateOwner(licencePlateCountry, licencePlateProvince, licencePlateNumber, recordDateOrBefore, connectedDatabase) {
      Severity: Minor
      Found in database/parkingDB/getLicencePlateOwner.js - About 35 mins to fix

        Function createStatus has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          batchId: number,
          ticketId: number,
          statusKey: 'convicted' | 'convictionBatch',
          sessionUser: PTSUser,
          connectedDatabase?: sqlite.Database
        Severity: Minor
        Found in database/parkingDB/addParkingTicketToConvictionBatch.ts - About 35 mins to fix

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

          export default function handler(request, response) {
              const result = removeLicencePlateFromLookupBatch(request.body, request.session.user);
              response.json(result);
          }
          Severity: Major
          Found in handlers/plates-post/doRemoveLicencePlateFromLookupBatch.js and 5 other locations - About 35 mins to fix
          handlers/plates-post/doAddAllParkingTicketsToLookupBatch.js on lines 2..5
          handlers/plates-post/doCreateLookupBatch.js on lines 2..5
          handlers/tickets-post/doUpdateRemark.js on lines 2..5
          handlers/tickets-post/doUpdateStatus.js on lines 2..5
          handlers/tickets-post/doUpdateTicket.js on lines 2..5

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

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

          export default function handler(request, response) {
              const createBatchResponse = createLookupBatch(request.body, request.session.user);
              response.json(createBatchResponse);
          }
          Severity: Major
          Found in handlers/plates-post/doCreateLookupBatch.js and 5 other locations - About 35 mins to fix
          handlers/plates-post/doAddAllParkingTicketsToLookupBatch.js on lines 2..5
          handlers/plates-post/doRemoveLicencePlateFromLookupBatch.js on lines 2..5
          handlers/tickets-post/doUpdateRemark.js on lines 2..5
          handlers/tickets-post/doUpdateStatus.js on lines 2..5
          handlers/tickets-post/doUpdateTicket.js on lines 2..5

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

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

          export default function handler(request, response) {
              const result = updateParkingTicketStatus(request.body, request.session.user);
              response.json(result);
          }
          Severity: Major
          Found in handlers/tickets-post/doUpdateStatus.js and 5 other locations - About 35 mins to fix
          handlers/plates-post/doAddAllParkingTicketsToLookupBatch.js on lines 2..5
          handlers/plates-post/doCreateLookupBatch.js on lines 2..5
          handlers/plates-post/doRemoveLicencePlateFromLookupBatch.js on lines 2..5
          handlers/tickets-post/doUpdateRemark.js on lines 2..5
          handlers/tickets-post/doUpdateTicket.js on lines 2..5

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

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

          export default function handler(request, response) {
              const result = updateParkingTicketRemark(request.body, request.session.user);
              response.json(result);
          }
          Severity: Major
          Found in handlers/tickets-post/doUpdateRemark.js and 5 other locations - About 35 mins to fix
          handlers/plates-post/doAddAllParkingTicketsToLookupBatch.js on lines 2..5
          handlers/plates-post/doCreateLookupBatch.js on lines 2..5
          handlers/plates-post/doRemoveLicencePlateFromLookupBatch.js on lines 2..5
          handlers/tickets-post/doUpdateStatus.js on lines 2..5
          handlers/tickets-post/doUpdateTicket.js on lines 2..5

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

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

                          document.querySelector('#editStatus--statusTimeString').value = (_e = statusObject.statusTimeString) !== null && _e !== void 0 ? _e : '';
          Severity: Major
          Found in public/javascripts/ticket-statuses-edit.js and 3 other locations - About 35 mins to fix
          public/javascripts/ticket-statuses-edit.js on lines 108..108
          public/javascripts/ticket-statuses-edit.js on lines 109..109
          public/javascripts/ticket-statuses-edit.js on lines 110..110

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

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

          export default function handler(request, response) {
              const result = addAllParkingTicketsToLookupBatch(request.body, request.session.user);
              response.json(result);
          }
          Severity: Major
          Found in handlers/plates-post/doAddAllParkingTicketsToLookupBatch.js and 5 other locations - About 35 mins to fix
          handlers/plates-post/doCreateLookupBatch.js on lines 2..5
          handlers/plates-post/doRemoveLicencePlateFromLookupBatch.js on lines 2..5
          handlers/tickets-post/doUpdateRemark.js on lines 2..5
          handlers/tickets-post/doUpdateStatus.js on lines 2..5
          handlers/tickets-post/doUpdateTicket.js on lines 2..5

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

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

          export default function handler(request, response) {
              const result = updateParkingTicket(request.body, request.session.user);
              response.json(result);
          }
          Severity: Major
          Found in handlers/tickets-post/doUpdateTicket.js and 5 other locations - About 35 mins to fix
          handlers/plates-post/doAddAllParkingTicketsToLookupBatch.js on lines 2..5
          handlers/plates-post/doCreateLookupBatch.js on lines 2..5
          handlers/plates-post/doRemoveLicencePlateFromLookupBatch.js on lines 2..5
          handlers/tickets-post/doUpdateRemark.js on lines 2..5
          handlers/tickets-post/doUpdateStatus.js on lines 2..5

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

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

                          document.querySelector('#editStatus--statusNote').value = (_c = statusObject.statusNote) !== null && _c !== void 0 ? _c : '';
          Severity: Major
          Found in public/javascripts/ticket-statuses-edit.js and 3 other locations - About 35 mins to fix
          public/javascripts/ticket-statuses-edit.js on lines 108..108
          public/javascripts/ticket-statuses-edit.js on lines 109..109
          public/javascripts/ticket-statuses-edit.js on lines 114..114

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

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

                          document.querySelector('#editStatus--statusField').value = (_a = statusObject.statusField) !== null && _a !== void 0 ? _a : '';
          Severity: Major
          Found in public/javascripts/ticket-statuses-edit.js and 3 other locations - About 35 mins to fix
          public/javascripts/ticket-statuses-edit.js on lines 109..109
          public/javascripts/ticket-statuses-edit.js on lines 110..110
          public/javascripts/ticket-statuses-edit.js on lines 114..114

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

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

                          document.querySelector('#editStatus--statusField2').value = (_b = statusObject.statusField2) !== null && _b !== void 0 ? _b : '';
          Severity: Major
          Found in public/javascripts/ticket-statuses-edit.js and 3 other locations - About 35 mins to fix
          public/javascripts/ticket-statuses-edit.js on lines 108..108
          public/javascripts/ticket-statuses-edit.js on lines 110..110
          public/javascripts/ticket-statuses-edit.js on lines 114..114

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

          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 adminGetHandler = (request, response, next) => {
              if (userIsAdmin(request)) {
                  next();
                  return;
              }
          Severity: Minor
          Found in handlers/permissions.js and 1 other location - About 35 mins to fix
          handlers/permissions.js on lines 18..24

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

          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 updateGetHandler = (request, response, next) => {
              if (userCanUpdate(request)) {
                  next();
                  return;
              }
          Severity: Minor
          Found in handlers/permissions.js and 1 other location - About 35 mins to fix
          handlers/permissions.js on lines 4..10

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

          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

                      onshow: (modalElement) => {
                          const createBatchButtonElements = modalElement.querySelectorAll('.is-create-batch-button');
                          for (const createBatchButtonElement of createBatchButtonElements) {
                              createBatchButtonElement.addEventListener('click', createFunction);
                          }
          Severity: Minor
          Found in public/javascripts/mto-plateExport.js and 1 other location - About 35 mins to fix
          public/javascripts/main.js on lines 198..203

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

          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

                onshow: (modalElement) => {
                  const createBatchButtonElements = modalElement.querySelectorAll(
                    '.is-create-batch-button'
                  )
          
          
          Severity: Minor
          Found in public/javascripts/mto-plateExport.ts and 1 other location - About 35 mins to fix
          public/javascripts/main.ts on lines 338..346

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

          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 default function getNextParkingTicketStatusIndex(ticketId, database) {
              return (database
                  .prepare(`select ifnull(max(statusIndex), 0) as statusIndexMax
                    from ParkingTicketStatusLog
                    where ticketId = ?`)
          Severity: Minor
          Found in database/parkingDB/getNextParkingTicketStatusIndex.js and 1 other location - About 35 mins to fix
          database/parkingDB/getNextParkingTicketRemarkIndex.js on lines 1..8

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

          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