SpeciesFileGroup/taxonworks

View on GitHub

Showing 12,628 of 12,628 total issues

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

    return determination.id
      ? TaxonDetermination.update(determination.id, {
          taxon_determination: payload
        })
      : TaxonDetermination.create({ taxon_determination: payload })
app/javascript/vue/tasks/extracts/new_extract/store/actions/saveOriginRelationships.js on lines 20..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 46.

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

    return relationship.id
      ? OriginRelationship.update(data.id, { origin_relationship: data })
      : OriginRelationship.create({ origin_relationship: data })
app/javascript/vue/tasks/digitize/store/actions/saveDeterminations.js on lines 42..46

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

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

    const request = state.graph.id
      ? BiologicalAssociationGraph.update(state.graph.id, payload)
      : BiologicalAssociationGraph.create(payload)
app/javascript/vue/tasks/observation_matrices/new/store/actions/saveMatrix.js on lines 13..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 46.

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

  const request = state.matrix.id
    ? ObservationMatrix.update(state.matrix.id, payload)
    : ObservationMatrix.create(payload)
app/javascript/vue/tasks/biological_associations/biological_associations_graph/composition/useGraph.js on lines 426..428

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

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

export const ATTRIBUTES = {
  cached_html: 'Name',
  cached_author_year: 'Author and year',
  original_combination: 'Original combination',
  cached_is_valid: 'Valid?',
app/javascript/vue/tasks/asserted_distributions/filter/constants/attributes.js on lines 1..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 46.

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

export const ATTRIBUTES = {
  otu_taxonomy_order: 'Order',
  otu_taxonomy_family: 'Family',
  otu_taxonomy_genus: 'Genus',
  otu_object_tag: 'OTU',
app/javascript/vue/tasks/nomenclature/filter/constants/attributes.js on lines 1..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 46.

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 199..207
app/controllers/collecting_events_controller.rb on lines 225..234
app/controllers/collection_objects_controller.rb on lines 313..321
app/controllers/collection_objects_controller.rb on lines 339..347
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_simple_batch_load
    if params[:file]
      @result = BatchLoad::Import::Namespaces::SimpleInterpreter.new(**batch_params)
      digest_cookie(params[:file].tempfile, :Simple_namespaces_md5)
      render 'namespaces/batch_load/simple/preview'
Severity: Major
Found in app/controllers/namespaces_controller.rb and 12 other locations - About 30 mins to fix
app/controllers/collecting_events_controller.rb on lines 199..207
app/controllers/collecting_events_controller.rb on lines 225..234
app/controllers/collection_objects_controller.rb on lines 313..321
app/controllers/collection_objects_controller.rb on lines 339..347
app/controllers/descriptors_controller.rb on lines 121..129
app/controllers/descriptors_controller.rb on lines 132..140
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 199..207
app/controllers/collecting_events_controller.rb on lines 225..234
app/controllers/collection_objects_controller.rb on lines 313..321
app/controllers/collection_objects_controller.rb on lines 339..347
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_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 199..207
app/controllers/collecting_events_controller.rb on lines 225..234
app/controllers/collection_objects_controller.rb on lines 313..321
app/controllers/collection_objects_controller.rb on lines 339..347
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 199..207
app/controllers/collecting_events_controller.rb on lines 225..234
app/controllers/collection_objects_controller.rb on lines 313..321
app/controllers/collection_objects_controller.rb on lines 339..347
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_modify_gene_descriptor_batch_load
    if params[:file]
      @result = BatchLoad::Import::Descriptors::ModifyGeneDescriptorInterpreter.new(**batch_params)
      digest_cookie(params[:file].tempfile, :modify_gene_descriptor_batch_load_descriptors_md5)
      render 'descriptors/batch_load/modify_gene_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 199..207
app/controllers/collecting_events_controller.rb on lines 225..234
app/controllers/collection_objects_controller.rb on lines 313..321
app/controllers/collection_objects_controller.rb on lines 339..347
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_data_attributes_batch_load
    if params[:file]
      @result = BatchLoad::Import::Otus::DataAttributesInterpreter.new(**batch_params)
      digest_cookie(params[:file].tempfile, :data_attributes_batch_load_otus_md5)
      render 'otus/batch_load/data_attributes/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 199..207
app/controllers/collecting_events_controller.rb on lines 225..234
app/controllers/collection_objects_controller.rb on lines 313..321
app/controllers/collection_objects_controller.rb on lines 339..347
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/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 225..234
app/controllers/collection_objects_controller.rb on lines 313..321
app/controllers/collection_objects_controller.rb on lines 339..347
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::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 199..207
app/controllers/collecting_events_controller.rb on lines 225..234
app/controllers/collection_objects_controller.rb on lines 339..347
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_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 199..207
app/controllers/collecting_events_controller.rb on lines 225..234
app/controllers/collection_objects_controller.rb on lines 313..321
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_primers_batch_load 
    if params[:file] 
      @result = BatchLoad::Import::Sequences::PrimersInterpreter.new(**batch_params)
      digest_cookie(params[:file].tempfile, :Primers_sequences_md5)
      render 'sequences/batch_load/primers/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 199..207
app/controllers/collecting_events_controller.rb on lines 225..234
app/controllers/collection_objects_controller.rb on lines 313..321
app/controllers/collection_objects_controller.rb on lines 339..347
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/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_gpx_batch_load
    if params[:file]
      @result = BatchLoad::Import::CollectingEvents::GPXInterpreter.new(**batch_params)
      digest_cookie(params[:file].tempfile, :gpx_batch_load_collecting_events_md5)
      render 'collecting_events/batch_load/gpx/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 199..207
app/controllers/collection_objects_controller.rb on lines 313..321
app/controllers/collection_objects_controller.rb on lines 339..347
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::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 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 199..207
app/controllers/collecting_events_controller.rb on lines 225..234
app/controllers/collection_objects_controller.rb on lines 313..321
app/controllers/collection_objects_controller.rb on lines 339..347
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

Severity
Category
Status
Source
Language