Vizzuality/landgriffon

View on GitHub

Showing 1,408 of 1,408 total issues

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

                  <div>
                    <div className="mb-1">Plots</div>
                    <TreeSelect
                      showSearch
                      multiple
client/src/containers/analysis-visualization/analysis-filters/more-filters/component.tsx on lines 405..417

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

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

export const useSuppliersTrees = <T = Supplier[]>(
  params: SuppliersTreesParams = {},
  options?: UseQueryOptions<Supplier[], unknown, T, ['suppliers-trees', typeof params]>,
) => {
  const query = useQuery(
Severity: Major
Found in client/src/hooks/suppliers/index.ts and 2 other locations - About 3 hrs to fix
client/src/hooks/admin-regions/index.ts on lines 56..77
client/src/hooks/suppliers/index.ts on lines 76..94

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

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

                  <div>
                    <div className="mb-1">T1 Suppliers</div>
                    <TreeSelect
                      showSearch
                      multiple
client/src/containers/analysis-eudr/filters/more-filters/index.tsx on lines 237..249

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

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

    sendgridClient.request(request).then(
      () => {
        res.status(200).json({ status: 'success' });
      },
      (error) => {
Severity: Major
Found in marketing/src/pages/api/newsletter.ts and 2 other locations - About 2 hrs to fix
marketing/src/pages/api/contact.ts on lines 59..68
marketing/src/pages/api/methodology.ts on lines 80..89

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

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

  private sortEntitiesByImpactOfYear(
    impactTable: ScenarioVsScenarioImpactTable,
    sortingYear: number | undefined,
    sortingOrder: ORDER_BY | undefined = ORDER_BY.ASC,
  ): void {
api/src/modules/impact/comparison/actual-vs-scenario.service.ts on lines 362..378
api/src/modules/impact/impact.service.ts on lines 435..451

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

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

    sendgridClient.request(request).then(
      () => {
        res.status(200).json({ status: 'success' });
      },
      (error) => {
Severity: Major
Found in marketing/src/pages/api/methodology.ts and 2 other locations - About 2 hrs to fix
marketing/src/pages/api/contact.ts on lines 59..68
marketing/src/pages/api/newsletter.ts on lines 25..34

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

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

  private sortEntitiesByImpactOfYear(
    impactTable: ActualVsScenarioImpactTable,
    sortingYear: number | undefined,
    sortingOrder: ORDER_BY | undefined = ORDER_BY.ASC,
  ): void {
api/src/modules/impact/comparison/scenario-vs-scenario.service.ts on lines 456..472
api/src/modules/impact/impact.service.ts on lines 435..451

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

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

  private sortEntitiesByImpactOfYear(
    impactTable: ImpactTable,
    sortingYear: number | undefined,
    sortingOrder: ORDER_BY | undefined = ORDER_BY.DESC,
  ): void {
Severity: Major
Found in api/src/modules/impact/impact.service.ts and 2 other locations - About 2 hrs to fix
api/src/modules/impact/comparison/actual-vs-scenario.service.ts on lines 362..378
api/src/modules/impact/comparison/scenario-vs-scenario.service.ts on lines 456..472

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

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

    sendgridMail.send(msg).then(
      () => {
        res.status(200).json({ status: 'success ' });
      },
      (error) => {
Severity: Major
Found in marketing/src/pages/api/contact.ts and 2 other locations - About 2 hrs to fix
marketing/src/pages/api/methodology.ts on lines 80..89
marketing/src/pages/api/newsletter.ts on lines 25..34

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

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 component.tsx has 289 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { useEffect, useMemo, useState } from 'react';
import { useQueryClient, useQueries } from '@tanstack/react-query';
import Flag from 'react-country-flag';
import axios from 'axios';
import DeckGL from '@deck.gl/react/typed';
Severity: Minor
Found in cookie-traceability/src/components/map/component.tsx - About 2 hrs to fix

    Function clusterLocations has 73 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function clusterLocations<L>(
      locations: L[],
      locationAccessors: LocationAccessors<L>,
      getLocationWeight: LocationWeightGetter,
      options?: Partial<Options>,
    Severity: Major
    Found in cookie-traceability/src/lib/flowmap/data/cluster/cluster.ts - About 2 hrs to fix

      Function Step02 has 73 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const Step02: React.FC = () => {
        return (
          <article
            className={cx({
              'flex flex-col lg:flex-row justify-between space-y-10 lg:space-x-10 lg:space-y-0': true,
      Severity: Major
      Found in marketing/src/containers/the-service/steps/02/component.tsx - About 2 hrs to fix

        Function Home has 73 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const Home: React.FC = () => {
          const mainElement = useRef<HTMLDivElement>(null);
          const [currentTradeFlow, setCurrentTradeFlow] = useState<CountryTrade | null>(null);
          const [ingredient, setIngredient] = useState<string>(INGREDIENTS[0].id);
        
        
        Severity: Major
        Found in cookie-traceability/src/pages/index.tsx - About 2 hrs to fix

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

          const WoodSVG = (props?: SVGAttributes<SVGSVGElement>) => {
            return (
              <svg
                xmlns="http://www.w3.org/2000/svg"
                width="24"
          Severity: Major
          Found in client/src/components/icons/commodities/wood.tsx and 5 other locations - About 2 hrs to fix
          client/src/components/icons/commodities/cattle.tsx on lines 3..17
          client/src/components/icons/commodities/cocoa.tsx on lines 3..17
          client/src/components/icons/commodities/palm-oil.tsx on lines 3..17
          client/src/components/icons/commodities/rubber.tsx on lines 3..17
          client/src/components/icons/commodities/soy.tsx on lines 3..17

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

          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

          const CocoaSVG = (props?: SVGAttributes<SVGSVGElement>) => {
            return (
              <svg
                xmlns="http://www.w3.org/2000/svg"
                width="24"
          Severity: Major
          Found in client/src/components/icons/commodities/cocoa.tsx and 5 other locations - About 2 hrs to fix
          client/src/components/icons/commodities/cattle.tsx on lines 3..17
          client/src/components/icons/commodities/palm-oil.tsx on lines 3..17
          client/src/components/icons/commodities/rubber.tsx on lines 3..17
          client/src/components/icons/commodities/soy.tsx on lines 3..17
          client/src/components/icons/commodities/wood.tsx on lines 3..17

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

          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

          const RubberSVG = (props?: SVGAttributes<SVGSVGElement>) => {
            return (
              <svg
                xmlns="http://www.w3.org/2000/svg"
                width="24"
          Severity: Major
          Found in client/src/components/icons/commodities/rubber.tsx and 5 other locations - About 2 hrs to fix
          client/src/components/icons/commodities/cattle.tsx on lines 3..17
          client/src/components/icons/commodities/cocoa.tsx on lines 3..17
          client/src/components/icons/commodities/palm-oil.tsx on lines 3..17
          client/src/components/icons/commodities/soy.tsx on lines 3..17
          client/src/components/icons/commodities/wood.tsx on lines 3..17

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

          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

          const SoySVG = (props?: SVGAttributes<SVGSVGElement>) => {
            return (
              <svg
                xmlns="http://www.w3.org/2000/svg"
                width="24"
          Severity: Major
          Found in client/src/components/icons/commodities/soy.tsx and 5 other locations - About 2 hrs to fix
          client/src/components/icons/commodities/cattle.tsx on lines 3..17
          client/src/components/icons/commodities/cocoa.tsx on lines 3..17
          client/src/components/icons/commodities/palm-oil.tsx on lines 3..17
          client/src/components/icons/commodities/rubber.tsx on lines 3..17
          client/src/components/icons/commodities/wood.tsx on lines 3..17

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

          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

          const PalmOilSVG = (props?: SVGAttributes<SVGSVGElement>) => {
            return (
              <svg
                xmlns="http://www.w3.org/2000/svg"
                width="24"
          Severity: Major
          Found in client/src/components/icons/commodities/palm-oil.tsx and 5 other locations - About 2 hrs to fix
          client/src/components/icons/commodities/cattle.tsx on lines 3..17
          client/src/components/icons/commodities/cocoa.tsx on lines 3..17
          client/src/components/icons/commodities/rubber.tsx on lines 3..17
          client/src/components/icons/commodities/soy.tsx on lines 3..17
          client/src/components/icons/commodities/wood.tsx on lines 3..17

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

          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

          const CattleSVG = (props?: SVGAttributes<SVGSVGElement>) => {
            return (
              <svg
                xmlns="http://www.w3.org/2000/svg"
                width="24"
          Severity: Major
          Found in client/src/components/icons/commodities/cattle.tsx and 5 other locations - About 2 hrs to fix
          client/src/components/icons/commodities/cocoa.tsx on lines 3..17
          client/src/components/icons/commodities/palm-oil.tsx on lines 3..17
          client/src/components/icons/commodities/rubber.tsx on lines 3..17
          client/src/components/icons/commodities/soy.tsx on lines 3..17
          client/src/components/icons/commodities/wood.tsx on lines 3..17

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

          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

            async createBusinessUnitDtos(
              importData: Record<string, any>[],
            ): Promise<CreateBusinessUnitDto[]> {
              const businessUnitDtos: CreateBusinessUnitDto[] = [];
              for (const importRow of importData) {
          api/src/modules/import-data/sourcing-data/dto-processor.service.ts on lines 177..185

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

          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