Showing 313 of 321 total issues

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

            if (this.added.has(value.id)) {
                this.added.delete(value.id)
            } else {
                this.removed.add(value.id)
            }
Severity: Major
Found in src/model/ModelCollectionProperty.js and 1 other location - About 1 hr to fix
src/model/ModelCollectionProperty.js on lines 70..74

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

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

        if (this.removed.has(value.id)) {
            this.removed.delete(value.id)
        } else {
            this.added.add(value.id)
        }
Severity: Major
Found in src/model/ModelCollectionProperty.js and 1 other location - About 1 hr to fix
src/model/ModelCollectionProperty.js on lines 93..97

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

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 not return the reference property if there is no value for the property', () => {
            model.modelDefinition.modelValidations.randomObject = {
                type: 'REFERENCE',
            }

Severity: Major
Found in src/model/__tests__/ModelBase.spec.js and 1 other location - About 1 hr to fix
src/model/__tests__/ModelBase.spec.js on lines 586..594

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

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

        it('should start the first week of 2015 in the previous year', () => {
            const weeksFor2015 = generateWeeklyPeriodsForYear(2015)

            expect(weeksFor2015[0]).toEqual({
                startDate: '2014-12-29',
Severity: Major
Found in src/period/generators/__tests__/weekly.spec.js and 5 other locations - About 1 hr to fix
src/period/generators/__tests__/daily.spec.js on lines 14..23
src/period/generators/__tests__/monthly.spec.js on lines 19..28
src/period/generators/__tests__/weekly.spec.js on lines 40..49
src/period/generators/__tests__/weekly.spec.js on lines 62..71
src/period/generators/__tests__/weekly.spec.js on lines 73..82

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

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

        it('should return the correct content for each period', () => {
            const monthlyPeriods = generateMonthlyPeriodsForYear(2017)

            expect(monthlyPeriods[0]).toEqual({
                startDate: '2017-01-01',
Severity: Major
Found in src/period/generators/__tests__/monthly.spec.js and 5 other locations - About 1 hr to fix
src/period/generators/__tests__/daily.spec.js on lines 14..23
src/period/generators/__tests__/weekly.spec.js on lines 40..49
src/period/generators/__tests__/weekly.spec.js on lines 51..60
src/period/generators/__tests__/weekly.spec.js on lines 62..71
src/period/generators/__tests__/weekly.spec.js on lines 73..82

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

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

        it('should have the expected format for each period', () => {
            const periods = generateDailyPeriodsForYear(2017)

            expect(periods[0]).toEqual({
                startDate: '2017-01-01',
Severity: Major
Found in src/period/generators/__tests__/daily.spec.js and 5 other locations - About 1 hr to fix
src/period/generators/__tests__/monthly.spec.js on lines 19..28
src/period/generators/__tests__/weekly.spec.js on lines 40..49
src/period/generators/__tests__/weekly.spec.js on lines 51..60
src/period/generators/__tests__/weekly.spec.js on lines 62..71
src/period/generators/__tests__/weekly.spec.js on lines 73..82

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

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

        it('should return the correct first week for 2014', () => {
            const weeksFor2014 = generateWeeklyPeriodsForYear(2014)

            expect(weeksFor2014[0]).toEqual({
                startDate: '2013-12-30',
Severity: Major
Found in src/period/generators/__tests__/weekly.spec.js and 5 other locations - About 1 hr to fix
src/period/generators/__tests__/daily.spec.js on lines 14..23
src/period/generators/__tests__/monthly.spec.js on lines 19..28
src/period/generators/__tests__/weekly.spec.js on lines 40..49
src/period/generators/__tests__/weekly.spec.js on lines 51..60
src/period/generators/__tests__/weekly.spec.js on lines 73..82

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

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 not return the collection for the property if there is no modelValidation for the property', () => {
            model.modelDefinition.modelValidations.indicators = {
                type: 'COLLECTION',
            }

Severity: Major
Found in src/model/__tests__/ModelBase.spec.js and 1 other location - About 1 hr to fix
src/model/__tests__/ModelBase.spec.js on lines 643..649

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

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

        it('should return the correct first week for 2004', () => {
            const weeksFor2004 = generateWeeklyPeriodsForYear(2004)

            expect(weeksFor2004[0]).toEqual({
                startDate: '2003-12-29',
Severity: Major
Found in src/period/generators/__tests__/weekly.spec.js and 5 other locations - About 1 hr to fix
src/period/generators/__tests__/daily.spec.js on lines 14..23
src/period/generators/__tests__/monthly.spec.js on lines 19..28
src/period/generators/__tests__/weekly.spec.js on lines 40..49
src/period/generators/__tests__/weekly.spec.js on lines 51..60
src/period/generators/__tests__/weekly.spec.js on lines 62..71

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

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

        it('should generate the correct result for each period', () => {
            const periods = generateWeeklyPeriodsForYear(2017)

            expect(periods[0]).toEqual({
                startDate: '2017-01-02',
Severity: Major
Found in src/period/generators/__tests__/weekly.spec.js and 5 other locations - About 1 hr to fix
src/period/generators/__tests__/daily.spec.js on lines 14..23
src/period/generators/__tests__/monthly.spec.js on lines 19..28
src/period/generators/__tests__/weekly.spec.js on lines 51..60
src/period/generators/__tests__/weekly.spec.js on lines 62..71
src/period/generators/__tests__/weekly.spec.js on lines 73..82

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

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

const AnalyticsRequestFiltersMixin = (base) =>
    class extends base {
        /**
         * Adds/updates the dx dimension filter to use in the request.
         *
Severity: Minor
Found in src/analytics/AnalyticsRequestFiltersMixin.js - 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 AnalyticsRequestDimensionsMixin has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

const AnalyticsRequestDimensionsMixin = (base) =>
    class extends base {
        /**
         * Adds/updates the dx dimension to use in the request.
         *
Severity: Minor
Found in src/analytics/AnalyticsRequestDimensionsMixin.js - 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 validate has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    validate() {
        return new Promise((resolve, reject) => {
            let validationMessages = []

            function unique(current, property) {
Severity: Minor
Found in src/model/ModelBase.js - About 1 hr to fix

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

    const isPrefixHeader = (header, dimensions) => {
        if (DEFAULT_PREFIX_IGNORE_HEADERS.includes(header.name)) {
            return false
        }
    
    
    Severity: Major
    Found in src/analytics/AnalyticsResponse.js and 1 other location - About 1 hr to fix
    src/analytics/AnalyticsResponse.js on lines 49..55

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

    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 isCollectHeader = (header, dimensions) => {
        if (DEFAULT_COLLECT_IGNORE_HEADERS.includes(header.name)) {
            return false
        }
    
    
    Severity: Major
    Found in src/analytics/AnalyticsResponse.js and 1 other location - About 1 hr to fix
    src/analytics/AnalyticsResponse.js on lines 41..47

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

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

        get(systemSettingsKey) {
            if (this.settings && this.settings[systemSettingsKey]) {
                return Promise.resolve(this.settings[systemSettingsKey])
            }
    
    
    Severity: Minor
    Found in src/system/SystemSettings.js - About 1 hr to fix

      Function load has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          load(options, forceReload = false) {
              if (!this.hasUnloadedData && !forceReload) {
                  return Promise.resolve(this)
              }
      
      
      Severity: Minor
      Found in src/model/ModelCollectionProperty.js - About 1 hr to fix

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

                            configuration.get('systemId').then((res2) => {
                                expect(res2).toBe(mockConfiguration.systemId)
                                expect(mockApi.get.mock.calls[0][0]).toBe(
                                    'configuration'
                                )
        Severity: Major
        Found in src/system/__tests__/SystemConfiguration.spec.js and 1 other location - About 1 hr to fix
        src/system/__tests__/SystemConfiguration.spec.js on lines 220..225

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

        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

                            configuration.get('systemId', true).then((res2) => {
                                expect(res2).toBe(mockConfiguration.systemId)
                                expect(mockApi.get.mock.calls[1][0]).toBe(
                                    'configuration'
                                )
        Severity: Major
        Found in src/system/__tests__/SystemConfiguration.spec.js and 1 other location - About 1 hr to fix
        src/system/__tests__/SystemConfiguration.spec.js on lines 204..209

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

        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 unloadedWithValues
                        .load({ paging: false, fields: 'id,displayName' })
                        .then(() => {
                            expect(api.get).toHaveBeenCalledWith(
                                [
        Severity: Major
        Found in src/model/__tests__/ModelCollectionProperty.spec.js and 1 other location - About 1 hr to fix
        src/model/__tests__/ModelCollectionProperty.spec.js on lines 404..415

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

        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