Showing 7,775 of 7,775 total issues

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

    public FilterMap(Map<K, V> map, Filter<V> filter) {
        if (map == null || filter == null)
            throw new IllegalArgumentException("null");
        _map = map;
        _filter = filter;
Severity: Minor
Found in zcommon/src/main/java/org/zkoss/util/FilterMap.java and 1 other location - About 35 mins to fix
zweb/src/main/java/org/zkoss/web/servlet/Servlets.java on lines 278..283

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

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

    private int initRodSize() {
        int sz = Utils.getIntAttribute(this, "org.zkoss.zul.grid.initRodSize", INIT_LIMIT, true);
        if ((sz) < 0)
            throw new UiException("nonnegative is required: " + sz);
        return sz;
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Grid.java and 1 other location - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 3465..3470

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

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 final <T> int addAll(Collection<T> col, Iterator<? extends T> iter) {
        int cnt = 0;
        if (iter != null)
            for (; iter.hasNext(); ++cnt)
                col.add(iter.next());
Severity: Minor
Found in zcommon/src/main/java/org/zkoss/util/CollectionsX.java and 1 other location - About 35 mins to fix
zcommon/src/main/java/org/zkoss/util/CollectionsX.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 45.

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

    private int initRodSize() {
        int sz = Utils.getIntAttribute(this, "org.zkoss.zul.listbox.initRodSize", INIT_LIMIT, true);
        if ((sz) < 0)
            throw new UiException("nonnegative is required: " + sz);
        return sz;
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Listbox.java and 1 other location - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Grid.java on lines 1520..1525

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

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 class Person {
        String name;

        
        
zktest/src/main/java/org/zkoss/zktest/bind/comp/TabboxDynamicSelectionVM.java on lines 63..79

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

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

    static public class Item {
        String name;

        public Item(String name) {
            super();
zktest/src/main/java/org/zkoss/zktest/bind/basic/DeferInitVM.java on lines 196..214

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

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 B00604() {
        options = new ListModelList<Option>();
        options.add(new Option("A","X"));
        options.add(new Option("B","Y"));
        options.add(new Option("C","Z"));
Severity: Minor
Found in zktest/src/main/java/org/zkoss/zktest/bind/issue/B00604.java and 1 other location - About 35 mins to fix
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_2807_ViewModel.java on lines 29..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 45.

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 Groupfoot getGroupfoot() {
        int index = getGroupfootIndex();
        if (index < 0)
            return null;
        final Rows rows = (Rows) getParent();
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Group.java and 1 other location - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Listgroup.java on lines 147..153

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

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

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

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/Tree.java and 3 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Grid.java on lines 318..321
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 3080..3083
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 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/Listbox.java and 3 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Grid.java on lines 318..321
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 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_TOP_PAD)) {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Grid.java and 4 other locations - About 35 mins to fix
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
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 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

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

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

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

Severity
Category
Status
Source
Language