File asms_2002_scheme2.rb
has 421 lines of code (exceeds 250 allowed). Consider refactoring. Open
require_relative "../fragmentable"
# self.write( 'root.svg', :add_atom_index => true)
module Rubabel
class Molecule
Method jasms_2002_2_e1
has 31 lines of code (exceeds 25 allowed). 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)
Method jasms_2002_2_f2_b_methoxy_loss
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
::Rearrangements << def jasms_2002_2_f2_b_methoxy_loss(only_uniqs: true, fragment_adduct_state: :as_published)
fragment_sets = []
fragment = lambda do |*arr|
# duplicate
(nmol, (c1, lost_carbon, oxygen, c2)) = self.dup_molecule(arr)
Method jasms_2002_2_e2_b_formaldehyde_loss
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
::Rule_names << def jasms_2002_2_e2_b_formaldehyde_loss(only_uniqs: true, fragment_adduct_state: :as_published)
fragment_sets = []
fragment = lambda do |*arr|
# duplicate
(nmol, (nitrogen, c1, c2, ester_oxygen, c3)) = self.dup_molecule(arr)
Method jasms_2002_2_a1
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
::Rule_names << def jasms_2002_2_a1(only_uniqs: true, fragment_adduct_state: :as_published)
fragment_sets = []
fragment = lambda do |*arr|
# duplicate
(nmol, (base_c, alcohol_carbon, alcohol_oxygen, carbonyl_carbon, carbonyl_oxygen, nitrogen, ring_carbon)) = self.dup_molecule(arr)
Method jasms_2002_2_e2_bprime_water_loss
has 29 lines of code (exceeds 25 allowed). 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)
Method jasms_2002_2_c2a
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
::Rule_names << def jasms_2002_2_c2a(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)
Method jasms_2002_2_e1_b
has 29 lines of code (exceeds 25 allowed). 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)
Method jasms_2002_2_e1_bprime
has 29 lines of code (exceeds 25 allowed). 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)
Method jasms_2002_2_e2_bprime_heterocyclic_loss
has 29 lines of code (exceeds 25 allowed). 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)
Method jasms_2002_2_f1
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
::Rule_names << def jasms_2002_2_f1(only_uniqs: true, fragment_adduct_state: :as_published)
fragment_sets = []
fragment = lambda do |*arr|
# duplicate
(nmol, (nitrogen, carbonyl, alpha_carbon, alcohol_oxygen)) = self.dup_molecule(arr)
Method jasms_2002_2_f2_bprime_water_loss
has 28 lines of code (exceeds 25 allowed). 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)
Method jasms_2002_2_f1_aprime
has 28 lines of code (exceeds 25 allowed). 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)
Method jasms_2002_2_f1_bprime
has 28 lines of code (exceeds 25 allowed). 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)
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)
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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)
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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)
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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)
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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)
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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)
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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)
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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)
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76