SpeciesFileGroup/taxonworks

View on GitHub

Showing 12,628 of 12,628 total issues

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

  def create
    @gene_attribute = GeneAttribute.new(gene_attribute_params)

    respond_to do |format|
      if @gene_attribute.save
Severity: Major
Found in app/controllers/gene_attributes_controller.rb and 20 other locations - About 1 hr to fix
app/controllers/asserted_distributions_controller.rb on lines 43..51
app/controllers/attributions_controller.rb on lines 42..51
app/controllers/biological_associations_controller.rb on lines 45..53
app/controllers/biological_associations_graphs_controller.rb on lines 44..53
app/controllers/biological_relationships_controller.rb on lines 61..70
app/controllers/character_states_controller.rb on lines 29..38
app/controllers/collection_object_observations_controller.rb on lines 30..40
app/controllers/collection_profiles_controller.rb on lines 33..42
app/controllers/common_names_controller.rb on lines 46..55
app/controllers/dataset_records_controller.rb on lines 28..37
app/controllers/depictions_controller.rb on lines 71..79
app/controllers/extracts_controller.rb on lines 44..53
app/controllers/loans_controller.rb on lines 49..58
app/controllers/organizations_controller.rb on lines 36..45
app/controllers/origin_relationships_controller.rb on lines 43..52
app/controllers/otu_page_layouts_controller.rb on lines 31..40
app/controllers/protocol_relationships_controller.rb on lines 47..56
app/controllers/protocols_controller.rb on lines 40..49
app/controllers/ranged_lot_categories_controller.rb on lines 29..38
app/controllers/sequences_controller.rb on lines 38..47

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

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 dwc_event_time
    return unless collecting_event

    %w{start_time end_time}
      .map { |t| %w{hour minute second}
Severity: Major
Found in app/models/field_occurrence/dwc_extensions.rb and 2 other locations - About 1 hr to fix
app/models/collection_object/dwc_extensions.rb on lines 616..626
app/models/field_occurrence/dwc_extensions.rb on lines 563..573

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

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

  def create
    @organization = Organization.new(organization_params)

    respond_to do |format|
      if @organization.save
Severity: Major
Found in app/controllers/organizations_controller.rb and 20 other locations - About 1 hr to fix
app/controllers/asserted_distributions_controller.rb on lines 43..51
app/controllers/attributions_controller.rb on lines 42..51
app/controllers/biological_associations_controller.rb on lines 45..53
app/controllers/biological_associations_graphs_controller.rb on lines 44..53
app/controllers/biological_relationships_controller.rb on lines 61..70
app/controllers/character_states_controller.rb on lines 29..38
app/controllers/collection_object_observations_controller.rb on lines 30..40
app/controllers/collection_profiles_controller.rb on lines 33..42
app/controllers/common_names_controller.rb on lines 46..55
app/controllers/dataset_records_controller.rb on lines 28..37
app/controllers/depictions_controller.rb on lines 71..79
app/controllers/extracts_controller.rb on lines 44..53
app/controllers/gene_attributes_controller.rb on lines 33..42
app/controllers/loans_controller.rb on lines 49..58
app/controllers/origin_relationships_controller.rb on lines 43..52
app/controllers/otu_page_layouts_controller.rb on lines 31..40
app/controllers/protocol_relationships_controller.rb on lines 47..56
app/controllers/protocols_controller.rb on lines 40..49
app/controllers/ranged_lot_categories_controller.rb on lines 29..38
app/controllers/sequences_controller.rb on lines 38..47

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

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

  def create
    @biological_association = BiologicalAssociation.new(biological_association_params)
    respond_to do |format|
      if @biological_association.save
        format.html { redirect_to @biological_association, notice: 'Biological association was successfully created.' }
Severity: Major
Found in app/controllers/biological_associations_controller.rb and 20 other locations - About 1 hr to fix
app/controllers/asserted_distributions_controller.rb on lines 43..51
app/controllers/attributions_controller.rb on lines 42..51
app/controllers/biological_associations_graphs_controller.rb on lines 44..53
app/controllers/biological_relationships_controller.rb on lines 61..70
app/controllers/character_states_controller.rb on lines 29..38
app/controllers/collection_object_observations_controller.rb on lines 30..40
app/controllers/collection_profiles_controller.rb on lines 33..42
app/controllers/common_names_controller.rb on lines 46..55
app/controllers/dataset_records_controller.rb on lines 28..37
app/controllers/depictions_controller.rb on lines 71..79
app/controllers/extracts_controller.rb on lines 44..53
app/controllers/gene_attributes_controller.rb on lines 33..42
app/controllers/loans_controller.rb on lines 49..58
app/controllers/organizations_controller.rb on lines 36..45
app/controllers/origin_relationships_controller.rb on lines 43..52
app/controllers/otu_page_layouts_controller.rb on lines 31..40
app/controllers/protocol_relationships_controller.rb on lines 47..56
app/controllers/protocols_controller.rb on lines 40..49
app/controllers/ranged_lot_categories_controller.rb on lines 29..38
app/controllers/sequences_controller.rb on lines 38..47

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

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

  def create
    @origin_relationship = OriginRelationship.new(origin_relationship_params)

    respond_to do |format|
      if @origin_relationship.save
Severity: Major
Found in app/controllers/origin_relationships_controller.rb and 20 other locations - About 1 hr to fix
app/controllers/asserted_distributions_controller.rb on lines 43..51
app/controllers/attributions_controller.rb on lines 42..51
app/controllers/biological_associations_controller.rb on lines 45..53
app/controllers/biological_associations_graphs_controller.rb on lines 44..53
app/controllers/biological_relationships_controller.rb on lines 61..70
app/controllers/character_states_controller.rb on lines 29..38
app/controllers/collection_object_observations_controller.rb on lines 30..40
app/controllers/collection_profiles_controller.rb on lines 33..42
app/controllers/common_names_controller.rb on lines 46..55
app/controllers/dataset_records_controller.rb on lines 28..37
app/controllers/depictions_controller.rb on lines 71..79
app/controllers/extracts_controller.rb on lines 44..53
app/controllers/gene_attributes_controller.rb on lines 33..42
app/controllers/loans_controller.rb on lines 49..58
app/controllers/organizations_controller.rb on lines 36..45
app/controllers/otu_page_layouts_controller.rb on lines 31..40
app/controllers/protocol_relationships_controller.rb on lines 47..56
app/controllers/protocols_controller.rb on lines 40..49
app/controllers/ranged_lot_categories_controller.rb on lines 29..38
app/controllers/sequences_controller.rb on lines 38..47

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

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 dwc_event_date
    return unless collecting_event

    %w{start_date end_date}
      .map { |d| %w{year month day}
Severity: Major
Found in app/models/field_occurrence/dwc_extensions.rb and 2 other locations - About 1 hr to fix
app/models/collection_object/dwc_extensions.rb on lines 616..626
app/models/field_occurrence/dwc_extensions.rb on lines 546..556

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

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 dwc_event_time
    return unless collecting_event

    %w{start_time end_time}
      .map { |t| %w{hour minute second}
Severity: Major
Found in app/models/collection_object/dwc_extensions.rb and 2 other locations - About 1 hr to fix
app/models/field_occurrence/dwc_extensions.rb on lines 546..556
app/models/field_occurrence/dwc_extensions.rb on lines 563..573

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

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

  def create
    @protocol_relationship = ProtocolRelationship.new(protocol_relationship_params)

    respond_to do |format|
      if @protocol_relationship.save
Severity: Major
Found in app/controllers/protocol_relationships_controller.rb and 20 other locations - About 1 hr to fix
app/controllers/asserted_distributions_controller.rb on lines 43..51
app/controllers/attributions_controller.rb on lines 42..51
app/controllers/biological_associations_controller.rb on lines 45..53
app/controllers/biological_associations_graphs_controller.rb on lines 44..53
app/controllers/biological_relationships_controller.rb on lines 61..70
app/controllers/character_states_controller.rb on lines 29..38
app/controllers/collection_object_observations_controller.rb on lines 30..40
app/controllers/collection_profiles_controller.rb on lines 33..42
app/controllers/common_names_controller.rb on lines 46..55
app/controllers/dataset_records_controller.rb on lines 28..37
app/controllers/depictions_controller.rb on lines 71..79
app/controllers/extracts_controller.rb on lines 44..53
app/controllers/gene_attributes_controller.rb on lines 33..42
app/controllers/loans_controller.rb on lines 49..58
app/controllers/organizations_controller.rb on lines 36..45
app/controllers/origin_relationships_controller.rb on lines 43..52
app/controllers/otu_page_layouts_controller.rb on lines 31..40
app/controllers/protocols_controller.rb on lines 40..49
app/controllers/ranged_lot_categories_controller.rb on lines 29..38
app/controllers/sequences_controller.rb on lines 38..47

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

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

  def create
    @extract = Extract.new(extract_params)

    respond_to do |format|
      if @extract.save
Severity: Major
Found in app/controllers/extracts_controller.rb and 20 other locations - About 1 hr to fix
app/controllers/asserted_distributions_controller.rb on lines 43..51
app/controllers/attributions_controller.rb on lines 42..51
app/controllers/biological_associations_controller.rb on lines 45..53
app/controllers/biological_associations_graphs_controller.rb on lines 44..53
app/controllers/biological_relationships_controller.rb on lines 61..70
app/controllers/character_states_controller.rb on lines 29..38
app/controllers/collection_object_observations_controller.rb on lines 30..40
app/controllers/collection_profiles_controller.rb on lines 33..42
app/controllers/common_names_controller.rb on lines 46..55
app/controllers/dataset_records_controller.rb on lines 28..37
app/controllers/depictions_controller.rb on lines 71..79
app/controllers/gene_attributes_controller.rb on lines 33..42
app/controllers/loans_controller.rb on lines 49..58
app/controllers/organizations_controller.rb on lines 36..45
app/controllers/origin_relationships_controller.rb on lines 43..52
app/controllers/otu_page_layouts_controller.rb on lines 31..40
app/controllers/protocol_relationships_controller.rb on lines 47..56
app/controllers/protocols_controller.rb on lines 40..49
app/controllers/ranged_lot_categories_controller.rb on lines 29..38
app/controllers/sequences_controller.rb on lines 38..47

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

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 update
    respond_to do |format|
      if @taxon_determination.update(taxon_determination_params)
        format.html { redirect_to @taxon_determination, notice: 'Taxon determination was successfully updated.' }
        format.json { render action: 'show', status: :created, location: @taxon_determination }
Severity: Minor
Found in app/controllers/taxon_determinations_controller.rb and 1 other location - About 1 hr to fix
app/controllers/namespaces_controller.rb on lines 54..61

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

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 collecting_event_browse_previous_by_identifier(collecting_event)
    return nil if collecting_event.nil?
    o = collecting_event.previous_by_identifier
    return content_tag(:div, 'None', 'class' => 'navigation-item disable') if o.nil?
    link_text = content_tag(:span, 'Previous by id', 'class' => 'small-icon icon-left', 'data-icon' => 'arrow-left')
Severity: Minor
Found in app/helpers/collecting_events_helper.rb and 1 other location - About 1 hr to fix
app/helpers/collecting_events_helper.rb on lines 183..194

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

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 update
    respond_to do |format|
      if @namespace.update(namespace_params)
        format.html { redirect_to @namespace, notice: 'Namespace was successfully updated.' }
        format.json { render action: 'show', status: :ok, location: @namespace }
Severity: Minor
Found in app/controllers/namespaces_controller.rb and 1 other location - About 1 hr to fix
app/controllers/taxon_determinations_controller.rb on lines 58..65

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

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 collecting_event_browse_next_by_identifier(collecting_event)
    return nil if collecting_event.nil?
    o = collecting_event.next_by_identifier
    return content_tag(:div, 'None', 'class' => 'navigation-item disable') if o.nil?
    link_text = content_tag(:span, 'Next by id', 'class' => 'small-icon icon-right', 'data-icon' => 'arrow-right')
Severity: Minor
Found in app/helpers/collecting_events_helper.rb and 1 other location - About 1 hr to fix
app/helpers/collecting_events_helper.rb on lines 167..178

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

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

  def sv_synonym_relationship
    if self.source
      date1 = self.source.cached_nomenclature_date.to_time
      date2 = self.subject_taxon_name.cached_nomenclature_date
      if !!date1 && !!date2
Severity: Major
Found in app/models/taxon_name_relationship/icn/unaccepting/synonym.rb and 3 other locations - About 55 mins to fix
app/models/taxon_name_relationship/icnp/unaccepting/synonym.rb on lines 33..41
app/models/taxon_name_relationship/iczn/invalidating/synonym.rb on lines 51..59
app/models/taxon_name_relationship/typification/genus/subsequent.rb on lines 28..36

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

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

  def sv_synonym_relationship
    if self.source
      date1 = self.source.cached_nomenclature_date.to_time
      date2 = self.subject_taxon_name.cached_nomenclature_date
      if !!date1 && !!date2
app/models/taxon_name_relationship/icn/unaccepting/synonym.rb on lines 35..43
app/models/taxon_name_relationship/icnp/unaccepting/synonym.rb on lines 33..41
app/models/taxon_name_relationship/iczn/invalidating/synonym.rb on lines 51..59

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

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

  def sv_synonym_relationship
    if self.source
      date1 = self.source.cached_nomenclature_date.to_time
      date2 = self.subject_taxon_name.cached_nomenclature_date
      if !!date1 && !!date2
app/models/taxon_name_relationship/icn/unaccepting/synonym.rb on lines 35..43
app/models/taxon_name_relationship/icnp/unaccepting/synonym.rb on lines 33..41
app/models/taxon_name_relationship/typification/genus/subsequent.rb on lines 28..36

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

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

  def sv_synonym_relationship
    if self.source
      date1 = self.source.cached_nomenclature_date.to_time
      date2 = self.subject_taxon_name.cached_nomenclature_date
      if !!date1 && !!date2
Severity: Major
Found in app/models/taxon_name_relationship/icnp/unaccepting/synonym.rb and 3 other locations - About 55 mins to fix
app/models/taxon_name_relationship/icn/unaccepting/synonym.rb on lines 35..43
app/models/taxon_name_relationship/iczn/invalidating/synonym.rb on lines 51..59
app/models/taxon_name_relationship/typification/genus/subsequent.rb on lines 28..36

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

  def index
    respond_to do |format|
      format.html {
        @recent_objects = Documentation.recent_from_project_id(sessions_current_project_id).order(updated_at: :desc).limit(10)
        render '/shared/data/all/index'
Severity: Major
Found in app/controllers/documentation_controller.rb and 2 other locations - About 55 mins to fix
app/controllers/attributions_controller.rb on lines 9..17
app/controllers/protocol_relationships_controller.rb on lines 8..16

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

  def index
    respond_to do |format|
      format.html {
        @recent_objects = ProtocolRelationship.recent_from_project_id(sessions_current_project_id).order(updated_at: :desc).limit(10)
        render '/shared/data/all/index'
Severity: Major
Found in app/controllers/protocol_relationships_controller.rb and 2 other locations - About 55 mins to fix
app/controllers/attributions_controller.rb on lines 9..17
app/controllers/documentation_controller.rb on lines 8..16

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

  def index
    respond_to do |format|
      format.html do
        @recent_objects = Attribution.recent_from_project_id(sessions_current_project_id).order(updated_at: :desc).limit(10)
        render '/shared/data/all/index'
Severity: Major
Found in app/controllers/attributions_controller.rb and 2 other locations - About 55 mins to fix
app/controllers/documentation_controller.rb on lines 8..16
app/controllers/protocol_relationships_controller.rb on lines 8..16

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

Severity
Category
Status
Source
Language