CellProfiler/centrosome

View on GitHub

Showing 380 of 380 total issues

File cpmorphology.py has 3566 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from __future__ import absolute_import
from __future__ import division
import logging

import numpy as np
Severity: Major
Found in centrosome/cpmorphology.py - About 1 wk to fix

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

        if len(count_t) > 0:
            last_n = np.max(count_t)
            diff_i_t = diff_i[mask]
            diff_j_t = diff_j[mask]
            remainder = diff_i_t * 2 - diff_j_t
    Severity: Major
    Found in centrosome/cpmorphology.py and 1 other location - About 3 days to fix
    centrosome/cpmorphology.py on lines 1121..1157

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

    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 len(count_t) > 0:
            last_n = np.max(count_t)
            diff_i_t = diff_i[mask]
            diff_j_t = diff_j[mask]
            remainder = diff_j_t * 2 - diff_i_t
    Severity: Major
    Found in centrosome/cpmorphology.py and 1 other location - About 3 days to fix
    centrosome/cpmorphology.py on lines 1165..1201

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

    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

    File filter.py has 1304 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    from __future__ import absolute_import
    from __future__ import division
    import deprecation
    import numpy as np
    import scipy.ndimage as scind
    Severity: Major
    Found in centrosome/filter.py - About 3 days to fix

      File threshold.py has 672 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # The help text for various thresholding options whose code resides here is in modules/identify.py
      
      
      from __future__ import absolute_import
      from __future__ import division
      Severity: Major
      Found in centrosome/threshold.py - About 1 day to fix

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

        def enhance_dark_holes(image, min_radius, max_radius, mask=None):
            """Enhance dark holes using a rolling ball filter
        
            image - grayscale 2-d image
            radii - a vector of radii: we enhance holes at each given radius
        Severity: Major
        Found in centrosome/filter.py and 1 other location - About 1 day to fix
        centrosome/filter.py on lines 739..766

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

        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 granulometry_filter(image, min_radius, max_radius, mask=None):
            """Enhances bright structures within a min and max radius using a rolling ball filter
        
            image - grayscale 2-d image
            radii - a vector of radii: we enhance holes at each given radius
        Severity: Major
        Found in centrosome/filter.py and 1 other location - About 1 day to fix
        centrosome/filter.py on lines 710..736

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

        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

                    x = (
                        np.sum(ss0 ** 2, 1) * (ss1[:, Y] - vv[:, Y])
                        + np.sum(ss1 ** 2, 1) * (vv[:, Y] - ss0[:, Y])
                        + np.sum(vv ** 2, 1) * (ss0[:, Y] - ss1[:, Y])
        Severity: Major
        Found in centrosome/cpmorphology.py and 1 other location - About 1 day to fix
        centrosome/cpmorphology.py on lines 1675..1678

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

        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

                    y = (
                        np.sum(ss0 ** 2, 1) * (vv[:, X] - ss1[:, X])
                        + np.sum(ss1 ** 2, 1) * (ss0[:, X] - vv[:, X])
                        + np.sum(vv ** 2, 1) * (ss1[:, X] - ss0[:, X])
        Severity: Major
        Found in centrosome/cpmorphology.py and 1 other location - About 1 day to fix
        centrosome/cpmorphology.py on lines 1670..1673

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

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

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

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

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

        Refactorings

        Further Reading

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

        def hprewitt(image, mask=None):
            """Find the horizontal edges of an image using the Prewitt transform
        
            image - image to process
            mask  - mask of relevant points
        Severity: Major
        Found in centrosome/filter.py and 3 other locations - About 1 day to fix
        centrosome/filter.py on lines 544..565
        centrosome/filter.py on lines 568..589
        centrosome/filter.py on lines 628..649

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 125.

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

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

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

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

        Refactorings

        Further Reading

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

        def vprewitt(image, mask=None):
            """Find the vertical edges of an image using the Prewitt transform
        
            image - image to process
            mask  - mask of relevant points
        Severity: Major
        Found in centrosome/filter.py and 3 other locations - About 1 day to fix
        centrosome/filter.py on lines 544..565
        centrosome/filter.py on lines 568..589
        centrosome/filter.py on lines 604..625

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 125.

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

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

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

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

        Refactorings

        Further Reading

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

        def vsobel(image, mask=None):
            """Find the vertical edges of an image using the Sobel transform
        
            image - image to process
            mask  - mask of relevant points
        Severity: Major
        Found in centrosome/filter.py and 3 other locations - About 1 day to fix
        centrosome/filter.py on lines 544..565
        centrosome/filter.py on lines 604..625
        centrosome/filter.py on lines 628..649

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 125.

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

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

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

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

        Refactorings

        Further Reading

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

        def hsobel(image, mask=None):
            """Find the horizontal edges of an image using the Sobel transform
        
            image - image to process
            mask  - mask of relevant points
        Severity: Major
        Found in centrosome/filter.py and 3 other locations - About 1 day to fix
        centrosome/filter.py on lines 568..589
        centrosome/filter.py on lines 604..625
        centrosome/filter.py on lines 628..649

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 125.

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

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

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

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

        Refactorings

        Further Reading

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

                binary_shrink_urb_table = erode_table | (
                    make_table(
                        False,
                        np.array([[0, 1, 0], [0, 1, 0], [0, 0, 0]], bool),
                        np.array([[0, 1, 0], [0, 1, 0], [0, 1, 0]], bool),
        Severity: Major
        Found in centrosome/cpmorphology.py and 3 other locations - About 7 hrs to fix
        centrosome/cpmorphology.py on lines 356..365
        centrosome/cpmorphology.py on lines 380..389
        centrosome/cpmorphology.py on lines 392..401

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 121.

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

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

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

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

        Refactorings

        Further Reading

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

                binary_shrink_lrl_table = erode_table | (
                    make_table(
                        False,
                        np.array([[0, 0, 0], [0, 1, 1], [0, 0, 0]], bool),
                        np.array([[0, 0, 0], [1, 1, 1], [0, 0, 0]], bool),
        Severity: Major
        Found in centrosome/cpmorphology.py and 3 other locations - About 7 hrs to fix
        centrosome/cpmorphology.py on lines 356..365
        centrosome/cpmorphology.py on lines 368..377
        centrosome/cpmorphology.py on lines 392..401

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 121.

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

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

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

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

        Refactorings

        Further Reading

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

                binary_shrink_llt_table = erode_table | (
                    make_table(
                        False,
                        np.array([[0, 0, 0], [0, 1, 0], [0, 1, 0]], bool),
                        np.array([[0, 1, 0], [0, 1, 0], [0, 1, 0]], bool),
        Severity: Major
        Found in centrosome/cpmorphology.py and 3 other locations - About 7 hrs to fix
        centrosome/cpmorphology.py on lines 356..365
        centrosome/cpmorphology.py on lines 368..377
        centrosome/cpmorphology.py on lines 380..389

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 121.

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

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

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

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

        Refactorings

        Further Reading

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

                binary_shrink_ulr_table = erode_table | (
                    make_table(
                        False,
                        np.array([[0, 0, 0], [1, 1, 0], [0, 0, 0]], bool),
                        np.array([[0, 0, 0], [1, 1, 1], [0, 0, 0]], bool),
        Severity: Major
        Found in centrosome/cpmorphology.py and 3 other locations - About 7 hrs to fix
        centrosome/cpmorphology.py on lines 368..377
        centrosome/cpmorphology.py on lines 380..389
        centrosome/cpmorphology.py on lines 392..401

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 121.

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

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

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

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

        Refactorings

        Further Reading

        Function grey_reconstruction has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
        Open

        def grey_reconstruction(image, mask, footprint=None, offset=None):
            """Perform a morphological reconstruction of the image
            
            grey_dilate the image, constraining each pixel to have a value that is
            at most that of the mask.
        Severity: Minor
        Found in centrosome/cpmorphology.py - About 7 hrs to fix

        Cognitive Complexity

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

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

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

        Further reading

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

        def majority(image, mask=None, iterations=1):
            """A pixel takes the value of the majority of its neighbors
            
            """
            global majority_table
        Severity: Major
        Found in centrosome/cpmorphology.py and 6 other locations - About 7 hrs to fix
        centrosome/cpmorphology.py on lines 3468..3484
        centrosome/cpmorphology.py on lines 3495..3514
        centrosome/cpmorphology.py on lines 3548..3565
        centrosome/cpmorphology.py on lines 3606..3622
        centrosome/cpmorphology.py on lines 3637..3653
        centrosome/cpmorphology.py on lines 3848..3868

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

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

        def thicken(image, mask=None, iterations=1):
            """Thicken the objects in an image where doing so does not connect them
            
            0 0 0    ? ? ?
            0 0 0 -> ? 1 ?
        Severity: Major
        Found in centrosome/cpmorphology.py and 6 other locations - About 7 hrs to fix
        centrosome/cpmorphology.py on lines 3468..3484
        centrosome/cpmorphology.py on lines 3495..3514
        centrosome/cpmorphology.py on lines 3548..3565
        centrosome/cpmorphology.py on lines 3606..3622
        centrosome/cpmorphology.py on lines 3637..3653
        centrosome/cpmorphology.py on lines 3732..3745

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

        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