princelab/msplinter

View on GitHub

Showing 28 of 78 total issues

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

      ::Rule_names << def jasms_2002_2_e1(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          # duplicate
          (nmol, (nitrogen, carbonyl_carbon, carbonyl_oxygen, alcohol_carbon, alcohol_oxygen)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb and 2 other locations - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme1.rb on lines 346..381
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 435..469

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

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

      ::Rearrangements << def jasms_2002_scheme1_c_e1_aprimeprime_formaldehyde_loss(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          #duplications and mapping
          (nmol,(cyclized_oxygen, freed_carbon, carbon_linked_to_nitrogen, carbon_linker, nitrogen)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme1.rb and 2 other locations - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb on lines 190..224
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 435..469

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

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

      ::Rule_names << def jasms_2002_5_e5_formaldehyde_loss(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          # duplicate
          (nmol, (nitrogen, ring_carbon, lost_carbon, lost_oxygen, ring_carbon2)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb and 2 other locations - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme1.rb on lines 346..381
lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb on lines 190..224

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

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

      ::Rule_names << def jasms_2002_scheme1_c_e1b_to_d1bprime(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |co, c, n|
          #duplications and mapping
          nmol = self.dup
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme1.rb and 1 other location - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme1.rb on lines 262..299

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

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

      ::Rule_names << def jasms_2002_scheme1_c_e1bprime(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |n, c2, lo|
          #duplications and mapping
          nmol = self.dup
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme1.rb and 1 other location - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme1.rb on lines 303..340

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

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

      ::Rule_names << def jasms_2002_2_e2_bprime_heterocyclic_loss(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          # duplicate
          (nmol, (nitrogen, ring_carbon, alcohol_carbon, alcohol_oxygen)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb and 2 other locations - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme1.rb on lines 543..576
lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb on lines 338..370

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

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

      ::Rule_names << def jasms_2002_scheme1_c_e2bprime_water_loss(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          #duplications and mapping
          (nmol,(ring_carbon2, alcohol_carbon, oxygen, nitrogen)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme1.rb and 2 other locations - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb on lines 338..370
lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb on lines 374..406

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

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

      ::Rule_names << def jasms_2002_2_e2_bprime_water_loss(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          # duplicate
          (nmol, (alcohol_oxygen, c1, c2, nitrogen)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb and 2 other locations - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme1.rb on lines 543..576
lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb on lines 374..406

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

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

      ::Rule_names << def jasms_2002_2_e1_bprime(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          # duplicate
          (nmol, (alcohol_oxygen, attacked_carbon, carbon_linker, nitrogen)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb and 1 other location - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb on lines 228..260

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

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

      ::Rule_names << def jasms_2002_2_e1_b(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          # duplicate
          (nmol, (alcohol_oxygen, nitrogen, attacked_carbon, leaving_oxygen)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb and 1 other location - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb on lines 264..296

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

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

      ::Rule_names << def jasms_2002_2_f1_aprime(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          # duplicate
          (nmol, (cyclized_oxygen, linked_to_nitrogen_carbon, attacked_carbon, lost_oxygen)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb and 2 other locations - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 222..253
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 329..360

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

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

      ::Rule_names << def jasms_2002_5_e1_water_loss(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          # duplicate
          (nmol, (alcohol_carbon, alcohol_oxygen, attacked_carbon, lost_oxygen)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb and 2 other locations - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb on lines 47..78
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 222..253

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

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

      ::Rule_names << def jasms_2002_4_g2a(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          # duplicate
          (nmol, (alcohol_oxygen, alcohol_carbon, acc1, aco1)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb and 2 other locations - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb on lines 47..78
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 329..360

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

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

      ::Rule_names << def jasms_2002_3_b2_formaldehyde_loss(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          # duplicate
          (nmol, (alcohol_oxygen, alcohol_carbon, link_carbon)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb and 3 other locations - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb on lines 117..148
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 152..183
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 294..325

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

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

      ::Rule_names << def jasms_2002_4_g1(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          # duplicate
          (nmol, (alcohol_oxygen, alcohol_carbon, c1)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb and 3 other locations - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb on lines 117..148
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 117..148
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 294..325

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

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

      ::Rearrangements << def jasms_2002_2_f2_bprime_water_loss(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          # duplicate
          (nmol, (linked_carbon, alcohol_carbon, oxygen)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb and 3 other locations - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 117..148
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 152..183
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 294..325

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

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

      ::Rule_names << def jasms_2002_4_g2a_prime_water_loss(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          # duplicate
          (nmol, (alcohol_oxygen, alcohol_carbon, ring_carbon)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb and 3 other locations - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb on lines 117..148
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 117..148
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 152..183

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

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

      ::Rule_names << def jasms_2002_4_g2a_prime(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          # duplicate
          (nmol, (alcohol_oxygen, alcohol_carbon, nitrogen)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb and 2 other locations - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb on lines 82..113
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 82..113

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

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

      ::Rule_names << def jasms_2002_2_f1_bprime(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          # duplicate
          (nmol, (lost_oxygen, attacked_carbon, nitrogen)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb and 2 other locations - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 82..113
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 187..218

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

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

      ::Rule_names << def jasms_2002_3_b2_water_loss(only_uniqs: true, fragment_adduct_state: :as_published)
        fragment_sets = []
        fragment = lambda do |*arr|
          # duplicate
          (nmol, (alcohol_oxygen, alcohol_carbon, nitrogen)) = self.dup_molecule(arr)
Severity: Major
Found in lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb and 2 other locations - About 3 hrs to fix
lib/rubabel/molecule/fragmentable/asms_2002_scheme2.rb on lines 82..113
lib/rubabel/molecule/fragmentable/asms_2002_scheme3-5.rb on lines 187..218

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

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