Anapher/Strive

View on GitHub

Showing 735 of 735 total issues

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

test('[SynchronizedSingle] applyState() sets the object in state', () => {
   const obj = synchronizedPropertyFactory({ type: 'single', baseId: 'test', propertyName: 'testProp' });
   const syncObj = { isOpen: true };

   const state = {} as any;
src/Web/WebSPA/Client/src/store/signal/synchronization/synchronized-property.test.ts on lines 11..19

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

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

            <FormControlLabel
               control={
                  <Controller
                     render={({ field: { onChange, value } }) => (
                        <Checkbox onChange={(e) => onChange(e.target.checked)} checked={value} />
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 178..189
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 190..201
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 202..213
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 227..238
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 312..323

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

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

            <FormControlLabel
               control={
                  <Controller
                     render={({ field: { onChange, value } }) => (
                        <Checkbox onChange={(e) => onChange(e.target.checked)} checked={value} />
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 178..189
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 190..201
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 202..213
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 215..226
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 312..323

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

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

            <FormControlLabel
               control={
                  <Controller
                     render={({ field: { onChange, value } }) => (
                        <Checkbox onChange={(e) => onChange(e.target.checked)} checked={value} />
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 178..189
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 190..201
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 202..213
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 215..226
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 227..238

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

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

               <FormControlLabel
                  control={
                     <Controller
                        render={({ field: { onChange, value } }) => (
                           <Checkbox onChange={(e) => onChange(e.target.checked)} checked={value} />
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 178..189
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 190..201
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 215..226
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 227..238
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 312..323

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

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

               <FormControlLabel
                  control={
                     <Controller
                        render={({ field: { onChange, value } }) => (
                           <Checkbox onChange={(e) => onChange(e.target.checked)} checked={value} />
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 178..189
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 202..213
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 215..226
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 227..238
src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 312..323

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

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

test('[SynchronizedByExactId] applyState() sets the object in state', () => {
   const obj = synchronizedPropertyFactory({ type: 'exactId', syncObjId: 'test', propertyName: 'testProp' });
   const syncObj = { isOpen: true };

   const state = {} as any;
src/Web/WebSPA/Client/src/store/signal/synchronization/synchronized-property.test.ts on lines 38..46

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

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

   async updateParticipant(participant: Participant): Promise<void> {
      const status = this.participantStatus.get(participant.participantId);
      if (status) {
         logger.info('updateParticipant() | participantId: %s | roomId: %s', participant.participantId, this.id);

Severity: Minor
Found in src/Services/SFU/src/lib/rooms/room.ts - About 3 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Function Whiteboard has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

export default function Whiteboard({
   canvas,
   onPushAction,
   canUndo,
   onUndo,

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

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

test('[SynchronizedByExactId] isTriggeredBy() only for exact id', () => {
   const obj = synchronizedPropertyFactory({ type: 'exactId', syncObjId: 'test', propertyName: 'testProp' });
   expect(obj.isTriggeredBy('test')).toBeTruthy();
   expect(obj.isTriggeredBy('test2')).toBeFalsy();
   expect(obj.isTriggeredBy('test?hello=true')).toBeFalsy();
src/Web/WebSPA/Client/src/store/signal/synchronization/synchronized-property.test.ts on lines 31..36
src/Web/WebSPA/Client/src/store/signal/synchronization/synchronized-property.test.ts on lines 58..63

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

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 getOptions: (track: MediaStreamTrack) => Partial<ProducerOptions> = (track) => {
      const settings = track.getSettings();
      log('Got video with %d x %d', settings.width, settings.height);

      const scaledLayers = fetchEncodings(
Severity: Major
Found in src/Web/WebSPA/Client/src/store/webrtc/hooks/useWebcam.ts and 1 other location - About 3 hrs to fix
src/Web/WebSPA/Client/src/store/webrtc/hooks/useScreen.ts on lines 36..48

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

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

test('[SynchronizedSingle] isTriggeredBy() for all objects with base id', () => {
   const obj = synchronizedPropertyFactory({ type: 'single', baseId: 'test', propertyName: 'testProp' });
   expect(obj.isTriggeredBy('test')).toBeTruthy();
   expect(obj.isTriggeredBy('test2')).toBeFalsy();
   expect(obj.isTriggeredBy('test?hello=true')).toBeTruthy();
src/Web/WebSPA/Client/src/store/signal/synchronization/synchronized-property.test.ts on lines 4..9
src/Web/WebSPA/Client/src/store/signal/synchronization/synchronized-property.test.ts on lines 58..63

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

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 getOptions: (track: MediaStreamTrack) => Partial<ProducerOptions> = (track) => {
      const settings = track.getSettings();
      log('Got video with %d x %d', settings.width, settings.height);

      const scaledLayers = fetchEncodings(
Severity: Major
Found in src/Web/WebSPA/Client/src/store/webrtc/hooks/useScreen.ts and 1 other location - About 3 hrs to fix
src/Web/WebSPA/Client/src/store/webrtc/hooks/useWebcam.ts on lines 38..50

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

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

test('[SynchronizedMultiple] isTriggeredBy() for all objects with base id', () => {
   const obj = synchronizedPropertyFactory({ type: 'multiple', baseId: 'test', propertyName: 'testProp' });
   expect(obj.isTriggeredBy('test')).toBeTruthy();
   expect(obj.isTriggeredBy('test2')).toBeFalsy();
   expect(obj.isTriggeredBy('test?hello=true')).toBeTruthy();
src/Web/WebSPA/Client/src/store/signal/synchronization/synchronized-property.test.ts on lines 4..9
src/Web/WebSPA/Client/src/store/signal/synchronization/synchronized-property.test.ts on lines 31..36

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

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

        [Fact]
        public async Task PatchBreakoutRooms_IncreaseRooms_CreateRooms()
        {
            // arrange
            var (connection, _) = await ConnectToOpenedConference();
src/Services/ConferenceManagement/Strive.IntegrationTests/Services/BreakoutRoomTests.cs on lines 249..271

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

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

        [Fact]
        public async Task PatchBreakoutRooms_DecreaseRooms_RemoveRooms()
        {
            // arrange
            var (connection, _) = await ConnectToOpenedConference();
src/Services/ConferenceManagement/Strive.IntegrationTests/Services/BreakoutRoomTests.cs on lines 225..247

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

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 whiteboard-controller.ts has 305 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { fabric } from 'fabric';
import { IEvent } from 'fabric/fabric-impl';
import jsonPatch from 'fast-json-patch';
import _ from 'lodash';
import {

    File PollTests.cs has 305 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    using System.Linq;
    using System.Threading.Tasks;
    using MediatR;
    using Microsoft.AspNetCore.SignalR.Client;
    using Strive.Core.Errors;

      Method ConfigureServices has 81 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public IServiceProvider ConfigureServices(IServiceCollection services)
              {
                  services.AddLogging();
      
                  // Authentication
      Severity: Major
      Found in src/Services/ConferenceManagement/Strive/Startup.cs - About 3 hrs to fix

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

           configureCanvas(canvas: Canvas) {
              super.configureCanvas(canvas);
        
              canvas.isDrawingMode = false;
              canvas.selection = false;
        src/Web/WebSPA/Client/src/features/whiteboard/tools/PanTool.ts on lines 10..22
        src/Web/WebSPA/Client/src/features/whiteboard/tools/TextTool.ts on lines 10..22

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

        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