kleros/kleros-v2

View on GitHub

Showing 1,220 of 1,343 total issues

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

      {
        type: "abi/event",
        abi: "event Transfer(address indexed from, address indexed to, uint256 value)",
        address: "0xa8e4235129258404A2ed3D36DAd20708CcB2d0b7",
        eventFilter: {
Severity: Major
Found in kleros-sdk/test/dataMappings.test.ts and 1 other location - About 1 hr to fix
kleros-sdk/test/dataMappings.test.ts on lines 294..305

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

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

  return useQuery({
    queryKey: [`allCasesQuery`],
    queryFn: async () =>
      await graphqlBatcher.fetch({ id: crypto.randomUUID(), document: allCasesQuery, variables: {} }),
  });
Severity: Major
Found in web/src/hooks/queries/useAllCasesQuery.ts and 1 other location - About 1 hr to fix
web/src/hooks/queries/useCounter.ts on lines 29..32

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

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

    const mapping = {
      type: "abi/event",
      abi: "event Transfer(address indexed from, address indexed to, uint256 value)",
      address: "0xa8e4235129258404A2ed3D36DAd20708CcB2d0b7",
      eventFilter: {
Severity: Major
Found in kleros-sdk/test/dataMappings.test.ts and 1 other location - About 1 hr to fix
kleros-sdk/test/dataMappings.test.ts on lines 143..154

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

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

  return useQuery<CounterQuery>({
    queryKey: [`useCounterQuery`],
    queryFn: async () => await graphqlBatcher.fetch({ id: crypto.randomUUID(), document: counterQuery, variables: {} }),
  });
Severity: Major
Found in web/src/hooks/queries/useCounter.ts and 1 other location - About 1 hr to fix
web/src/hooks/queries/useAllCasesQuery.ts on lines 21..25

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

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 getFormattedRewards has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

export const getFormattedRewards = (data: any, pricesData: any) => {
  return rewards.map(({ token, coinId, getValue, getAmount }) => {
    const coinPrice = !isUndefined(pricesData) ? pricesData[CoinIds[token]]?.price : undefined;

    const totalReward = data && calculateTotalJurorReward(coinId, data);
Severity: Minor
Found in web/src/utils/jurorRewardConfig.ts - About 1 hr 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 getCourtsPath has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

export const getCourtsPath = (
  node: CourtTreeQuery["court"],
  id: string | undefined,
  path: IItem[] = []
): IItem[] | null => {
Severity: Minor
Found in web/src/pages/Courts/CourtDetails/index.tsx - About 1 hr 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 updateCountsAndGetCurrentRuling has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function updateCountsAndGetCurrentRuling(id: string, choice: BigInt, delta: BigInt): CurrentRulingInfo {
  const round = ClassicRound.load(id);
  if (!round) return { ruling: ZERO, tied: false };
  const choiceNum = choice.toI32();
  const newChoiceCount = round.counts[choiceNum].plus(delta);
Severity: Minor
Found in subgraph/core/src/entities/ClassicRound.ts - About 1 hr to fix

Function isRngReady has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const isRngReady = async () => {
  const { randomizerRng, blockHashRNG, sortition } = await getContracts();
  const currentRng = await sortition.rng();
  if (currentRng === randomizerRng.address) {
    const requesterID = await randomizerRng.requesterToID(sortition.address);
Severity: Minor
Found in contracts/scripts/keeperBot.ts - About 1 hr to fix

Function executeDelayedStakes has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const executeDelayedStakes = async () => {
  const { sortition } = await getContracts();

  // delayedStakes = 1 + delayedStakeWriteIndex - delayedStakeReadIndex
  const delayedStakesRemaining = BigNumber.from(1)
Severity: Minor
Found in contracts/scripts/keeperBot.ts - About 1 hr to fix

Function accordionItems has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const accordionItems = useMemo(() => {
    return drawnJurors
      .map((drawnJuror) =>
        !isUndefined(drawnJuror.vote?.justification?.choice)
          ? {
Severity: Minor
Found in web/src/pages/Cases/CaseDetails/Voting/VotesDetails/index.tsx - About 1 hr to fix

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

const StyledChainContainer = styled.div`
  display: flex;
  height: 34px;
  gap: 0.5rem;
  justify-content: center;
Severity: Major
Found in web/src/layout/Header/navbar/Menu/Settings/General.tsx and 5 other locations - About 1 hr to fix
web/src/components/HowItWorks.tsx on lines 6..26
web/src/components/Popup/MiniGuides/Onboarding/PnkLogoAndTitle.tsx on lines 27..37
web/src/pages/Cases/CaseDetails/MaintenanceButtons/index.tsx on lines 30..47
web/src/pages/Cases/CaseDetails/Voting/VotesDetails/index.tsx on lines 53..61
web/src/pages/Courts/StakeMaintenanceButton/index.tsx on lines 21..38

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

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 StyledCourtLabel = styled.label`
  font-size: 24px;
  background: linear-gradient(
    90deg,
    ${({ theme }) => theme.secondaryPurple} 0%,
web/src/components/HowItWorks.tsx on lines 6..26
web/src/layout/Header/navbar/Menu/Settings/General.tsx on lines 18..34
web/src/pages/Cases/CaseDetails/MaintenanceButtons/index.tsx on lines 30..47
web/src/pages/Cases/CaseDetails/Voting/VotesDetails/index.tsx on lines 53..61
web/src/pages/Courts/StakeMaintenanceButton/index.tsx on lines 21..38

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

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 Container = styled.div`
  display: flex;
  align-items: center;
  gap: 8px;
  color: ${({ theme }) => theme.primaryBlue};
Severity: Major
Found in web/src/components/HowItWorks.tsx and 5 other locations - About 1 hr to fix
web/src/components/Popup/MiniGuides/Onboarding/PnkLogoAndTitle.tsx on lines 27..37
web/src/layout/Header/navbar/Menu/Settings/General.tsx on lines 18..34
web/src/pages/Cases/CaseDetails/MaintenanceButtons/index.tsx on lines 30..47
web/src/pages/Cases/CaseDetails/Voting/VotesDetails/index.tsx on lines 53..61
web/src/pages/Courts/StakeMaintenanceButton/index.tsx on lines 21..38

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

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

task("simulate:withdraw-fees-and-rewards", "Withdraws fees and rewards for people who appealed and won")
  .addParam("walletindex", "Index of the wallet to use for executing the ruling")
  .addParam("disputeid", "The ID of the dispute to execute ruling")
  .addParam("beneficiary", "The address of the person who won the appeal")
  .addOptionalParam("roundid", "the round ID the appeal took place")
Severity: Major
Found in contracts/scripts/simulations/tasks.ts and 2 other locations - About 1 hr to fix
contracts/scripts/simulations/tasks.ts on lines 119..165
contracts/scripts/simulations/tasks.ts on lines 274..299

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

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 PopupContainer = styled.div`
  display: flex;
  flex-direction: column;
  position: absolute;
  height: fit-content;
Severity: Major
Found in web/src/pages/Courts/StakeMaintenanceButton/index.tsx and 5 other locations - About 1 hr to fix
web/src/components/HowItWorks.tsx on lines 6..26
web/src/components/Popup/MiniGuides/Onboarding/PnkLogoAndTitle.tsx on lines 27..37
web/src/layout/Header/navbar/Menu/Settings/General.tsx on lines 18..34
web/src/pages/Cases/CaseDetails/MaintenanceButtons/index.tsx on lines 30..47
web/src/pages/Cases/CaseDetails/Voting/VotesDetails/index.tsx on lines 53..61

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

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 PopupContainer = styled.div`
  display: flex;
  flex-direction: column;
  position: absolute;
  height: fit-content;
web/src/components/HowItWorks.tsx on lines 6..26
web/src/components/Popup/MiniGuides/Onboarding/PnkLogoAndTitle.tsx on lines 27..37
web/src/layout/Header/navbar/Menu/Settings/General.tsx on lines 18..34
web/src/pages/Cases/CaseDetails/Voting/VotesDetails/index.tsx on lines 53..61
web/src/pages/Courts/StakeMaintenanceButton/index.tsx on lines 21..38

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

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

      expect(await sortition.getJurorCourtIDs(deployer)).to.be.deep.equal([BigNumber.from("1"), BigNumber.from("2")]);
Severity: Major
Found in contracts/test/arbitration/staking-neo.ts and 1 other location - About 1 hr to fix
contracts/test/arbitration/staking.ts on lines 51..51

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

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

const StyledModal = styled(Modal)`
  position: absolute;
  top: 50%;
  left: 50%;
  right: auto;
web/src/components/LightButton.tsx on lines 6..21
web/src/pages/Cases/AttachmentDisplay/Header.tsx on lines 41..57
web/src/pages/Cases/CaseDetails/Voting/PendingVotesBox.tsx on lines 8..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 56.

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 JustificationText = styled.div`
  color: ${({ theme }) => theme.secondaryText};
  font-size: 16px;
  line-height: 1.2;
  &:before {
web/src/components/HowItWorks.tsx on lines 6..26
web/src/components/Popup/MiniGuides/Onboarding/PnkLogoAndTitle.tsx on lines 27..37
web/src/layout/Header/navbar/Menu/Settings/General.tsx on lines 18..34
web/src/pages/Cases/CaseDetails/MaintenanceButtons/index.tsx on lines 30..47
web/src/pages/Courts/StakeMaintenanceButton/index.tsx on lines 21..38

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

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

task("simulate:cast-vote", "Casts a vote for a drawn juror")
  .addParam("walletindex", "Index of the wallet to use for casting the vote")
  .addParam("disputeid", "The ID of the dispute to vote on")
  .addParam("choice", "The ID of the choice you will vote")
  .addParam("justification", "if there was a commit phase this must match the justification too")
Severity: Major
Found in contracts/scripts/simulations/tasks.ts and 2 other locations - About 1 hr to fix
contracts/scripts/simulations/tasks.ts on lines 119..165
contracts/scripts/simulations/tasks.ts on lines 355..377

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

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