Ontica/Empiria.Land.Intranet

View on GitHub

Showing 370 of 516 total issues

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

  assignRoleToSubject(subjectUID: string,
                      contextUID: string,
                      roleUID: string): EmpObservable<Identifiable[]> {
    Assertion.assertValue(subjectUID, 'subjectUID');
    Assertion.assertValue(contextUID, 'contextUID');
Severity: Major
Found in src/app/data-services/_access-control.data.service.ts and 3 other locations - About 4 hrs to fix
src/app/data-services/_access-control.data.service.ts on lines 174..185
src/app/data-services/_access-control.data.service.ts on lines 188..199
src/app/data-services/_access-control.data.service.ts on lines 202..213

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

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

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

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

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

Refactorings

Further Reading

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

  assignFeatureToSubject(subjectUID: string,
                         contextUID: string,
                         featureUID: string): EmpObservable<Identifiable[]> {
    Assertion.assertValue(subjectUID, 'subjectUID');
    Assertion.assertValue(contextUID, 'contextUID');
Severity: Major
Found in src/app/data-services/_access-control.data.service.ts and 3 other locations - About 4 hrs to fix
src/app/data-services/_access-control.data.service.ts on lines 160..171
src/app/data-services/_access-control.data.service.ts on lines 174..185
src/app/data-services/_access-control.data.service.ts on lines 202..213

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

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

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

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

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

Refactorings

Further Reading

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

  removeFeatureToSubject(subjectUID: string,
                         contextUID: string,
                         featureUID: string): EmpObservable<Identifiable[]> {
    Assertion.assertValue(subjectUID, 'subjectUID');
    Assertion.assertValue(contextUID, 'contextUID');
Severity: Major
Found in src/app/data-services/_access-control.data.service.ts and 3 other locations - About 4 hrs to fix
src/app/data-services/_access-control.data.service.ts on lines 160..171
src/app/data-services/_access-control.data.service.ts on lines 174..185
src/app/data-services/_access-control.data.service.ts on lines 188..199

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

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

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

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

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

Refactorings

Further Reading

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

  removeRoleToSubject(subjectUID: string,
                      contextUID: string,
                      roleUID: string): EmpObservable<Identifiable[]> {
    Assertion.assertValue(subjectUID, 'subjectUID');
    Assertion.assertValue(contextUID, 'contextUID');
Severity: Major
Found in src/app/data-services/_access-control.data.service.ts and 3 other locations - About 4 hrs to fix
src/app/data-services/_access-control.data.service.ts on lines 160..171
src/app/data-services/_access-control.data.service.ts on lines 188..199
src/app/data-services/_access-control.data.service.ts on lines 202..213

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

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

  removeRecordingActFromBookEntry(recordingBookUID: string,
                                  bookEntryUID: string,
                                  recordingActUID: string): EmpObservable<InstrumentRecording> {
    Assertion.assertValue(recordingBookUID, 'recordingBookUID');
    Assertion.assertValue(bookEntryUID, 'bookEntryUID');
Severity: Major
Found in src/app/data-services/recording.data.service.ts and 1 other location - About 4 hrs to fix
src/app/data-services/recording.data.service.ts on lines 218..229

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

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

  removeRecordingActParty(instrumentRecordingUID: string,
                          recordingActUID: string,
                          recordingActPartyUID: string): EmpObservable<RecordingAct> {
    Assertion.assertValue(instrumentRecordingUID, 'instrumentRecordingUID');
    Assertion.assertValue(recordingActUID, 'recordingActUID');
Severity: Major
Found in src/app/data-services/recording.data.service.ts and 1 other location - About 4 hrs to fix
src/app/data-services/recording.data.service.ts on lines 247..258

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

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

  private setCheckBookEntryInput(checkBookEntryInput: boolean) {
    this.checkBookEntryInput = checkBookEntryInput;

    this.form.controls.bookEntryUID.reset();
    this.form.controls.bookEntryNo.reset();
src/app/views/registration/recording-acts/recording-act-creator.component.ts on lines 398..407

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

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

  private setCheckBookEntryInput(checkBookEntryInput: boolean) {
    this.checkBookEntryInput = checkBookEntryInput;

    this.form.controls.bookEntryUID.reset();
    this.form.controls.bookEntryNo.reset();
src/app/views/certificate-emission/certificate-creator.component.ts on lines 278..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 122.

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

RecordingActCreatorComponent has 34 functions (exceeds 20 allowed). Consider refactoring.
Open

@Component({
  selector: 'emp-land-recording-act-creator',
  templateUrl: './recording-act-creator.component.html',
  styles: [`
    .searcher-item-container {

    File recording-act-creator.component.ts has 347 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * @license
     * Copyright (c) La Vía Óntica SC, Ontica LLC and contributors. All rights reserved.
     *
     * See LICENSE.txt in the project root for complete license information.

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

        private validateRecordingBookFields(){
          if (this.registrationCommandRules.selectBookEntry) {
            this.formHelper.setControlValidators(this.form.controls.recordingBook, Validators.required);
          } else {
            this.formHelper.clearControlValidators(this.form.controls.recordingBook);
      src/app/views/certificate-emission/certificate-creator.component.ts on lines 223..232

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

      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

        private validateRecordingBookFields(){
          if (this.certificateRulesSelected.selectBookEntry) {
            this.formHelper.setControlValidators(this.form.controls.recordingBook, Validators.required);
          } else {
            this.formHelper.clearControlValidators(this.form.controls.recordingBook);
      src/app/views/registration/recording-acts/recording-act-creator.component.ts on lines 353..362

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

      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

        onSubjectTabbedViewEvent(event: EventInfo) {
          switch (event.type as SubjectTabbedViewEventType) {
      
            case SubjectTabbedViewEventType.SUBJECT_UPDATED:
              sendEvent(this.accessControlTabbedViewEvent, AccessControlTabbedViewEventType.UPDATED,
      src/app/views/_access-control/subjects/subject-tabbed-view.component.ts on lines 75..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 116.

      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

        onSubjectEditorEvent(event: EventInfo) {
          switch (event.type as SubjectEditorEventType) {
      
            case SubjectEditorEventType.SUBJECT_UPDATED:
              sendEvent(this.subjectTabbedViewEvent, SubjectTabbedViewEventType.SUBJECT_UPDATED,
      src/app/views/_access-control/access-control-tabbed-view/access-control-tabbed-view.component.ts on lines 109..126

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

      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

      RecordingDataService has 32 functions (exceeds 20 allowed). Consider refactoring.
      Open

      @Injectable()
      export class RecordingDataService {
      
        constructor(private http: HttpService) { }
      
      
      Severity: Minor
      Found in src/app/data-services/recording.data.service.ts - About 4 hrs to fix

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

          appendRecordingActParty(instrumentRecordingUID: string,
                                  recordingActUID: string,
                                  recordingActPartyFields: RecordingActPartyFields): EmpObservable<RecordingAct> {
            Assertion.assertValue(instrumentRecordingUID, 'instrumentRecordingUID');
            Assertion.assertValue(recordingActUID, 'recordingActUID');
        Severity: Major
        Found in src/app/data-services/recording.data.service.ts and 1 other location - About 4 hrs to fix
        src/app/data-services/recording.data.service.ts on lines 167..177

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

        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

          updateRecordingAct(instrumentRecordingUID: string,
                             recordingActUID: string,
                             recordingActFields: RecordingActFields): EmpObservable<RecordingAct> {
            Assertion.assertValue(instrumentRecordingUID, 'instrumentRecordingUID');
            Assertion.assertValue(recordingActUID, 'recordingActUID');
        Severity: Major
        Found in src/app/data-services/recording.data.service.ts and 1 other location - About 4 hrs to fix
        src/app/data-services/recording.data.service.ts on lines 205..215

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

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

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

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

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

        Refactorings

        Further Reading

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

          delete<T>(path: string, body?: any, options?: HttpClientOptions): EmpObservable<T> {
            Assertion.assertValue(path, 'path');
        
            return new EmpObservable(
              this.directory.getService(path, HttpMethod.DELETE)
        Severity: Major
        Found in src/app/core/http/http.service.ts and 3 other locations - About 3 hrs to fix
        src/app/core/http/http.service.ts on lines 42..51
        src/app/core/http/http.service.ts on lines 54..63
        src/app/core/http/http.service.ts on lines 66..75

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

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

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

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

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

        Refactorings

        Further Reading

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

          post<T>(path: string, body?: any, options?: HttpClientOptions): EmpObservable<T> {
            Assertion.assertValue(path, 'path');
        
            return new EmpObservable(
              this.directory.getService(path, HttpMethod.POST)
        Severity: Major
        Found in src/app/core/http/http.service.ts and 3 other locations - About 3 hrs to fix
        src/app/core/http/http.service.ts on lines 54..63
        src/app/core/http/http.service.ts on lines 66..75
        src/app/core/http/http.service.ts on lines 78..88

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

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

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

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

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

        Refactorings

        Further Reading

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

          patch<T>(path: string, body: any, options?: HttpClientOptions): EmpObservable<T> {
            Assertion.assertValue(path, 'path');
        
            return new EmpObservable(
              this.directory.getService(path, HttpMethod.PATCH)
        Severity: Major
        Found in src/app/core/http/http.service.ts and 3 other locations - About 3 hrs to fix
        src/app/core/http/http.service.ts on lines 42..51
        src/app/core/http/http.service.ts on lines 54..63
        src/app/core/http/http.service.ts on lines 78..88

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

        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