presidential-innovation-fellows/code-gov-web

View on GitHub

Showing 111 of 125 total issues

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

  describe('destroy', () => {
    it('should unsubscribe from router events on destroy', () => {
      this.fixture.detectChanges();
      spyOn(this.modalComponent.modalSub, 'unsubscribe');
      this.fixture.destroy();
Severity: Major
Found in src/app/components/modal/modal.component.spec.ts and 1 other location - About 3 hrs to fix
src/app/components/explore-code/agency/agency.component.spec.ts on lines 98..105

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

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('destroy', () => {
    it('should unsubscribe from router events on destroy', () => {
      this.fixture.detectChanges();
      spyOn(this.agencyComponent.eventSub, 'unsubscribe');
      this.fixture.destroy();
src/app/components/modal/modal.component.spec.ts on lines 127..134

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

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

export class ComplianceMeasuringCodeComponent {
  constructor(private seoService: SeoService) {
    seoService.setTitle('Measuring Source Code', true);
    seoService.setMetaDescription(
      'Learn about different ways to measure source code and how to choose the ' +
src/app/components/policy-guide/docs/capacity/capacity-resources/capacity-resources.component.ts on lines 9..18
src/app/components/policy-guide/docs/compliance/compliance-inventory-code/compliance-inventory-code.component.ts on lines 9..18
src/app/components/policy-guide/docs/compliance/compliance-whats-required/compliance-whats-required.component.ts on lines 9..18

Duplicated Code

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

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

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

Tuning

This issue has a mass of 87.

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

export class ComplianceInventoryCodeComponent {
  constructor(private seoService: SeoService) {
    seoService.setTitle('Creating your enterprise code inventory', true);
    seoService.setMetaDescription(
      'Learn how to create your enterprise code inventory and read up on the ' +
src/app/components/policy-guide/docs/capacity/capacity-resources/capacity-resources.component.ts on lines 9..18
src/app/components/policy-guide/docs/compliance/compliance-measuring-code/compliance-measuring-code.component.ts on lines 9..18
src/app/components/policy-guide/docs/compliance/compliance-whats-required/compliance-whats-required.component.ts on lines 9..18

Duplicated Code

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

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

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

Tuning

This issue has a mass of 87.

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 do nothing when a .mil is clicked', () => {
    let modalService = TestBed.get(ModalService);
    spyOn(modalService, 'showModal');
    this.fixture.debugElement.nativeElement.querySelector('#mil-link').click();

src/app/directives/external-link/external-link.directive.spec.ts on lines 67..73

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

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 do nothing when a .gov is clicked', () => {
    let modalService = TestBed.get(ModalService);
    spyOn(modalService, 'showModal');
    this.fixture.debugElement.nativeElement.querySelector('#gov-link').click();

src/app/directives/external-link/external-link.directive.spec.ts on lines 75..81

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

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

export class CapacityResourcesComponent {
constructor(private seoService: SeoService) {
    seoService.setTitle('Tools and Resources', true);
    seoService.setMetaDescription(
      'A growing list of tools and resources that agencies can use to share and ' +
src/app/components/policy-guide/docs/compliance/compliance-inventory-code/compliance-inventory-code.component.ts on lines 9..18
src/app/components/policy-guide/docs/compliance/compliance-measuring-code/compliance-measuring-code.component.ts on lines 9..18
src/app/components/policy-guide/docs/compliance/compliance-whats-required/compliance-whats-required.component.ts on lines 9..18

Duplicated Code

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

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

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

Tuning

This issue has a mass of 87.

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

export class ComplianceWhatsRequiredComponent {
constructor(private seoService: SeoService) {
    seoService.setTitle('Policy Compliance - What\'s Required?', true);
    seoService.setMetaDescription(
      'Learn about the requirements of the Federal Source Code Policy and when ' +
src/app/components/policy-guide/docs/capacity/capacity-resources/capacity-resources.component.ts on lines 9..18
src/app/components/policy-guide/docs/compliance/compliance-inventory-code/compliance-inventory-code.component.ts on lines 9..18
src/app/components/policy-guide/docs/compliance/compliance-measuring-code/compliance-measuring-code.component.ts on lines 9..18

Duplicated Code

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

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

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

Tuning

This issue has a mass of 87.

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

export class CapacityIntroductionComponent {
  constructor(private seoService: SeoService) {
    seoService.setTitle('Introduction - Building your Agency\'s Open Source Practice', true);
    seoService.setMetaDescription(
      'Recommendations for an interdisciplinary approach to Open Source for Federal agencies.'
src/app/components/policy-guide/docs/compliance/compliance-procurement/compliance-procurement.component.ts on lines 9..15
src/app/components/policy-guide/docs/open-source/open-source-licensing/open-source-licensing.component.ts on lines 9..17
src/app/components/policy-guide/docs/overview/introduction/introduction.component.ts on lines 8..17
src/app/components/policy-guide/docs/overview/overview-tracking-progress/overview-tracking-progress.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-appendix/policy-appendix.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-code-reuse/policy-code-reuse.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-exceptions/policy-exceptions.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-implementation/policy-implementation.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-introduction/policy-introduction.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-objectives/policy-objectives.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-open-source/policy-open-source.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-scope/policy-scope.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-solutions-analysis/policy-solutions-analysis.component.ts on lines 8..17

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

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

export class PolicyObjectivesComponent {

  constructor(private seoService: SeoService) {
    seoService.setTitle('Source Code Policy Objectives', true);
    seoService.setMetaDescription('Read the Federal Open Source Code Policy Objectives.');
src/app/components/policy-guide/docs/capacity/capacity-introduction/capacity-introduction.component.ts on lines 9..17
src/app/components/policy-guide/docs/compliance/compliance-procurement/compliance-procurement.component.ts on lines 9..15
src/app/components/policy-guide/docs/open-source/open-source-licensing/open-source-licensing.component.ts on lines 9..17
src/app/components/policy-guide/docs/overview/introduction/introduction.component.ts on lines 8..17
src/app/components/policy-guide/docs/overview/overview-tracking-progress/overview-tracking-progress.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-appendix/policy-appendix.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-code-reuse/policy-code-reuse.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-exceptions/policy-exceptions.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-implementation/policy-implementation.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-introduction/policy-introduction.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-open-source/policy-open-source.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-scope/policy-scope.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-solutions-analysis/policy-solutions-analysis.component.ts on lines 8..17

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

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

export class PolicyIntroductionComponent {

  constructor(private seoService: SeoService) {
    seoService.setTitle('Source Code Policy Introduction', true);
    seoService.setMetaDescription('Start here to read the Federal Open Source Code Policy.');
src/app/components/policy-guide/docs/capacity/capacity-introduction/capacity-introduction.component.ts on lines 9..17
src/app/components/policy-guide/docs/compliance/compliance-procurement/compliance-procurement.component.ts on lines 9..15
src/app/components/policy-guide/docs/open-source/open-source-licensing/open-source-licensing.component.ts on lines 9..17
src/app/components/policy-guide/docs/overview/introduction/introduction.component.ts on lines 8..17
src/app/components/policy-guide/docs/overview/overview-tracking-progress/overview-tracking-progress.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-appendix/policy-appendix.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-code-reuse/policy-code-reuse.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-exceptions/policy-exceptions.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-implementation/policy-implementation.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-objectives/policy-objectives.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-open-source/policy-open-source.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-scope/policy-scope.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-solutions-analysis/policy-solutions-analysis.component.ts on lines 8..17

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

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

export class ComplianceProcurementComponent {
  constructor(private seoService: SeoService) {
    seoService.setTitle('Procuring Software', true);
    seoService.setMetaDescription('Learn about different ways to procure software.');
    seoService.setMetaRobots('Index, Follow');
src/app/components/policy-guide/docs/capacity/capacity-introduction/capacity-introduction.component.ts on lines 9..17
src/app/components/policy-guide/docs/open-source/open-source-licensing/open-source-licensing.component.ts on lines 9..17
src/app/components/policy-guide/docs/overview/introduction/introduction.component.ts on lines 8..17
src/app/components/policy-guide/docs/overview/overview-tracking-progress/overview-tracking-progress.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-appendix/policy-appendix.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-code-reuse/policy-code-reuse.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-exceptions/policy-exceptions.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-implementation/policy-implementation.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-introduction/policy-introduction.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-objectives/policy-objectives.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-open-source/policy-open-source.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-scope/policy-scope.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-solutions-analysis/policy-solutions-analysis.component.ts on lines 8..17

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

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

export class PolicyOpenSourceComponent {

  constructor(private seoService: SeoService) {
    seoService.setTitle('Source Code Policy Open Source Software', true);
    seoService.setMetaDescription('Read the Federal Open Source Code Policy Open Source Software.');
src/app/components/policy-guide/docs/capacity/capacity-introduction/capacity-introduction.component.ts on lines 9..17
src/app/components/policy-guide/docs/compliance/compliance-procurement/compliance-procurement.component.ts on lines 9..15
src/app/components/policy-guide/docs/open-source/open-source-licensing/open-source-licensing.component.ts on lines 9..17
src/app/components/policy-guide/docs/overview/introduction/introduction.component.ts on lines 8..17
src/app/components/policy-guide/docs/overview/overview-tracking-progress/overview-tracking-progress.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-appendix/policy-appendix.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-code-reuse/policy-code-reuse.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-exceptions/policy-exceptions.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-implementation/policy-implementation.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-introduction/policy-introduction.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-objectives/policy-objectives.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-scope/policy-scope.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-solutions-analysis/policy-solutions-analysis.component.ts on lines 8..17

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

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

export class PolicyCodeReuseComponent {

  constructor(private seoService: SeoService) {
    seoService.setTitle('Source Code Policy Government-Wide Code Reuse', true);
    seoService.setMetaDescription(
src/app/components/policy-guide/docs/capacity/capacity-introduction/capacity-introduction.component.ts on lines 9..17
src/app/components/policy-guide/docs/compliance/compliance-procurement/compliance-procurement.component.ts on lines 9..15
src/app/components/policy-guide/docs/open-source/open-source-licensing/open-source-licensing.component.ts on lines 9..17
src/app/components/policy-guide/docs/overview/introduction/introduction.component.ts on lines 8..17
src/app/components/policy-guide/docs/overview/overview-tracking-progress/overview-tracking-progress.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-appendix/policy-appendix.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-exceptions/policy-exceptions.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-implementation/policy-implementation.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-introduction/policy-introduction.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-objectives/policy-objectives.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-open-source/policy-open-source.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-scope/policy-scope.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-solutions-analysis/policy-solutions-analysis.component.ts on lines 8..17

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

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

export class PolicySolutionsAnalysisComponent {

  constructor(private seoService: SeoService) {
    seoService.setTitle('Source Code Policy Three-Step Software Solutions Analysis', true);
    seoService.setMetaDescription(
src/app/components/policy-guide/docs/capacity/capacity-introduction/capacity-introduction.component.ts on lines 9..17
src/app/components/policy-guide/docs/compliance/compliance-procurement/compliance-procurement.component.ts on lines 9..15
src/app/components/policy-guide/docs/open-source/open-source-licensing/open-source-licensing.component.ts on lines 9..17
src/app/components/policy-guide/docs/overview/introduction/introduction.component.ts on lines 8..17
src/app/components/policy-guide/docs/overview/overview-tracking-progress/overview-tracking-progress.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-appendix/policy-appendix.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-code-reuse/policy-code-reuse.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-exceptions/policy-exceptions.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-implementation/policy-implementation.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-introduction/policy-introduction.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-objectives/policy-objectives.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-open-source/policy-open-source.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-scope/policy-scope.component.ts on lines 8..17

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

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

export class OverviewTrackingProgressComponent {

  constructor(private seoService: SeoService) {
    seoService.setTitle('How OMB Will Assess Agency Progress', true);
    seoService.setMetaDescription(
src/app/components/policy-guide/docs/capacity/capacity-introduction/capacity-introduction.component.ts on lines 9..17
src/app/components/policy-guide/docs/compliance/compliance-procurement/compliance-procurement.component.ts on lines 9..15
src/app/components/policy-guide/docs/open-source/open-source-licensing/open-source-licensing.component.ts on lines 9..17
src/app/components/policy-guide/docs/overview/introduction/introduction.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-appendix/policy-appendix.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-code-reuse/policy-code-reuse.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-exceptions/policy-exceptions.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-implementation/policy-implementation.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-introduction/policy-introduction.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-objectives/policy-objectives.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-open-source/policy-open-source.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-scope/policy-scope.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-solutions-analysis/policy-solutions-analysis.component.ts on lines 8..17

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

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

export class PolicyImplementationComponent {

  constructor(private seoService: SeoService) {
    seoService.setTitle('Source Code Policy Implementation', true);
    seoService.setMetaDescription('Read the Federal Open Source Code Policy Implementation.');
src/app/components/policy-guide/docs/capacity/capacity-introduction/capacity-introduction.component.ts on lines 9..17
src/app/components/policy-guide/docs/compliance/compliance-procurement/compliance-procurement.component.ts on lines 9..15
src/app/components/policy-guide/docs/open-source/open-source-licensing/open-source-licensing.component.ts on lines 9..17
src/app/components/policy-guide/docs/overview/introduction/introduction.component.ts on lines 8..17
src/app/components/policy-guide/docs/overview/overview-tracking-progress/overview-tracking-progress.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-appendix/policy-appendix.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-code-reuse/policy-code-reuse.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-exceptions/policy-exceptions.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-introduction/policy-introduction.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-objectives/policy-objectives.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-open-source/policy-open-source.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-scope/policy-scope.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-solutions-analysis/policy-solutions-analysis.component.ts on lines 8..17

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

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

export class OpenSourceLicensingComponent {
  constructor(private seoService: SeoService) {
    seoService.setTitle('Open Source Licensing', true);
    seoService.setMetaDescription(
      'Learn about open source licensing under the Source Code Policy.'
src/app/components/policy-guide/docs/capacity/capacity-introduction/capacity-introduction.component.ts on lines 9..17
src/app/components/policy-guide/docs/compliance/compliance-procurement/compliance-procurement.component.ts on lines 9..15
src/app/components/policy-guide/docs/overview/introduction/introduction.component.ts on lines 8..17
src/app/components/policy-guide/docs/overview/overview-tracking-progress/overview-tracking-progress.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-appendix/policy-appendix.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-code-reuse/policy-code-reuse.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-exceptions/policy-exceptions.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-implementation/policy-implementation.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-introduction/policy-introduction.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-objectives/policy-objectives.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-open-source/policy-open-source.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-scope/policy-scope.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-solutions-analysis/policy-solutions-analysis.component.ts on lines 8..17

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

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

export class PolicyAppendixComponent {

  constructor(private seoService: SeoService) {
    seoService.setTitle('Source Code Policy Appendix A - Definitions', true);
    seoService.setMetaDescription(
src/app/components/policy-guide/docs/capacity/capacity-introduction/capacity-introduction.component.ts on lines 9..17
src/app/components/policy-guide/docs/compliance/compliance-procurement/compliance-procurement.component.ts on lines 9..15
src/app/components/policy-guide/docs/open-source/open-source-licensing/open-source-licensing.component.ts on lines 9..17
src/app/components/policy-guide/docs/overview/introduction/introduction.component.ts on lines 8..17
src/app/components/policy-guide/docs/overview/overview-tracking-progress/overview-tracking-progress.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-code-reuse/policy-code-reuse.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-exceptions/policy-exceptions.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-implementation/policy-implementation.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-introduction/policy-introduction.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-objectives/policy-objectives.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-open-source/policy-open-source.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-scope/policy-scope.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-solutions-analysis/policy-solutions-analysis.component.ts on lines 8..17

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

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

export class IntroductionComponent {

  constructor(private seoService: SeoService) {
    seoService.setTitle('Policy Implementation Introduction', true);
    seoService.setMetaDescription(
src/app/components/policy-guide/docs/capacity/capacity-introduction/capacity-introduction.component.ts on lines 9..17
src/app/components/policy-guide/docs/compliance/compliance-procurement/compliance-procurement.component.ts on lines 9..15
src/app/components/policy-guide/docs/open-source/open-source-licensing/open-source-licensing.component.ts on lines 9..17
src/app/components/policy-guide/docs/overview/overview-tracking-progress/overview-tracking-progress.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-appendix/policy-appendix.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-code-reuse/policy-code-reuse.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-exceptions/policy-exceptions.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-implementation/policy-implementation.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-introduction/policy-introduction.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-objectives/policy-objectives.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-open-source/policy-open-source.component.ts on lines 8..15
src/app/components/policy-guide/policy/policy-scope/policy-scope.component.ts on lines 8..17
src/app/components/policy-guide/policy/policy-solutions-analysis/policy-solutions-analysis.component.ts on lines 8..17

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

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