Showing 2,934 of 7,758 total issues

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

        for (int j = 0; j < len && !_opens.isEmpty(); ++j) {
            final Path path = new Path(paths[j]);
            if (_opens.remove(path)) {
                found = true;
                fireOpenChanged(path.path);
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/AbstractTreeModel.java and 1 other location - About 30 mins to fix
zul/src/main/java/org/zkoss/zul/AbstractTreeModel.java on lines 452..458

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

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 boolean addToSelection(E child) {
        final int[] path = getPath(child);
        if (path != null && path.length > 0)
            return addSelectionPath(path);
        return false;
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/AbstractTreeModel.java and 1 other location - About 30 mins to fix
zul/src/main/java/org/zkoss/zul/AbstractTreeModel.java on lines 636..641

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

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 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/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
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/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 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/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 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 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 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 Cell clone = (Cell) super.clone();
        if (_auxinf != null)
            clone._auxinf = (AuxInfo) _auxinf.clone();
        return clone;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Cell.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/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/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 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 11 locations. Consider refactoring.
Open

    public Object clone() {
        final Menuitem clone = (Menuitem) super.clone();
        if (_auxinf != null)
            clone._auxinf = (AuxInfo) _auxinf.clone();
        return clone;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Menuitem.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/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/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 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 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 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 Treecell clone = (Treecell) super.clone();
        if (_auxinf != null)
            clone._auxinf = (AuxInfo) _auxinf.clone();
        return clone;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Treecell.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/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 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

Severity
Category
Status
Source
Language