Showing 2,934 of 7,758 total issues

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

    public void setDisabled(boolean disabled) {
        if ((_auxinf != null && _auxinf.disabled) != disabled) {
            initAuxInfoForA().disabled = disabled;
            smartUpdate("disabled", isDisabled());
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/A.java and 9 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Button.java on lines 64..69
zul/src/main/java/org/zkoss/zul/Label.java on lines 95..100
zul/src/main/java/org/zkoss/zul/Label.java on lines 120..125
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 71..76
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 86..91
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 192..197
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 152..157
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 175..180
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 199..204

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

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

        private static final Type BOOLEAN_TYPE = new Type(BOOLEAN, null, ('Z' << 24)
            | (0 << 16) | (5 << 8) | 1, 1);
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 899..900
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 911..912
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 917..918
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 923..924
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 929..930
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 935..936
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 941..942
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 947..948

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

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

        private static final Type FLOAT_TYPE = new Type(FLOAT, null, ('F' << 24)
            | (2 << 16) | (2 << 8) | 1, 1);
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 899..900
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 905..906
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 911..912
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 917..918
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 923..924
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 929..930
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 941..942
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 947..948

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

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

        } else if (cmd.equals(Events.ON_ANCHOR_POS)) {
            final Map<String, Object> data = request.getData();
            _anchorTop = AuRequests.getInt(data, "top", 0);
            _anchorLeft = AuRequests.getInt(data, "left", 0);
        } else if (cmd.equals(Events.ON_CHECK_SELECT_ALL) && isSelModel) {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Tree.java and 4 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Grid.java on lines 1848..1852
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 3633..3637
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 3629..3633
zul/src/main/java/org/zkoss/zul/Tree.java on lines 2974..2978

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

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

    public void setSubmitByEnter(boolean submitByEnter) {
        if ((_auxinf != null && _auxinf.submitByEnter) != submitByEnter) {
            initAuxInfoForTextbox().submitByEnter = submitByEnter;
            smartUpdate("submitByEnter", isSubmitByEnter());
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Textbox.java and 9 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/A.java on lines 59..64
zul/src/main/java/org/zkoss/zul/Button.java on lines 64..69
zul/src/main/java/org/zkoss/zul/Label.java on lines 95..100
zul/src/main/java/org/zkoss/zul/Label.java on lines 120..125
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 71..76
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 86..91
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 192..197
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 152..157
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 175..180

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

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

        private static final Type VOID_TYPE = new Type(VOID, null, ('V' << 24)
            | (5 << 16) | (0 << 8) | 0, 1);
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 905..906
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 911..912
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 917..918
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 923..924
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 929..930
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 935..936
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 941..942
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 947..948

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

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

        private static final Type SHORT_TYPE = new Type(SHORT, null, ('S' << 24)
            | (0 << 16) | (7 << 8) | 1, 1);
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 899..900
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 905..906
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 911..912
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 917..918
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 929..930
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 935..936
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 941..942
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 947..948

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

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

    private synchronized void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
        s.defaultWriteObject();

        if (_value instanceof Serializable) {
            s.writeBoolean(true);
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Row.java and 2 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Comboitem.java on lines 227..236
zul/src/main/java/org/zkoss/zul/Listitem.java on lines 398..407

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

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

    public void setCheckmark(boolean checkmark) {
        if ((_auxinf != null && _auxinf.checkmark) != checkmark) {
            initAuxInfoForMenuitem().checkmark = checkmark;
            smartUpdate("checkmark", isCheckmark());
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Menuitem.java and 9 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/A.java on lines 59..64
zul/src/main/java/org/zkoss/zul/Button.java on lines 64..69
zul/src/main/java/org/zkoss/zul/Label.java on lines 95..100
zul/src/main/java/org/zkoss/zul/Label.java on lines 120..125
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 86..91
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 192..197
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 152..157
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 175..180
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 199..204

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

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

        if (_model instanceof PageableModel && _pgListener != null) {
            ((PageableModel) _model).removePagingEventListener((PagingListener) _pgListener);
            ((PageableModel) _model).addPagingEventListener((PagingListener) _pgListener);
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Grid.java and 3 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 3080..3083
zul/src/main/java/org/zkoss/zul/Tree.java on lines 296..299
zul/src/main/java/org/zkoss/zul/Tree.java on lines 2032..2035

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

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

                        if (min >= 0)
                            max = min + cnt - 1;
                        else if (max < 0)
                            max = cnt - 1; //0 ~ cnt - 1
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Combobox.java and 2 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/impl/GridDataLoader.java on lines 153..156
zul/src/main/java/org/zkoss/zul/impl/ListboxDataLoader.java on lines 158..161

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

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

            if (min >= 0)
                max = min + cnt - 1;
            else if (max < 0)
                max = cnt - 1; //0 ~ cnt - 1            
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/impl/ListboxDataLoader.java and 2 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Combobox.java on lines 320..323
zul/src/main/java/org/zkoss/zul/impl/GridDataLoader.java on lines 153..156

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

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

    public void setMultiline(boolean multiline) {
        if ((_auxinf != null && _auxinf.multiline) != multiline) {
            initAuxInfoForLabel().multiline = multiline;
            smartUpdate("multiline", isMultiline());
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Label.java and 9 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/A.java on lines 59..64
zul/src/main/java/org/zkoss/zul/Button.java on lines 64..69
zul/src/main/java/org/zkoss/zul/Label.java on lines 120..125
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 71..76
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 86..91
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 192..197
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 152..157
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 175..180
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 199..204

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

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

        } else if (cmd.equals(Events.ON_ANCHOR_POS)) {
            final Map<String, Object> data = request.getData();
            _anchorTop = AuRequests.getInt(data, "top", 0);
            _anchorLeft = AuRequests.getInt(data, "left", 0);
        } else if (cmd.equals(Events.ON_TOP_PAD)) {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Listbox.java and 4 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Grid.java on lines 1848..1852
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 3629..3633
zul/src/main/java/org/zkoss/zul/Tree.java on lines 2978..2982
zul/src/main/java/org/zkoss/zul/Tree.java on lines 2974..2978

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

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

    public void setAutocheck(boolean autocheck) {
        if ((_auxinf != null && _auxinf.autocheck) != autocheck) {
            initAuxInfoForMenuitem().autocheck = autocheck;
            smartUpdate("autocheck", isAutocheck());
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Menuitem.java and 9 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/A.java on lines 59..64
zul/src/main/java/org/zkoss/zul/Button.java on lines 64..69
zul/src/main/java/org/zkoss/zul/Label.java on lines 95..100
zul/src/main/java/org/zkoss/zul/Label.java on lines 120..125
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 71..76
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 86..91
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 152..157
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 175..180
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 199..204

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

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

    public void setPre(boolean pre) {
        if ((_auxinf != null && _auxinf.pre) != pre) {
            initAuxInfoForLabel().pre = pre;
            smartUpdate("pre", isPre());
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Label.java and 9 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/A.java on lines 59..64
zul/src/main/java/org/zkoss/zul/Button.java on lines 64..69
zul/src/main/java/org/zkoss/zul/Label.java on lines 95..100
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 71..76
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 86..91
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 192..197
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 152..157
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 175..180
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 199..204

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

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

        private static final Type LONG_TYPE = new Type(LONG, null, ('J' << 24)
            | (1 << 16) | (1 << 8) | 2, 1);
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 899..900
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 905..906
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 911..912
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 917..918
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 923..924
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 929..930
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 935..936
zkbind/src/main/java/org/zkoss/bind/paranamer/BytecodeReadingParanamer.java on lines 947..948

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

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

        } else if (cmd.equals(Events.ON_SCROLL_POS)) {
            final Map<String, Object> data = request.getData();
            _currentTop = AuRequests.getInt(data, "top", 0);
            _currentLeft = AuRequests.getInt(data, "left", 0);
        } else if (cmd.equals(Events.ON_ANCHOR_POS)) {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Listbox.java and 4 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Grid.java on lines 1848..1852
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 3633..3637
zul/src/main/java/org/zkoss/zul/Tree.java on lines 2978..2982
zul/src/main/java/org/zkoss/zul/Tree.java on lines 2974..2978

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

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

        } else if (cmd.equals(Events.ON_SCROLL_POS)) {
            final Map<String, Object> data = request.getData();
            _currentTop = AuRequests.getInt(data, "top", 0);
            _currentLeft = AuRequests.getInt(data, "left", 0);
        } else if (cmd.equals(Events.ON_ANCHOR_POS)) {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Tree.java and 4 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Grid.java on lines 1848..1852
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 3633..3637
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 3629..3633
zul/src/main/java/org/zkoss/zul/Tree.java on lines 2978..2982

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

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

    public void setDisabled(boolean disabled) {
        if ((_auxinf != null && _auxinf.disabled) != disabled) {
            initAuxInfoForMenuitem().disabled = disabled;
            smartUpdate("disabled", isDisabled());
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Menuitem.java and 9 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/A.java on lines 59..64
zul/src/main/java/org/zkoss/zul/Button.java on lines 64..69
zul/src/main/java/org/zkoss/zul/Label.java on lines 95..100
zul/src/main/java/org/zkoss/zul/Label.java on lines 120..125
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 71..76
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 192..197
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 152..157
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 175..180
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 199..204

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

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