SpeciesFileGroup/taxonworks

View on GitHub

Showing 12,631 of 12,631 total issues

Method initialize has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      def initialize(query_params)
        super

        @collectors = boolean_param(params, :collectors )
        @collecting_event_id = params[:collecting_event_id]
Severity: Minor
Found in lib/queries/collecting_event/filter.rb - About 1 hr to fix

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

      def destroy
        @person.destroy
        respond_to do |format|
          if @person.destroyed?
            format.html { destroy_redirect @person, notice: 'Person was successfully destroyed.' }
    Severity: Major
    Found in app/controllers/people_controller.rb and 15 other locations - About 1 hr to fix
    app/controllers/citations_controller.rb on lines 86..94
    app/controllers/collecting_events_controller.rb on lines 86..94
    app/controllers/containers_controller.rb on lines 82..90
    app/controllers/contents_controller.rb on lines 67..75
    app/controllers/controlled_vocabulary_terms_controller.rb on lines 63..71
    app/controllers/descriptors_controller.rb on lines 84..92
    app/controllers/downloads_controller.rb on lines 36..44
    app/controllers/georeferences_controller.rb on lines 123..131
    app/controllers/observations_controller.rb on lines 92..100
    app/controllers/otus_controller.rb on lines 101..109
    app/controllers/sequence_relationships_controller.rb on lines 66..74
    app/controllers/tags_controller.rb on lines 91..99
    app/controllers/taxon_name_classifications_controller.rb on lines 92..100
    app/controllers/taxon_name_relationships_controller.rb on lines 73..81
    app/controllers/taxon_names_controller.rb on lines 73..81

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

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

      def create_simple_batch_load
        if params[:file] && digested_cookie_exists?(params[:file].tempfile, :Simple_namespaces_md5)
          @result = BatchLoad::Import::Namespaces::SimpleInterpreter.new(**batch_params)
          if @result.create
            flash[:notice] = "Successfully proccessed file, #{@result.total_records_created} namespaces were created."
    Severity: Major
    Found in app/controllers/namespaces_controller.rb and 9 other locations - About 1 hr to fix
    app/controllers/collecting_events_controller.rb on lines 210..223
    app/controllers/collecting_events_controller.rb on lines 237..250
    app/controllers/collection_objects_controller.rb on lines 324..337
    app/controllers/collection_objects_controller.rb on lines 350..363
    app/controllers/descriptors_controller.rb on lines 162..177
    app/controllers/otus_controller.rb on lines 220..233
    app/controllers/sequences_controller.rb on lines 141..154
    app/controllers/sequences_controller.rb on lines 167..180
    app/controllers/taxon_names_controller.rb on lines 199..212

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

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

      def create_castor_batch_load
        if params[:file] && digested_cookie_exists?(params[:file].tempfile, :Castor_collecting_events_md5)
          @result = BatchLoad::Import::CollectingEvents::CastorInterpreter.new(**batch_params)
          if @result.create
            flash[:notice] = "Successfully proccessed file, #{@result.total_records_created} collecting events were created."
    Severity: Major
    Found in app/controllers/collecting_events_controller.rb and 9 other locations - About 1 hr to fix
    app/controllers/collecting_events_controller.rb on lines 237..250
    app/controllers/collection_objects_controller.rb on lines 324..337
    app/controllers/collection_objects_controller.rb on lines 350..363
    app/controllers/descriptors_controller.rb on lines 162..177
    app/controllers/namespaces_controller.rb on lines 116..129
    app/controllers/otus_controller.rb on lines 220..233
    app/controllers/sequences_controller.rb on lines 141..154
    app/controllers/sequences_controller.rb on lines 167..180
    app/controllers/taxon_names_controller.rb on lines 199..212

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

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

      def destroy
        @content.destroy
        respond_to do |format|
          if @content.destroyed?
            format.html { destroy_redirect @content, notice: 'Content was successfully destroyed.' }
    Severity: Major
    Found in app/controllers/contents_controller.rb and 15 other locations - About 1 hr to fix
    app/controllers/citations_controller.rb on lines 86..94
    app/controllers/collecting_events_controller.rb on lines 86..94
    app/controllers/containers_controller.rb on lines 82..90
    app/controllers/controlled_vocabulary_terms_controller.rb on lines 63..71
    app/controllers/descriptors_controller.rb on lines 84..92
    app/controllers/downloads_controller.rb on lines 36..44
    app/controllers/georeferences_controller.rb on lines 123..131
    app/controllers/observations_controller.rb on lines 92..100
    app/controllers/otus_controller.rb on lines 101..109
    app/controllers/people_controller.rb on lines 71..79
    app/controllers/sequence_relationships_controller.rb on lines 66..74
    app/controllers/tags_controller.rb on lines 91..99
    app/controllers/taxon_name_classifications_controller.rb on lines 92..100
    app/controllers/taxon_name_relationships_controller.rb on lines 73..81
    app/controllers/taxon_names_controller.rb on lines 73..81

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

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

      def destroy
        @container.destroy
        respond_to do |format|
          if @container.destroyed?
            format.html { destroy_redirect @container, notice: 'Container was successfully destroyed.' }
    Severity: Major
    Found in app/controllers/containers_controller.rb and 15 other locations - About 1 hr to fix
    app/controllers/citations_controller.rb on lines 86..94
    app/controllers/collecting_events_controller.rb on lines 86..94
    app/controllers/contents_controller.rb on lines 67..75
    app/controllers/controlled_vocabulary_terms_controller.rb on lines 63..71
    app/controllers/descriptors_controller.rb on lines 84..92
    app/controllers/downloads_controller.rb on lines 36..44
    app/controllers/georeferences_controller.rb on lines 123..131
    app/controllers/observations_controller.rb on lines 92..100
    app/controllers/otus_controller.rb on lines 101..109
    app/controllers/people_controller.rb on lines 71..79
    app/controllers/sequence_relationships_controller.rb on lines 66..74
    app/controllers/tags_controller.rb on lines 91..99
    app/controllers/taxon_name_classifications_controller.rb on lines 92..100
    app/controllers/taxon_name_relationships_controller.rb on lines 73..81
    app/controllers/taxon_names_controller.rb on lines 73..81

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

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

      def destroy
        @taxon_name_relationship.destroy
        respond_to do |format|
          if @taxon_name_relationship.destroyed?
            format.html { destroy_redirect @taxon_name_relationship, notice: 'Taxon name relationship was successfully destroyed.' }
    Severity: Major
    Found in app/controllers/taxon_name_relationships_controller.rb and 15 other locations - About 1 hr to fix
    app/controllers/citations_controller.rb on lines 86..94
    app/controllers/collecting_events_controller.rb on lines 86..94
    app/controllers/containers_controller.rb on lines 82..90
    app/controllers/contents_controller.rb on lines 67..75
    app/controllers/controlled_vocabulary_terms_controller.rb on lines 63..71
    app/controllers/descriptors_controller.rb on lines 84..92
    app/controllers/downloads_controller.rb on lines 36..44
    app/controllers/georeferences_controller.rb on lines 123..131
    app/controllers/observations_controller.rb on lines 92..100
    app/controllers/otus_controller.rb on lines 101..109
    app/controllers/people_controller.rb on lines 71..79
    app/controllers/sequence_relationships_controller.rb on lines 66..74
    app/controllers/tags_controller.rb on lines 91..99
    app/controllers/taxon_name_classifications_controller.rb on lines 92..100
    app/controllers/taxon_names_controller.rb on lines 73..81

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

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

      def destroy
        @descriptor.destroy
        respond_to do |format|
          if @descriptor.destroyed?
            format.html { destroy_redirect @descriptor, notice: 'Descriptor was successfully destroyed.' }
    Severity: Major
    Found in app/controllers/descriptors_controller.rb and 15 other locations - About 1 hr to fix
    app/controllers/citations_controller.rb on lines 86..94
    app/controllers/collecting_events_controller.rb on lines 86..94
    app/controllers/containers_controller.rb on lines 82..90
    app/controllers/contents_controller.rb on lines 67..75
    app/controllers/controlled_vocabulary_terms_controller.rb on lines 63..71
    app/controllers/downloads_controller.rb on lines 36..44
    app/controllers/georeferences_controller.rb on lines 123..131
    app/controllers/observations_controller.rb on lines 92..100
    app/controllers/otus_controller.rb on lines 101..109
    app/controllers/people_controller.rb on lines 71..79
    app/controllers/sequence_relationships_controller.rb on lines 66..74
    app/controllers/tags_controller.rb on lines 91..99
    app/controllers/taxon_name_classifications_controller.rb on lines 92..100
    app/controllers/taxon_name_relationships_controller.rb on lines 73..81
    app/controllers/taxon_names_controller.rb on lines 73..81

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

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

      def destroy
        @observation.destroy
        respond_to do |format|
          if @observation.destroyed?
            format.html { destroy_redirect @observation, notice: 'Observation was successfully destroyed.' }
    Severity: Major
    Found in app/controllers/observations_controller.rb and 15 other locations - About 1 hr to fix
    app/controllers/citations_controller.rb on lines 86..94
    app/controllers/collecting_events_controller.rb on lines 86..94
    app/controllers/containers_controller.rb on lines 82..90
    app/controllers/contents_controller.rb on lines 67..75
    app/controllers/controlled_vocabulary_terms_controller.rb on lines 63..71
    app/controllers/descriptors_controller.rb on lines 84..92
    app/controllers/downloads_controller.rb on lines 36..44
    app/controllers/georeferences_controller.rb on lines 123..131
    app/controllers/otus_controller.rb on lines 101..109
    app/controllers/people_controller.rb on lines 71..79
    app/controllers/sequence_relationships_controller.rb on lines 66..74
    app/controllers/tags_controller.rb on lines 91..99
    app/controllers/taxon_name_classifications_controller.rb on lines 92..100
    app/controllers/taxon_name_relationships_controller.rb on lines 73..81
    app/controllers/taxon_names_controller.rb on lines 73..81

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

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

      def destroy
        @controlled_vocabulary_term.destroy
        respond_to do |format|
          if @controlled_vocabulary_term.destroyed?
            format.html { destroy_redirect @controlled_vocabulary_term, notice: 'OTU was successfully destroyed.' }
    Severity: Major
    Found in app/controllers/controlled_vocabulary_terms_controller.rb and 15 other locations - About 1 hr to fix
    app/controllers/citations_controller.rb on lines 86..94
    app/controllers/collecting_events_controller.rb on lines 86..94
    app/controllers/containers_controller.rb on lines 82..90
    app/controllers/contents_controller.rb on lines 67..75
    app/controllers/descriptors_controller.rb on lines 84..92
    app/controllers/downloads_controller.rb on lines 36..44
    app/controllers/georeferences_controller.rb on lines 123..131
    app/controllers/observations_controller.rb on lines 92..100
    app/controllers/otus_controller.rb on lines 101..109
    app/controllers/people_controller.rb on lines 71..79
    app/controllers/sequence_relationships_controller.rb on lines 66..74
    app/controllers/tags_controller.rb on lines 91..99
    app/controllers/taxon_name_classifications_controller.rb on lines 92..100
    app/controllers/taxon_name_relationships_controller.rb on lines 73..81
    app/controllers/taxon_names_controller.rb on lines 73..81

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

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

      def destroy
        @citation.destroy
        respond_to do |format|
          if @citation.destroyed?
            format.html { destroy_redirect @citation, notice: 'Citation was successfully destroyed.' }
    Severity: Major
    Found in app/controllers/citations_controller.rb and 15 other locations - About 1 hr to fix
    app/controllers/collecting_events_controller.rb on lines 86..94
    app/controllers/containers_controller.rb on lines 82..90
    app/controllers/contents_controller.rb on lines 67..75
    app/controllers/controlled_vocabulary_terms_controller.rb on lines 63..71
    app/controllers/descriptors_controller.rb on lines 84..92
    app/controllers/downloads_controller.rb on lines 36..44
    app/controllers/georeferences_controller.rb on lines 123..131
    app/controllers/observations_controller.rb on lines 92..100
    app/controllers/otus_controller.rb on lines 101..109
    app/controllers/people_controller.rb on lines 71..79
    app/controllers/sequence_relationships_controller.rb on lines 66..74
    app/controllers/tags_controller.rb on lines 91..99
    app/controllers/taxon_name_classifications_controller.rb on lines 92..100
    app/controllers/taxon_name_relationships_controller.rb on lines 73..81
    app/controllers/taxon_names_controller.rb on lines 73..81

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

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

      def create_primers_batch_load
        if params[:file] && digested_cookie_exists?(params[:file].tempfile, :Primers_sequences_md5)
          @result = BatchLoad::Import::Sequences::PrimersInterpreter.new(**batch_params)
          if @result.create
            flash[:notice] = "Successfully proccessed file, #{@result.total_records_created} sequences were created."
    Severity: Major
    Found in app/controllers/sequences_controller.rb and 9 other locations - About 1 hr to fix
    app/controllers/collecting_events_controller.rb on lines 210..223
    app/controllers/collecting_events_controller.rb on lines 237..250
    app/controllers/collection_objects_controller.rb on lines 324..337
    app/controllers/collection_objects_controller.rb on lines 350..363
    app/controllers/descriptors_controller.rb on lines 162..177
    app/controllers/namespaces_controller.rb on lines 116..129
    app/controllers/otus_controller.rb on lines 220..233
    app/controllers/sequences_controller.rb on lines 141..154
    app/controllers/taxon_names_controller.rb on lines 199..212

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

    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

            coordinates[:lat_deg] = matchdata1[1]
            coordinates[:lat_min] = matchdata1[2]
            coordinates[:lat_sec] = matchdata1[3]
            coordinates[:lat_ns]  = matchdata1[4]
            coordinates[:long_deg] = matchdata1[5]
    Severity: Major
    Found in lib/utilities/geo.rb and 1 other location - About 1 hr to fix
    lib/utilities/geo.rb on lines 649..656

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

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

      def destroy
        @otu.destroy
        respond_to do |format|
          if @otu.destroyed?
            format.html { destroy_redirect @otu, notice: 'OTU was successfully destroyed.' }
    Severity: Major
    Found in app/controllers/otus_controller.rb and 15 other locations - About 1 hr to fix
    app/controllers/citations_controller.rb on lines 86..94
    app/controllers/collecting_events_controller.rb on lines 86..94
    app/controllers/containers_controller.rb on lines 82..90
    app/controllers/contents_controller.rb on lines 67..75
    app/controllers/controlled_vocabulary_terms_controller.rb on lines 63..71
    app/controllers/descriptors_controller.rb on lines 84..92
    app/controllers/downloads_controller.rb on lines 36..44
    app/controllers/georeferences_controller.rb on lines 123..131
    app/controllers/observations_controller.rb on lines 92..100
    app/controllers/people_controller.rb on lines 71..79
    app/controllers/sequence_relationships_controller.rb on lines 66..74
    app/controllers/tags_controller.rb on lines 91..99
    app/controllers/taxon_name_classifications_controller.rb on lines 92..100
    app/controllers/taxon_name_relationships_controller.rb on lines 73..81
    app/controllers/taxon_names_controller.rb on lines 73..81

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

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

      def create_gpx_batch_load
        if params[:file] && digested_cookie_exists?(params[:file].tempfile, :gpx_batch_load_collecting_events_md5)
          @result = BatchLoad::Import::CollectingEvents::GPXInterpreter.new(**batch_params)
          if @result.create
            flash[:notice] = "Successfully proccessed file, #{@result.total_records_created} collecting events w/georeferences were created."
    Severity: Major
    Found in app/controllers/collecting_events_controller.rb and 9 other locations - About 1 hr to fix
    app/controllers/collecting_events_controller.rb on lines 210..223
    app/controllers/collection_objects_controller.rb on lines 324..337
    app/controllers/collection_objects_controller.rb on lines 350..363
    app/controllers/descriptors_controller.rb on lines 162..177
    app/controllers/namespaces_controller.rb on lines 116..129
    app/controllers/otus_controller.rb on lines 220..233
    app/controllers/sequences_controller.rb on lines 141..154
    app/controllers/sequences_controller.rb on lines 167..180
    app/controllers/taxon_names_controller.rb on lines 199..212

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

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

      def destroy
        @collecting_event.destroy
        respond_to do |format|
          if @collecting_event.destroyed?
            format.html { destroy_redirect @collecting_event, notice: 'CollectingEvent was successfully destroyed.' }
    Severity: Major
    Found in app/controllers/collecting_events_controller.rb and 15 other locations - About 1 hr to fix
    app/controllers/citations_controller.rb on lines 86..94
    app/controllers/containers_controller.rb on lines 82..90
    app/controllers/contents_controller.rb on lines 67..75
    app/controllers/controlled_vocabulary_terms_controller.rb on lines 63..71
    app/controllers/descriptors_controller.rb on lines 84..92
    app/controllers/downloads_controller.rb on lines 36..44
    app/controllers/georeferences_controller.rb on lines 123..131
    app/controllers/observations_controller.rb on lines 92..100
    app/controllers/otus_controller.rb on lines 101..109
    app/controllers/people_controller.rb on lines 71..79
    app/controllers/sequence_relationships_controller.rb on lines 66..74
    app/controllers/tags_controller.rb on lines 91..99
    app/controllers/taxon_name_classifications_controller.rb on lines 92..100
    app/controllers/taxon_name_relationships_controller.rb on lines 73..81
    app/controllers/taxon_names_controller.rb on lines 73..81

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

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

      def destroy
        @taxon_name_classification.destroy
        respond_to do |format|
          if @taxon_name_classification.destroyed?
            format.html { destroy_redirect @taxon_name_classification, notice: 'Taxon name classification was successfully destroyed.' }
    Severity: Major
    Found in app/controllers/taxon_name_classifications_controller.rb and 15 other locations - About 1 hr to fix
    app/controllers/citations_controller.rb on lines 86..94
    app/controllers/collecting_events_controller.rb on lines 86..94
    app/controllers/containers_controller.rb on lines 82..90
    app/controllers/contents_controller.rb on lines 67..75
    app/controllers/controlled_vocabulary_terms_controller.rb on lines 63..71
    app/controllers/descriptors_controller.rb on lines 84..92
    app/controllers/downloads_controller.rb on lines 36..44
    app/controllers/georeferences_controller.rb on lines 123..131
    app/controllers/observations_controller.rb on lines 92..100
    app/controllers/otus_controller.rb on lines 101..109
    app/controllers/people_controller.rb on lines 71..79
    app/controllers/sequence_relationships_controller.rb on lines 66..74
    app/controllers/tags_controller.rb on lines 91..99
    app/controllers/taxon_name_relationships_controller.rb on lines 73..81
    app/controllers/taxon_names_controller.rb on lines 73..81

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

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

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

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

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

    Refactorings

    Further Reading

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

      def sv_validate_priority
        unless self.type_class.nomenclatural_priority.nil?
          date1 = self.subject_taxon_name.cached_nomenclature_date
          date2 = self.object_taxon_name.cached_nomenclature_date
          if !!date1 && !!date2 && date1 > date2 && subject_invalid_statuses.empty?
    app/models/taxon_name_relationship/typification/genus/original.rb on lines 30..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 49.

    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

            coordinates[:lat_deg] = matchdata2[2]
            coordinates[:lat_min] = matchdata2[3]
            coordinates[:lat_sec] = matchdata2[4]
            coordinates[:lat_ns]  = matchdata2[1]
            coordinates[:long_deg] = matchdata2[6]
    Severity: Major
    Found in lib/utilities/geo.rb and 1 other location - About 1 hr to fix
    lib/utilities/geo.rb on lines 639..646

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

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

      def destroy
        @georeference.destroy
        respond_to do |format|
          if @georeference.destroyed?
            format.html { destroy_redirect @georeference, notice: 'Georeference was successfully destroyed.' }
    Severity: Major
    Found in app/controllers/georeferences_controller.rb and 15 other locations - About 1 hr to fix
    app/controllers/citations_controller.rb on lines 86..94
    app/controllers/collecting_events_controller.rb on lines 86..94
    app/controllers/containers_controller.rb on lines 82..90
    app/controllers/contents_controller.rb on lines 67..75
    app/controllers/controlled_vocabulary_terms_controller.rb on lines 63..71
    app/controllers/descriptors_controller.rb on lines 84..92
    app/controllers/downloads_controller.rb on lines 36..44
    app/controllers/observations_controller.rb on lines 92..100
    app/controllers/otus_controller.rb on lines 101..109
    app/controllers/people_controller.rb on lines 71..79
    app/controllers/sequence_relationships_controller.rb on lines 66..74
    app/controllers/tags_controller.rb on lines 91..99
    app/controllers/taxon_name_classifications_controller.rb on lines 92..100
    app/controllers/taxon_name_relationships_controller.rb on lines 73..81
    app/controllers/taxon_names_controller.rb on lines 73..81

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

    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