GlobalNamesArchitecture/dwca-hunter

View on GitHub

Showing 53 of 144 total issues

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

    def initialize(opts = { download: true, unpack: true })
      @command = "fungal-names"
      @title = "Fungal Names"
      # Download from https://nmdc.cn/fungalnames/released
      # upload it to box.com, update link
Severity: Major
Found in lib/dwca_hunter/resources/fungal_names.rb and 2 other locations - About 40 mins to fix
lib/dwca_hunter/resources/lpsn_bacteria.rb on lines 5..21
lib/dwca_hunter/resources/mycobank.rb on lines 5..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 38.

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 initialize(opts = { download: true, unpack: true })
      @command = "lpsn-bact"
      @title = "List of Prokaryotic names with Standing in Nomenclature"
      @url = "https://uofi.box.com/shared/static/86ufg8wovbc029weuid9h5akjuc85zch.csv"
      @UUID = "3d10ba04-be3a-4617-b9d5-07f1ae5ac195"
Severity: Major
Found in lib/dwca_hunter/resources/lpsn_bacteria.rb and 2 other locations - About 40 mins to fix
lib/dwca_hunter/resources/fungal_names.rb on lines 5..22
lib/dwca_hunter/resources/mycobank.rb on lines 5..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 38.

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

      @names.each do |n|
        @core << [n[:taxon_id], n[:name_string], n[:current_id],
                  n[:domain], n[:phylum], n[:family],
                  n[:genus], n[:rank], n[:taxonomic_status], n[:nom_code]]
Severity: Minor
Found in lib/dwca_hunter/resources/wcvp.rb and 2 other locations - About 40 mins to fix
lib/dwca_hunter/resources/ictv.rb on lines 113..116
lib/dwca_hunter/resources/mammal_divdb.rb on lines 132..135

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

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

      @names.each do |n|
        @core << [n[:taxon_id], n[:local_id], n[:name_string],
                  n[:kingdom], n[:phylum], n[:klass], n[:order],
                  n[:family], n[:genus], n[:code]]
Severity: Minor
Found in lib/dwca_hunter/resources/ictv.rb and 2 other locations - About 40 mins to fix
lib/dwca_hunter/resources/mammal_divdb.rb on lines 132..135
lib/dwca_hunter/resources/wcvp.rb on lines 146..149

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

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

      @names.each do |n|
        @core << [n[:taxon_id], n[:name_string],
                  n[:kingdom], n[:phylum], n[:klass], n[:order], n[:family],
                  n[:genus], n[:rank], n[:code]]
Severity: Minor
Found in lib/dwca_hunter/resources/mammal_divdb.rb and 2 other locations - About 40 mins to fix
lib/dwca_hunter/resources/ictv.rb on lines 113..116
lib/dwca_hunter/resources/wcvp.rb on lines 146..149

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

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

          { first_name: "G. F.",
            last_name: "Clements"
          },
          { first_name: "T. S.",
            last_name: "Schulenberg"
Severity: Minor
Found in lib/dwca_hunter/resources/clements.rb and 1 other location - About 35 mins to fix
lib/dwca_hunter/resources/lcvp.rb on lines 139..166

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

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

          {
            first_name: "Martin",
            last_name: "Freiberg"
          },
          {
Severity: Minor
Found in lib/dwca_hunter/resources/lcvp.rb and 1 other location - About 35 mins to fix
lib/dwca_hunter/resources/clements.rb on lines 117..137

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

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 self.unescape(input)
      result = input.dup.strip

      result.gsub!(/&[a-z]+;/) do | match |
          case match
Severity: Minor
Found in lib/dwca_hunter/xml.rb and 1 other location - About 35 mins to fix
lib/dwca_hunter/xml.rb on lines 3..15

Duplicated Code

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

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

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

Tuning

This issue has a mass of 35.

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 self.escape(input)
      result = input.dup.strip

      result.gsub!(/[&<>'"]/) do | match |
          case match
Severity: Minor
Found in lib/dwca_hunter/xml.rb and 1 other location - About 35 mins to fix
lib/dwca_hunter/xml.rb on lines 18..30

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

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

    def initialize(opts = {})
      @command = "arctos"
      @title = "Arctos"
      # @url = "http://arctos.database.museum/cache/gn_merge.tgz.zip"
      # see issue https://github.com/ArctosDB/arctos/issues/5709
Severity: Major
Found in lib/dwca_hunter/resources/arctos.rb and 7 other locations - About 35 mins to fix
lib/dwca_hunter/resources/aos-birds.rb on lines 5..20
lib/dwca_hunter/resources/clements.rb on lines 5..20
lib/dwca_hunter/resources/how-moore-birds.rb on lines 5..20
lib/dwca_hunter/resources/ioc_word_bird.rb on lines 5..20
lib/dwca_hunter/resources/mammal_divdb.rb on lines 5..20
lib/dwca_hunter/resources/mcz.rb on lines 5..20
lib/dwca_hunter/resources/sherborn.rb on lines 5..20

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

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

      @names.each do |n|
        @core << [n[:taxon_id], n[:name_string], n[:current_id],
                  n[:kingdom], n[:phylum], n[:klass], n[:order], n[:family],
                  n[:code]]
Severity: Major
Found in lib/dwca_hunter/resources/index-fungorum.rb and 5 other locations - About 35 mins to fix
lib/dwca_hunter/resources/aos-birds.rb on lines 98..101
lib/dwca_hunter/resources/arctos.rb on lines 154..157
lib/dwca_hunter/resources/ioc_word_bird.rb on lines 126..129
lib/dwca_hunter/resources/lcvp.rb on lines 129..132
lib/dwca_hunter/resources/mcz.rb on lines 87..90

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

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

      @names.each do |n|
        @core << [n[:taxon_id], n[:name_string],
                  n[:kingdom], n[:phylum], n[:klass], n[:order], n[:family],
                  n[:genus], n[:code]]
Severity: Major
Found in lib/dwca_hunter/resources/arctos.rb and 5 other locations - About 35 mins to fix
lib/dwca_hunter/resources/aos-birds.rb on lines 98..101
lib/dwca_hunter/resources/index-fungorum.rb on lines 86..89
lib/dwca_hunter/resources/ioc_word_bird.rb on lines 126..129
lib/dwca_hunter/resources/lcvp.rb on lines 129..132
lib/dwca_hunter/resources/mcz.rb on lines 87..90

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

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

    def initialize(opts = {})
      @command = "aos-birds"
      @title = "American Ornithological Society"
      @url = "http://checklist.americanornithology.org/taxa.csv"
      @UUID = "91d38806-8435-479f-a18d-705e5cb0767c"
Severity: Major
Found in lib/dwca_hunter/resources/aos-birds.rb and 7 other locations - About 35 mins to fix
lib/dwca_hunter/resources/arctos.rb on lines 5..22
lib/dwca_hunter/resources/clements.rb on lines 5..20
lib/dwca_hunter/resources/how-moore-birds.rb on lines 5..20
lib/dwca_hunter/resources/ioc_word_bird.rb on lines 5..20
lib/dwca_hunter/resources/mammal_divdb.rb on lines 5..20
lib/dwca_hunter/resources/mcz.rb on lines 5..20
lib/dwca_hunter/resources/sherborn.rb on lines 5..20

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

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

    def initialize(opts = {})
      @command = "clements-ebird"
      @title = "The eBird/Clements Checklist of Birds of the World"
      @url = "https://uofi.box.com/shared/static/o3ekrurtw09025fc1z045auauga5x68y.csv"
      @UUID = "577c0b56-4a3c-4314-8724-14b304f601de"
Severity: Major
Found in lib/dwca_hunter/resources/clements.rb and 7 other locations - About 35 mins to fix
lib/dwca_hunter/resources/aos-birds.rb on lines 5..20
lib/dwca_hunter/resources/arctos.rb on lines 5..22
lib/dwca_hunter/resources/how-moore-birds.rb on lines 5..20
lib/dwca_hunter/resources/ioc_word_bird.rb on lines 5..20
lib/dwca_hunter/resources/mammal_divdb.rb on lines 5..20
lib/dwca_hunter/resources/mcz.rb on lines 5..20
lib/dwca_hunter/resources/sherborn.rb on lines 5..20

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

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

    def initialize(opts = {})
      @command = "how-moore-birds"
      @title = "Howard and Moore Complete Checklist of the Birds of the World"
      @url = "https://uofi.box.com/shared/static/m71m541dr5unc41xzg4y51d92b7wiy2k.csv"
      @UUID = "85023fe5-bf2a-486b-bdae-3e61cefd41fd"
Severity: Major
Found in lib/dwca_hunter/resources/how-moore-birds.rb and 7 other locations - About 35 mins to fix
lib/dwca_hunter/resources/aos-birds.rb on lines 5..20
lib/dwca_hunter/resources/arctos.rb on lines 5..22
lib/dwca_hunter/resources/clements.rb on lines 5..20
lib/dwca_hunter/resources/ioc_word_bird.rb on lines 5..20
lib/dwca_hunter/resources/mammal_divdb.rb on lines 5..20
lib/dwca_hunter/resources/mcz.rb on lines 5..20
lib/dwca_hunter/resources/sherborn.rb on lines 5..20

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

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

    def initialize(opts = {})
      @command = 'ioc-world-bird'
      @title = 'IOC World Bird List'
      @url = 'https://uofi.box.com/shared/static/towpfov7p1txekpdtutndyagpddd8v1t.csv'
      @UUID = '6421ffec-38e3-40fb-a6d9-af27238a47a1'
Severity: Major
Found in lib/dwca_hunter/resources/ioc_word_bird.rb and 7 other locations - About 35 mins to fix
lib/dwca_hunter/resources/aos-birds.rb on lines 5..20
lib/dwca_hunter/resources/arctos.rb on lines 5..22
lib/dwca_hunter/resources/clements.rb on lines 5..20
lib/dwca_hunter/resources/how-moore-birds.rb on lines 5..20
lib/dwca_hunter/resources/mammal_divdb.rb on lines 5..20
lib/dwca_hunter/resources/mcz.rb on lines 5..20
lib/dwca_hunter/resources/sherborn.rb on lines 5..20

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

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

      @names.each do |n|
        @core << [n[:taxon_id], n[:name_string],
                  n[:kingdom], n[:phylum], n[:klass], n[:order], n[:family],
                  n[:genus], n[:code]]
Severity: Major
Found in lib/dwca_hunter/resources/ioc_word_bird.rb and 5 other locations - About 35 mins to fix
lib/dwca_hunter/resources/aos-birds.rb on lines 98..101
lib/dwca_hunter/resources/arctos.rb on lines 154..157
lib/dwca_hunter/resources/index-fungorum.rb on lines 86..89
lib/dwca_hunter/resources/lcvp.rb on lines 129..132
lib/dwca_hunter/resources/mcz.rb on lines 87..90

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

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

    def initialize(opts = {})
      @command = "mcz"
      @title = "MCZbase"
      @url = "https://uofi.box.com/shared/static/cdupnudo5usgbcjeds83fw2884jg9n5j.gz"
      @UUID = "c79d055b-211b-40de-8e27-618011656265"
Severity: Major
Found in lib/dwca_hunter/resources/mcz.rb and 7 other locations - About 35 mins to fix
lib/dwca_hunter/resources/aos-birds.rb on lines 5..20
lib/dwca_hunter/resources/arctos.rb on lines 5..22
lib/dwca_hunter/resources/clements.rb on lines 5..20
lib/dwca_hunter/resources/how-moore-birds.rb on lines 5..20
lib/dwca_hunter/resources/ioc_word_bird.rb on lines 5..20
lib/dwca_hunter/resources/mammal_divdb.rb on lines 5..20
lib/dwca_hunter/resources/sherborn.rb on lines 5..20

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

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

      @names.each do |n|
        @core << [n[:taxon_id], n[:name_string],
                  n[:kingdom], n[:phylum], n[:klass], n[:order], n[:family],
                  n[:genus], n[:code]]
Severity: Major
Found in lib/dwca_hunter/resources/mcz.rb and 5 other locations - About 35 mins to fix
lib/dwca_hunter/resources/aos-birds.rb on lines 98..101
lib/dwca_hunter/resources/arctos.rb on lines 154..157
lib/dwca_hunter/resources/index-fungorum.rb on lines 86..89
lib/dwca_hunter/resources/ioc_word_bird.rb on lines 126..129
lib/dwca_hunter/resources/lcvp.rb on lines 129..132

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

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

    def initialize(opts = {})
      @command = "mammal-div-db"
      @title = "ASM Mammal Diversity Database"
      @url = "https://www.mammaldiversity.org/assets/data/MDD.zip"
      @UUID = "94270cdd-5424-4bb1-8324-46ccc5386dc7"
Severity: Major
Found in lib/dwca_hunter/resources/mammal_divdb.rb and 7 other locations - About 35 mins to fix
lib/dwca_hunter/resources/aos-birds.rb on lines 5..20
lib/dwca_hunter/resources/arctos.rb on lines 5..22
lib/dwca_hunter/resources/clements.rb on lines 5..20
lib/dwca_hunter/resources/how-moore-birds.rb on lines 5..20
lib/dwca_hunter/resources/ioc_word_bird.rb on lines 5..20
lib/dwca_hunter/resources/mcz.rb on lines 5..20
lib/dwca_hunter/resources/sherborn.rb on lines 5..20

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

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