SpeciesFileGroup/taxonworks

View on GitHub

Showing 12,631 of 12,631 total issues

Method destroy_couplet has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def destroy_couplet
    k = children.order(:position).reload.to_a
    return true if k.empty?

    # TODO: handle multiple facets
Severity: Minor
Found in app/models/lead.rb - About 1 hr to fix

    Method paper_distribution_row has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def paper_distribution_row(entry_item)
        o = case entry_item.object.class.name
        when 'TypeMaterial'
          entry_item.object.collection_object
        else
    Severity: Minor
    Found in app/helpers/taxon_names/paper_catalog_helper.rb - About 1 hr to fix

      Method nexml_depictions has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def nexml_depictions(options = {})
          opt = {target: '', descriptors: []}.merge!(options)
          xml = Builder::XmlMarkup.new(target: opt[:target])
          m = opt[:observation_matrix]
          xml.depictions do
      Severity: Minor
      Found in app/helpers/observation_matrices/export/nexml_helper.rb - About 1 hr to fix

        Method sv_missing_part_of_speech has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def sv_missing_part_of_speech
              if is_species_rank? && self.part_of_speech_class.nil? && !has_misspelling_relationship? && is_available?
        
                z = TaxonNameClassification.
                    joins(:taxon_name).
        Severity: Minor
        Found in app/models/protonym/soft_validation_extensions.rb - About 1 hr to fix

          Method geographic_area has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def geographic_area(columns, data_origin = nil)
                r = BatchLoad::ColumnResolver::Result.new
          
                if columns['geographic_area_id']
                  begin
          Severity: Minor
          Found in lib/batch_load/column_resolver.rb - About 1 hr to fix

            Method name_status has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def self.name_status(taxonworks_object, colrapi_result)
                  o = taxonworks_object
            
                  r = {
                      taxonworks_name: collection_object_scientific_name(o),
            Severity: Minor
            Found in lib/vendor/colrapi.rb - About 1 hr to fix

              Method soft_validators has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def soft_validators(only_sets: [], except_sets: [], only_methods: [], except_methods: [], include_flagged: false, fixable: nil, include_superclass: true)
                    only_methods = Utilities::Params.arrayify(only_methods)
                    return only_methods if !only_methods.empty?
              
                    except_methods = Utilities::Params.arrayify(except_methods)
              Severity: Minor
              Found in lib/soft_validation.rb - About 1 hr to fix

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

                  def create
                    @observation = Observation.new(observation_params)
                    respond_to do |format|
                      if @observation.save
                        format.html {
                Severity: Major
                Found in app/controllers/observations_controller.rb and 1 other location - About 1 hr to fix
                app/controllers/descriptors_controller.rb on lines 47..56

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

                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 next_link(instance, text: 'Next', target: nil)
                    link_text = content_tag(:span, text, 'class' => 'small-icon icon-right', 'data-icon' => 'arrow-right')
                    link_object = instance.next
                    return content_tag(:div, link_text, 'class' => 'navigation-item disable') if link_object.nil?
                    if target.nil?
                Severity: Major
                Found in app/helpers/workbench/navigation_helper.rb and 1 other location - About 1 hr to fix
                app/helpers/workbench/navigation_helper.rb on lines 82..91

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

                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
                    @descriptor = Descriptor.new(descriptor_params)
                    respond_to do |format|
                      if @descriptor.save
                        format.html { redirect_to url_for(@descriptor.metamorphosize),
                Severity: Major
                Found in app/controllers/descriptors_controller.rb and 1 other location - About 1 hr to fix
                app/controllers/observations_controller.rb on lines 60..70

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

                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 previous_link(instance, text: 'Previous', target: nil)
                    link_text = content_tag(:span, text,  'data-icon' => 'arrow-left', 'class' => 'small-icon')
                    link_object = instance.previous
                    return content_tag(:div, link_text, 'class' => 'navigation-item disable') if link_object.nil?
                    if target.nil?
                Severity: Major
                Found in app/helpers/workbench/navigation_helper.rb and 1 other location - About 1 hr to fix
                app/helpers/workbench/navigation_helper.rb on lines 96..105

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 51.

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

                    roles_attributes: {
                      id: Number,
                      _destroy: Boolean,
                      type: String,
                      person_id: Number,
                Severity: Major
                Found in app/javascript/vue/routes/endpoints/Extract.js and 8 other locations - About 1 hr to fix
                app/javascript/vue/routes/endpoints/CollectingEvents.js on lines 47..59
                app/javascript/vue/routes/endpoints/CollectionObject.js on lines 58..70
                app/javascript/vue/routes/endpoints/FieldOccurrence.js on lines 55..67
                app/javascript/vue/routes/endpoints/Loan.js on lines 37..49
                app/javascript/vue/routes/endpoints/SledImage.js on lines 42..54
                app/javascript/vue/routes/endpoints/Source.js on lines 51..63
                app/javascript/vue/routes/endpoints/TaxonName.js on lines 20..32
                app/javascript/vue/routes/endpoints/TypeMaterial.js on lines 10..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 57.

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

                    identifiers_attributes: {
                      id: Number,
                      _destroy: Boolean,
                      identifier: String,
                      namespace_id: Number,
                Severity: Major
                Found in app/javascript/vue/routes/endpoints/FieldOccurrence.js and 8 other locations - About 1 hr to fix
                app/javascript/vue/routes/endpoints/CollectingEvents.js on lines 47..59
                app/javascript/vue/routes/endpoints/CollectionObject.js on lines 58..70
                app/javascript/vue/routes/endpoints/Extract.js on lines 13..25
                app/javascript/vue/routes/endpoints/Loan.js on lines 37..49
                app/javascript/vue/routes/endpoints/SledImage.js on lines 42..54
                app/javascript/vue/routes/endpoints/Source.js on lines 51..63
                app/javascript/vue/routes/endpoints/TaxonName.js on lines 20..32
                app/javascript/vue/routes/endpoints/TypeMaterial.js on lines 10..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 57.

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

                    roles_attributes: {
                      id: Number,
                      _destroy: Boolean,
                      type: String,
                      person_id: Number,
                Severity: Major
                Found in app/javascript/vue/routes/endpoints/Loan.js and 8 other locations - About 1 hr to fix
                app/javascript/vue/routes/endpoints/CollectingEvents.js on lines 47..59
                app/javascript/vue/routes/endpoints/CollectionObject.js on lines 58..70
                app/javascript/vue/routes/endpoints/Extract.js on lines 13..25
                app/javascript/vue/routes/endpoints/FieldOccurrence.js on lines 55..67
                app/javascript/vue/routes/endpoints/SledImage.js on lines 42..54
                app/javascript/vue/routes/endpoints/Source.js on lines 51..63
                app/javascript/vue/routes/endpoints/TaxonName.js on lines 20..32
                app/javascript/vue/routes/endpoints/TypeMaterial.js on lines 10..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 57.

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

                    roles_attributes: {
                      id: Number,
                      _destroy: Boolean,
                      type: String,
                      person_id: Number,
                Severity: Major
                Found in app/javascript/vue/routes/endpoints/CollectingEvents.js and 8 other locations - About 1 hr to fix
                app/javascript/vue/routes/endpoints/CollectionObject.js on lines 58..70
                app/javascript/vue/routes/endpoints/Extract.js on lines 13..25
                app/javascript/vue/routes/endpoints/FieldOccurrence.js on lines 55..67
                app/javascript/vue/routes/endpoints/Loan.js on lines 37..49
                app/javascript/vue/routes/endpoints/SledImage.js on lines 42..54
                app/javascript/vue/routes/endpoints/Source.js on lines 51..63
                app/javascript/vue/routes/endpoints/TaxonName.js on lines 20..32
                app/javascript/vue/routes/endpoints/TypeMaterial.js on lines 10..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 57.

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

                    roles_attributes: {
                      id: Number,
                      _destroy: Boolean,
                      type: String,
                      person_id: Number,
                Severity: Major
                Found in app/javascript/vue/routes/endpoints/TypeMaterial.js and 8 other locations - About 1 hr to fix
                app/javascript/vue/routes/endpoints/CollectingEvents.js on lines 47..59
                app/javascript/vue/routes/endpoints/CollectionObject.js on lines 58..70
                app/javascript/vue/routes/endpoints/Extract.js on lines 13..25
                app/javascript/vue/routes/endpoints/FieldOccurrence.js on lines 55..67
                app/javascript/vue/routes/endpoints/Loan.js on lines 37..49
                app/javascript/vue/routes/endpoints/SledImage.js on lines 42..54
                app/javascript/vue/routes/endpoints/Source.js on lines 51..63
                app/javascript/vue/routes/endpoints/TaxonName.js on lines 20..32

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

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

                    roles_attributes: {
                      id: Number,
                      _destroy: Boolean,
                      type: String,
                      person_id: Number,
                Severity: Major
                Found in app/javascript/vue/routes/endpoints/TaxonName.js and 8 other locations - About 1 hr to fix
                app/javascript/vue/routes/endpoints/CollectingEvents.js on lines 47..59
                app/javascript/vue/routes/endpoints/CollectionObject.js on lines 58..70
                app/javascript/vue/routes/endpoints/Extract.js on lines 13..25
                app/javascript/vue/routes/endpoints/FieldOccurrence.js on lines 55..67
                app/javascript/vue/routes/endpoints/Loan.js on lines 37..49
                app/javascript/vue/routes/endpoints/SledImage.js on lines 42..54
                app/javascript/vue/routes/endpoints/Source.js on lines 51..63
                app/javascript/vue/routes/endpoints/TypeMaterial.js on lines 10..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 57.

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

                    identifiers_attributes: {
                      id: Number,
                      _destroy: Boolean,
                      identifier: String,
                      namespace_id: Number,
                Severity: Major
                Found in app/javascript/vue/routes/endpoints/CollectionObject.js and 8 other locations - About 1 hr to fix
                app/javascript/vue/routes/endpoints/CollectingEvents.js on lines 47..59
                app/javascript/vue/routes/endpoints/Extract.js on lines 13..25
                app/javascript/vue/routes/endpoints/FieldOccurrence.js on lines 55..67
                app/javascript/vue/routes/endpoints/Loan.js on lines 37..49
                app/javascript/vue/routes/endpoints/SledImage.js on lines 42..54
                app/javascript/vue/routes/endpoints/Source.js on lines 51..63
                app/javascript/vue/routes/endpoints/TaxonName.js on lines 20..32
                app/javascript/vue/routes/endpoints/TypeMaterial.js on lines 10..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 57.

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

                    roles_attributes: {
                      id: Number,
                      _destroy: Boolean,
                      type: String,
                      person_id: Number,
                Severity: Major
                Found in app/javascript/vue/routes/endpoints/Source.js and 8 other locations - About 1 hr to fix
                app/javascript/vue/routes/endpoints/CollectingEvents.js on lines 47..59
                app/javascript/vue/routes/endpoints/CollectionObject.js on lines 58..70
                app/javascript/vue/routes/endpoints/Extract.js on lines 13..25
                app/javascript/vue/routes/endpoints/FieldOccurrence.js on lines 55..67
                app/javascript/vue/routes/endpoints/Loan.js on lines 37..49
                app/javascript/vue/routes/endpoints/SledImage.js on lines 42..54
                app/javascript/vue/routes/endpoints/TaxonName.js on lines 20..32
                app/javascript/vue/routes/endpoints/TypeMaterial.js on lines 10..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 57.

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

                    identifiers_attributes: {
                      id: Number,
                      _destroy: Boolean,
                      identifier: String,
                      namespace_id: Number,
                Severity: Major
                Found in app/javascript/vue/routes/endpoints/SledImage.js and 8 other locations - About 1 hr to fix
                app/javascript/vue/routes/endpoints/CollectingEvents.js on lines 47..59
                app/javascript/vue/routes/endpoints/CollectionObject.js on lines 58..70
                app/javascript/vue/routes/endpoints/Extract.js on lines 13..25
                app/javascript/vue/routes/endpoints/FieldOccurrence.js on lines 55..67
                app/javascript/vue/routes/endpoints/Loan.js on lines 37..49
                app/javascript/vue/routes/endpoints/Source.js on lines 51..63
                app/javascript/vue/routes/endpoints/TaxonName.js on lines 20..32
                app/javascript/vue/routes/endpoints/TypeMaterial.js on lines 10..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 57.

                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