Showing 7,775 of 7,775 total issues

Consider simplifying this complex logical expression.
Open

            if (dt.getFullYear() != y || dt.getMonth() != m || dt.getDate() != d
                || dt.getHours() != hr || dt.getMinutes() != min || dt.getSeconds() != sec) //ignore msec (safer though not accurate)
                return; //failed
Severity: Major
Found in zul/src/main/resources/web/js/zul/db/datefmt.ts - About 40 mins to fix

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

        public boolean sort(boolean ascending) {
            final String dir = getSortDirection();
            if (ascending) {
                if ("ascending".equals(dir))
                    return false;
    Severity: Major
    Found in zul/src/main/java/org/zkoss/zul/Column.java and 2 other locations - About 40 mins to fix
    zul/src/main/java/org/zkoss/zul/Listheader.java on lines 414..424
    zul/src/main/java/org/zkoss/zul/Treecol.java on lines 369..379

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

        private static List getItems(int items) {
            List Items = new ArrayList();
            for (int i = 0; i < items; i++) {
                Items.add(new String("data "+i));
            }
    zktest/src/main/java/org/zkoss/zktest/test2/select/models/ListModelSets.java on lines 46..52
    zktest/src/main/java/org/zkoss/zktest/test2/select/models/SimpleListModels.java on lines 48..54

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

        public boolean sort(boolean ascending) {
            final String dir = getSortDirection();
            if (ascending) {
                if ("ascending".equals(dir))
                    return false;
    Severity: Major
    Found in zul/src/main/java/org/zkoss/zul/Listheader.java and 2 other locations - About 40 mins to fix
    zul/src/main/java/org/zkoss/zul/Column.java on lines 362..373
    zul/src/main/java/org/zkoss/zul/Treecol.java on lines 369..379

    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

    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/Groupbox.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/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/Window.java on lines 392..399
    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 3 locations. Consider refactoring.
    Open

                for (String key : compBindings.keySet()) {
                    final BindingKey bkey = getBindingKey(comp, key);
                    if (loadinit) {
                        _formBindingHandler.doInit(comp, bkey);
                    }
    Severity: Major
    Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java and 2 other locations - About 40 mins to fix
    zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 2582..2588
    zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 2589..2596

    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

    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

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

        public void setAnchor(String anchor) {
            if (anchor == null)
                anchor = "";
            if (!Objects.equals(_anchor, anchor)) {
                _anchor = anchor;
    Severity: Major
    Found in zul/src/main/java/org/zkoss/zul/Anchorchildren.java and 7 other locations - About 40 mins to fix
    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/Window.java on lines 392..399
    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 3 locations. Consider refactoring.
    Open

                for (String key : compBindings.keySet()) {
                    final BindingKey bkey = getBindingKey(comp, key);
                    if (loadinit) {
                        _childrenBindingHandler.doInit(comp, bkey);
                    }
    Severity: Major
    Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java and 2 other locations - About 40 mins to fix
    zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 2575..2581
    zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 2582..2588

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

        private static Set getItems(int items) {
            Set Items = new LinkedHashSet();
            for (int i = 0; i < items; i++) {
                Items.add(new String("data "+i));
            }
    zktest/src/main/java/org/zkoss/zktest/test2/select/models/ListModelLists.java on lines 46..52
    zktest/src/main/java/org/zkoss/zktest/test2/select/models/SimpleListModels.java on lines 48..54

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

        public boolean sort(boolean ascending) {
            final String dir = getSortDirection();
            if (ascending) {
                if ("ascending".equals(dir))
                    return false;
    Severity: Major
    Found in zul/src/main/java/org/zkoss/zul/Treecol.java and 2 other locations - About 40 mins to fix
    zul/src/main/java/org/zkoss/zul/Column.java on lines 362..373
    zul/src/main/java/org/zkoss/zul/Listheader.java on lines 414..424

    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

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

        public void setValign(String valign) {
            if (valign == null)
                valign = "top";
            if (!Objects.equals(_valign, valign)) {
                _valign = valign;
    Severity: Major
    Found in zul/src/main/java/org/zkoss/zul/Hlayout.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/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/Window.java on lines 392..399
    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

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

        public void setLabel(String label) {
            if (label == null)
                label = "";
            if (!Objects.equals(_label, label)) {
                _label = label;
    Severity: Major
    Found in zul/src/main/java/org/zkoss/zul/impl/LabelElement.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/Window.java on lines 392..399

    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

    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/Panel.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/Window.java on lines 392..399
    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 3 locations. Consider refactoring.
    Open

                for (String key : compBindings.keySet()) {
                    final BindingKey bkey = getBindingKey(comp, key);
                    if (loadinit) {
                        _propertyBindingHandler.doInit(comp, bkey);
                    }
    Severity: Major
    Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java and 2 other locations - About 40 mins to fix
    zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 2575..2581
    zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 2589..2596

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

        private static List getItems(int items) {
            List Items = new ArrayList();
            for (int i = 0; i < items; i++) {
                Items.add(new String("data "+i));
            }
    zktest/src/main/java/org/zkoss/zktest/test2/select/models/ListModelLists.java on lines 46..52
    zktest/src/main/java/org/zkoss/zktest/test2/select/models/ListModelSets.java on lines 46..52

    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

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

        public void setContent(String content) {
            if (content == null)
                content = "";
            if (!Objects.equals(_content, content)) {
                _content = content;
    Severity: Major
    Found in zul/src/main/java/org/zkoss/zul/Menu.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/Panel.java on lines 437..444
    zul/src/main/java/org/zkoss/zul/Window.java on lines 392..399
    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

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

        public void setAutodisable(String autodisable) {
            if (autodisable == null)
                autodisable = "";
            if (!Objects.equals(_autodisable, autodisable)) {
                _autodisable = autodisable;
    Severity: Major
    Found in zul/src/main/java/org/zkoss/zul/Checkbox.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/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/Window.java on lines 392..399
    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 2 locations. Consider refactoring.
    Open

            if (collector != null) {
                collector.addInfo(new ValidationInfo(ValidationInfo.PROP, getComponent(), getValidatorExpressionString(),
                        validator.toString(), Boolean.valueOf(vctx.isValid()),
                        ((BindContextImpl) vctx.getBindContext()).getValidatorArgs(), null));
            }
    zkbind/src/main/java/org/zkoss/bind/impl/SaveFormBindingImpl.java on lines 296..300

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

                } else if (ctypelc.startsWith("audio/")) {
                    try {
                        return fi.isInMemory() ? new AAudio(name, fi.get()) : new StreamAudio(name, fi, ctypelc);
                    } catch (Throwable ex) {
                        if (log.isDebugEnabled())
    Severity: Minor
    Found in zk/src/main/java/org/zkoss/zk/au/http/AuMultipartUploader.java and 1 other location - About 40 mins to fix
    zk/src/main/java/org/zkoss/zk/au/http/AuMultipartUploader.java on lines 575..582

    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

    Severity
    Category
    Status
    Source
    Language