KarrLab/obj_tables

View on GitHub
obj_tables/chem/core.py

Summary

Maintainability
F
2 wks
Test Coverage
A
99%

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

""" Chemistry attributes

:Author: Jonathan Karr <karr@mssm.edu>
:Date: 2017-05-10
:Copyright: 2017, Karr Lab
Severity: Major
Found in obj_tables/chem/core.py - About 2 days to fix

    Function deserialize has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
    Open

        def deserialize(self, value, objects=None, decoded=None):
            """ Deserialize value
    
            Args:
                value (:obj:`str`): semantically equivalent representation
    Severity: Minor
    Found in obj_tables/chem/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 value has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        def value(self, value):
            if value is None:
                self._value = None
                self._serialized_value = None
                self._serialized_format = None
    Severity: Minor
    Found in obj_tables/chem/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 start has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

            def start(self, parts):
                if len(set([part.serialize() for part in parts])) < len(parts):
                    raise ValueError('Reaction participants cannot be repeated')
    
                if self.species:
    Severity: Minor
    Found in obj_tables/chem/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 gbl has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

            def gbl(self, *args):
                parts = []
                for arg in args:
                    if isinstance(arg, lark.lexer.Token) and \
                            arg.type == 'SPECIES_STOICHIOMETRY__SPECIES__COMPARTMENT__ID':
    Severity: Minor
    Found in obj_tables/chem/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 lcl has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

            def lcl(self, *args):
                parts = []
                for arg in args:
                    if isinstance(arg, lark.tree.Tree):
                        if arg.data == 'lcl_reactants':
    Severity: Minor
    Found in obj_tables/chem/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 is_equal has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def is_equal(self, other):
            """ Determine if two reaction equations are semantically equivalent
    
            Args:
                other (:obj:`ReactionEquation`): other reaction equation
    Severity: Minor
    Found in obj_tables/chem/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 from_dict has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def from_dict(self, dict_value):
            """ Set value from a dictionary representation
    
            Args:
                dict_value (:obj:`dict`): dictionary representation
    Severity: Minor
    Found in obj_tables/chem/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 serialized_format has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def serialized_format(self, value):
            if value in [ChemicalStructureFormat.inchi, ChemicalStructureFormat.smiles]:
                if self._serialized_format in [ChemicalStructureFormat.inchi, ChemicalStructureFormat.smiles]:
                    if value != self._serialized_format:
                        self._serialized_format = value
    Severity: Minor
    Found in obj_tables/chem/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 serialize has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

        def serialize(self):
            """ Generate a string representation
    
            Returns:
                :obj:`str`: string representation
    Severity: Minor
    Found in obj_tables/chem/core.py - About 55 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 to_dict has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

        def to_dict(self):
            """ Get a dictionary representation
    
            Returns:
                :obj:`dict`: dictionary representation
    Severity: Minor
    Found in obj_tables/chem/core.py - About 55 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 serialize has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

        def serialize(self, include_compartment=True):
            """ Generate a string representation
    
            Args:
                include_compartment (:obj:`bool`, optional): if :obj:`True`, include compartment in string representation
    Severity: Minor
    Found in obj_tables/chem/core.py - About 55 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_xlsx_validation has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

        def get_xlsx_validation(self, sheet_models=None, doc_metadata_model=None):
            """ Get XLSX validation
    
            Args:
                sheet_models (:obj:`list` of :obj:`Model`, optional): models encoded as separate sheets
    Severity: Minor
    Found in obj_tables/chem/core.py - About 55 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_xlsx_validation has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

        def get_xlsx_validation(self, sheet_models=None, doc_metadata_model=None):
            """ Get XLSX validation
    
            Args:
                sheet_models (:obj:`list` of :obj:`Model`, optional): models encoded as separate sheets
    Severity: Minor
    Found in obj_tables/chem/core.py - About 55 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

                            if cls.__name__ == self.species_cls:
                                self.species_cls = cls
                                break
    
    
    Severity: Major
    Found in obj_tables/chem/core.py - About 45 mins to fix

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

          def __init__(self, verbose_name='', description="A reaction equation (e.g. 'A[c] <=> B[e]', '[c]: A <=> B')",
      Severity: Minor
      Found in obj_tables/chem/core.py - About 45 mins to fix

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

            def __init__(self, default=None, none_value=None, verbose_name='', description="A chemical formula (e.g. 'H2O', 'CO2', or 'NaCl')",
        Severity: Minor
        Found in obj_tables/chem/core.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if cls.__module__ + '.' + cls.__name__ == self.species_cls:
                                      self.species_cls = cls
                                      break
                              else:
          Severity: Major
          Found in obj_tables/chem/core.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if cls.__module__ + '.' + cls.__name__ == self.compartment_cls:
                                        self.compartment_cls = cls
                                        break
                                else:
            Severity: Major
            Found in obj_tables/chem/core.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if cls.__name__ == self.compartment_cls:
                                          self.compartment_cls = cls
                                          break
              
              
              Severity: Major
              Found in obj_tables/chem/core.py - About 45 mins to fix

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

                    def deserialize(self, value):
                        """ Deserialize value
                
                        Args:
                            value (:obj:`str`): string representation of structure
                Severity: Minor
                Found in obj_tables/chem/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

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

                    def validate(self, obj, value):
                        """ Determine if :obj:`value` is a valid value
                
                        Args:
                            obj (:obj:`Model`): class being validated
                Severity: Minor
                Found in obj_tables/chem/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

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

                    def get_xlsx_validation(self, sheet_models=None, doc_metadata_model=None):
                        """ Get XLSX validation
                
                        Args:
                            sheet_models (:obj:`list` of :obj:`Model`, optional): models encoded as separate sheets
                Severity: Major
                Found in obj_tables/chem/core.py and 1 other location - About 1 day to fix
                obj_tables/chem/core.py on lines 1031..1067

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

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

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

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

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

                Refactorings

                Further Reading

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

                    def get_xlsx_validation(self, sheet_models=None, doc_metadata_model=None):
                        """ Get XLSX validation
                
                        Args:
                            sheet_models (:obj:`list` of :obj:`Model`, optional): models encoded as separate sheets
                Severity: Major
                Found in obj_tables/chem/core.py and 1 other location - About 1 day to fix
                obj_tables/chem/core.py on lines 159..195

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

                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 objects and self.compartment_cls:
                            if not isinstance(self.compartment_cls, type):
                                for cls in objects.keys():
                                    if '.' in self.compartment_cls:
                                        if cls.__module__ + '.' + cls.__name__ == self.compartment_cls:
                Severity: Major
                Found in obj_tables/chem/core.py and 1 other location - About 1 day to fix
                obj_tables/chem/core.py on lines 902..922

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

                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 objects and self.species_cls:
                            if not isinstance(self.species_cls, type):
                                for cls in objects.keys():
                                    if '.' in self.species_cls:
                                        if cls.__module__ + '.' + cls.__name__ == self.species_cls:
                Severity: Major
                Found in obj_tables/chem/core.py and 1 other location - About 1 day to fix
                obj_tables/chem/core.py on lines 924..944

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

                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 self.species:
                                for part in parts:
                                    species = self.species.get(part.species, None)
                                    if not species:
                                        raise ValueError('Species "{}" must be defined'.format(part.species))
                Severity: Major
                Found in obj_tables/chem/core.py and 1 other location - About 2 hrs to fix
                obj_tables/chem/core.py on lines 675..680

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

                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 self.compartments:
                                for part in parts:
                                    compartment = self.compartments.get(part.compartment, None)
                                    if not compartment:
                                        raise ValueError('Compartment "{}" must be defined'.format(part.compartment))
                Severity: Major
                Found in obj_tables/chem/core.py and 1 other location - About 2 hrs to fix
                obj_tables/chem/core.py on lines 668..673

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

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

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

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

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

                Refactorings

                Further Reading

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

                    def validate_unique(self, objects, values):
                        """ Determine if the attribute values are unique
                
                        Args:
                            objects (:obj:`list` of :obj:`Model`): list of :obj:`Model` objects
                Severity: Major
                Found in obj_tables/chem/core.py and 7 other locations - About 2 hrs to fix
                obj_tables/bio/seq.py on lines 113..127
                obj_tables/bio/seq.py on lines 275..289
                obj_tables/chem/core.py on lines 466..480
                obj_tables/chem/core.py on lines 976..990
                obj_tables/math/numeric.py on lines 135..149
                obj_tables/math/numeric.py on lines 309..323
                obj_tables/math/symbolic.py on lines 93..107

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

                    def validate_unique(self, objects, values):
                        """ Determine if the attribute values are unique
                
                        Args:
                            objects (:obj:`list` of :obj:`Model`): list of :obj:`Model` objects
                Severity: Major
                Found in obj_tables/chem/core.py and 7 other locations - About 2 hrs to fix
                obj_tables/bio/seq.py on lines 113..127
                obj_tables/bio/seq.py on lines 275..289
                obj_tables/chem/core.py on lines 102..116
                obj_tables/chem/core.py on lines 466..480
                obj_tables/math/numeric.py on lines 135..149
                obj_tables/math/numeric.py on lines 309..323
                obj_tables/math/symbolic.py on lines 93..107

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

                    def validate_unique(self, objects, values):
                        """ Determine if the attribute values are unique
                
                        Args:
                            objects (:obj:`list` of :obj:`Model`): list of :obj:`Model` objects
                Severity: Major
                Found in obj_tables/chem/core.py and 7 other locations - About 2 hrs to fix
                obj_tables/bio/seq.py on lines 113..127
                obj_tables/bio/seq.py on lines 275..289
                obj_tables/chem/core.py on lines 102..116
                obj_tables/chem/core.py on lines 976..990
                obj_tables/math/numeric.py on lines 135..149
                obj_tables/math/numeric.py on lines 309..323
                obj_tables/math/symbolic.py on lines 93..107

                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

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

                        if self.primary and (not value or len(value) == 0):
                            errors.append('{} value for primary attribute cannot be empty'.format(
                                self.__class__.__name__))
                Severity: Major
                Found in obj_tables/chem/core.py and 1 other location - About 1 hr to fix
                obj_tables/bio/seq.py on lines 267..269

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 49.

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

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

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

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

                Refactorings

                Further Reading

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

                        @lark.v_args(inline=True)
                        def gbl_parts(self, *args):
                            val = []
                            for arg in args:
                                if isinstance(arg, ReactionParticipant):
                Severity: Major
                Found in obj_tables/chem/core.py and 1 other location - About 1 hr to fix
                obj_tables/chem/core.py on lines 736..742

                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

                        @lark.v_args(inline=True)
                        def lcl_parts(self, *args):
                            val = []
                            for arg in args:
                                if isinstance(arg, ReactionParticipant):
                Severity: Major
                Found in obj_tables/chem/core.py and 1 other location - About 1 hr to fix
                obj_tables/chem/core.py on lines 704..710

                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 arg in args:
                                if arg.type == 'SPECIES_STOICHIOMETRY__SPECIES__SPECIES_TYPE__ID':
                                    species = arg.value
                                elif arg.type == 'SPECIES_STOICHIOMETRY__STOICHIOMETRY':
                                    stoichiometry = float(arg.value)
                Severity: Major
                Found in obj_tables/chem/core.py and 1 other location - About 1 hr to fix
                obj_tables/chem/core.py on lines 748..753

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

                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 arg.type == 'SPECIES_STOICHIOMETRY__SPECIES__SPECIES_TYPE__ID':
                                    species = arg.value
                                elif arg.type == 'SPECIES_STOICHIOMETRY__SPECIES__COMPARTMENT__ID':
                                    compartment = arg.value
                                elif arg.type == 'SPECIES_STOICHIOMETRY__STOICHIOMETRY':
                Severity: Major
                Found in obj_tables/chem/core.py and 1 other location - About 1 hr to fix
                obj_tables/chem/core.py on lines 715..719

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

                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 isinstance(value, str):
                                try:
                                    return (ChemicalStructure().deserialize(value), None)
                                except Exception as error:
                                    return (None, core.InvalidAttribute(self, [str(error)]))
                Severity: Major
                Found in obj_tables/chem/core.py and 1 other location - About 1 hr to fix
                obj_tables/sci/refs.py on lines 142..145

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

                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

                                self.species == other.species or (
                                    isinstance(self.species, core.Model) and self.species.is_equal(other.species)
                Severity: Major
                Found in obj_tables/chem/core.py and 1 other location - About 1 hr to fix
                obj_tables/chem/core.py on lines 795..796

                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

                                self.compartment == other.compartment or (
                                    isinstance(self.compartment, core.Model) and self.compartment.is_equal(other.compartment)
                Severity: Major
                Found in obj_tables/chem/core.py and 1 other location - About 1 hr to fix
                obj_tables/chem/core.py on lines 790..791

                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

                        if self.primary and value is None:
                            errors.append('{} value for primary attribute cannot be `None`'.format(
                                self.__class__.__name__))
                Severity: Minor
                Found in obj_tables/chem/core.py and 1 other location - About 50 mins to fix
                obj_tables/bio/seq.py on lines 105..107

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

                        if self.none:
                            if value is not None and not isinstance(value, ReactionEquation):
                                errors.append('Value must be an instance of `ReactionEquation` or `None`')
                Severity: Minor
                Found in obj_tables/chem/core.py and 2 other locations - About 35 mins to fix
                obj_tables/chem/core.py on lines 455..456
                obj_tables/sci/refs.py on lines 161..162

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

                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 value is not None and not isinstance(value, ChemicalStructure):
                            errors.append('Value must be an instance of `ChemicalStructure` or `None`')
                Severity: Minor
                Found in obj_tables/chem/core.py and 2 other locations - About 35 mins to fix
                obj_tables/chem/core.py on lines 965..967
                obj_tables/sci/refs.py on lines 161..162

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

                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

                        if isinstance(self.compartment, core.Model):
                            compartment = self.compartment.serialize()
                        else:
                            compartment = self.compartment
                Severity: Major
                Found in obj_tables/chem/core.py and 3 other locations - About 30 mins to fix
                obj_tables/chem/core.py on lines 808..811
                obj_tables/chem/core.py on lines 840..843
                obj_tables/chem/core.py on lines 848..851

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

                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

                            if isinstance(self.compartment, core.Model):
                                compartment = self.compartment.serialize()
                            else:
                                compartment = self.compartment
                Severity: Major
                Found in obj_tables/chem/core.py and 3 other locations - About 30 mins to fix
                obj_tables/chem/core.py on lines 808..811
                obj_tables/chem/core.py on lines 813..816
                obj_tables/chem/core.py on lines 840..843

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

                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

                        if isinstance(self.species, core.Model):
                            species = self.species.serialize()
                        else:
                            species = self.species
                Severity: Major
                Found in obj_tables/chem/core.py and 3 other locations - About 30 mins to fix
                obj_tables/chem/core.py on lines 813..816
                obj_tables/chem/core.py on lines 840..843
                obj_tables/chem/core.py on lines 848..851

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

                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

                        if isinstance(self.species, core.Model):
                            species = self.species.serialize()
                        else:
                            species = self.species
                Severity: Major
                Found in obj_tables/chem/core.py and 3 other locations - About 30 mins to fix
                obj_tables/chem/core.py on lines 808..811
                obj_tables/chem/core.py on lines 813..816
                obj_tables/chem/core.py on lines 848..851

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

                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