Showing 2,935 of 7,775 total issues

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

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

    public void setLeft(String left) {
        if (!Objects.equals(_auxinf != null ? _auxinf.left : null, left)) {
            initAuxInfo0().left = left;
            smartUpdate("left", left);
        }
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 118..123
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

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

    public void setIconSclasses(String[] iconSclasses) {
        if (!Objects.equals(_auxinf != null ? _auxinf.iconSclasses : null, iconSclasses)) {
            initAuxInfo().iconSclasses = iconSclasses;
            smartUpdate("iconSclasses", iconSclasses);
        }
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 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

                    case UNKNOWN:
                        childrenArray.add(fillShadowElement(seNext));
                        if (sit.hasNext())
                            seNext = sit.next();
                        else {
zktest/src/main/java/org/zkoss/zktest/zats/zuti/composer/DebuggerComposer.java on lines 160..168

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/Grid.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/Iframe.java on lines 71..78
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 598..605
zul/src/main/java/org/zkoss/zul/Tree.java on lines 921..928

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 (_dataLoader != null) {
            s.writeInt(_dataLoader.getOffset());
            s.writeInt(_dataLoader.getLimit());
        } else {
            s.writeInt(0);
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Listbox.java and 1 other location - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/Grid.java on lines 1667..1673

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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

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 947..952
zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 967..972
zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 988..993

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

        try {
            dlg.doModal();
        } catch (Throwable ex) {
            try {
                dlg.detach();
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Fileupload.java and 1 other location - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/Messagebox.java on lines 187..196

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

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

            if (curInfo instanceof ComponentInfo) {
                final ComponentInfo compInfo = (ComponentInfo) curInfo;
                _def = compInfo.getComponentDefinition();
                addSharedAnnotationMap(_def.getAnnotationMap());
                addSharedAnnotationMap(compInfo.getAnnotationMap());
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.java and 1 other location - About 40 mins to fix
zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.java on lines 171..179

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

        case NEXT:
            old = se._nextInsertion;
            se._nextInsertion = target;
            if (old instanceof HtmlShadowElement) {
                asShadow(old)._previousInsertion = 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 1153..1159

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/CollectionTemplateTreeVM.java on lines 69..75

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

                    case UNKNOWN:
                        childrenArray.add(fillShadowElement(seNext));
                        if (sit.hasNext())
                            seNext = sit.next();
                        else {
zktest/src/main/java/org/zkoss/zktest/zats/zuti/composer/DebuggerComposer.java on lines 86..94

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> e = _tabs.getChildren().iterator(); e.hasNext();) {
                    final Tab tab = (Tab) e.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 642..648

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 getOriginContextPath(ServletRequest request) {
        String path = (String) request.getAttribute(Attributes.FORWARD_CONTEXT_PATH);
        return path != null ? path
                : request instanceof HttpServletRequest ? ((HttpServletRequest) request).getContextPath() : "";
    }
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 175..179
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 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

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

        for (; --newcnt >= 0; ++min) {
            if (renderer == null)
                renderer = (RowRenderer) getRealRenderer();
            rows.insertBefore(newUnloadedItem(renderer, min), next);
        }
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 482..486

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 (Iterator it = ((List) value).iterator(); it.hasNext(); j++) {
                if (j > 0)
                    _buf.append(',');
                renderValue(it.next());
            }
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java and 1 other location - About 40 mins to fix
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 150..154

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