SpeciesFileGroup/taxonworks

View on GitHub

Showing 12,636 of 12,636 total issues

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

      date[:verbatim_date] = matchdata1[0].strip
      date[:start_date_day] = matchdata1[2]
      date[:start_date_month] = matchdata1[1]
      date[:start_date_year] = matchdata1[3]
Severity: Minor
Found in lib/utilities/dates.rb and 5 other locations - About 15 mins to fix
lib/utilities/dates.rb on lines 843..846
lib/utilities/dates.rb on lines 849..852
lib/utilities/dates.rb on lines 861..864
lib/utilities/dates.rb on lines 867..870
lib/utilities/elevation.rb on lines 19..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 26.

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

  def self.disjoint_taxon_name_classes
    self.parent.disjoint_taxon_name_classes + self.collect_to_s(
        TaxonNameClassification::Icnp::EffectivelyPublished::ValidlyPublished::Illegitimate,
        TaxonNameClassification::Icnp::EffectivelyPublished::ValidlyPublished::Illegitimate::Rejected,
        TaxonNameClassification::Icnp::EffectivelyPublished::ValidlyPublished::Illegitimate::NotInOfficialList)
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/homonym.rb on lines 5..9
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/incorrect_original_spelling.rb on lines 5..9
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/superfluous.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/not_in_official_list.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/rejected.rb on lines 5..9
app/models/taxon_name_relationship/iczn/invalidating/synonym/suppression/conditional.rb on lines 5..9
app/models/taxon_name_relationship/iczn/invalidating/synonym/suppression/partial.rb on lines 5..9

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

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

  def self.disjoint_taxon_name_classes
    self.parent.disjoint_taxon_name_classes + self.collect_to_s(
        TaxonNameClassification::Icn::EffectivelyPublished::ValidlyPublished::Illegitimate,
        TaxonNameClassification::Icn::EffectivelyPublished::ValidlyPublished::Illegitimate::Homonym,
        TaxonNameClassification::Icn::EffectivelyPublished::ValidlyPublished::Illegitimate::Superfluous)
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/homonym.rb on lines 5..9
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/superfluous.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/homonym.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/not_in_official_list.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/rejected.rb on lines 5..9
app/models/taxon_name_relationship/iczn/invalidating/synonym/suppression/conditional.rb on lines 5..9
app/models/taxon_name_relationship/iczn/invalidating/synonym/suppression/partial.rb on lines 5..9

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

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

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

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

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

Refactorings

Further Reading

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

      date[:verbatim_date] = matchdata1[0].strip
      date[:start_date_day] = matchdata1[2]
      date[:start_date_month] = matchdata1[1]
      date[:start_date_year] = matchdata1[3]
Severity: Minor
Found in lib/utilities/dates.rb and 5 other locations - About 15 mins to fix
lib/utilities/dates.rb on lines 843..846
lib/utilities/dates.rb on lines 849..852
lib/utilities/dates.rb on lines 855..858
lib/utilities/dates.rb on lines 861..864
lib/utilities/elevation.rb on lines 19..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 26.

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

  def self.disjoint_taxon_name_relationships
    self.parent.disjoint_taxon_name_relationships +
        self.collect_to_s(TaxonNameRelationship::Iczn::Invalidating::Synonym::Suppression,
            TaxonNameRelationship::Iczn::Invalidating::Synonym::Suppression::Conditional,
            TaxonNameRelationship::Iczn::Invalidating::Synonym::Suppression::Total)
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/homonym.rb on lines 5..9
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/incorrect_original_spelling.rb on lines 5..9
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/superfluous.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/homonym.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/not_in_official_list.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/rejected.rb on lines 5..9
app/models/taxon_name_relationship/iczn/invalidating/synonym/suppression/conditional.rb on lines 5..9

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

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

  def self.disjoint_taxon_name_classes
    self.parent.disjoint_taxon_name_classes + self.collect_to_s(
        TaxonNameClassification::Icn::EffectivelyPublished::ValidlyPublished::Illegitimate,
        TaxonNameClassification::Icn::EffectivelyPublished::ValidlyPublished::Illegitimate::IncorrectOriginalSpelling,
        TaxonNameClassification::Icn::EffectivelyPublished::ValidlyPublished::Illegitimate::Superfluous)
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/incorrect_original_spelling.rb on lines 5..9
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/superfluous.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/homonym.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/not_in_official_list.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/rejected.rb on lines 5..9
app/models/taxon_name_relationship/iczn/invalidating/synonym/suppression/conditional.rb on lines 5..9
app/models/taxon_name_relationship/iczn/invalidating/synonym/suppression/partial.rb on lines 5..9

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

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

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

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

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

Refactorings

Further Reading

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

      date[:verbatim_date] = matchdata1[0].strip
      date[:start_date_day] = matchdata1[2]
      date[:start_date_month] = matchdata1[1]
      date[:start_date_year] = matchdata1[3]
Severity: Minor
Found in lib/utilities/dates.rb and 5 other locations - About 15 mins to fix
lib/utilities/dates.rb on lines 849..852
lib/utilities/dates.rb on lines 855..858
lib/utilities/dates.rb on lines 861..864
lib/utilities/dates.rb on lines 867..870
lib/utilities/elevation.rb on lines 19..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 26.

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

  def self.disjoint_taxon_name_relationships
    self.parent.disjoint_taxon_name_relationships +
        self.collect_to_s(TaxonNameRelationship::Iczn::Invalidating::Synonym::Suppression,
            TaxonNameRelationship::Iczn::Invalidating::Synonym::Suppression::Partial,
            TaxonNameRelationship::Iczn::Invalidating::Synonym::Suppression::Total)
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/homonym.rb on lines 5..9
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/incorrect_original_spelling.rb on lines 5..9
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/superfluous.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/homonym.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/not_in_official_list.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/rejected.rb on lines 5..9
app/models/taxon_name_relationship/iczn/invalidating/synonym/suppression/partial.rb on lines 5..9

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

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

  def self.disjoint_taxon_name_classes
    self.parent.disjoint_taxon_name_classes + self.collect_to_s(
        TaxonNameClassification::Icn::EffectivelyPublished::ValidlyPublished::Illegitimate,
        TaxonNameClassification::Icn::EffectivelyPublished::ValidlyPublished::Illegitimate::IncorrectOriginalSpelling,
        TaxonNameClassification::Icn::EffectivelyPublished::ValidlyPublished::Illegitimate::Homonym)
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/homonym.rb on lines 5..9
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/incorrect_original_spelling.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/homonym.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/not_in_official_list.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/rejected.rb on lines 5..9
app/models/taxon_name_relationship/iczn/invalidating/synonym/suppression/conditional.rb on lines 5..9
app/models/taxon_name_relationship/iczn/invalidating/synonym/suppression/partial.rb on lines 5..9

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

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

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

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

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

Refactorings

Further Reading

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

      date[:verbatim_date] = matchdata1[0].strip
      date[:start_date_day] = matchdata1[3]
      date[:start_date_month] = matchdata1[2]
      date[:start_date_year] = matchdata1[1]
Severity: Minor
Found in lib/utilities/dates.rb and 5 other locations - About 15 mins to fix
lib/utilities/dates.rb on lines 843..846
lib/utilities/dates.rb on lines 849..852
lib/utilities/dates.rb on lines 855..858
lib/utilities/dates.rb on lines 867..870
lib/utilities/elevation.rb on lines 19..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 26.

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

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

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

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

Refactorings

Further Reading

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

      date[:verbatim_date] = matchdata1[0].strip
      date[:start_date_day] = matchdata1[1]
      date[:start_date_month] = matchdata1[2]
      date[:start_date_year] = matchdata1[3]
Severity: Minor
Found in lib/utilities/dates.rb and 5 other locations - About 15 mins to fix
lib/utilities/dates.rb on lines 843..846
lib/utilities/dates.rb on lines 855..858
lib/utilities/dates.rb on lines 861..864
lib/utilities/dates.rb on lines 867..870
lib/utilities/elevation.rb on lines 19..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 26.

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

  def self.disjoint_taxon_name_classes
    self.parent.disjoint_taxon_name_classes + self.collect_to_s(
        TaxonNameClassification::Icnp::EffectivelyPublished::ValidlyPublished::Illegitimate,
        TaxonNameClassification::Icnp::EffectivelyPublished::ValidlyPublished::Illegitimate::NotInOfficialList,
        TaxonNameClassification::Icnp::EffectivelyPublished::ValidlyPublished::Illegitimate::Homonym)
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/homonym.rb on lines 5..9
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/incorrect_original_spelling.rb on lines 5..9
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/superfluous.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/homonym.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/not_in_official_list.rb on lines 5..9
app/models/taxon_name_relationship/iczn/invalidating/synonym/suppression/conditional.rb on lines 5..9
app/models/taxon_name_relationship/iczn/invalidating/synonym/suppression/partial.rb on lines 5..9

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

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

  def self.disjoint_taxon_name_classes
    self.parent.disjoint_taxon_name_classes + self.collect_to_s(
        TaxonNameClassification::Icnp::EffectivelyPublished::ValidlyPublished::Illegitimate,
        TaxonNameClassification::Icnp::EffectivelyPublished::ValidlyPublished::Illegitimate::Rejected,
        TaxonNameClassification::Icnp::EffectivelyPublished::ValidlyPublished::Illegitimate::Homonym)
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/homonym.rb on lines 5..9
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/incorrect_original_spelling.rb on lines 5..9
app/models/taxon_name_classification/icn/effectively_published/validly_published/illegitimate/superfluous.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/homonym.rb on lines 5..9
app/models/taxon_name_classification/icnp/effectively_published/validly_published/illegitimate/rejected.rb on lines 5..9
app/models/taxon_name_relationship/iczn/invalidating/synonym/suppression/conditional.rb on lines 5..9
app/models/taxon_name_relationship/iczn/invalidating/synonym/suppression/partial.rb on lines 5..9

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

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

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

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

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

Refactorings

Further Reading

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

      elevation[:verbatim_elevation] = matchdata1[0].strip
      elevation[:minimum_elevation] = matchdata1[1]
      elevation[:maximum_elevation] = matchdata1[2]
      elevation[:units] = matchdata1[3]
Severity: Minor
Found in lib/utilities/elevation.rb and 5 other locations - About 15 mins to fix
lib/utilities/dates.rb on lines 843..846
lib/utilities/dates.rb on lines 849..852
lib/utilities/dates.rb on lines 855..858
lib/utilities/dates.rb on lines 861..864
lib/utilities/dates.rb on lines 867..870

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

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

      elsif h[obj].nil?
        h[obj] =
          {object: r_value[:object_at_rank],
           row_id: r_value[:object].id,
           errors: r_value[:errors],
Severity: Minor
Found in lib/tools/interactive_key.rb and 1 other location - About 15 mins to fix
lib/tools/interactive_key.rb on lines 425..430

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

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

    when :geographic_area
      h = collecting_event.geographic_area.dwc_georeference_attributes
      if a = collecting_event&.attribute_updater(:geographic_area_id)
        h[:georeferencedBy] = User.find(a).name
      end
Severity: Minor
Found in app/models/field_occurrence/dwc_extensions.rb and 1 other location - About 15 mins to fix
app/models/collection_object/dwc_extensions.rb on lines 168..176

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

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

        h[obj] =
          {object: r_value[:object_at_rank],
           row_id: r_value[:object].id,
           errors: r_value[:errors],
           error_descriptors: r_value[:error_descriptors]
Severity: Minor
Found in lib/tools/interactive_key.rb and 1 other location - About 15 mins to fix
lib/tools/interactive_key.rb on lines 408..414

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

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

    when :geographic_area
      h = collecting_event.geographic_area.dwc_georeference_attributes
      if a = collecting_event&.attribute_updater(:geographic_area_id)
        h[:georeferencedBy] = User.find(a).name
      end
Severity: Minor
Found in app/models/collection_object/dwc_extensions.rb and 1 other location - About 15 mins to fix
app/models/field_occurrence/dwc_extensions.rb on lines 152..160

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

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

  def language_to_use
    return nil if language_id.blank?
    l = Language.where(id: language_id).first
    return nil if l.nil? || !descriptor_available_languages.to_a.include?(l)
    l
Severity: Minor
Found in lib/tools/image_matrix.rb and 1 other location - About 15 mins to fix
lib/tools/interactive_key.rb on lines 222..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 26.

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

  def language_to_use
    return nil if language_id.blank?
    l = Language.where(id: language_id).first
    return nil if l.nil? || !descriptor_available_languages.to_a.include?(l)
    l
Severity: Minor
Found in lib/tools/interactive_key.rb and 1 other location - About 15 mins to fix
lib/tools/image_matrix.rb on lines 250..254

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

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