Showing 2,934 of 7,758 total issues

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

    public void setMultiline(boolean multiline) {
        if ((_auxinf != null && _auxinf.multiline) != multiline) {
            initAuxInfoForTextbox().multiline = multiline;
            smartUpdate("multiline", isMultiline());
        }
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 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 CHAR_TYPE = new Type(CHAR, null, ('C' << 24)
            | (0 << 16) | (6 << 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 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 10 locations. Consider refactoring.
Open

    public void setDisabled(boolean disabled) {
        if ((_auxinf != null && _auxinf.disabled) != disabled) {
            initAuxInfoForButton().disabled = disabled;
            smartUpdate("disabled", isDisabled());
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Button.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/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 10 locations. Consider refactoring.
Open

    public void setTabbable(boolean tabbable) {
        if ((_auxinf != null && _auxinf.tabbable) != tabbable) {
            initAuxInfoForTextbox().tabbable = tabbable;
            smartUpdate("tabbable", isTabbable());
        }
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 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 BYTE_TYPE = new Type(BYTE, null, ('B' << 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 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 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

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/GridDataLoader.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/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

    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/Comboitem.java and 2 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Listitem.java on lines 398..407
zul/src/main/java/org/zkoss/zul/Row.java on lines 345..354

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/Listitem.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/Row.java on lines 345..354

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 296..299

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 DOUBLE_TYPE = new Type(DOUBLE, null, ('D' << 24)
            | (3 << 16) | (3 << 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 941..942

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

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

        private static final Type INT_TYPE = new Type(INT, null, ('I' << 24)
            | (0 << 16) | (0 << 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 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 7 locations. Consider refactoring.
Open

    public void setRightColumns(int rightColumns) {
        if (rightColumns < 0)
            throw new WrongValueException("Positive only");
        if (_rightColumns != rightColumns) {
            _rightColumns = rightColumns;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Frozen.java and 6 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Auxheader.java on lines 55..62
zul/src/main/java/org/zkoss/zul/Auxheader.java on lines 74..81
zul/src/main/java/org/zkoss/zul/Frozen.java on lines 49..56
zul/src/main/java/org/zkoss/zul/Frozen.java on lines 70..77
zul/src/main/java/org/zkoss/zul/Slider.java on lines 476..483
zul/src/main/java/org/zkoss/zul/Slider.java on lines 504..511

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

    public void setStrokeWidth(double strokeWidth) {
        if (strokeWidth <= 0)
            throw new WrongValueException("The value of strokeWidth should be larger than 0");
        if (_strokeWidth != strokeWidth) {
            _strokeWidth = strokeWidth;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Slider.java and 6 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Auxheader.java on lines 55..62
zul/src/main/java/org/zkoss/zul/Auxheader.java on lines 74..81
zul/src/main/java/org/zkoss/zul/Frozen.java on lines 49..56
zul/src/main/java/org/zkoss/zul/Frozen.java on lines 70..77
zul/src/main/java/org/zkoss/zul/Frozen.java on lines 123..130
zul/src/main/java/org/zkoss/zul/Slider.java on lines 504..511

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

    public void setRowspan(int rowspan) throws WrongValueException {
        if (rowspan <= 0)
            throw new WrongValueException("Positive only");
        if (_rowspan != rowspan) {
            _rowspan = rowspan;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Auxheader.java and 6 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Auxheader.java on lines 55..62
zul/src/main/java/org/zkoss/zul/Frozen.java on lines 49..56
zul/src/main/java/org/zkoss/zul/Frozen.java on lines 70..77
zul/src/main/java/org/zkoss/zul/Frozen.java on lines 123..130
zul/src/main/java/org/zkoss/zul/Slider.java on lines 476..483
zul/src/main/java/org/zkoss/zul/Slider.java on lines 504..511

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

    public void setScaleInput(double scaleInput) {
        if (_scaleInput <= 0)
            throw new WrongValueException("The value of scaleInput should be larger than 0");
        if (_scaleInput != scaleInput) {
            _scaleInput = scaleInput;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Slider.java and 6 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Auxheader.java on lines 55..62
zul/src/main/java/org/zkoss/zul/Auxheader.java on lines 74..81
zul/src/main/java/org/zkoss/zul/Frozen.java on lines 49..56
zul/src/main/java/org/zkoss/zul/Frozen.java on lines 70..77
zul/src/main/java/org/zkoss/zul/Frozen.java on lines 123..130
zul/src/main/java/org/zkoss/zul/Slider.java on lines 476..483

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

    public void setColumns(int columns) {
        if (columns < 0)
            throw new WrongValueException("Positive only");
        if (_columns != columns) {
            _columns = columns;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Frozen.java and 6 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Auxheader.java on lines 55..62
zul/src/main/java/org/zkoss/zul/Auxheader.java on lines 74..81
zul/src/main/java/org/zkoss/zul/Frozen.java on lines 49..56
zul/src/main/java/org/zkoss/zul/Frozen.java on lines 123..130
zul/src/main/java/org/zkoss/zul/Slider.java on lines 476..483
zul/src/main/java/org/zkoss/zul/Slider.java on lines 504..511

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

    public void setColspan(int colspan) throws WrongValueException {
        if (colspan <= 0)
            throw new WrongValueException("Positive only");
        if (_colspan != colspan) {
            _colspan = colspan;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Auxheader.java and 6 other locations - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Auxheader.java on lines 74..81
zul/src/main/java/org/zkoss/zul/Frozen.java on lines 49..56
zul/src/main/java/org/zkoss/zul/Frozen.java on lines 70..77
zul/src/main/java/org/zkoss/zul/Frozen.java on lines 123..130
zul/src/main/java/org/zkoss/zul/Slider.java on lines 476..483
zul/src/main/java/org/zkoss/zul/Slider.java on lines 504..511

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

            if (initAuxInfo().annots == null) {
                _auxinf.annots = annots;
                _auxinf.annotsShared = true;
            } else {
                _auxinf.annots.addAll(annots);
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.java and 1 other location - About 35 mins to fix
zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.java on lines 2737..2742

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

            if (_model != null && paging) {
                prevSeldItems = null;
                unselectedItems = null;
            } else {
                unselectedItems = collectUnselectedObjects(realPrevSeldItems, curSeldItems);
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Tree.java and 1 other location - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 3790..3795

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