SpeciesFileGroup/taxonworks

View on GitHub

Showing 1,084 of 12,568 total issues

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

  def preview_castor_batch_load
    if params[:file]
      @result = BatchLoad::Import::CollectionObjects::CastorInterpreter.new(**batch_params)
      digest_cookie(params[:file].tempfile, :Castor_collection_objects_md5)
      render 'collection_objects/batch_load/castor/preview'
Severity: Major
Found in app/controllers/collection_objects_controller.rb and 12 other locations - About 30 mins to fix
app/controllers/collecting_events_controller.rb on lines 195..203
app/controllers/collecting_events_controller.rb on lines 221..230
app/controllers/collection_objects_controller.rb on lines 326..334
app/controllers/descriptors_controller.rb on lines 121..129
app/controllers/descriptors_controller.rb on lines 132..140
app/controllers/namespaces_controller.rb on lines 105..113
app/controllers/otus_controller.rb on lines 156..164
app/controllers/otus_controller.rb on lines 208..216
app/controllers/sequence_relationships_controller.rb on lines 92..100
app/controllers/sequences_controller.rb on lines 130..138
app/controllers/sequences_controller.rb on lines 156..164
app/controllers/taxon_names_controller.rb on lines 188..196

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

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

  def preview_qualitative_descriptor_batch_load
    if params[:file]
      @result = BatchLoad::Import::Descriptors::QualitativeInterpreter.new(**batch_params)
      digest_cookie(params[:file].tempfile, :qualitative_descriptors_batch_load_md5)
      render 'descriptors/batch_load/qualitative_descriptor/preview'
Severity: Major
Found in app/controllers/descriptors_controller.rb and 12 other locations - About 30 mins to fix
app/controllers/collecting_events_controller.rb on lines 195..203
app/controllers/collecting_events_controller.rb on lines 221..230
app/controllers/collection_objects_controller.rb on lines 300..308
app/controllers/collection_objects_controller.rb on lines 326..334
app/controllers/descriptors_controller.rb on lines 121..129
app/controllers/namespaces_controller.rb on lines 105..113
app/controllers/otus_controller.rb on lines 156..164
app/controllers/otus_controller.rb on lines 208..216
app/controllers/sequence_relationships_controller.rb on lines 92..100
app/controllers/sequences_controller.rb on lines 130..138
app/controllers/sequences_controller.rb on lines 156..164
app/controllers/taxon_names_controller.rb on lines 188..196

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

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

  def preview_identifiers_batch_load
    if params[:file]
      @result = BatchLoad::Import::Otus::IdentifiersInterpreter.new(**batch_params)
      digest_cookie(params[:file].tempfile, :batch_load_otus_identifiers_md5)
      render('otus/batch_load/identifiers/preview')
Severity: Major
Found in app/controllers/otus_controller.rb and 12 other locations - About 30 mins to fix
app/controllers/collecting_events_controller.rb on lines 195..203
app/controllers/collecting_events_controller.rb on lines 221..230
app/controllers/collection_objects_controller.rb on lines 300..308
app/controllers/collection_objects_controller.rb on lines 326..334
app/controllers/descriptors_controller.rb on lines 121..129
app/controllers/descriptors_controller.rb on lines 132..140
app/controllers/namespaces_controller.rb on lines 105..113
app/controllers/otus_controller.rb on lines 208..216
app/controllers/sequence_relationships_controller.rb on lines 92..100
app/controllers/sequences_controller.rb on lines 130..138
app/controllers/sequences_controller.rb on lines 156..164
app/controllers/taxon_names_controller.rb on lines 188..196

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

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

  def preview_nomen_batch_load
    if params[:file]
      @result = BatchLoad::Import::TaxonNames::NomenInterpreter.new(**batch_params)
      digest_cookie(params[:file].tempfile, :nomen_taxon_names_md5)
      render 'taxon_names/batch_load/nomen/preview'
Severity: Major
Found in app/controllers/taxon_names_controller.rb and 12 other locations - About 30 mins to fix
app/controllers/collecting_events_controller.rb on lines 195..203
app/controllers/collecting_events_controller.rb on lines 221..230
app/controllers/collection_objects_controller.rb on lines 300..308
app/controllers/collection_objects_controller.rb on lines 326..334
app/controllers/descriptors_controller.rb on lines 121..129
app/controllers/descriptors_controller.rb on lines 132..140
app/controllers/namespaces_controller.rb on lines 105..113
app/controllers/otus_controller.rb on lines 156..164
app/controllers/otus_controller.rb on lines 208..216
app/controllers/sequence_relationships_controller.rb on lines 92..100
app/controllers/sequences_controller.rb on lines 130..138
app/controllers/sequences_controller.rb on lines 156..164

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

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

  def preview_genbank_batch_load 
    if params[:file] 
      @result = BatchLoad::Import::Sequences::GenbankInterpreter.new(**batch_params)
      digest_cookie(params[:file].tempfile, :Genbank_sequences_md5)
      render 'sequences/batch_load/genbank/preview'
Severity: Major
Found in app/controllers/sequences_controller.rb and 12 other locations - About 30 mins to fix
app/controllers/collecting_events_controller.rb on lines 195..203
app/controllers/collecting_events_controller.rb on lines 221..230
app/controllers/collection_objects_controller.rb on lines 300..308
app/controllers/collection_objects_controller.rb on lines 326..334
app/controllers/descriptors_controller.rb on lines 121..129
app/controllers/descriptors_controller.rb on lines 132..140
app/controllers/namespaces_controller.rb on lines 105..113
app/controllers/otus_controller.rb on lines 156..164
app/controllers/otus_controller.rb on lines 208..216
app/controllers/sequence_relationships_controller.rb on lines 92..100
app/controllers/sequences_controller.rb on lines 156..164
app/controllers/taxon_names_controller.rb on lines 188..196

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

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

  def preview_primers_batch_load
    if params[:file]
      @result = BatchLoad::Import::SequenceRelationships::PrimersInterpreter.new(**batch_params)
      digest_cookie(params[:file].tempfile, :Primers_sequences_md5)
      render 'sequence_relationships/batch_load/primers/preview'
Severity: Major
Found in app/controllers/sequence_relationships_controller.rb and 12 other locations - About 30 mins to fix
app/controllers/collecting_events_controller.rb on lines 195..203
app/controllers/collecting_events_controller.rb on lines 221..230
app/controllers/collection_objects_controller.rb on lines 300..308
app/controllers/collection_objects_controller.rb on lines 326..334
app/controllers/descriptors_controller.rb on lines 121..129
app/controllers/descriptors_controller.rb on lines 132..140
app/controllers/namespaces_controller.rb on lines 105..113
app/controllers/otus_controller.rb on lines 156..164
app/controllers/otus_controller.rb on lines 208..216
app/controllers/sequences_controller.rb on lines 130..138
app/controllers/sequences_controller.rb on lines 156..164
app/controllers/taxon_names_controller.rb on lines 188..196

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

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

  def preview_buffered_batch_load
    if params[:file]
      @result = BatchLoad::Import::CollectionObjects::BufferedInterpreter.new(**batch_params)
      digest_cookie(params[:file].tempfile, :Buffered_collection_objects_md5)
      render 'collection_objects/batch_load/buffered/preview'
Severity: Major
Found in app/controllers/collection_objects_controller.rb and 12 other locations - About 30 mins to fix
app/controllers/collecting_events_controller.rb on lines 195..203
app/controllers/collecting_events_controller.rb on lines 221..230
app/controllers/collection_objects_controller.rb on lines 300..308
app/controllers/descriptors_controller.rb on lines 121..129
app/controllers/descriptors_controller.rb on lines 132..140
app/controllers/namespaces_controller.rb on lines 105..113
app/controllers/otus_controller.rb on lines 156..164
app/controllers/otus_controller.rb on lines 208..216
app/controllers/sequence_relationships_controller.rb on lines 92..100
app/controllers/sequences_controller.rb on lines 130..138
app/controllers/sequences_controller.rb on lines 156..164
app/controllers/taxon_names_controller.rb on lines 188..196

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

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

  def preview_castor_batch_load
    if params[:file]
      @result = BatchLoad::Import::CollectingEvents::CastorInterpreter.new(**batch_params)
      digest_cookie(params[:file].tempfile, :Castor_collecting_events_md5)
      render 'collecting_events/batch_load/castor/preview'
Severity: Major
Found in app/controllers/collecting_events_controller.rb and 12 other locations - About 30 mins to fix
app/controllers/collecting_events_controller.rb on lines 221..230
app/controllers/collection_objects_controller.rb on lines 300..308
app/controllers/collection_objects_controller.rb on lines 326..334
app/controllers/descriptors_controller.rb on lines 121..129
app/controllers/descriptors_controller.rb on lines 132..140
app/controllers/namespaces_controller.rb on lines 105..113
app/controllers/otus_controller.rb on lines 156..164
app/controllers/otus_controller.rb on lines 208..216
app/controllers/sequence_relationships_controller.rb on lines 92..100
app/controllers/sequences_controller.rb on lines 130..138
app/controllers/sequences_controller.rb on lines 156..164
app/controllers/taxon_names_controller.rb on lines 188..196

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

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

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

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

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

Refactorings

Further Reading

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

  def self.disjoint_taxon_name_classes
    self.parent.disjoint_taxon_name_classes + self.collect_to_s(
        TaxonNameClassification::Iczn::Unavailable::Suppressed,
        TaxonNameClassification::Iczn::Unavailable::Suppressed::OfficialIndexOfRejectedFamilyGroupNamesInZoology,
        TaxonNameClassification::Iczn::Unavailable::Suppressed::OfficialIndexOfRejectedGenericNamesInZoology,
app/models/taxon_name_classification/iczn/unavailable/suppressed/not_in_official_list_of_available_names_in_zoology.rb on lines 5..11
app/models/taxon_name_classification/iczn/unavailable/suppressed/official_index_of_rejected_family_group_names_in_zoology.rb on lines 9..15
app/models/taxon_name_classification/iczn/unavailable/suppressed/official_index_of_rejected_generic_names_in_zoology.rb on lines 9..15
app/models/taxon_name_classification/iczn/unavailable/suppressed/official_index_of_rejected_specific_names_in_zoology.rb on lines 9..15

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

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

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

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

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

Refactorings

Further Reading

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

  def self.disjoint_taxon_name_classes
    self.parent.disjoint_taxon_name_classes + self.collect_to_s(
        TaxonNameClassification::Iczn::Unavailable::Suppressed,
        TaxonNameClassification::Iczn::Unavailable::Suppressed::OfficialIndexOfRejectedAndInvalidWorksInZoology,
        TaxonNameClassification::Iczn::Unavailable::Suppressed::OfficialIndexOfRejectedFamilyGroupNamesInZoology,
app/models/taxon_name_classification/iczn/unavailable/suppressed/official_index_of_rejected_and_invalid_works_in_zoology.rb on lines 5..11
app/models/taxon_name_classification/iczn/unavailable/suppressed/official_index_of_rejected_family_group_names_in_zoology.rb on lines 9..15
app/models/taxon_name_classification/iczn/unavailable/suppressed/official_index_of_rejected_generic_names_in_zoology.rb on lines 9..15
app/models/taxon_name_classification/iczn/unavailable/suppressed/official_index_of_rejected_specific_names_in_zoology.rb on lines 9..15

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

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

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

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

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

Refactorings

Further Reading

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

  def self.disjoint_taxon_name_classes
    self.parent.disjoint_taxon_name_classes + self.collect_to_s(
        TaxonNameClassification::Iczn::Unavailable::Suppressed,
        TaxonNameClassification::Iczn::Unavailable::Suppressed::OfficialIndexOfRejectedAndInvalidWorksInZoology,
        TaxonNameClassification::Iczn::Unavailable::Suppressed::NotInOfficialListOfAvailableNamesInZoology,
app/models/taxon_name_classification/iczn/unavailable/suppressed/not_in_official_list_of_available_names_in_zoology.rb on lines 5..11
app/models/taxon_name_classification/iczn/unavailable/suppressed/official_index_of_rejected_and_invalid_works_in_zoology.rb on lines 5..11
app/models/taxon_name_classification/iczn/unavailable/suppressed/official_index_of_rejected_family_group_names_in_zoology.rb on lines 9..15
app/models/taxon_name_classification/iczn/unavailable/suppressed/official_index_of_rejected_specific_names_in_zoology.rb on lines 9..15

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

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

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

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

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

Refactorings

Further Reading

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

  def self.disjoint_taxon_name_classes
    self.parent.disjoint_taxon_name_classes + self.collect_to_s(
        TaxonNameClassification::Iczn::Unavailable::Suppressed,
        TaxonNameClassification::Iczn::Unavailable::Suppressed::OfficialIndexOfRejectedAndInvalidWorksInZoology,
        TaxonNameClassification::Iczn::Unavailable::Suppressed::NotInOfficialListOfAvailableNamesInZoology,
app/models/taxon_name_classification/iczn/unavailable/suppressed/not_in_official_list_of_available_names_in_zoology.rb on lines 5..11
app/models/taxon_name_classification/iczn/unavailable/suppressed/official_index_of_rejected_and_invalid_works_in_zoology.rb on lines 5..11
app/models/taxon_name_classification/iczn/unavailable/suppressed/official_index_of_rejected_family_group_names_in_zoology.rb on lines 9..15
app/models/taxon_name_classification/iczn/unavailable/suppressed/official_index_of_rejected_generic_names_in_zoology.rb on lines 9..15

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

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

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

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

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

Refactorings

Further Reading

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

    def sv_validate_coordinated_names_type_species
      return true unless is_valid?
      return true unless is_genus_rank?
      list_of_coordinated_names.each do |t|
        if self.type_species != t.type_species
Severity: Minor
Found in app/models/protonym/soft_validation_extensions.rb and 2 other locations - About 30 mins to fix
app/models/protonym/soft_validation_extensions.rb on lines 697..702
app/models/protonym/soft_validation_extensions.rb on lines 1017..1022

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

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

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

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

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

Refactorings

Further Reading

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

  def self.disjoint_taxon_name_classes
    self.parent.disjoint_taxon_name_classes + self.collect_to_s(
        TaxonNameClassification::Iczn::Unavailable::Suppressed,
        TaxonNameClassification::Iczn::Unavailable::Suppressed::OfficialIndexOfRejectedAndInvalidWorksInZoology,
        TaxonNameClassification::Iczn::Unavailable::Suppressed::NotInOfficialListOfAvailableNamesInZoology,
app/models/taxon_name_classification/iczn/unavailable/suppressed/not_in_official_list_of_available_names_in_zoology.rb on lines 5..11
app/models/taxon_name_classification/iczn/unavailable/suppressed/official_index_of_rejected_and_invalid_works_in_zoology.rb on lines 5..11
app/models/taxon_name_classification/iczn/unavailable/suppressed/official_index_of_rejected_generic_names_in_zoology.rb on lines 9..15
app/models/taxon_name_classification/iczn/unavailable/suppressed/official_index_of_rejected_specific_names_in_zoology.rb on lines 9..15

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

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

    def sv_fix_coordinated_names_part_of_speech
      return false unless self.part_of_speech_class.nil?
      list_of_coordinated_names.each do |t|
        unless t.part_of_speech_class.nil?
          c = self.taxon_name_classifications.create(type: t.part_of_speech_class.to_s)
Severity: Minor
Found in app/models/protonym/soft_validation_extensions.rb and 1 other location - About 30 mins to fix
app/models/protonym/soft_validation_extensions.rb on lines 686..694

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

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

    def sv_fix_coordinated_names_gender
      return false unless self.gender_class.nil?
      list_of_coordinated_names.each do |t|
        unless t.gender_class.nil?
          c = self.taxon_name_classifications.create(type: t.gender_class.to_s)
Severity: Minor
Found in app/models/protonym/soft_validation_extensions.rb and 1 other location - About 30 mins to fix
app/models/protonym/soft_validation_extensions.rb on lines 707..715

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

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

      def initialize(query_params)
        super

        @attribute_subject_id = params[:attribute_subject_id]
        @attribute_subject_type = params[:attribute_subject_type]
Severity: Minor
Found in lib/queries/data_attribute/filter.rb and 1 other location - About 30 mins to fix
lib/queries/alternate_value/filter.rb on lines 32..41

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

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

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

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

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

Refactorings

Further Reading

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

    def sv_validate_coordinated_names_type_genus
      return true unless is_valid?
      return true unless is_family_rank?
      list_of_coordinated_names.each do |t|
        if self.type_genus != t.type_genus
Severity: Minor
Found in app/models/protonym/soft_validation_extensions.rb and 2 other locations - About 30 mins to fix
app/models/protonym/soft_validation_extensions.rb on lines 697..702
app/models/protonym/soft_validation_extensions.rb on lines 898..903

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

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

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

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

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

Refactorings

Further Reading

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

    def sv_validate_coordinated_names_part_of_speech
      return true unless is_available?
      return true unless is_species_rank?
      list_of_coordinated_names.each do |t|
        if self.part_of_speech_class != t.part_of_speech_class
Severity: Minor
Found in app/models/protonym/soft_validation_extensions.rb and 2 other locations - About 30 mins to fix
app/models/protonym/soft_validation_extensions.rb on lines 898..903
app/models/protonym/soft_validation_extensions.rb on lines 1017..1022

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

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

  def create
    @observation_matrix_column_item = ObservationMatrixColumnItem.new(observation_matrix_column_item_params)
    respond_to do |format|
      if @observation_matrix_column_item.save
        format.json { render :show, status: :created, location: @observation_matrix_column_item.metamorphosize }
Severity: Minor
Found in app/controllers/observation_matrix_column_items_controller.rb and 1 other location - About 30 mins to fix
app/controllers/observation_matrix_row_items_controller.rb on lines 37..43

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

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