KarrLab/bcforms

View on GitHub
bcforms/core.py

Summary

Maintainability
F
1 mo
Test Coverage
A
96%

File core.py has 1842 lines of code (exceeds 250 allowed). Consider refactoring.
Open

""" BcForms

:Author: Mike Zheng <xzheng20@colby.edu>
:Author: Jonathan Karr <karr@mssm.edu>
:Date: 2019-06-25
Severity: Major
Found in bcforms/core.py - About 5 days to fix

    Function get_structure has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring.
    Open

        def get_structure(self):
            """ Get an Open Babel molecule of the structure
    
            Returns:
                :obj:`openbabel.OBMol`: Open Babel molecule of the structure
    Severity: Minor
    Found in bcforms/core.py - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function from_str has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
    Open

        def from_str(self, string):
            """ Set a complex from a string representation
    
            Args:
                string (:obj:`str`): string representation of a complex
    Severity: Minor
    Found in bcforms/core.py - About 7 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function draw_xlink has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

    def draw_xlink(xlink_name, include_all_hydrogens=False, remove_hydrogens=True, show_atom_nums=False,
                   l_color=0x00ea4e, r_color=0x00adef, bond_color=0xea4200,
                   width=300, height=200, atom_label_font_size=0.6,
                   image_format='png', include_xml_header=False):
        """ Generate an image of a crosslink
    Severity: Minor
    Found in bcforms/core.py - About 4 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function get_genomic_image has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

        def get_genomic_image(self, seq_features=None, width=1200, cols=2, nt_per_track=80, **kwargs):
            """ Get a genomic visualization of the :obj:`BpForm`
    
            Args:
                seq_features (:obj:`dict`): list of features each
    Severity: Minor
    Found in bcforms/core.py - About 4 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function get_mol_wt has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

        def get_mol_wt(self, subunit_mol_wts=None):
            """ Get the molecular weight
    
            * If user wants to calculate molecular weight of nested BcForm, where
              some subunits are BcForm objects, then the subunit BcForms must be able
    Severity: Minor
    Found in bcforms/core.py - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function get_formula has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

        def get_formula(self, subunit_formulas=None):
            """ Get the empirical formula
    
            * If user wants to calculate formula of nested BcForm, where some subunits
              are BcForm objects, then the subunit BcForms must be able to calculate
    Severity: Minor
    Found in bcforms/core.py - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function get_charge has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

        def get_charge(self, subunit_charges=None):
            """ Get the total charge
    
            * If user wants to calculate charge of nested BcForm, where
              some subunits are BcForm objects, then the subunit BcForms must be able
    Severity: Minor
    Found in bcforms/core.py - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function is_equal has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

        def is_equal(self, other):
            """ Check if two complexes are semantically equal (same subunits and crosslinks)
    
            Args:
                other (:obj:`BcForm`): another complex
    Severity: Minor
    Found in bcforms/core.py - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    OntologyCrosslink has 23 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class OntologyCrosslink(Crosslink):
        """ A pre-defined crosslink between subunits
    
        Attributes:
            type (:obj:`str`): type of the pre-defined crosslink
    Severity: Minor
    Found in bcforms/core.py - About 2 hrs to fix

      Function validate has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

          def validate(self):
              """ Check if the BcForm is valid
      
              * Check if the crosslinking subunit is in the subunit list and if the `subunit_idx` is valid
      
      
      Severity: Minor
      Found in bcforms/core.py - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      InlineCrosslink has 22 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class InlineCrosslink(Crosslink):
          """ A crosslink between subunits defined inline
      
          Attributes:
              l_bond_atoms (:obj:`list` of :obj:`Atom`): atoms from the left subunit that bond with the right subunit
      Severity: Minor
      Found in bcforms/core.py - About 2 hrs to fix

        Function get_structure has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
        Open

            def get_structure(self):
                """ Get an Open Babel molecule of the structure
        
                Returns:
                    :obj:`tuple`:
        Severity: Minor
        Found in bcforms/core.py - About 2 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function is_equal has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

            def is_equal(self, other):
                """ Check if two crosslinks are semantically equal (have the same bond atoms)
        
                Args:
                    other (:obj:`Crosslink`): another crosslink
        Severity: Minor
        Found in bcforms/core.py - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function draw_xlink has 12 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def draw_xlink(xlink_name, include_all_hydrogens=False, remove_hydrogens=True, show_atom_nums=False,
        Severity: Major
        Found in bcforms/core.py - About 1 hr to fix

          Function draw_xlink has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          def draw_xlink(xlink_name, include_all_hydrogens=False, remove_hydrogens=True, show_atom_nums=False,
                         l_color=0x00ea4e, r_color=0x00adef, bond_color=0xea4200,
                         width=300, height=200, atom_label_font_size=0.6,
                         image_format='png', include_xml_header=False):
              """ Generate an image of a crosslink
          Severity: Minor
          Found in bcforms/core.py - About 1 hr to fix

            Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def __init__(self, l_bond_atoms=None, r_bond_atoms=None, l_displaced_atoms=None, r_displaced_atoms=None,
            Severity: Major
            Found in bcforms/core.py - About 50 mins to fix

              Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def __init__(self, subunit, element, position, monomer, charge=0, subunit_idx=None, component_type=None):
              Severity: Major
              Found in bcforms/core.py - About 50 mins to fix

                Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __init__(self, type, l_subunit, l_monomer, r_subunit, r_monomer, l_subunit_idx=None, r_subunit_idx=None):
                Severity: Major
                Found in bcforms/core.py - About 50 mins to fix

                  Function structure has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def structure(self, value):
                          """ Set the structure of the subunit
                  
                          * setting structure will automaticall set formula, mol_wt, charge
                  
                  
                  Severity: Minor
                  Found in bcforms/core.py - About 45 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def __init__(self, id, stoichiometry, structure=None, formula=None, mol_wt=None, charge=None):
                  Severity: Minor
                  Found in bcforms/core.py - About 45 mins to fix

                    Function get_genomic_image has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def get_genomic_image(self, seq_features=None, width=1200, cols=2, nt_per_track=80, **kwargs):
                    Severity: Minor
                    Found in bcforms/core.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              for i_atom, atom in atom_type.items():
                                                  atom_type[i_atom] = mol.GetAtom(atom)
                      
                              # mol.AddHydrogens()
                      
                      
                      Severity: Major
                      Found in bcforms/core.py - About 45 mins to fix

                        Function is_equal has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def is_equal(self, other):
                                """ Check if two atoms are semantically equal (belong to the same subunit/monomer and
                                have the same element, position, and charge)
                        
                                Args:
                        Severity: Minor
                        Found in bcforms/core.py - About 45 mins to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function __init__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def __init__(self, l_bond_atoms=None, r_bond_atoms=None, l_displaced_atoms=None, r_displaced_atoms=None,
                                         order=BondOrder.single, stereo=None,
                                         comments=None):
                                """
                        
                        
                        Severity: Minor
                        Found in bcforms/core.py - About 45 mins to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function get_details has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def get_details(self):
                                """ Get the full details of the crosslink in a dictionary
                        
                                Returns:
                                    :obj:`dict`: detailed information of the crosslink
                        Severity: Minor
                        Found in bcforms/core.py - About 45 mins to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Avoid deeply nested control flow statements.
                        Open

                                                for i_atom, atom in atom_type.items():
                                                    if atom is not None:
                                                        atom_type[i_atom] = atom.GetIdx()
                        
                        
                        Severity: Major
                        Found in bcforms/core.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  for i_atom, atom in atom_type.items():
                                                      atom_type[i_atom] = atom+n_atoms[i_subunit]
                                      atom_maps.append(atom_map)
                          Severity: Major
                          Found in bcforms/core.py - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if next(subunit for subunit in self_subunits_subunits if subunit.id == atom.subunit).stoichiometry > 1:
                                                        errors.append("crosslink {} contains multiple subunit '{}', so the subunit_idx of atom '{}[{}]' cannot be None".format(
                                                            i_crosslink + 1, atom.subunit, atom_type, i_atom))
                                                elif atom.subunit_idx > next(subunit for subunit in self_subunits_subunits if subunit.id == atom.subunit).stoichiometry:
                            Severity: Major
                            Found in bcforms/core.py - About 45 mins to fix

                              Function clean has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def clean(self):
                                      """ Clean up the subunits and the crosslinks
                              
                                      For example, convert `1 * a + 1 * a` to `2 * a`
                              
                              
                              Severity: Minor
                              Found in bcforms/core.py - About 45 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function from_set has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def from_set(self, subunits):
                                      """ Set the subunits from a list of subunits
                              
                                      Note: this method does not support crosslinks
                              
                              
                              Severity: Minor
                              Found in bcforms/core.py - About 35 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Avoid too many return statements within this function.
                              Open

                                      return True
                              Severity: Major
                              Found in bcforms/core.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                        return True
                                Severity: Major
                                Found in bcforms/core.py - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                              return False
                                  Severity: Major
                                  Found in bcforms/core.py - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                                return False
                                    Severity: Major
                                    Found in bcforms/core.py - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                              return True
                                      Severity: Major
                                      Found in bcforms/core.py - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                                        return False
                                        Severity: Major
                                        Found in bcforms/core.py - About 30 mins to fix

                                          Function get_hydrogen_atom has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          def get_hydrogen_atom(parent_atom, bonding_hydrogens, i_monomer):
                                              """ Get a hydrogen atom attached to a parent atom
                                              Args:
                                                  parent_atom (:obj:`openbabel.OBAtom`): parent atom
                                                  bonding_hydrogens (:obj:`list`): hydrogens that have already been gotten
                                          Severity: Minor
                                          Found in bcforms/core.py - About 25 mins to fix

                                          Cognitive Complexity

                                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                          A method's cognitive complexity is based on a few simple rules:

                                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                          • Code is considered more complex for each "break in the linear flow of the code"
                                          • Code is considered more complex when "flow breaking structures are nested"

                                          Further reading

                                          Function __str__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                              def __str__(self):
                                                  """Generate a string representation
                                          
                                                  Returns:
                                                      :obj:`str`: string representation
                                          Severity: Minor
                                          Found in bcforms/core.py - About 25 mins to fix

                                          Cognitive Complexity

                                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                          A method's cognitive complexity is based on a few simple rules:

                                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                          • Code is considered more complex for each "break in the linear flow of the code"
                                          • Code is considered more complex when "flow breaking structures are nested"

                                          Further reading

                                          Function mol_wt has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                              def mol_wt(self, value):
                                                  """ Set the molecular weight of the subunit
                                          
                                                  Args:
                                                      value (:obj:`float` or :obj:`int` or :obj:`None`): molecular weight of the subunit
                                          Severity: Minor
                                          Found in bcforms/core.py - About 25 mins to fix

                                          Cognitive Complexity

                                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                          A method's cognitive complexity is based on a few simple rules:

                                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                          • Code is considered more complex for each "break in the linear flow of the code"
                                          • Code is considered more complex when "flow breaking structures are nested"

                                          Further reading

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

                                                  if subunit_formulas is None:
                                                      for subunit in self.subunits:
                                                          if subunit.get_formula() is None:
                                                              raise ValueError('Not all subunits have defined formula')
                                                          formula += subunit.get_formula()
                                          Severity: Major
                                          Found in bcforms/core.py and 2 other locations - About 1 day to fix
                                          bcforms/core.py on lines 1901..1914
                                          bcforms/core.py on lines 1943..1956

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

                                          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

                                                  if subunit_charges is None:
                                                      for subunit in self.subunits:
                                                          if subunit.get_charge() is None:
                                                              raise ValueError('Not all subunits have defined charge')
                                                          charge += subunit.get_charge()
                                          Severity: Major
                                          Found in bcforms/core.py and 2 other locations - About 1 day to fix
                                          bcforms/core.py on lines 1860..1873
                                          bcforms/core.py on lines 1901..1914

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

                                          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

                                                  if subunit_mol_wts is None:
                                                      for subunit in self.subunits:
                                                          if subunit.get_mol_wt() is None:
                                                              raise ValueError('Not all subunits have defined molecular weight')
                                                          mol_wt += subunit.get_mol_wt()
                                          Severity: Major
                                          Found in bcforms/core.py and 2 other locations - About 1 day to fix
                                          bcforms/core.py on lines 1860..1873
                                          bcforms/core.py on lines 1943..1956

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

                                          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

                                              def get_r_displaced_atoms(self):
                                                  """ Get the right displaced atoms
                                          
                                                  Returns:
                                                      :obj:`list` of :obj:`Atom`: right displaced atoms
                                          Severity: Major
                                          Found in bcforms/core.py and 3 other locations - About 7 hrs to fix
                                          bcforms/core.py on lines 1336..1351
                                          bcforms/core.py on lines 1353..1368
                                          bcforms/core.py on lines 1370..1385

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

                                          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

                                              def get_l_bond_atoms(self):
                                                  """ Get the left bond atoms
                                          
                                                  Returns:
                                                      :obj:`list` of :obj:`Atom`: left bond atoms
                                          Severity: Major
                                          Found in bcforms/core.py and 3 other locations - About 7 hrs to fix
                                          bcforms/core.py on lines 1353..1368
                                          bcforms/core.py on lines 1370..1385
                                          bcforms/core.py on lines 1387..1402

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

                                          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

                                              def get_r_bond_atoms(self):
                                                  """ Get the right bond atoms
                                          
                                                  Returns:
                                                      :obj:`list` of :obj:`Atom`: right bond atoms
                                          Severity: Major
                                          Found in bcforms/core.py and 3 other locations - About 7 hrs to fix
                                          bcforms/core.py on lines 1336..1351
                                          bcforms/core.py on lines 1370..1385
                                          bcforms/core.py on lines 1387..1402

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

                                          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

                                              def get_l_displaced_atoms(self):
                                                  """ Get the left displaced atoms
                                          
                                                  Returns:
                                                      :obj:`list` of :obj:`Atom`: left displaced atoms
                                          Severity: Major
                                          Found in bcforms/core.py and 3 other locations - About 7 hrs to fix
                                          bcforms/core.py on lines 1336..1351
                                          bcforms/core.py on lines 1353..1368
                                          bcforms/core.py on lines 1387..1402

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

                                          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

                                              if r_monomer_alphabet == 'protein':
                                                  r_monomer = bpforms.ProteinForm().from_str(xlink_details['r_monomer'])
                                              elif r_monomer_alphabet == 'dna':
                                                  r_monomer = bpforms.DnaForm().from_str(xlink_details['r_monomer'])
                                              elif r_monomer_alphabet == 'rna':
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 6 hrs to fix
                                          bcforms/core.py on lines 2339..2346

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

                                          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

                                              if l_monomer_alphabet == 'protein':
                                                  l_monomer = bpforms.ProteinForm().from_str(xlink_details['l_monomer'])
                                              elif l_monomer_alphabet == 'dna':
                                                  l_monomer = bpforms.DnaForm().from_str(xlink_details['l_monomer'])
                                              elif l_monomer_alphabet == 'rna':
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 6 hrs to fix
                                          bcforms/core.py on lines 2349..2356

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

                                          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

                                              @subunit_idx.setter
                                              def subunit_idx(self, value):
                                                  """ Set the index of the homomer of the subunit that the atom belongs to
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 2 other locations - About 3 hrs to fix
                                          bcforms/core.py on lines 1189..1202
                                          bcforms/core.py on lines 1264..1277

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

                                          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

                                              @r_subunit_idx.setter
                                              def r_subunit_idx(self, value):
                                                  """ Set the index of the right subunit in the crosslink
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 2 other locations - About 3 hrs to fix
                                          bcforms/core.py on lines 485..497
                                          bcforms/core.py on lines 1189..1202

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

                                          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

                                              @l_subunit_idx.setter
                                              def l_subunit_idx(self, value):
                                                  """ Set the index of the left subunit in the crosslink
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 2 other locations - About 3 hrs to fix
                                          bcforms/core.py on lines 485..497
                                          bcforms/core.py on lines 1264..1277

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

                                          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 get_mol_wt(self, mol_wt=None):
                                                  """ Get the molecular weight
                                          
                                                  Args:
                                                      mol_wt (:obj:`float` or :obj:`None`): Subunit molecular weight per copy
                                          Severity: Major
                                          Found in bcforms/core.py and 2 other locations - About 2 hrs to fix
                                          bcforms/core.py on lines 285..302
                                          bcforms/core.py on lines 322..338

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 57.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                              def get_formula(self, formula=None):
                                                  """ Get the empirical formula
                                          
                                                  Args:
                                                      formula (:obj:`EmpiricalFormula` or :obj:`None`): Subunit empirical formula per copy
                                          Severity: Major
                                          Found in bcforms/core.py and 2 other locations - About 2 hrs to fix
                                          bcforms/core.py on lines 304..320
                                          bcforms/core.py on lines 322..338

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 57.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                              def get_charge(self, charge=None):
                                                  """ Get the total charge
                                          
                                                  Args:
                                                      charge (:obj:`int` or :obj:`None`): Subunit charge per copy
                                          Severity: Major
                                          Found in bcforms/core.py and 2 other locations - About 2 hrs to fix
                                          bcforms/core.py on lines 285..302
                                          bcforms/core.py on lines 304..320

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 57.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                          if args[3][0] == 'subunit_idx':
                                                              subunit_idx = int(args[3][1])
                                                          else:
                                                              subunit_idx = None
                                                              num_optional_args += 1
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 2 hrs to fix
                                          bcforms/core.py on lines 1668..1672

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                          if args[3][0] == 'subunit_idx':
                                                              subunit_idx = int(args[3][1])
                                                          else:
                                                              subunit_idx = None
                                                              num_optional_args += 1
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 2 hrs to fix
                                          bcforms/core.py on lines 1699..1703

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

                                          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

                                              i_l_atom = atom_maps[0][1][1]['monomer'][form.crosslinks[0].get_l_bond_atoms()[0].position]
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 2 hrs to fix
                                          bcforms/core.py on lines 2397..2397

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

                                          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

                                              for i_atom in atom_maps[0][1][1]['monomer'].values():
                                                  if structure.GetAtom(i_atom).GetAtomicNum() > 1:
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 2 hrs to fix
                                          bcforms/core.py on lines 2376..2377

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

                                          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

                                              for i_atom in atom_maps[1][1][1]['monomer'].values():
                                                  if structure.GetAtom(i_atom).GetAtomicNum() > 1:
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 2 hrs to fix
                                          bcforms/core.py on lines 2367..2368

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

                                          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

                                              i_r_atom = atom_maps[1][1][1]['monomer'][form.crosslinks[0].get_r_bond_atoms()[0].position]
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 2 hrs to fix
                                          bcforms/core.py on lines 2396..2396

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

                                          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

                                              @position.setter
                                              def position(self, value):
                                                  """ Set the position of the atom in the compound
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 2 hrs to fix
                                          bcforms/core.py on lines 557..569

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

                                          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

                                              @monomer.setter
                                              def monomer(self, value):
                                                  """ Set the position in the subunit of the monomer that the atom belongs to
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 2 hrs to fix
                                          bcforms/core.py on lines 533..545

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

                                          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

                                                  for self_crosslink in self.crosslinks:
                                                      found = False
                                                      for other_crosslink in other.crosslinks:
                                                          if self_crosslink.is_equal(other_crosslink):
                                                              found = True
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 1 hr to fix
                                          bcforms/core.py on lines 2023..2030

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

                                          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

                                                  for self_subunit in self.subunits:
                                                      found = False
                                                      for other_subunit in other.subunits:
                                                          if self_subunit.is_equal(other_subunit):
                                                              found = True
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 1 hr to fix
                                          bcforms/core.py on lines 2035..2042

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

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

                                              @charge.setter
                                              def charge(self, value):
                                                  """ Set the charge of the atom
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 16 other locations - About 1 hr to fix
                                          bcforms/core.py on lines 73..85
                                          bcforms/core.py on lines 97..109
                                          bcforms/core.py on lines 461..473
                                          bcforms/core.py on lines 509..521
                                          bcforms/core.py on lines 835..848
                                          bcforms/core.py on lines 860..873
                                          bcforms/core.py on lines 885..898
                                          bcforms/core.py on lines 910..923
                                          bcforms/core.py on lines 934..946
                                          bcforms/core.py on lines 1139..1152
                                          bcforms/core.py on lines 1164..1177
                                          bcforms/core.py on lines 1214..1227
                                          bcforms/core.py on lines 1239..1252
                                          bcforms/core.py on lines 1289..1302
                                          bcforms/core.py on lines 1507..1520
                                          bcforms/core.py on lines 1532..1545

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

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

                                              @l_bond_atoms.setter
                                              def l_bond_atoms(self, value):
                                                  """ Set the left bond atoms
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 16 other locations - About 1 hr to fix
                                          bcforms/core.py on lines 73..85
                                          bcforms/core.py on lines 97..109
                                          bcforms/core.py on lines 461..473
                                          bcforms/core.py on lines 509..521
                                          bcforms/core.py on lines 581..593
                                          bcforms/core.py on lines 860..873
                                          bcforms/core.py on lines 885..898
                                          bcforms/core.py on lines 910..923
                                          bcforms/core.py on lines 934..946
                                          bcforms/core.py on lines 1139..1152
                                          bcforms/core.py on lines 1164..1177
                                          bcforms/core.py on lines 1214..1227
                                          bcforms/core.py on lines 1239..1252
                                          bcforms/core.py on lines 1289..1302
                                          bcforms/core.py on lines 1507..1520
                                          bcforms/core.py on lines 1532..1545

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

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

                                              @r_displaced_atoms.setter
                                              def r_displaced_atoms(self, value):
                                                  """ Set the right displaced atoms
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 16 other locations - About 1 hr to fix
                                          bcforms/core.py on lines 73..85
                                          bcforms/core.py on lines 97..109
                                          bcforms/core.py on lines 461..473
                                          bcforms/core.py on lines 509..521
                                          bcforms/core.py on lines 581..593
                                          bcforms/core.py on lines 835..848
                                          bcforms/core.py on lines 860..873
                                          bcforms/core.py on lines 885..898
                                          bcforms/core.py on lines 934..946
                                          bcforms/core.py on lines 1139..1152
                                          bcforms/core.py on lines 1164..1177
                                          bcforms/core.py on lines 1214..1227
                                          bcforms/core.py on lines 1239..1252
                                          bcforms/core.py on lines 1289..1302
                                          bcforms/core.py on lines 1507..1520
                                          bcforms/core.py on lines 1532..1545

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

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

                                              @r_monomer.setter
                                              def r_monomer(self, value):
                                                  """ Set the index of the right monomer in the crosslink
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 16 other locations - About 1 hr to fix
                                          bcforms/core.py on lines 73..85
                                          bcforms/core.py on lines 97..109
                                          bcforms/core.py on lines 461..473
                                          bcforms/core.py on lines 509..521
                                          bcforms/core.py on lines 581..593
                                          bcforms/core.py on lines 835..848
                                          bcforms/core.py on lines 860..873
                                          bcforms/core.py on lines 885..898
                                          bcforms/core.py on lines 910..923
                                          bcforms/core.py on lines 934..946
                                          bcforms/core.py on lines 1139..1152
                                          bcforms/core.py on lines 1164..1177
                                          bcforms/core.py on lines 1214..1227
                                          bcforms/core.py on lines 1239..1252
                                          bcforms/core.py on lines 1507..1520
                                          bcforms/core.py on lines 1532..1545

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

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

                                              @stoichiometry.setter
                                              def stoichiometry(self, value):
                                                  """ Set the stoichiometry of the subunit
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 16 other locations - About 1 hr to fix
                                          bcforms/core.py on lines 73..85
                                          bcforms/core.py on lines 461..473
                                          bcforms/core.py on lines 509..521
                                          bcforms/core.py on lines 581..593
                                          bcforms/core.py on lines 835..848
                                          bcforms/core.py on lines 860..873
                                          bcforms/core.py on lines 885..898
                                          bcforms/core.py on lines 910..923
                                          bcforms/core.py on lines 934..946
                                          bcforms/core.py on lines 1139..1152
                                          bcforms/core.py on lines 1164..1177
                                          bcforms/core.py on lines 1214..1227
                                          bcforms/core.py on lines 1239..1252
                                          bcforms/core.py on lines 1289..1302
                                          bcforms/core.py on lines 1507..1520
                                          bcforms/core.py on lines 1532..1545

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

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

                                              @r_bond_atoms.setter
                                              def r_bond_atoms(self, value):
                                                  """ Set the right bond atoms
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 16 other locations - About 1 hr to fix
                                          bcforms/core.py on lines 73..85
                                          bcforms/core.py on lines 97..109
                                          bcforms/core.py on lines 461..473
                                          bcforms/core.py on lines 509..521
                                          bcforms/core.py on lines 581..593
                                          bcforms/core.py on lines 835..848
                                          bcforms/core.py on lines 885..898
                                          bcforms/core.py on lines 910..923
                                          bcforms/core.py on lines 934..946
                                          bcforms/core.py on lines 1139..1152
                                          bcforms/core.py on lines 1164..1177
                                          bcforms/core.py on lines 1214..1227
                                          bcforms/core.py on lines 1239..1252
                                          bcforms/core.py on lines 1289..1302
                                          bcforms/core.py on lines 1507..1520
                                          bcforms/core.py on lines 1532..1545

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

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

                                              @subunits.setter
                                              def subunits(self, value):
                                                  """ Set the subunits
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 16 other locations - About 1 hr to fix
                                          bcforms/core.py on lines 73..85
                                          bcforms/core.py on lines 97..109
                                          bcforms/core.py on lines 461..473
                                          bcforms/core.py on lines 509..521
                                          bcforms/core.py on lines 581..593
                                          bcforms/core.py on lines 835..848
                                          bcforms/core.py on lines 860..873
                                          bcforms/core.py on lines 885..898
                                          bcforms/core.py on lines 910..923
                                          bcforms/core.py on lines 934..946
                                          bcforms/core.py on lines 1139..1152
                                          bcforms/core.py on lines 1164..1177
                                          bcforms/core.py on lines 1214..1227
                                          bcforms/core.py on lines 1239..1252
                                          bcforms/core.py on lines 1289..1302
                                          bcforms/core.py on lines 1532..1545

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

                                          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

                                                  if not isinstance(value, EmpiricalFormula) and not isinstance(value, str) and value is not None:
                                                      raise ValueError(':obj:`value` is not an instance of :obj:`EmpiricalFormula` or :obj:`str` or None')
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 1 hr to fix
                                          bcforms/core.py on lines 213..214

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

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

                                              @subunit.setter
                                              def subunit(self, value):
                                                  """ Set the subunit that the atom belongs to
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 16 other locations - About 1 hr to fix
                                          bcforms/core.py on lines 73..85
                                          bcforms/core.py on lines 97..109
                                          bcforms/core.py on lines 509..521
                                          bcforms/core.py on lines 581..593
                                          bcforms/core.py on lines 835..848
                                          bcforms/core.py on lines 860..873
                                          bcforms/core.py on lines 885..898
                                          bcforms/core.py on lines 910..923
                                          bcforms/core.py on lines 934..946
                                          bcforms/core.py on lines 1139..1152
                                          bcforms/core.py on lines 1164..1177
                                          bcforms/core.py on lines 1214..1227
                                          bcforms/core.py on lines 1239..1252
                                          bcforms/core.py on lines 1289..1302
                                          bcforms/core.py on lines 1507..1520
                                          bcforms/core.py on lines 1532..1545

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

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

                                              @r_subunit.setter
                                              def r_subunit(self, value):
                                                  """ Set the name of the right subunit in the crosslink
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 16 other locations - About 1 hr to fix
                                          bcforms/core.py on lines 73..85
                                          bcforms/core.py on lines 97..109
                                          bcforms/core.py on lines 461..473
                                          bcforms/core.py on lines 509..521
                                          bcforms/core.py on lines 581..593
                                          bcforms/core.py on lines 835..848
                                          bcforms/core.py on lines 860..873
                                          bcforms/core.py on lines 885..898
                                          bcforms/core.py on lines 910..923
                                          bcforms/core.py on lines 934..946
                                          bcforms/core.py on lines 1139..1152
                                          bcforms/core.py on lines 1164..1177
                                          bcforms/core.py on lines 1214..1227
                                          bcforms/core.py on lines 1289..1302
                                          bcforms/core.py on lines 1507..1520
                                          bcforms/core.py on lines 1532..1545

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

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

                                              @crosslinks.setter
                                              def crosslinks(self, value):
                                                  """ Set the crosslinks
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 16 other locations - About 1 hr to fix
                                          bcforms/core.py on lines 73..85
                                          bcforms/core.py on lines 97..109
                                          bcforms/core.py on lines 461..473
                                          bcforms/core.py on lines 509..521
                                          bcforms/core.py on lines 581..593
                                          bcforms/core.py on lines 835..848
                                          bcforms/core.py on lines 860..873
                                          bcforms/core.py on lines 885..898
                                          bcforms/core.py on lines 910..923
                                          bcforms/core.py on lines 934..946
                                          bcforms/core.py on lines 1139..1152
                                          bcforms/core.py on lines 1164..1177
                                          bcforms/core.py on lines 1214..1227
                                          bcforms/core.py on lines 1239..1252
                                          bcforms/core.py on lines 1289..1302
                                          bcforms/core.py on lines 1507..1520

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

                                          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

                                              atom_labels.append({
                                                  'position': i_atom,
                                                  'element': el_table.GetSymbol(structure.GetAtom(i_atom).GetAtomicNum()),
                                                  'label': xlink_details['r_monomer'],
                                                  'color': r_color})
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 1 hr to fix
                                          bcforms/core.py on lines 2370..2374

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

                                          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

                                                  if not isinstance(value, float) and not isinstance(value, int) and value is not None:
                                                      raise ValueError(':obj:`value` is not an instance of :obj:`float` or :obj:`int` or None')
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 1 hr to fix
                                          bcforms/core.py on lines 177..178

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

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

                                              @element.setter
                                              def element(self, value):
                                                  """ Set the element of the atom
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 16 other locations - About 1 hr to fix
                                          bcforms/core.py on lines 73..85
                                          bcforms/core.py on lines 97..109
                                          bcforms/core.py on lines 461..473
                                          bcforms/core.py on lines 581..593
                                          bcforms/core.py on lines 835..848
                                          bcforms/core.py on lines 860..873
                                          bcforms/core.py on lines 885..898
                                          bcforms/core.py on lines 910..923
                                          bcforms/core.py on lines 934..946
                                          bcforms/core.py on lines 1139..1152
                                          bcforms/core.py on lines 1164..1177
                                          bcforms/core.py on lines 1214..1227
                                          bcforms/core.py on lines 1239..1252
                                          bcforms/core.py on lines 1289..1302
                                          bcforms/core.py on lines 1507..1520
                                          bcforms/core.py on lines 1532..1545

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

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

                                              @l_displaced_atoms.setter
                                              def l_displaced_atoms(self, value):
                                                  """ Set the left displaced atoms
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 16 other locations - About 1 hr to fix
                                          bcforms/core.py on lines 73..85
                                          bcforms/core.py on lines 97..109
                                          bcforms/core.py on lines 461..473
                                          bcforms/core.py on lines 509..521
                                          bcforms/core.py on lines 581..593
                                          bcforms/core.py on lines 835..848
                                          bcforms/core.py on lines 860..873
                                          bcforms/core.py on lines 910..923
                                          bcforms/core.py on lines 934..946
                                          bcforms/core.py on lines 1139..1152
                                          bcforms/core.py on lines 1164..1177
                                          bcforms/core.py on lines 1214..1227
                                          bcforms/core.py on lines 1239..1252
                                          bcforms/core.py on lines 1289..1302
                                          bcforms/core.py on lines 1507..1520
                                          bcforms/core.py on lines 1532..1545

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

                                          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

                                              atom_labels.append({
                                                  'position': i_atom,
                                                  'element': el_table.GetSymbol(structure.GetAtom(i_atom).GetAtomicNum()),
                                                  'label': xlink_details['l_monomer'],
                                                  'color': l_color})
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 1 hr to fix
                                          bcforms/core.py on lines 2379..2383

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

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

                                              @l_monomer.setter
                                              def l_monomer(self, value):
                                                  """ Set the index of the left monomer in the crosslink
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 16 other locations - About 1 hr to fix
                                          bcforms/core.py on lines 73..85
                                          bcforms/core.py on lines 97..109
                                          bcforms/core.py on lines 461..473
                                          bcforms/core.py on lines 509..521
                                          bcforms/core.py on lines 581..593
                                          bcforms/core.py on lines 835..848
                                          bcforms/core.py on lines 860..873
                                          bcforms/core.py on lines 885..898
                                          bcforms/core.py on lines 910..923
                                          bcforms/core.py on lines 934..946
                                          bcforms/core.py on lines 1139..1152
                                          bcforms/core.py on lines 1164..1177
                                          bcforms/core.py on lines 1239..1252
                                          bcforms/core.py on lines 1289..1302
                                          bcforms/core.py on lines 1507..1520
                                          bcforms/core.py on lines 1532..1545

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

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

                                              @id.setter
                                              def id(self, value):
                                                  """ Set the id of the subunit
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 16 other locations - About 1 hr to fix
                                          bcforms/core.py on lines 97..109
                                          bcforms/core.py on lines 461..473
                                          bcforms/core.py on lines 509..521
                                          bcforms/core.py on lines 581..593
                                          bcforms/core.py on lines 835..848
                                          bcforms/core.py on lines 860..873
                                          bcforms/core.py on lines 885..898
                                          bcforms/core.py on lines 910..923
                                          bcforms/core.py on lines 934..946
                                          bcforms/core.py on lines 1139..1152
                                          bcforms/core.py on lines 1164..1177
                                          bcforms/core.py on lines 1214..1227
                                          bcforms/core.py on lines 1239..1252
                                          bcforms/core.py on lines 1289..1302
                                          bcforms/core.py on lines 1507..1520
                                          bcforms/core.py on lines 1532..1545

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

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

                                              @order.setter
                                              def order(self, value):
                                                  """ Set the order
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 16 other locations - About 1 hr to fix
                                          bcforms/core.py on lines 73..85
                                          bcforms/core.py on lines 97..109
                                          bcforms/core.py on lines 461..473
                                          bcforms/core.py on lines 509..521
                                          bcforms/core.py on lines 581..593
                                          bcforms/core.py on lines 835..848
                                          bcforms/core.py on lines 860..873
                                          bcforms/core.py on lines 885..898
                                          bcforms/core.py on lines 910..923
                                          bcforms/core.py on lines 1139..1152
                                          bcforms/core.py on lines 1164..1177
                                          bcforms/core.py on lines 1214..1227
                                          bcforms/core.py on lines 1239..1252
                                          bcforms/core.py on lines 1289..1302
                                          bcforms/core.py on lines 1507..1520
                                          bcforms/core.py on lines 1532..1545

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

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

                                              @type.setter
                                              def type(self, value):
                                                  """ Set the type of the abstracted crosslink
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 16 other locations - About 1 hr to fix
                                          bcforms/core.py on lines 73..85
                                          bcforms/core.py on lines 97..109
                                          bcforms/core.py on lines 461..473
                                          bcforms/core.py on lines 509..521
                                          bcforms/core.py on lines 581..593
                                          bcforms/core.py on lines 835..848
                                          bcforms/core.py on lines 860..873
                                          bcforms/core.py on lines 885..898
                                          bcforms/core.py on lines 910..923
                                          bcforms/core.py on lines 934..946
                                          bcforms/core.py on lines 1164..1177
                                          bcforms/core.py on lines 1214..1227
                                          bcforms/core.py on lines 1239..1252
                                          bcforms/core.py on lines 1289..1302
                                          bcforms/core.py on lines 1507..1520
                                          bcforms/core.py on lines 1532..1545

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

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

                                              @l_subunit.setter
                                              def l_subunit(self, value):
                                                  """ Set the name of the left subunit in the crosslink
                                          
                                                  Args:
                                          Severity: Major
                                          Found in bcforms/core.py and 16 other locations - About 1 hr to fix
                                          bcforms/core.py on lines 73..85
                                          bcforms/core.py on lines 97..109
                                          bcforms/core.py on lines 461..473
                                          bcforms/core.py on lines 509..521
                                          bcforms/core.py on lines 581..593
                                          bcforms/core.py on lines 835..848
                                          bcforms/core.py on lines 860..873
                                          bcforms/core.py on lines 885..898
                                          bcforms/core.py on lines 910..923
                                          bcforms/core.py on lines 934..946
                                          bcforms/core.py on lines 1139..1152
                                          bcforms/core.py on lines 1214..1227
                                          bcforms/core.py on lines 1239..1252
                                          bcforms/core.py on lines 1289..1302
                                          bcforms/core.py on lines 1507..1520
                                          bcforms/core.py on lines 1532..1545

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                  subunit = next((subunit for subunit in self.subunits if isinstance(subunit, Subunit) and subunit.id == subunit_id), None)
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 1 hr to fix
                                          bcforms/core.py on lines 2061..2061

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                  subunit = next((subunit for subunit in self.subunits if isinstance(subunit, Subunit) and subunit.id == subunit_id), None)
                                          Severity: Major
                                          Found in bcforms/core.py and 1 other location - About 1 hr to fix
                                          bcforms/core.py on lines 2083..2083

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

                                          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

                                                      @lark.v_args(inline=True)
                                                      def inline_crosslink_stereo(self, *args):
                                                          return ('stereo', BondStereo[args[-2].value])
                                          Severity: Minor
                                          Found in bcforms/core.py and 1 other location - About 50 mins to fix
                                          bcforms/core.py on lines 1730..1732

                                          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

                                                      @lark.v_args(inline=True)
                                                      def inline_crosslink_order(self, *args):
                                                          return ('order', BondOrder[args[-2].value])
                                          Severity: Minor
                                          Found in bcforms/core.py and 1 other location - About 50 mins to fix
                                          bcforms/core.py on lines 1734..1736

                                          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

                                                      if 'stoichiometry' in subunit:
                                                          new_subunit['stoichiometry'] = subunit['stoichiometry']
                                                      else:
                                                          raise ValueError('`subunit` has no `stoichiometry`')
                                          Severity: Minor
                                          Found in bcforms/core.py and 1 other location - About 45 mins to fix
                                          bcforms/core.py on lines 1800..1803

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

                                                              component_dict[args[0][0]] = args[0][1]
                                          Severity: Major
                                          Found in bcforms/core.py and 2 other locations - About 45 mins to fix
                                          bcforms/core.py on lines 1613..1613
                                          bcforms/core.py on lines 1614..1614

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

                                                              component_dict[args[1][0]] = args[1][1]
                                          Severity: Major
                                          Found in bcforms/core.py and 2 other locations - About 45 mins to fix
                                          bcforms/core.py on lines 1610..1610
                                          bcforms/core.py on lines 1613..1613

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

                                                              component_dict[args[0][0]] = args[0][1]
                                          Severity: Major
                                          Found in bcforms/core.py and 2 other locations - About 45 mins to fix
                                          bcforms/core.py on lines 1610..1610
                                          bcforms/core.py on lines 1614..1614

                                          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

                                                      if 'id' in subunit:
                                                          new_subunit['id'] = subunit['id']
                                                      else:
                                                          raise ValueError('`subunit` has no `id`')
                                          Severity: Minor
                                          Found in bcforms/core.py and 1 other location - About 45 mins to fix
                                          bcforms/core.py on lines 1806..1809

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

                                                      @lark.v_args(inline=True)
                                                      def coefficient(self, *args):
                                                          return ('stoichiometry', int(args[0].value))
                                          Severity: Major
                                          Found in bcforms/core.py and 4 other locations - About 40 mins to fix
                                          bcforms/core.py on lines 1328..1330
                                          bcforms/core.py on lines 1332..1334
                                          bcforms/core.py on lines 1742..1744
                                          bcforms/core.py on lines 1754..1756

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

                                                      @lark.v_args(inline=True)
                                                      def monomer_position(self, *args):
                                                          return ('monomer_position', int(args[0].value))
                                          Severity: Major
                                          Found in bcforms/core.py and 4 other locations - About 40 mins to fix
                                          bcforms/core.py on lines 1328..1330
                                          bcforms/core.py on lines 1332..1334
                                          bcforms/core.py on lines 1618..1620
                                          bcforms/core.py on lines 1754..1756

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

                                                                  elif attr == 'l_monomer':
                                                                      l_subunit = val[0]
                                                                      l_subunit_idx = val[1]
                                                                      l_monomer = val[2]
                                          Severity: Minor
                                          Found in bcforms/core.py and 1 other location - About 40 mins to fix
                                          bcforms/core.py on lines 1650..1653

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

                                                                  elif attr == 'r_monomer':
                                                                      r_subunit = val[0]
                                                                      r_subunit_idx = val[1]
                                                                      r_monomer = val[2]
                                          Severity: Minor
                                          Found in bcforms/core.py and 1 other location - About 40 mins to fix
                                          bcforms/core.py on lines 1646..1649

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

                                                  @lark.v_args(inline=True)
                                                  def atom_charge(self, *args):
                                                      return ('atom_charge', int(args[0].value))
                                          Severity: Major
                                          Found in bcforms/core.py and 4 other locations - About 40 mins to fix
                                          bcforms/core.py on lines 1328..1330
                                          bcforms/core.py on lines 1618..1620
                                          bcforms/core.py on lines 1742..1744
                                          bcforms/core.py on lines 1754..1756

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

                                                  @lark.v_args(inline=True)
                                                  def atom_position(self, *args):
                                                      return ('atom_position', int(args[0].value))
                                          Severity: Major
                                          Found in bcforms/core.py and 4 other locations - About 40 mins to fix
                                          bcforms/core.py on lines 1332..1334
                                          bcforms/core.py on lines 1618..1620
                                          bcforms/core.py on lines 1742..1744
                                          bcforms/core.py on lines 1754..1756

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

                                                      @lark.v_args(inline=True)
                                                      def atom_position(self, *args):
                                                          return ('atom_position', int(args[0].value))
                                          Severity: Major
                                          Found in bcforms/core.py and 4 other locations - About 40 mins to fix
                                          bcforms/core.py on lines 1328..1330
                                          bcforms/core.py on lines 1332..1334
                                          bcforms/core.py on lines 1618..1620
                                          bcforms/core.py on lines 1742..1744

                                          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

                                          There are no issues that match your filters.

                                          Category
                                          Status