Showing 2,934 of 7,758 total issues

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

    public ELXelExpression100(ExpressionApi expr,
    String rawexpr, FunctionMapper mapper, Class expectedType) {
        if (expr == null)
            throw new IllegalArgumentException();
        _rawexpr = rawexpr;
Severity: Minor
Found in zcommon/src/main/java/org/zkoss/xel/el/ELXelExpression100.java and 1 other location - About 45 mins to fix
zul/src/main/java/org/zkoss/zul/event/ListDataEvent.java on lines 75..82

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

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 static void setShadowInfo(Component comp, ShadowInfo info) {
        final Map<Component, ShadowInfo> map = getShadowInfos(info != null);
        if (map != null)
            if (info != null)
                map.put(comp, info);
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/impl/Utils.java and 1 other location - About 45 mins to fix
zk/src/main/java/org/zkoss/zk/ui/impl/Utils.java on lines 128..135

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

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 static void setComponentInfo(Component comp, ComponentInfo info) {
        final Map<Component, ComponentInfo> map = getComponentInfos(info != null);
        if (map != null)
            if (info != null)
                map.put(comp, info);
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/impl/Utils.java and 1 other location - About 45 mins to fix
zk/src/main/java/org/zkoss/zk/ui/impl/Utils.java on lines 168..175

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

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 beforeChildAdded(Component newChild, Component refChild) {
        if (!(newChild instanceof Popup))
            throw new UiException("Unsupported child for Combobutton: " + newChild);
        if (getFirstChild() != null)
            throw new UiException("At most one popup is allowed, " + this);
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Combobutton.java and 1 other location - About 45 mins to fix
zul/src/main/java/org/zkoss/zul/Bandbox.java on lines 222..228

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

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

/* FunctionDefinition.java

    Purpose:
        
    Description:
zktest/src/main/java/org/zkoss/zktest/test2/B86_ZK_4017MyItem.java on lines 1..27

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

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

/* B86_ZK_4017MyItem.java

    Purpose:
        
    Description:
zcommon/src/main/java/org/zkoss/xel/taglib/FunctionDefinition.java on lines 1..36

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

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 ListDataEvent(ListModel model, int type, int index0, int index1) {
        if (model == null)
            throw new IllegalArgumentException();
        _model = model;
        _type = type;
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/event/ListDataEvent.java and 1 other location - About 45 mins to fix
zcommon/src/main/java/org/zkoss/xel/el/ELXelExpression100.java on lines 38..46

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

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 beforeChildAdded(Component newChild, Component refChild) {
        if (!(newChild instanceof Bandpopup))
            throw new UiException("Unsupported child for Bandbox: " + newChild);
        if (getFirstChild() != null)
            throw new UiException("At most one bandpopup is allowed, " + this);
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Bandbox.java and 1 other location - About 45 mins to fix
zul/src/main/java/org/zkoss/zul/Combobutton.java on lines 153..159

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

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 (Short.TYPE == type || Short.class.equals(type)) {
            try {
                return Short.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 483..490

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 (Double.TYPE == type || Double.class.equals(type)) {
            try {
                return Double.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 467..474
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 475..482
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 483..490

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 (Integer.TYPE == type || Integer.class.equals(type)) {
            try {
                return Integer.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 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
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 483..490

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 (Byte.TYPE == type || Byte.class.equals(type)) {
            try {
                return Byte.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 475..482
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 483..490

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 (Long.TYPE == type || Long.class.equals(type)) {
            try {
                return Long.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 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
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 483..490

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

        /*package*/ 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/Grid.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/Listbox.java on lines 2798..2808
zul/src/main/java/org/zkoss/zul/Radiogroup.java on lines 712..722
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

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

  private boolean jj_2_4(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_4(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(3, 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 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_6(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_6(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(5, 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 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 5 locations. Consider refactoring.
Open

        /* package */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/Listbox.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/Radiogroup.java on lines 712..722
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

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

  private boolean jj_2_8(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_8(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(7, 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 2074..2079

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_3(int xla) {
    jj_la = xla; jj_lastpos = jj_scanpos = token;
    try { return !jj_3_3(); }
    catch(LookaheadSuccess ls) { return true; }
    finally { jj_save(2, 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 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

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/Combobox.java and 4 other locations - About 40 mins to fix
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
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

Severity
Category
Status
Source
Language