Showing 2,934 of 7,758 total issues

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

    protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws java.io.IOException {
        super.renderProperties(renderer);

        if (_x != 0)
            render(renderer, "x", _x);
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Absolutechildren.java and 1 other location - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/Auxheader.java on lines 120..127

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

    public void setPageIncrement(int pginc) throws WrongValueException {
        if (pginc <= 0)
            throw new WrongValueException("Nonpositive is not allowed: " + pginc);
        if (_pginc != pginc) {
            _pginc = pginc;
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Paging.java and 1 other location - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 427..435

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

        for (Tab tab = (Tab) getNextSibling(); tab != null; tab = (Tab) tab.getNextSibling())
            if (!tab.isDisabled()) {
                tab.setSelected(true);
                return tab;
            }
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Tab.java and 1 other location - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/Tab.java on lines 195..199

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

            } else if (!lock.waitUntilUnlock(300*1000)) { //5 minute
                final PotentialDeadLockException ex =
                    new PotentialDeadLockException(
                    "Unable to load from "+src+"\nCause: conflict too long.");
                log.warn("", ex); //very rare, possibly a bug
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 2631..2636

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

                        if (item != null) {
                            Object ele = _model.getElementAt(item.getIndex());
                            if (ctrl == null || ctrl.isSelectable(ele))
                                selObjs.add(ele);
                        }
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/Listbox.java on lines 3742..3746

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

        for (Tab tab = (Tab) getPreviousSibling(); tab != null; tab = (Tab) tab.getPreviousSibling())
            if (!tab.isDisabled()) {
                tab.setSelected(true);
                return tab;
            }
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Tab.java and 1 other location - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/Tab.java on lines 190..194

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

            if (!"both".equals(rw) && !"save".equals(rw)) { //load only, skip
                if (BinderUtil.hasContext() && BinderUtil.getContext().isIgnoreAccessCreationWarn()) {
                    return;
                }
                _log.warn(MiscUtil.formatLocationMessage(
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java and 1 other location - About 40 mins to fix
zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 1325..1333

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

    public int getColumnIndex() {
        int j = 0;
        for (Iterator it = getParent().getChildren().iterator(); it.hasNext(); ++j)
            if (it.next() == this)
                break;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Listcell.java and 6 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Footer.java on lines 57..63
zul/src/main/java/org/zkoss/zul/Listfooter.java on lines 58..64
zul/src/main/java/org/zkoss/zul/Listheader.java on lines 379..385
zul/src/main/java/org/zkoss/zul/Treecell.java on lines 77..83
zul/src/main/java/org/zkoss/zul/Treecol.java on lines 333..339
zul/src/main/java/org/zkoss/zul/Treefooter.java on lines 58..64

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

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

    public int getColumnIndex() {
        int j = 0;
        for (Iterator it = getParent().getChildren().iterator(); it.hasNext(); ++j)
            if (it.next() == this)
                break;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Treecell.java and 6 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Footer.java on lines 57..63
zul/src/main/java/org/zkoss/zul/Listcell.java on lines 86..92
zul/src/main/java/org/zkoss/zul/Listfooter.java on lines 58..64
zul/src/main/java/org/zkoss/zul/Listheader.java on lines 379..385
zul/src/main/java/org/zkoss/zul/Treecol.java on lines 333..339
zul/src/main/java/org/zkoss/zul/Treefooter.java on lines 58..64

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

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

    public int getColumnIndex() {
        int j = 0;
        for (Iterator it = getParent().getChildren().iterator(); it.hasNext(); ++j)
            if (it.next() == this)
                break;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Treefooter.java and 6 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Footer.java on lines 57..63
zul/src/main/java/org/zkoss/zul/Listcell.java on lines 86..92
zul/src/main/java/org/zkoss/zul/Listfooter.java on lines 58..64
zul/src/main/java/org/zkoss/zul/Listheader.java on lines 379..385
zul/src/main/java/org/zkoss/zul/Treecell.java on lines 77..83
zul/src/main/java/org/zkoss/zul/Treecol.java on lines 333..339

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

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

    public int getColumnIndex() {
        int j = 0;
        for (Iterator it = getParent().getChildren().iterator(); it.hasNext(); ++j)
            if (it.next() == this)
                break;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Listfooter.java and 6 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Footer.java on lines 57..63
zul/src/main/java/org/zkoss/zul/Listcell.java on lines 86..92
zul/src/main/java/org/zkoss/zul/Listheader.java on lines 379..385
zul/src/main/java/org/zkoss/zul/Treecell.java on lines 77..83
zul/src/main/java/org/zkoss/zul/Treecol.java on lines 333..339
zul/src/main/java/org/zkoss/zul/Treefooter.java on lines 58..64

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

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

    public int getColumnIndex() {
        int j = 0;
        for (Iterator it = getParent().getChildren().iterator(); it.hasNext(); ++j)
            if (it.next() == this)
                break;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Footer.java and 6 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Listcell.java on lines 86..92
zul/src/main/java/org/zkoss/zul/Listfooter.java on lines 58..64
zul/src/main/java/org/zkoss/zul/Listheader.java on lines 379..385
zul/src/main/java/org/zkoss/zul/Treecell.java on lines 77..83
zul/src/main/java/org/zkoss/zul/Treecol.java on lines 333..339
zul/src/main/java/org/zkoss/zul/Treefooter.java on lines 58..64

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

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

    public int getColumnIndex() {
        int j = 0;
        for (Iterator it = getParent().getChildren().iterator(); it.hasNext(); ++j)
            if (it.next() == this)
                break;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Treecol.java and 6 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Footer.java on lines 57..63
zul/src/main/java/org/zkoss/zul/Listcell.java on lines 86..92
zul/src/main/java/org/zkoss/zul/Listfooter.java on lines 58..64
zul/src/main/java/org/zkoss/zul/Listheader.java on lines 379..385
zul/src/main/java/org/zkoss/zul/Treecell.java on lines 77..83
zul/src/main/java/org/zkoss/zul/Treefooter.java on lines 58..64

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

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

    public int getColumnIndex() {
        int j = 0;
        for (Iterator it = getParent().getChildren().iterator(); it.hasNext(); ++j)
            if (it.next() == this)
                break;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Listheader.java and 6 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Footer.java on lines 57..63
zul/src/main/java/org/zkoss/zul/Listcell.java on lines 86..92
zul/src/main/java/org/zkoss/zul/Listfooter.java on lines 58..64
zul/src/main/java/org/zkoss/zul/Treecell.java on lines 77..83
zul/src/main/java/org/zkoss/zul/Treecol.java on lines 333..339
zul/src/main/java/org/zkoss/zul/Treefooter.java on lines 58..64

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

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

  private boolean jj_3R_68() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_scan_token(49)) {
    jj_scanpos = xsp;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 9 other locations - About 35 mins to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2088..2096
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2144..2152
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2544..2552
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2721..2729
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2731..2739
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2741..2749
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2767..2775
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2800..2808
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2820..2828

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

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

  private boolean jj_3R_53() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_scan_token(27)) {
    jj_scanpos = xsp;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 9 other locations - About 35 mins to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2088..2096
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2144..2152
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2544..2552
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2559..2567
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2721..2729
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2731..2739
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2741..2749
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2800..2808
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2820..2828

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

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

  private boolean jj_3R_35() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_scan_token(41)) {
    jj_scanpos = xsp;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 9 other locations - About 35 mins to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2088..2096
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2544..2552
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2559..2567
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2721..2729
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2731..2739
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2741..2749
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2767..2775
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2800..2808
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2820..2828

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

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

  private boolean jj_3R_49() {
    Token xsp;
    xsp = jj_scanpos;
    if (jj_scan_token(33)) {
    jj_scanpos = xsp;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 9 other locations - About 35 mins to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2088..2096
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2144..2152
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2544..2552
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2559..2567
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2721..2729
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2731..2739
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2741..2749
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2767..2775
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2800..2808

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

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

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

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

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

Refactorings

Further Reading

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

    @Init
    public void init() {
        loadCurrentItem();
        bunchTags = new ArrayList<Tag>(3);
        bunchTags.add(new Tag("addAll1"));
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithSet.java on lines 55..62
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 31..38
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 36..43

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

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