zul/src/main/java/org/zkoss/zul/Window.java

Summary

Maintainability
F
4 days
Test Coverage

Window has 71 methods (exceeds 20 allowed). Consider refactoring.
Open

public class Window extends XulElement implements Framable, IdSpace {
    private static final Logger log = LoggerFactory.getLogger(Window.class);
    private static final long serialVersionUID = 20100721L;

    private transient Caption _caption;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Window.java - About 1 day to fix

    File Window.java has 559 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* Window.java
    
        Purpose:
            
        Description:
    Severity: Major
    Found in zul/src/main/java/org/zkoss/zul/Window.java - About 1 day to fix

      Method service has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          public void service(org.zkoss.zk.au.AuRequest request, boolean everError) {
              final String cmd = request.getCommand();
              if (cmd.equals(Events.ON_OPEN)) {
                  OpenEvent evt = OpenEvent.getOpenEvent(request);
                  setVisible(evt.isOpen());
      Severity: Minor
      Found in zul/src/main/java/org/zkoss/zul/Window.java - 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

      Method service has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public void service(org.zkoss.zk.au.AuRequest request, boolean everError) {
              final String cmd = request.getCommand();
              if (cmd.equals(Events.ON_OPEN)) {
                  OpenEvent evt = OpenEvent.getOpenEvent(request);
                  setVisible(evt.isOpen());
      Severity: Minor
      Found in zul/src/main/java/org/zkoss/zul/Window.java - About 1 hr to fix

        Method isEventThreadEnabled has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private boolean isEventThreadEnabled(boolean attachedRequired) {
                Desktop desktop = getDesktop();
                if (desktop == null) {
                    if (attachedRequired)
                        throw new SuspendNotAllowedException("Not attached, " + this);
        Severity: Minor
        Found in zul/src/main/java/org/zkoss/zul/Window.java - 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

        Method renderProperties has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws java.io.IOException {
                super.renderProperties(renderer);
        
                render(renderer, "title", _title);
                render(renderer, "maximized", _maximized);
        Severity: Minor
        Found in zul/src/main/java/org/zkoss/zul/Window.java - 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

        Method setMode has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public void setMode(String name) {
                if ("popup".equals(name))
                    doPopup();
                else if ("overlapped".equals(name))
                    doOverlapped();
        Severity: Minor
        Found in zul/src/main/java/org/zkoss/zul/Window.java - 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

        Method checkOverlappable has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private void checkOverlappable(int mode) {
                if (!"false".equals(getDraggable()))
                    throw new UiException("Draggable window cannot be modal, overlapped, popup, or highlighted: " + this);
        
                if (mode == MODAL)
        Severity: Minor
        Found in zul/src/main/java/org/zkoss/zul/Window.java - 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

        Method beforeChildAdded has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            public void beforeChildAdded(Component child, Component refChild) {
                if (child instanceof Caption) {
                    if (_caption != null && _caption != child)
                        throw new UiException("Only one caption is allowed: " + this);
                } else if (refChild instanceof Caption) {
        Severity: Minor
        Found in zul/src/main/java/org/zkoss/zul/Window.java - About 25 mins to fix

        Cognitive Complexity

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

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

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

        Further reading

        Method doModal has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            public void doModal() {
                if (!isEventThreadEnabled(true)) {
                    checkOverlappable(MODAL_EVENT_THREAD_DISABLED);
                    setNonModalMode(MODAL_EVENT_THREAD_DISABLED);
                    return;
        Severity: Minor
        Found in zul/src/main/java/org/zkoss/zul/Window.java - About 25 mins to fix

        Cognitive Complexity

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

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

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

        Further reading

        Method setDraggable has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            public void setDraggable(String draggable) {
                if (_mode != EMBEDDED) {
                    if (draggable != null && (draggable.length() > 0 && !"false".equals(draggable)))
                        throw new UiException("Only embedded window could be draggable: " + this);
                }
        Severity: Minor
        Found in zul/src/main/java/org/zkoss/zul/Window.java - About 25 mins to fix

        Cognitive Complexity

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

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

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

        Further reading

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

            static {
                addClientEvent(Window.class, Events.ON_CLOSE, 0);
                addClientEvent(Window.class, Events.ON_MOVE, CE_DUPLICATE_IGNORE | CE_IMPORTANT);
                addClientEvent(Window.class, Events.ON_SIZE, CE_DUPLICATE_IGNORE | CE_IMPORTANT);
                addClientEvent(Window.class, Events.ON_OPEN, CE_IMPORTANT);
        Severity: Major
        Found in zul/src/main/java/org/zkoss/zul/Window.java and 1 other location - About 1 hr to fix
        zul/src/main/java/org/zkoss/zul/Panel.java on lines 68..76

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

        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

                } else if (cmd.equals(Events.ON_MAXIMIZE)) {
                    MaximizeEvent evt = MaximizeEvent.getMaximizeEvent(request);
                    setLeftDirectly(evt.getLeft());
                    setTopDirectly(evt.getTop());
                    setWidthDirectly(evt.getWidth());
        Severity: Major
        Found in zul/src/main/java/org/zkoss/zul/Window.java and 2 other locations - About 1 hr to fix
        zul/src/main/java/org/zkoss/zul/Panel.java on lines 691..701
        zul/src/main/java/org/zkoss/zul/Panel.java on lines 681..691

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

        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

            public void setMinimized(boolean minimized) {
                if (_minimized != minimized) {
                    if (!_minimizable)
                        throw new UiException("not minimizable, " + this);
        
        
        Severity: Major
        Found in zul/src/main/java/org/zkoss/zul/Window.java and 1 other location - About 1 hr to fix
        zul/src/main/java/org/zkoss/zul/Panel.java on lines 224..237

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

        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

            public void setMaximized(boolean maximized) {
                if (_maximized != maximized) {
                    if (!_maximizable)
                        throw new UiException("Not maximizable, " + this);
        
        
        Severity: Minor
        Found in zul/src/main/java/org/zkoss/zul/Window.java and 1 other location - About 55 mins to fix
        zul/src/main/java/org/zkoss/zul/Panel.java on lines 172..184

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

        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

            public void beforeChildAdded(Component child, Component refChild) {
                if (child instanceof Caption) {
                    if (_caption != null && _caption != child)
                        throw new UiException("Only one caption is allowed: " + this);
                } else if (refChild instanceof Caption) {
        Severity: Minor
        Found in zul/src/main/java/org/zkoss/zul/Window.java and 1 other location - About 55 mins to fix
        zul/src/main/java/org/zkoss/zul/Groupbox.java on lines 178..186

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 63.

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

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

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

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

        Refactorings

        Further Reading

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

            public void setTitle(String title) {
                if (title == null)
                    title = "";
                if (!Objects.equals(_title, title)) {
                    _title = title;
        Severity: Major
        Found in zul/src/main/java/org/zkoss/zul/Window.java and 7 other locations - About 40 mins to fix
        zul/src/main/java/org/zkoss/zul/Anchorchildren.java on lines 68..75
        zul/src/main/java/org/zkoss/zul/Checkbox.java on lines 125..132
        zul/src/main/java/org/zkoss/zul/Groupbox.java on lines 168..175
        zul/src/main/java/org/zkoss/zul/Hlayout.java on lines 41..48
        zul/src/main/java/org/zkoss/zul/Menu.java on lines 102..109
        zul/src/main/java/org/zkoss/zul/Panel.java on lines 437..444
        zul/src/main/java/org/zkoss/zul/impl/LabelElement.java on lines 46..53

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

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

            private void afterUnmarshal() {
                for (Iterator<Component> it = getChildren().iterator(); it.hasNext();) {
                    final Object child = it.next();
                    if (child instanceof Caption) {
                        _caption = (Caption) child;
        Severity: Major
        Found in zul/src/main/java/org/zkoss/zul/Window.java and 3 other locations - About 40 mins to fix
        zul/src/main/java/org/zkoss/zul/LayoutRegion.java on lines 528..536
        zul/src/main/java/org/zkoss/zul/Row.java on lines 334..342
        zul/src/main/java/org/zkoss/zul/Tab.java on lines 381..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 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

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

                if (border == null || "0".equals(border) || "false".equals(border))
                    border = "none";
                else if ("true".equals(border))
                    border = "normal";
        Severity: Minor
        Found in zul/src/main/java/org/zkoss/zul/Window.java and 1 other location - About 40 mins to fix
        zul/src/main/java/org/zkoss/zul/Panel.java on lines 400..403

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

            public void setMinheight(int minheight) {
                if (minheight < 0)
                    minheight = 100;
                if (_minheight != minheight) {
                    _minheight = minheight;
        Severity: Major
        Found in zul/src/main/java/org/zkoss/zul/Window.java and 6 other locations - About 35 mins to fix
        zul/src/main/java/org/zkoss/zul/Listbox.java on lines 789..796
        zul/src/main/java/org/zkoss/zul/Listheader.java on lines 368..375
        zul/src/main/java/org/zkoss/zul/Panel.java on lines 317..324
        zul/src/main/java/org/zkoss/zul/Panel.java on lines 341..348
        zul/src/main/java/org/zkoss/zul/Treecol.java on lines 322..329
        zul/src/main/java/org/zkoss/zul/Window.java on lines 322..329

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

        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

            public void setMinwidth(int minwidth) {
                if (minwidth < 0)
                    minwidth = 200;
                if (_minwidth != minwidth) {
                    _minwidth = minwidth;
        Severity: Major
        Found in zul/src/main/java/org/zkoss/zul/Window.java and 6 other locations - About 35 mins to fix
        zul/src/main/java/org/zkoss/zul/Listbox.java on lines 789..796
        zul/src/main/java/org/zkoss/zul/Listheader.java on lines 368..375
        zul/src/main/java/org/zkoss/zul/Panel.java on lines 317..324
        zul/src/main/java/org/zkoss/zul/Panel.java on lines 341..348
        zul/src/main/java/org/zkoss/zul/Treecol.java on lines 322..329
        zul/src/main/java/org/zkoss/zul/Window.java on lines 298..305

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

        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