nukeop/nuclear

View on GitHub

Showing 654 of 654 total issues

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

    return artistAlbums.results.slice(1).map(album => ({
      id: album.collectionId,
      coverImage: album.artworkUrl100.replace('100x100bb.jpg', '250x250bb.jpg'),
      thumb: album.artworkUrl100.replace('100x100bb.jpg', '1600x1600bb.jpg'),
      title: album.collectionName,
Severity: Major
Found in packages/core/src/plugins/meta/itunesmusic.ts and 1 other location - About 2 hrs to fix
packages/core/src/plugins/meta/itunesmusic.ts on lines 46..54

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

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 getMenu has 66 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  getMenu() {
    const template = [];

    // Playing status
    if (this.playerContext.track) {
Severity: Major
Found in packages/main/src/services/trayMenu/index.ts - About 2 hrs to fix

    Function mockAlbumSongsSearch has 64 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function mockAlbumSongsSearch() {
      global.fetch = jest.fn(() =>
        Promise.resolve({
          json: jest.fn(() => ({
            'resultCount': 2,
    Severity: Major
    Found in packages/core/src/plugins/meta/metaMocks/iTunesMusicMocks.ts - About 2 hrs to fix

      File PlaylistViewContainer.test.tsx has 273 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* eslint-disable @typescript-eslint/no-var-requires */
      /* eslint-disable @typescript-eslint/ban-ts-comment */
      import { fireEvent, render, waitFor } from '@testing-library/react';
      import React from 'react';
      import { createMemoryHistory } from 'history';

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

        const PlaybackRateSliderColors = {
          fillColor: { r: 248, g: 248, b: 242, a: 1 },
          trackColor: { r: 68, g: 71, b: 90, a: 1 },
          thumbColor: { r: 248, g: 248, b: 242, a: 1 }
        };
        packages/app/app/components/Settings/index.tsx on lines 19..23
        packages/ui/lib/components/VolumeControls/VolumeSlider/index.tsx on lines 14..18

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

        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

        const volumeSliderColors = {
          fillColor: { r: 248, g: 248, b: 242, a: 1 },
          trackColor: { r: 68, g: 71, b: 90, a: 1 },
          thumbColor: { r: 248, g: 248, b: 242, a: 1 }
        };
        packages/app/app/components/Settings/index.tsx on lines 19..23
        packages/ui/lib/components/VolumeControls/PlaybackRateSlider/index.tsx on lines 14..18

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

        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

        const volumeSliderColors = {
          fillColor: { r: 248, g: 248, b: 242, a: 1 },
          trackColor: { r: 68, g: 71, b: 90, a: 1 },
          thumbColor: { r: 248, g: 248, b: 242, a: 1 }
        };
        Severity: Major
        Found in packages/app/app/components/Settings/index.tsx and 2 other locations - About 2 hrs to fix
        packages/ui/lib/components/VolumeControls/PlaybackRateSlider/index.tsx on lines 14..18
        packages/ui/lib/components/VolumeControls/VolumeSlider/index.tsx on lines 14..18

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

        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

          it('should display a context popup on right click', async () => {
            const { component } = mountComponent();
            const track = component.getByTestId('queue-popup-uuid1');
            await waitFor(() => fireEvent.contextMenu(track));
            expect(component.asFragment()).toMatchSnapshot();
        packages/app/app/containers/PlayQueueContainer/PlayQueueContainer.test.tsx on lines 48..53

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

        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

          router.post('/', validate(updateEqualizerSchema), (req, res) => {
            rendererWindow.send(IpcEvents.EQUALIZER_UPDATE, req.body.values);
            res.send();
          })
            .describe(getStandardDescription({
        Severity: Major
        Found in packages/main/src/services/http/server/api/equalizer.ts and 2 other locations - About 2 hrs to fix
        packages/main/src/services/http/server/api/player.ts on lines 82..92
        packages/main/src/services/http/server/api/player.ts on lines 94..104

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

        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

          router
            .post('/seek', validate(seekSchema), (req, res) => {
              rendererWindow.send(IpcEvents.SEEK, req.body.value);
              res.send();
            })
        Severity: Major
        Found in packages/main/src/services/http/server/api/player.ts and 2 other locations - About 2 hrs to fix
        packages/main/src/services/http/server/api/equalizer.ts on lines 26..33
        packages/main/src/services/http/server/api/player.ts on lines 82..92

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

        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

          it('should display a context popup on right click for tracks without thumbnails', async () => {
            const { component } = mountComponent();
            const track = component.getByTestId('queue-popup-uuid3');
            await waitFor(() => fireEvent.contextMenu(track));
            expect(component.asFragment()).toMatchSnapshot();
        packages/app/app/containers/PlayQueueContainer/PlayQueueContainer.test.tsx on lines 41..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 85.

        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

          router
            .post('/volume', validate(volumeSchema), (req, res) => {
              rendererWindow.send(IpcEvents.VOLUME, req.body.value);
              res.send();
            })
        Severity: Major
        Found in packages/main/src/services/http/server/api/player.ts and 2 other locations - About 2 hrs to fix
        packages/main/src/services/http/server/api/equalizer.ts on lines 26..33
        packages/main/src/services/http/server/api/player.ts on lines 94..104

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

        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

              <ContextPopup
                trigger={<button>Test</button>}
                artist='Test artist'
                title='Test title'
              >
        Severity: Major
        Found in packages/ui/stories/components/contextPopup.stories.js and 1 other location - About 2 hrs to fix
        packages/ui/stories/components/contextPopup.stories.js on lines 33..52

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

        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

              <ContextPopup
                trigger={<button>Test</button>}
                artist='Test artist'
                title='Test title'
                thumb='https://i.imgur.com/4euOws2.jpg'
        Severity: Major
        Found in packages/ui/stories/components/contextPopup.stories.js and 1 other location - About 2 hrs to fix
        packages/ui/stories/components/contextPopup.stories.js on lines 10..28

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

        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

          async getTagArtists(tag: string): Promise<LastfmArtistShort[]> {
            const result = await (await fetch(this.addApiKey(
              scrobblingApiUrl +
              '?method=tag.getTopArtists&format=json&tag=' +
              tag
        Severity: Major
        Found in packages/core/src/rest/Lastfm.ts and 2 other locations - About 2 hrs to fix
        packages/core/src/rest/Lastfm.ts on lines 110..118
        packages/core/src/rest/Lastfm.ts on lines 120..127

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

        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

              StreamMappingsService.postStreamMapping({
                artist: getTrackArtist(currentTrack),
                title: currentTrack.name,
                source: selectedStreamProvider,
                stream_id: head(currentTrack.streams).id,
        packages/app/app/containers/StreamVerificationContainer/index.tsx on lines 95..106

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

        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

            expect(state?.queue?.queueItems).toEqual([
              expect.objectContaining({
                artist: 'test artist',
                name: 'test artist top track 1'
              }),
        packages/app/app/containers/AlbumViewContainer/AlbumViewContainer.test.tsx on lines 152..165
        packages/app/app/containers/AlbumViewContainer/AlbumViewContainer.test.tsx on lines 175..188

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

        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

            expect(state?.queue?.queueItems).toEqual([
              expect.objectContaining({
                artist: 'test artist',
                name: 'test track 1'
              }),
        packages/app/app/containers/AlbumViewContainer/AlbumViewContainer.test.tsx on lines 175..188
        packages/app/app/containers/ArtistViewContainer/ArtistViewContainer.test.tsx on lines 168..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 84.

        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

          async getTagTracks(tag: string): Promise<LastfmTrackMatch[]> {
            const result = await (await fetch(this.addApiKey(
              scrobblingApiUrl +
              '?method=tag.getTopTracks&format=json&tag=' +
              tag
        Severity: Major
        Found in packages/core/src/rest/Lastfm.ts and 2 other locations - About 2 hrs to fix
        packages/core/src/rest/Lastfm.ts on lines 120..127
        packages/core/src/rest/Lastfm.ts on lines 129..137

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

        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

            expect(state?.queue?.queueItems).toEqual([
              expect.objectContaining({
                artist: 'test artist',
                name: 'test track 1'
              }),
        packages/app/app/containers/AlbumViewContainer/AlbumViewContainer.test.tsx on lines 152..165
        packages/app/app/containers/ArtistViewContainer/ArtistViewContainer.test.tsx on lines 168..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 84.

        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