Aam-Digital/ndb-core

View on GitHub

Showing 282 of 313 total issues

File data-transformation.service.spec.ts has 391 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { TestBed, waitForAsync } from "@angular/core/testing";

import { DataTransformationService } from "./data-transformation.service";
import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
import { Database } from "../../database/database";

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

    describe("DialogCloseComponent", () => {
      let component: DialogCloseComponent;
      let fixture: ComponentFixture<DialogCloseComponent>;
    
      beforeEach(async () => {
    src/app/core/common-components/view-title/view-title.component.spec.ts on lines 7..30

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

    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

    describe("ViewTitleComponent", () => {
      let component: ViewTitleComponent;
      let fixture: ComponentFixture<ViewTitleComponent>;
    
      beforeEach(async () => {
    src/app/core/common-components/dialog-close/dialog-close.component.spec.ts on lines 7..30

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

    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

    describe("RollCallTabComponent", () => {
      let component: RollCallTabComponent;
      let fixture: ComponentFixture<RollCallTabComponent>;
    
      beforeEach(async () => {
    src/app/core/common-components/template-tooltip/template-tooltip.component.spec.ts on lines 6..25

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 157.

    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

    describe("TemplateTooltipComponent", () => {
      let component: TemplateTooltipComponent;
      let fixture: ComponentFixture<TemplateTooltipComponent>;
    
      beforeEach(async () => {
    src/app/child-dev-project/attendance/add-day-attendance/roll-call/roll-call-tab/roll-call-tab.component.spec.ts on lines 6..25

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 157.

    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 config-import-parser.service.spec.ts has 378 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { TestBed } from "@angular/core/testing";
    
    import { ConfigImportParserService } from "./config-import-parser.service";
    import { EntityConfig } from "../../core/entity/entity-config";
    import { ConfigService } from "../../core/config/config.service";
    Severity: Minor
    Found in src/app/features/config-setup/config-import-parser.service.spec.ts - About 5 hrs to fix

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

      describe("EditDescriptionOnlyComponent", () => {
        let component: EditDescriptionOnlyComponent;
        let fixture: ComponentFixture<EditDescriptionOnlyComponent>;
      
        beforeEach(async () => {
      src/app/core/common-components/view-actions/view-actions.component.spec.ts on lines 5..24
      src/app/features/reporting/reporting/report-row/report-row.component.spec.ts on lines 5..24

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 156.

      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

      describe("ReportRowComponent", () => {
        let component: ReportRowComponent;
        let fixture: ComponentFixture<ReportRowComponent>;
      
        beforeEach(async () => {
      src/app/core/common-components/description-only/edit-description-only/edit-description-only.component.spec.ts on lines 4..23
      src/app/core/common-components/view-actions/view-actions.component.spec.ts on lines 5..24

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 156.

      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

      describe("ViewActionsComponent", () => {
        let component: ViewActionsComponent;
        let fixture: ComponentFixture<ViewActionsComponent>;
      
        beforeEach(async () => {
      src/app/core/common-components/description-only/edit-description-only/edit-description-only.component.spec.ts on lines 4..23
      src/app/features/reporting/reporting/report-row/report-row.component.spec.ts on lines 5..24

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 156.

      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 migrate defaultValue with placeholder value", fakeAsync(() => {
            let testEntity = "entity:old-format";
      
            updateSubject.next({
              entity: Object.assign(new Config(), {
      Severity: Major
      Found in src/app/core/config/config.service.spec.ts and 1 other location - About 4 hrs to fix
      src/app/core/config/config.service.spec.ts on lines 198..226

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

      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 migrate defaultValue with string value", fakeAsync(() => {
            let testEntity = "entity:old-format";
      
            updateSubject.next({
              entity: Object.assign(new Config(), {
      Severity: Major
      Found in src/app/core/config/config.service.spec.ts and 1 other location - About 4 hrs to fix
      src/app/core/config/config.service.spec.ts on lines 228..256

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

      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 entity-form.service.spec.ts has 359 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import { fakeAsync, TestBed, tick, waitForAsync } from "@angular/core/testing";
      
      import { EntityFormService } from "./entity-form.service";
      import {
        FormControl,

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

          async archive<E extends Entity>(entityParam: E | E[]) {
            let originalEntities: E[] = Array.isArray(entityParam)
              ? entityParam
              : [entityParam];
            const newEntities: E[] = originalEntities.map((e) => e.copy());
        Severity: Major
        Found in src/app/core/entity/entity-actions/entity-actions.service.ts and 1 other location - About 4 hrs to fix
        src/app/core/entity/entity-actions/entity-actions.service.ts on lines 269..287

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

          async undoArchive<E extends Entity>(entityParam: E | E[]) {
            let newEntities: E[] = Array.isArray(entityParam)
              ? entityParam
              : [entityParam];
            const originalEntities: E[] = newEntities.map((e) => e.copy());
        Severity: Major
        Found in src/app/core/entity/entity-actions/entity-actions.service.ts and 1 other location - About 4 hrs to fix
        src/app/core/entity/entity-actions/entity-actions.service.ts on lines 246..264

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

        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

        describe("BetaFeatureComponent", () => {
          let component: BetaFeatureComponent;
          let fixture: ComponentFixture<BetaFeatureComponent>;
        
          beforeEach(async () => {
        src/app/core/admin/admin-entity-details/admin-entity-field/anonymize-options/anonymize-options.component.spec.ts on lines 5..23

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

        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

        describe("AnonymizeOptionsComponent", () => {
          let component: AnonymizeOptionsComponent;
          let fixture: ComponentFixture<AnonymizeOptionsComponent>;
        
          beforeEach(async () => {
        src/app/features/coming-soon/beta-feature/beta-feature.component.spec.ts on lines 6..23

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

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

        describe("BooleanInputComponent", () => {
          let component: BooleanInputComponent;
          let fixture: ComponentFixture<BooleanInputComponent>;
        
          beforeEach(async () => {
        src/app/core/basic-datatypes/month/display-month/display-month.component.spec.ts on lines 5..22
        src/app/core/common-components/help-button/help-button.component.spec.ts on lines 5..22
        src/app/core/common-components/pill/pill.component.spec.ts on lines 5..22
        src/app/features/location/view-location/view-location.component.spec.ts on lines 5..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 144.

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

        describe("PillComponent", () => {
          let component: PillComponent;
          let fixture: ComponentFixture<PillComponent>;
        
          beforeEach(async () => {
        Severity: Major
        Found in src/app/core/common-components/pill/pill.component.spec.ts and 4 other locations - About 4 hrs to fix
        src/app/core/basic-datatypes/boolean/edit-boolean/boolean-input/boolean-input.component.spec.ts on lines 5..22
        src/app/core/basic-datatypes/month/display-month/display-month.component.spec.ts on lines 5..22
        src/app/core/common-components/help-button/help-button.component.spec.ts on lines 5..22
        src/app/features/location/view-location/view-location.component.spec.ts on lines 5..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 144.

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

        describe("ViewLocationComponent", () => {
          let component: ViewLocationComponent;
          let fixture: ComponentFixture<ViewLocationComponent>;
        
          beforeEach(async () => {
        src/app/core/basic-datatypes/boolean/edit-boolean/boolean-input/boolean-input.component.spec.ts on lines 5..22
        src/app/core/basic-datatypes/month/display-month/display-month.component.spec.ts on lines 5..22
        src/app/core/common-components/help-button/help-button.component.spec.ts on lines 5..22
        src/app/core/common-components/pill/pill.component.spec.ts on lines 5..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 144.

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

        describe("HelpButtonComponent", () => {
          let component: HelpButtonComponent;
          let fixture: ComponentFixture<HelpButtonComponent>;
        
          beforeEach(async () => {
        src/app/core/basic-datatypes/boolean/edit-boolean/boolean-input/boolean-input.component.spec.ts on lines 5..22
        src/app/core/basic-datatypes/month/display-month/display-month.component.spec.ts on lines 5..22
        src/app/core/common-components/pill/pill.component.spec.ts on lines 5..22
        src/app/features/location/view-location/view-location.component.spec.ts on lines 5..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 144.

        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