emory-libraries/eulxml

View on GitHub

Showing 192 of 192 total issues

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

class FloatField(Field):

    """Map an XPath expression to a single Python float. If the XPath
    expression evaluates to an empty NodeList, an FloatField evaluates to
    `None`.
Severity: Major
Found in eulxml/xmlmap/fields.py and 4 other locations - About 1 hr to fix
eulxml/xmlmap/fields.py on lines 911..924
eulxml/xmlmap/fields.py on lines 926..938
eulxml/xmlmap/fields.py on lines 941..954
eulxml/xmlmap/fields.py on lines 1145..1153

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

class IntegerListField(Field):

    """Map an XPath expression to a list of Python integers. If the XPath
    expression evaluates to an empty NodeList, an IntegerListField evaluates to
    an empty list.
Severity: Major
Found in eulxml/xmlmap/fields.py and 4 other locations - About 1 hr to fix
eulxml/xmlmap/fields.py on lines 897..909
eulxml/xmlmap/fields.py on lines 911..924
eulxml/xmlmap/fields.py on lines 926..938
eulxml/xmlmap/fields.py on lines 1145..1153

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

class FloatListField(Field):

    """Map an XPath expression to a list of Python floats. If the XPath
    expression evaluates to an empty NodeList, an IntegerListField evaluates to
    an empty list.
Severity: Major
Found in eulxml/xmlmap/fields.py and 4 other locations - About 1 hr to fix
eulxml/xmlmap/fields.py on lines 897..909
eulxml/xmlmap/fields.py on lines 926..938
eulxml/xmlmap/fields.py on lines 941..954
eulxml/xmlmap/fields.py on lines 1145..1153

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

class IntegerField(Field):

    """Map an XPath expression to a single Python integer. If the XPath
    expression evaluates to an empty NodeList, an IntegerField evaluates to
    `None`.
Severity: Major
Found in eulxml/xmlmap/fields.py and 4 other locations - About 1 hr to fix
eulxml/xmlmap/fields.py on lines 897..909
eulxml/xmlmap/fields.py on lines 911..924
eulxml/xmlmap/fields.py on lines 941..954
eulxml/xmlmap/fields.py on lines 1145..1153

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

Function _init_subforms has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    def _init_subforms(self, data=None, prefix=None):
        # initialize each subform class with the appropriate model instance and data
        self.subforms = SortedDict()    # create as sorted dictionary to preserve order
        for name, subform in six.iteritems(self.__class__.subforms):
            # instantiate the new form with the current field as instance, if available
Severity: Minor
Found in eulxml/forms/xmlobject.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

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

class LanguageTerm(Common):
    ROOT_NAME = 'languageTerm'
    type = xmlmap.StringField('@type')
    authority = xmlmap.StringField('@authority')
    text = xmlmap.StringField('text()')
Severity: Major
Found in eulxml/xmlmap/mods.py and 1 other location - About 1 hr to fix
eulxml/xmlmap/mods.py on lines 248..252

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

class Abstract(Common):
    ROOT_NAME = 'abstract'
    text = xmlmap.StringField('text()')
    type = xmlmap.StringField('@type')
    label = xmlmap.StringField('@displayLabel')
Severity: Major
Found in eulxml/xmlmap/mods.py and 1 other location - About 1 hr to fix
eulxml/xmlmap/mods.py on lines 202..206

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

Function _serialize has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    def _serialize(self):
        if self.prefix:
            yield self.prefix
            yield ':'
        yield self.name
Severity: Minor
Found in eulxml/xpath/ast.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 xmlobjectform_factory has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

def xmlobjectform_factory(model, form=XmlObjectForm, fields=None, exclude=None,
Severity: Major
Found in eulxml/forms/xmlobject.py - About 1 hr to fix

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

        def __init__(self, prefix, name, args):
            self.prefix = prefix
            '''the namespace prefix, or None if unspecified'''
            self.name = name
            '''the local function name'''
    Severity: Major
    Found in eulxml/xpath/ast.py and 2 other locations - About 1 hr to fix
    eulxml/xpath/ast.py on lines 102..108
    eulxml/xpath/ast.py on lines 185..191

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

    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

    Function is_valid has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def is_valid(self):
            """Returns True if this form and all subforms (if any) are valid.
    
            If all standard form-validation tests pass, uses :class:`~eulxml.xmlmap.XmlObject`
            validation methods to check for schema-validity (if a schema is associated)
    Severity: Minor
    Found in eulxml/forms/xmlobject.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

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

    def p_abbreviated_absolute_location_path(p):
        """
        AbbreviatedAbsoluteLocationPath : ABBREV_PATH_SEP RelativeLocationPath
        """
        p[0] = ast.AbsolutePath(p[1], p[2])
    Severity: Major
    Found in eulxml/xpath/parserules.py and 4 other locations - About 1 hr to fix
    eulxml/xpath/parserules.py on lines 57..61
    eulxml/xpath/parserules.py on lines 93..97
    eulxml/xpath/parserules.py on lines 188..195
    eulxml/xpath/parserules.py on lines 207..211

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

    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

    def p_absolute_location_path_subpath(p):
        """
        AbsoluteLocationPath : PATH_SEP RelativeLocationPath
        """
        p[0] = ast.AbsolutePath(p[1], p[2])
    Severity: Major
    Found in eulxml/xpath/parserules.py and 4 other locations - About 1 hr to fix
    eulxml/xpath/parserules.py on lines 57..61
    eulxml/xpath/parserules.py on lines 99..103
    eulxml/xpath/parserules.py on lines 188..195
    eulxml/xpath/parserules.py on lines 207..211

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

    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

    def p_name_test_prefix_star(p):
        """
        NameTest : NCNAME COLON STAR_OP
        """
        p[0] = ast.NameTest(p[1], p[3])
    Severity: Major
    Found in eulxml/xpath/parserules.py and 4 other locations - About 1 hr to fix
    eulxml/xpath/parserules.py on lines 57..61
    eulxml/xpath/parserules.py on lines 93..97
    eulxml/xpath/parserules.py on lines 99..103
    eulxml/xpath/parserules.py on lines 188..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 39.

    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 __init__(self, axis, node_test, predicates):
            self.axis = axis
            '''the step's axis, or @ or None if abbreviated or undefined'''
            self.node_test = node_test
            '''a NameTest or NodeType object describing the test represented'''
    Severity: Major
    Found in eulxml/xpath/ast.py and 2 other locations - About 1 hr to fix
    eulxml/xpath/ast.py on lines 102..108
    eulxml/xpath/ast.py on lines 304..310

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

    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

    def p_expr_unary(p):
        """
        Expr : MINUS_OP Expr %prec UMINUS_OP
        """
        p[0] = ast.UnaryExpression(p[1], p[2])
    Severity: Major
    Found in eulxml/xpath/parserules.py and 4 other locations - About 1 hr to fix
    eulxml/xpath/parserules.py on lines 93..97
    eulxml/xpath/parserules.py on lines 99..103
    eulxml/xpath/parserules.py on lines 188..195
    eulxml/xpath/parserules.py on lines 207..211

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

    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

    def p_node_test_type_literal(p):
        """
        NodeTest : NODETYPE OPEN_PAREN LITERAL CLOSE_PAREN
        """
        # NOTE: Technically this only allows 'processing-instruction' for p[1].
    Severity: Major
    Found in eulxml/xpath/parserules.py and 4 other locations - About 1 hr to fix
    eulxml/xpath/parserules.py on lines 57..61
    eulxml/xpath/parserules.py on lines 93..97
    eulxml/xpath/parserules.py on lines 99..103
    eulxml/xpath/parserules.py on lines 207..211

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

    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 __init__(self, left, op, right):
            self.left = left
            '''the left side of the binary expression'''
            self.op = op
            '''the operator of the binary expression'''
    Severity: Major
    Found in eulxml/xpath/ast.py and 2 other locations - About 1 hr to fix
    eulxml/xpath/ast.py on lines 185..191
    eulxml/xpath/ast.py on lines 304..310

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

    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

    Function formfields_for_xmlobject has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def formfields_for_xmlobject(model, fields=None, exclude=None, widgets=None, options=None,
    Severity: Major
    Found in eulxml/forms/xmlobject.py - About 1 hr to fix

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

          if isinstance(fields, ParsedFieldList):
              fieldlist = fields
          elif exclude is not None:
              excludelist = _parse_field_list(exclude, include_parents=False)
      Severity: Major
      Found in eulxml/forms/xmlobject.py and 1 other location - About 1 hr to fix
      eulxml/forms/xmlobject.py on lines 150..153

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 38.

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

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

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

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

      Refactorings

      Further Reading

      Severity
      Category
      Status
      Source
      Language