Showing 2,934 of 7,758 total issues

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

    protected void setVflex0(String flex) {
        if (flex != null && flex.length() == 0)
            flex = null;
        if (!Objects.equals(_auxinf != null ? _auxinf.vflex : null, flex)) {
            initAuxInfo0().vflex = flex;
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java and 7 other locations - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 181..188
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 211..218
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 285..292
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 354..361
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 434..441
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 620..627
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 731..738

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

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

    public void setTooltiptext(String tooltiptext) {
        if (tooltiptext != null && tooltiptext.length() == 0)
            tooltiptext = null;
        if (!Objects.equals(_auxinf != null ? _auxinf.tooltiptext : null, tooltiptext)) {
            initAuxInfo0().tooltiptext = tooltiptext;
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java and 7 other locations - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 181..188
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 211..218
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 354..361
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 434..441
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 567..574
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 620..627
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 731..738

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

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

    public void setSclass(String sclass) {
        if (sclass != null && sclass.length() == 0)
            sclass = null;
        if (!Objects.equals(_auxinf != null ? _auxinf.sclass : null, sclass)) {
            initAuxInfo0().sclass = sclass;
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java and 7 other locations - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 181..188
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 211..218
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 285..292
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 434..441
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 567..574
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 620..627
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 731..738

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

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

    public void setClientAction(String action) {
        if (action != null && action.length() == 0)
            action = null;
        if (!Objects.equals(_auxinf != null ? _auxinf.action : null, action)) {
            initAuxInfo0().action = action;
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java and 7 other locations - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 181..188
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 211..218
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 285..292
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 354..361
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 434..441
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 567..574
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 620..627

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

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

    public void setErrorboxIconSclass(String iconSclass) {
        if (iconSclass != null && iconSclass.length() == 0)
            iconSclass = null;
        if (!Objects.equals(_auxinf != null ? _auxinf.errorboxSclass : null, iconSclass)) {
            initAuxInfoForInputElement().errorboxIconSclass = iconSclass;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/impl/InputElement.java and 6 other locations - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/A.java on lines 163..171
zul/src/main/java/org/zkoss/zul/Button.java on lines 214..222
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 232..240
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 181..188
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 755..762
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 106..113

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

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

    public void setCtrlKeys(String ctrlKeys) throws UiException {
        if (ctrlKeys != null && ctrlKeys.length() == 0)
            ctrlKeys = null;
        if (!Objects.equals(_auxinf != null ? _auxinf.ctrlKeys : null, ctrlKeys)) {
            initAuxInfo().ctrlKeys = ctrlKeys;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/impl/XulElement.java and 6 other locations - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/A.java on lines 163..171
zul/src/main/java/org/zkoss/zul/Button.java on lines 214..222
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 232..240
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 181..188
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 755..762
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 778..785

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

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

    public void setTarget(String target) {
        if (target != null && target.length() == 0)
            target = null;

        if (!Objects.equals(_auxinf != null ? _auxinf.target : null, target)) {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Menuitem.java and 6 other locations - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/A.java on lines 163..171
zul/src/main/java/org/zkoss/zul/Button.java on lines 214..222
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 181..188
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 755..762
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 778..785
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 106..113

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

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

    public void setTarget(String target) {
        if (target != null && target.length() == 0)
            target = null;

        if (!Objects.equals(_auxinf != null ? _auxinf.target : null, target)) {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Button.java and 6 other locations - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/A.java on lines 163..171
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 232..240
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 181..188
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 755..762
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 778..785
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 106..113

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

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

    public void setName(String name) {
        if (name != null && name.length() == 0)
            name = null;
        if (!Objects.equals(_auxinf != null ? _auxinf.name : null, name)) {
            initAuxInfoForInputElement().name = name;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/impl/InputElement.java and 6 other locations - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/A.java on lines 163..171
zul/src/main/java/org/zkoss/zul/Button.java on lines 214..222
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 232..240
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 755..762
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 778..785
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 106..113

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

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

    public void setHref(String href) {
        if (href != null && href.length() == 0)
            href = null;
        if (!Objects.equals(_auxinf != null ? _auxinf.href : null, href)) {
            initAuxInfoForA().href = href;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/A.java and 4 other locations - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/Button.java on lines 191..198
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 209..216
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 185..192
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 257..264

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

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

    public void setHref(String href) {
        if (href != null && href.length() == 0)
            href = null;
        if (!Objects.equals(_auxinf != null ? _auxinf.href : null, href)) {
            initAuxInfoForButton().href = href;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Button.java and 4 other locations - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/A.java on lines 140..147
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 209..216
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 185..192
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 257..264

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

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

    public void setStyle(String style) {
        if (style != null && style.length() == 0)
            style = null;
        if (!Objects.equals(_auxinf != null ? _auxinf.style : null, style)) {
            initAuxInfo0().style = style;
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java and 7 other locations - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 181..188
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 211..218
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 285..292
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 354..361
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 567..574
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 620..627
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 731..738

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

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

    public void setErrorboxSclass(String sclass) {
        if (sclass != null && sclass.length() == 0)
            sclass = null;
        if (!Objects.equals(_auxinf != null ? _auxinf.errorboxSclass : null, sclass)) {
            initAuxInfoForInputElement().errorboxSclass = sclass;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/impl/InputElement.java and 6 other locations - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/A.java on lines 163..171
zul/src/main/java/org/zkoss/zul/Button.java on lines 214..222
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 232..240
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 181..188
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 778..785
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 106..113

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

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

    protected void setHflex0(String flex) {
        if (flex != null && flex.length() == 0)
            flex = null;
        if (!Objects.equals(_auxinf != null ? _auxinf.hflex : null, flex)) {
            initAuxInfo0().hflex = flex;
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java and 7 other locations - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 181..188
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 211..218
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 285..292
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 354..361
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 434..441
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 567..574
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 731..738

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

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

    public void setImage(String src) {
        if (src != null && src.length() == 0)
            src = null;
        if (!Objects.equals(_auxinf != null ? _auxinf.image : null, src)) {
            initAuxInfo().image = src;
zul/src/main/java/org/zkoss/zul/A.java on lines 140..147
zul/src/main/java/org/zkoss/zul/Button.java on lines 191..198
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 209..216
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 257..264

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

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

    public void setHoverImage(String src) {
        if (src != null && src.length() == 0)
            src = null;
        if (!Objects.equals(_auxinf != null ? _auxinf.hoverimg : null, src)) {
            initAuxInfo().hoverimg = src;
zul/src/main/java/org/zkoss/zul/A.java on lines 140..147
zul/src/main/java/org/zkoss/zul/Button.java on lines 191..198
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 209..216
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 185..192

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

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

    public void setHref(String href) throws WrongValueException {
        if (href != null && href.length() == 0)
            href = null;
        if (!Objects.equals(_auxinf != null ? _auxinf.href : null, href)) {
            initAuxInfoForMenuitem().href = href;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Menuitem.java and 4 other locations - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/A.java on lines 140..147
zul/src/main/java/org/zkoss/zul/Button.java on lines 191..198
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 185..192
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 257..264

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

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

    private boolean validateSavePropertyBefore(Component comp, String command, Map<String, Property[]> validates,
            boolean valid, Set<Property> notifys) {
        final List<SavePropertyBinding> bindings = _infoProvider.getSaveBeforeBindings().get(command); //_saveBeforeBindings.get(command);
        boolean r = valid;
        if (bindings != null) {
zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 145..155
zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 179..189

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

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

    private void doSerialize0(Component comp) throws Exception {
        Page pg = comp.getPage();
        ((ComponentCtrl) comp).sessionWillPassivate(pg); // simulate
        ByteArrayOutputStream oaos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(oaos);
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_3563VM.java on lines 85..94
zktest/src/main/java/org/zkoss/zktest/test2/F80_ZK_3185VM.java on lines 76..85

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

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

    private boolean validateSaveFormAfter(Component comp, String command, Map<String, Property[]> validates,
            boolean valid, Set<Property> notifys) {
        final List<SaveFormBinding> bindings = _infoProvider.getSaveFormAfterBindings().get(command); //_saveFormBeforeBindings.get(command);
        boolean r = valid;
        if (bindings != null) {
zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 132..142
zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java on lines 145..155

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

Severity
Category
Status
Source
Language