Showing 2,934 of 7,758 total issues

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

        case PREVIOUS:
            old = se._previousInsertion;
            se._previousInsertion = target;
            if (old instanceof HtmlShadowElement) {
                asShadow(old)._nextInsertion = target;
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/HtmlShadowElement.java and 1 other location - About 40 mins to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlShadowElement.java on lines 1158..1164

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

    public void setInnerWidth(String innerWidth) {
        if (innerWidth == null)
            innerWidth = "100%";
        if (!_innerWidth.equals(innerWidth)) {
            _innerWidth = innerWidth;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Tree.java and 4 other locations - About 40 mins to fix
zhtml/src/main/java/org/zkoss/zhtml/impl/ContentTag.java on lines 53..60
zul/src/main/java/org/zkoss/zul/Grid.java on lines 1000..1007
zul/src/main/java/org/zkoss/zul/Iframe.java on lines 71..78
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 598..605

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

        if (Strings.isBlank(validatorExpr)) {
            validatorExpr = getSystemValidator(comp, attr);
            if (validatorExpr != null) {
                validatorExpr = "'" + validatorExpr + "'";
            }
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java and 3 other locations - About 40 mins to fix
zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 949..954
zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 969..974
zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 990..995

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

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

        final boolean shallInvalidated = //Bug 3147518: avoid memory leak
        (min < 0 || min == 0) && (max < 0 || max >= newsz || max >= oldsz);
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/impl/ListboxDataLoader.java and 1 other location - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/impl/GridDataLoader.java on lines 383..384

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

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

        final boolean shallInvalidated = //Bug 3147518: avoid memory leak
        (min < 0 || min == 0) && (max < 0 || max >= newsz || max >= oldsz);
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/impl/GridDataLoader.java and 1 other location - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/impl/ListboxDataLoader.java on lines 408..409

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

        if (Strings.isBlank(converterExpr)) {
            converterExpr = getSystemConverter(comp, attr);
            if (converterExpr != null) {
                converterExpr = "'" + converterExpr + "'";
            }
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java and 3 other locations - About 40 mins to fix
zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 949..954
zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 969..974
zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 996..1001

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

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

                for (Iterator<Component> it = _tabs.getChildren().iterator(); it.hasNext();) {
                    final Tab tab = (Tab) it.next();
                    if (tab.isSelected()) {
                        _seltab = tab;
                        break;
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Tabbox.java and 1 other location - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/Tabbox.java on lines 732..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 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 3 locations. Consider refactoring.
Open

        rootNode.add(new DefaultTreeNode(testObject("Node 1", 1, false, CLOSED), new DefaultTreeNode[] {
            new DefaultTreeNode(testObject("Subnode 1-1", 2, true, CLOSED)),
            new DefaultTreeNode(testObject("Subnode 1-2", 2, true, CLOSED))
        }));
zktest/src/main/java/org/zkoss/zktest/test2/B65_ZK_1766_Composer.java on lines 113..116
zktest/src/main/java/org/zkoss/zktest/test2/B65_ZK_1766_Composer.java on lines 127..130

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

    public void setAutodisable(String autodisable) {
        if (!Objects.equals(_auxinf != null ? _auxinf.autodisable : null, autodisable)) {
            initAuxInfoForMenuitem().autodisable = autodisable;
            smartUpdate("autodisable", getAutodisable());
        }
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Menuitem.java and 2 other locations - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/A.java on lines 101..106
zul/src/main/java/org/zkoss/zul/Button.java on lines 106..111

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

    public void setIconTooltips(String[] iconTooltips) {
        if (!Objects.equals(_auxinf != null ? _auxinf.iconTooltips : null, iconTooltips)) {
            initAuxInfo().iconTooltips = iconTooltips;
            smartUpdate("iconTooltips", iconTooltips);
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java and 3 other locations - About 40 mins to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 100..105
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 118..123
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 105..110

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

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

    @NotifyChange({ "model", "message1" }) @Command
    public void delete(@BindingParam("node") MyTreeNode node) {
        MyTreeNode parent = (MyTreeNode)node.getParent();
        int i = parent.getIndex(node);
        parent.remove(i);
zktest/src/main/java/org/zkoss/zktest/bind/basic/CollectionIndexTreeComposer.java on lines 68..74

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

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

        rootNode.add(new DefaultTreeNode(testObject("Node 2", 1, false, CLOSED), new DefaultTreeNode[] {
            new DefaultTreeNode(testObject("Subnode 2-1", 2, true, CLOSED)),
            new DefaultTreeNode(testObject("Subnode 2-2", 2, true, CLOSED))
        }));
zktest/src/main/java/org/zkoss/zktest/test2/B65_ZK_1766_Composer.java on lines 109..112
zktest/src/main/java/org/zkoss/zktest/test2/B65_ZK_1766_Composer.java on lines 113..116

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

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

            if (!(newItem instanceof Element) && !(newItem instanceof DocType)
            && !(newItem instanceof Comment)
            && !(newItem instanceof ProcessingInstruction)
            && !(newItem instanceof EntityReference))
Severity: Minor
Found in zcommon/src/main/java/org/zkoss/idom/Document.java and 1 other location - About 40 mins to fix
zcommon/src/main/java/org/zkoss/idom/impl/AbstractGroup.java on lines 464..466

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

    public void setAutodisable(String autodisable) {
        if (!Objects.equals(_auxinf != null ? _auxinf.autodisable : null, autodisable)) {
            initAuxInfoForButton().autodisable = autodisable;
            smartUpdate("autodisable", getAutodisable());
        }
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Button.java and 2 other locations - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/A.java on lines 101..106
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 136..141

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

    public static final String getThisServletPath(ServletRequest request) {
        String path = (String) request.getAttribute(Attributes.INCLUDE_SERVLET_PATH);
        return path != null ? path
                : request instanceof HttpServletRequest ? ((HttpServletRequest) request).getServletPath() : "/";
    }
Severity: Major
Found in zweb/src/main/java/org/zkoss/web/servlet/http/Https.java and 4 other locations - About 40 mins to fix
zweb/src/main/java/org/zkoss/web/servlet/http/Https.java on lines 187..191
zweb/src/main/java/org/zkoss/web/servlet/http/Https.java on lines 223..227
zweb/src/main/java/org/zkoss/web/servlet/http/Https.java on lines 233..237
zweb/src/main/java/org/zkoss/web/servlet/http/Https.java on lines 244..248

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

    public void setTop(String top) {
        if (!Objects.equals(_auxinf != null ? _auxinf.top : null, top)) {
            initAuxInfo0().top = top;
            smartUpdate("top", top);
        }
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java and 3 other locations - About 40 mins to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 100..105
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 105..110
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 147..152

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

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

                    for (int i = 0; i < parameterTypes.length; i++) {
                        parameters[i] = factory.coerceToType(params[i],
                                parameterTypes[i]);
                    }
Severity: Minor
Found in zel/src/main/java/org/zkoss/zel/BeanELResolver.java and 1 other location - About 40 mins to fix
zel/src/main/java/org/zkoss/zel/Util.java on lines 637..640

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

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

                for (int i = 0; i < parameterTypes.length; i++) {
                    parameters[i] = factory.coerceToType(params[i],
                            parameterTypes[i]);
                }
Severity: Minor
Found in zel/src/main/java/org/zkoss/zel/Util.java and 1 other location - About 40 mins to fix
zel/src/main/java/org/zkoss/zel/BeanELResolver.java on lines 237..240

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

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

        } catch (InvocationTargetException ite) {
            Throwable cause = ite.getCause();
            if (cause instanceof ThreadDeath) {
                throw (ThreadDeath) cause;
            }
Severity: Minor
Found in zel/src/main/java/org/zkoss/zel/impl/parser/AstValue.java and 1 other location - About 40 mins to fix
zel/src/main/java/org/zkoss/zel/BeanELResolver.java on lines 261..270

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

Severity
Category
Status
Source
Language