Showing 2,934 of 7,758 total issues

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

  private boolean jj_2_1(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_1(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(0, xla); }
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 7 other locations - About 40 mins to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2039..2044
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2046..2051
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2053..2058
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2060..2065
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2067..2072
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2074..2079
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2081..2086

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

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

    public void setContext(String context) {
        if (!Objects.equals(_auxinf != null ? _auxinf.context : null, context)) {
            initAuxInfo().context = new DeferedUuid(context);
            smartUpdate("context", _auxinf.context);
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/impl/XulElement.java and 5 other locations - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 189..194
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 267..272
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 282..287
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 365..371
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 381..387

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

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

        private void doCatch(Throwable ex) {
            if (_ctrled) {
                try {
                    ((RendererCtrl) _renderer).doCatch(ex);
                } catch (Throwable t) {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Radiogroup.java and 4 other locations - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/Combobox.java on lines 660..670
zul/src/main/java/org/zkoss/zul/Grid.java on lines 1224..1234
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 2798..2808
zul/src/main/java/org/zkoss/zul/Tree.java on lines 2394..2404

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

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

        private void doCatch(Throwable ex) {
            if (_ctrled) {
                try {
                    ((RendererCtrl) _renderer).doCatch(ex);
                } catch (Throwable t) {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Tree.java and 4 other locations - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/Combobox.java on lines 660..670
zul/src/main/java/org/zkoss/zul/Grid.java on lines 1224..1234
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 2798..2808
zul/src/main/java/org/zkoss/zul/Radiogroup.java on lines 712..722

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

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

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

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

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

Refactorings

Further Reading

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

  private boolean jj_2_2(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_2(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(1, xla); }
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 7 other locations - About 40 mins to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2032..2037
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2046..2051
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2053..2058
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2060..2065
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2067..2072
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2074..2079
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2081..2086

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

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

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

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

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

Refactorings

Further Reading

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

  private boolean jj_2_5(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_5(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(4, xla); }
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 7 other locations - About 40 mins to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2032..2037
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2039..2044
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2046..2051
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2053..2058
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2067..2072
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2074..2079
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2081..2086

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

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

        if (Float.TYPE == type || Float.class.equals(type)) {
            try {
                return Float.valueOf(val);
            } catch (NumberFormatException nfe) {
                throw new ELException(MessageFactory.get("error.convert",
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 5 other locations - About 40 mins to fix
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 427..434
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 435..442
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 443..450
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 467..474
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 475..482

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

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

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

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

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

Refactorings

Further Reading

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

  private boolean jj_2_7(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_7(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(6, xla); }
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 7 other locations - About 40 mins to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2032..2037
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2039..2044
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2046..2051
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2053..2058
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2060..2065
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2067..2072
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2081..2086

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

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

    public void setContext(Popup popup) {
        if (!Objects.equals(_auxinf != null ? _auxinf.context : null, popup)) {
            initAuxInfo().context = new DeferedUuid(popup);
            smartUpdate("context", _auxinf.context);
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/impl/XulElement.java and 5 other locations - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 173..178
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 267..272
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 282..287
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 365..371
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 381..387

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

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

    public void setPopup(String popup) {
        if (!Objects.equals(_auxinf != null ? _auxinf.popup : null, popup)) {
            initAuxInfo().popup = new DeferedUuid(popup);
            smartUpdate("popup", _auxinf.popup);
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/impl/XulElement.java and 5 other locations - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 173..178
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 189..194
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 282..287
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 365..371
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 381..387

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

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

    public void setTooltip(Popup popup) {
        // ZK-816, component keep wrong tooltip reference if set tooltip before tooltip attached
        if (!Objects.equals(_auxinf != null ? _auxinf.tooltip : null, popup)) {
            initAuxInfo().tooltip = new DeferedUuid(popup);
            smartUpdate("tooltip", _auxinf.tooltip);
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/impl/XulElement.java and 5 other locations - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 173..178
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 189..194
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 267..272
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 282..287
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 365..371

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

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

    public void setPopup(Popup popup) {
        if (!Objects.equals(_auxinf != null ? _auxinf.popup : null, popup)) {
            initAuxInfo().popup = new DeferedUuid(popup);
            smartUpdate("popup", _auxinf.popup);
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/impl/XulElement.java and 5 other locations - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 173..178
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 189..194
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 267..272
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 365..371
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 381..387

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

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

    public void setTooltip(String tooltip) {
        // ZK-816
        if (!Objects.equals(_auxinf != null ? _auxinf.tooltip : null, tooltip)) {
            initAuxInfo().tooltip = new DeferedUuid(tooltip);
            smartUpdate("tooltip", _auxinf.tooltip);
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/impl/XulElement.java and 5 other locations - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 173..178
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 189..194
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 267..272
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 282..287
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 381..387

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

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 Yytoken.TYPE_RIGHT_SQUARE:
                        if(valueStack.size()>1){
                            statusStack.removeFirst();
                            valueStack.removeFirst();
                            status=peekStatus(statusStack);
Severity: Minor
Found in zcommon/src/main/java/org/zkoss/json/parser/JSONParser.java and 1 other location - About 40 mins to fix
zcommon/src/main/java/org/zkoss/json/parser/JSONParser.java on lines 164..173

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

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

                    _groupsInfo.add(idx, new int[] { index, size, size > 1 && prev[2] >= index ? prev[2] + 1 : -1 });
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Rows.java and 1 other location - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 2183..2183

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

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

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

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

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

Refactorings

Further Reading

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

            } else {
                ++retained;
                if (begin >= 0) {
                    fireEvent(ListDataEvent.INTERVAL_REMOVED, begin, index - 1);
                    index = begin; //this range removed, the index is reset to begin
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/ListModelSet.java and 1 other location - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/ListModelMap.java on lines 462..469

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

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

    private Object handleCase(Object c) {
        if (_igcase) {
            if (c instanceof String)
                return ((String) c).toUpperCase();
            if (c instanceof Character)
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/ListitemComparator.java and 1 other location - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/TreeitemComparator.java on lines 263..271

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

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

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

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

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

Refactorings

Further Reading

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

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

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

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

                    _groupsInfo.add(idx, new int[] { index, size, size > 1 && prev[2] >= index ? prev[2] + 1 : -1 });
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/Rows.java on lines 451..451

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

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 (paging && (!isCheckmarkDeselectOther() || (isCheckmarkDeselectOther() && selectAll))) {
                // use toArray() to prevent java.util.ConcurrentModificationException
                for (Object item : realPrevSeldItems.toArray()) {
                    int index = ((Treeitem) item).getIndex();
                    if (index >= to || index < from)
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Tree.java and 1 other location - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 3680..3687

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

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