Showing 7,775 of 7,775 total issues

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

    public Object clone() {
        final XulElement clone = (XulElement) super.clone();
        if (_auxinf != null)
            clone._auxinf = (AuxInfo) _auxinf.clone();
        return clone;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/impl/XulElement.java and 10 other locations - About 30 mins to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 1057..1062
zul/src/main/java/org/zkoss/zul/Button.java on lines 282..287
zul/src/main/java/org/zkoss/zul/Cell.java on lines 112..117
zul/src/main/java/org/zkoss/zul/Label.java on lines 188..193
zul/src/main/java/org/zkoss/zul/Listcell.java on lines 60..65
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 278..283
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 223..228
zul/src/main/java/org/zkoss/zul/Treecell.java on lines 125..130
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 1114..1119
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 503..508

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

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

    public Object clone() {
        final LabelImageElement clone = (LabelImageElement) super.clone();
        if (_auxinf != null)
            clone._auxinf = (AuxInfo) _auxinf.clone();
        return clone;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java and 10 other locations - About 30 mins to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 1057..1062
zul/src/main/java/org/zkoss/zul/Button.java on lines 282..287
zul/src/main/java/org/zkoss/zul/Cell.java on lines 112..117
zul/src/main/java/org/zkoss/zul/Label.java on lines 188..193
zul/src/main/java/org/zkoss/zul/Listcell.java on lines 60..65
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 278..283
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 223..228
zul/src/main/java/org/zkoss/zul/Treecell.java on lines 125..130
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 1114..1119
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 485..490

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 41.

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

    public class FoodComparator implements Comparator, Serializable {
        
        public int compare(Object o1, Object o2) {
            Food data = (Food) o1;
            Food data2 = (Food) o2;
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModel.java on lines 123..131
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListboxMultiple.java on lines 159..167
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModel.java on lines 113..121
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListbox.java on lines 136..144
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListboxMultiple.java on lines 149..157
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2534Group.java on lines 176..184

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

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

    public Object clone() {
        final Listcell clone = (Listcell) super.clone();
        if (_auxinf != null)
            clone._auxinf = (AuxInfo) _auxinf.clone();
        return clone;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Listcell.java and 10 other locations - About 30 mins to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 1057..1062
zul/src/main/java/org/zkoss/zul/Button.java on lines 282..287
zul/src/main/java/org/zkoss/zul/Cell.java on lines 112..117
zul/src/main/java/org/zkoss/zul/Label.java on lines 188..193
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 278..283
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 223..228
zul/src/main/java/org/zkoss/zul/Treecell.java on lines 125..130
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 1114..1119
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 503..508
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 485..490

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 41.

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

    public Object clone() {
        final InputElement clone = (InputElement) super.clone();
        if (_auxinf != null)
            clone._auxinf = (AuxInfo) _auxinf.clone();
        return clone;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/impl/InputElement.java and 10 other locations - About 30 mins to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 1057..1062
zul/src/main/java/org/zkoss/zul/Button.java on lines 282..287
zul/src/main/java/org/zkoss/zul/Cell.java on lines 112..117
zul/src/main/java/org/zkoss/zul/Label.java on lines 188..193
zul/src/main/java/org/zkoss/zul/Listcell.java on lines 60..65
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 278..283
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 223..228
zul/src/main/java/org/zkoss/zul/Treecell.java on lines 125..130
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 503..508
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 485..490

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 41.

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

    public class FoodComparator implements Comparator, Serializable {

        public int compare(Object o1, Object o2) {
            Food data = (Food) o1;
            Food data2 = (Food) o2;
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModel.java on lines 123..131
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListbox.java on lines 146..154
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListboxMultiple.java on lines 159..167
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModel.java on lines 113..121
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListbox.java on lines 136..144
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListboxMultiple.java on lines 149..157

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

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

    public Object clone() {
        final HtmlBasedComponent clone = (HtmlBasedComponent) super.clone();
        if (_auxinf != null)
            clone._auxinf = (AuxInfo) _auxinf.clone();
        return clone;
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java and 10 other locations - About 30 mins to fix
zul/src/main/java/org/zkoss/zul/Button.java on lines 282..287
zul/src/main/java/org/zkoss/zul/Cell.java on lines 112..117
zul/src/main/java/org/zkoss/zul/Label.java on lines 188..193
zul/src/main/java/org/zkoss/zul/Listcell.java on lines 60..65
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 278..283
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 223..228
zul/src/main/java/org/zkoss/zul/Treecell.java on lines 125..130
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 1114..1119
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 503..508
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 485..490

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 41.

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

    public class FoodComparator implements Comparator, Serializable {
        
        public int compare(Object o1, Object o2) {
            Food data = (Food) o1;
            Food data2 = (Food) o2;
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModel.java on lines 123..131
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListbox.java on lines 146..154
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListboxMultiple.java on lines 159..167
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModel.java on lines 113..121
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListbox.java on lines 136..144
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2534Group.java on lines 176..184

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

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

    public class FoodComparator implements Comparator, Serializable {
        
        public int compare(Object o1, Object o2) {
            Food data = (Food) o1;
            Food data2 = (Food) o2;
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModel.java on lines 123..131
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListbox.java on lines 146..154
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListboxMultiple.java on lines 159..167
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListbox.java on lines 136..144
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListboxMultiple.java on lines 149..157
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2534Group.java on lines 176..184

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

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

    public Object clone() {
        final Button clone = (Button) super.clone();
        if (_auxinf != null)
            clone._auxinf = (AuxInfo) _auxinf.clone();
        return clone;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Button.java and 10 other locations - About 30 mins to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 1057..1062
zul/src/main/java/org/zkoss/zul/Cell.java on lines 112..117
zul/src/main/java/org/zkoss/zul/Label.java on lines 188..193
zul/src/main/java/org/zkoss/zul/Listcell.java on lines 60..65
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 278..283
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 223..228
zul/src/main/java/org/zkoss/zul/Treecell.java on lines 125..130
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 1114..1119
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 503..508
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 485..490

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 41.

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

    public Object clone() {
        final Textbox clone = (Textbox) super.clone();
        if (_auxinf != null)
            clone._auxinf = (AuxInfo) _auxinf.clone();
        return clone;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Textbox.java and 10 other locations - About 30 mins to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 1057..1062
zul/src/main/java/org/zkoss/zul/Button.java on lines 282..287
zul/src/main/java/org/zkoss/zul/Cell.java on lines 112..117
zul/src/main/java/org/zkoss/zul/Label.java on lines 188..193
zul/src/main/java/org/zkoss/zul/Listcell.java on lines 60..65
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 278..283
zul/src/main/java/org/zkoss/zul/Treecell.java on lines 125..130
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 1114..1119
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 503..508
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 485..490

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 41.

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

    public Object clone() {
        final Label clone = (Label) super.clone();
        if (_auxinf != null)
            clone._auxinf = (AuxInfo) _auxinf.clone();
        return clone;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Label.java and 10 other locations - About 30 mins to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 1057..1062
zul/src/main/java/org/zkoss/zul/Button.java on lines 282..287
zul/src/main/java/org/zkoss/zul/Cell.java on lines 112..117
zul/src/main/java/org/zkoss/zul/Listcell.java on lines 60..65
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 278..283
zul/src/main/java/org/zkoss/zul/Textbox.java on lines 223..228
zul/src/main/java/org/zkoss/zul/Treecell.java on lines 125..130
zul/src/main/java/org/zkoss/zul/impl/InputElement.java on lines 1114..1119
zul/src/main/java/org/zkoss/zul/impl/LabelImageElement.java on lines 503..508
zul/src/main/java/org/zkoss/zul/impl/XulElement.java on lines 485..490

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 41.

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

    public Tree getTree() {
        for (Component p = this; (p = p.getParent()) != null;)
            if (p instanceof Tree)
                return (Tree) p;
        return null;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Treerow.java and 3 other locations - About 30 mins to fix
zul/src/main/java/org/zkoss/zul/Treecell.java on lines 52..57
zul/src/main/java/org/zkoss/zul/Treechildren.java on lines 52..57
zul/src/main/java/org/zkoss/zul/Treeitem.java on lines 395..400

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

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

    private void replaceComponent(Component oc, Component nc) {
        Component parent = oc.getParent();
        Component ref = oc.getNextSibling();
        oc.detach();
        parent.insertBefore(nc, ref);
zktest/src/main/java/org/zkoss/zktest/bind/issue/F02545ChildrenBindingMapTestVM.java on lines 109..114
zktest/src/main/java/org/zkoss/zktest/bind/issue/F02545ChildrenBindingSupportListModelVM.java on lines 167..172
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3681_Validator_VM.java on lines 96..101

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

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

    private void replaceComponent (Component oc, Component nc) {
        Component parent = oc.getParent();
        Component ref = oc.getNextSibling();
        oc.detach();
        parent.insertBefore(nc, ref);
zktest/src/main/java/org/zkoss/zktest/bind/issue/F02545ChildrenBindingMapTestVM.java on lines 109..114
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3681_Validator_VM.java on lines 96..101
zktest/src/main/java/org/zkoss/zktest/zats/zuti/vm/ForEachListModelVM.java on lines 158..163

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

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

    private void replaceComponent (Component oc, Component nc) {
        Component parent = oc.getParent();
        Component ref = oc.getNextSibling();
        oc.detach();
        parent.insertBefore(nc, ref);
zktest/src/main/java/org/zkoss/zktest/bind/issue/F02545ChildrenBindingSupportListModelVM.java on lines 167..172
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3681_Validator_VM.java on lines 96..101
zktest/src/main/java/org/zkoss/zktest/zats/zuti/vm/ForEachListModelVM.java on lines 158..163

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

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 Set<B86_ZK_4017MyItem> getFilteredList() {
        final Set<B86_ZK_4017MyItem> itemsToShowAfterFilter = new HashSet<>(itemList);
        itemsToShowAfterFilter.removeIf(item -> (item.v3 % 8 == 0));
        return itemsToShowAfterFilter;
    }
zktest/src/main/java/org/zkoss/zktest/test2/B86_ZK_4017ListboxComposer.java on lines 62..66
zktest/src/main/java/org/zkoss/zktest/test2/B86_ZK_4020Composer.java on lines 86..90

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

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

    public Tree getTree() {
        for (Component n = this; (n = n.getParent()) != null;)
            if (n instanceof Tree)
                return (Tree) n;
        return null;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Treecell.java and 3 other locations - About 30 mins to fix
zul/src/main/java/org/zkoss/zul/Treechildren.java on lines 52..57
zul/src/main/java/org/zkoss/zul/Treeitem.java on lines 395..400
zul/src/main/java/org/zkoss/zul/Treerow.java on lines 41..46

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 41.

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

    private void replaceComponent(Component oc, Component nc) {
        Component parent = oc.getParent();
        Component ref = oc.getNextSibling();
        oc.detach();
        parent.insertBefore(nc, ref);
zktest/src/main/java/org/zkoss/zktest/bind/issue/F02545ChildrenBindingMapTestVM.java on lines 109..114
zktest/src/main/java/org/zkoss/zktest/bind/issue/F02545ChildrenBindingSupportListModelVM.java on lines 167..172
zktest/src/main/java/org/zkoss/zktest/zats/zuti/vm/ForEachListModelVM.java on lines 158..163

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

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

    public Tree getTree() {
        for (Component p = this; (p = p.getParent()) != null;)
            if (p instanceof Tree)
                return (Tree) p;
        return null;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Treeitem.java and 3 other locations - About 30 mins to fix
zul/src/main/java/org/zkoss/zul/Treecell.java on lines 52..57
zul/src/main/java/org/zkoss/zul/Treechildren.java on lines 52..57
zul/src/main/java/org/zkoss/zul/Treerow.java on lines 41..46

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 41.

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