Showing 7,775 of 7,775 total issues

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

            case 't':
                css.top = jq.px(dims.top - dims.height);
                anima.top = jq.px(dims.top);
                break;
Severity: Major
Found in zk/src/main/resources/web/js/zk/anima.ts and 3 other locations - About 1 hr to fix
zk/src/main/resources/web/js/zk/anima.ts on lines 359..362
zk/src/main/resources/web/js/zk/anima.ts on lines 363..366
zk/src/main/resources/web/js/zk/anima.ts on lines 367..370

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

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

        slideOut(this: zk.Widget, n: HTMLElement, opts?: zk.SlideOptions): void {
            zk(n).slideOut(this, opts);
        }
Severity: Major
Found in zk/src/main/resources/web/js/zk/effect.ts and 3 other locations - About 1 hr to fix
zk/src/main/resources/web/js/zk/effect.ts on lines 435..437
zk/src/main/resources/web/js/zk/effect.ts on lines 446..448
zk/src/main/resources/web/js/zk/effect.ts on lines 457..459

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

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

        slideIn(this: zk.Widget, n: HTMLElement, opts?: zk.SlideOptions): void {
            zk(n).slideIn(this, opts);
        },
Severity: Major
Found in zk/src/main/resources/web/js/zk/effect.ts and 3 other locations - About 1 hr to fix
zk/src/main/resources/web/js/zk/effect.ts on lines 435..437
zk/src/main/resources/web/js/zk/effect.ts on lines 446..448
zk/src/main/resources/web/js/zk/effect.ts on lines 468..470

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

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

        slideUp(this: zk.Widget, n: HTMLElement, opts?: zk.SlideOptions): void {
            zk(n).slideUp(this, opts);
        },
Severity: Major
Found in zk/src/main/resources/web/js/zk/effect.ts and 3 other locations - About 1 hr to fix
zk/src/main/resources/web/js/zk/effect.ts on lines 435..437
zk/src/main/resources/web/js/zk/effect.ts on lines 457..459
zk/src/main/resources/web/js/zk/effect.ts on lines 468..470

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

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 static class Food {
        private String category;
        private String name;

        public Food(String category, String name) {
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListbox.java on lines 119..144
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListboxMultiple.java on lines 132..157
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListbox.java on lines 109..134
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01194NestedVMInit.java on lines 41..66
zktest/src/main/java/org/zkoss/zktest/bind/issue/F01845TabboxModel.java on lines 59..85
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2534Group.java on lines 149..174

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

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 static class Food {
        private String category;
        private String name;

        public Food(String category, String name) {
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListbox.java on lines 119..144
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListboxMultiple.java on lines 132..157
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListboxMultiple.java on lines 122..147
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01194NestedVMInit.java on lines 41..66
zktest/src/main/java/org/zkoss/zktest/bind/issue/F01845TabboxModel.java on lines 59..85
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2534Group.java on lines 149..174

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

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 static class Food {
        private String category;
        private String name;

        public Food(String category, String name) {
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListboxMultiple.java on lines 132..157
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListbox.java on lines 109..134
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListboxMultiple.java on lines 122..147
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01194NestedVMInit.java on lines 41..66
zktest/src/main/java/org/zkoss/zktest/bind/issue/F01845TabboxModel.java on lines 59..85
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2534Group.java on lines 149..174

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

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 static class Food {
        private String category;
        private String name;

        public Food(String category, String name) {
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListbox.java on lines 119..144
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListboxMultiple.java on lines 132..157
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListbox.java on lines 109..134
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListboxMultiple.java on lines 122..147
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01194NestedVMInit.java on lines 41..66
zktest/src/main/java/org/zkoss/zktest/bind/issue/F01845TabboxModel.java on lines 59..85

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

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

    public JSONObject toJSON() {
        JSONObject json = super.toJSON();
        put(json, "condition", _condition);
        putEssential(json, "fromExpr", _fromExpr);
        putEssential(json, "toExpr", _toExpr);
zkbind/src/main/java/org/zkoss/bind/sys/debugger/impl/info/LoadInfo.java on lines 52..62

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

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 static class VM2 {
        private String name;
        private String desc;

        public VM2(String name, String desc) {
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListbox.java on lines 119..144
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListboxMultiple.java on lines 132..157
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListbox.java on lines 109..134
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListboxMultiple.java on lines 122..147
zktest/src/main/java/org/zkoss/zktest/bind/issue/F01845TabboxModel.java on lines 59..85
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2534Group.java on lines 149..174

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

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 static class TabInfo {

        String path;
        String title;
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListbox.java on lines 119..144
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListboxMultiple.java on lines 132..157
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListbox.java on lines 109..134
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListboxMultiple.java on lines 122..147
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01194NestedVMInit.java on lines 41..66
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2534Group.java on lines 149..174

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

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 static class Food {
        private String category;
        private String name;

        public Food(String category, String name) {
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListbox.java on lines 119..144
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListbox.java on lines 109..134
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListboxMultiple.java on lines 122..147
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01194NestedVMInit.java on lines 41..66
zktest/src/main/java/org/zkoss/zktest/bind/issue/F01845TabboxModel.java on lines 59..85
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2534Group.java on lines 149..174

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

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

    public String getApply() {
        if (_apply == null)
            return null;

        final StringBuffer sb = new StringBuffer();
zk/src/main/java/org/zkoss/zk/ui/metainfo/impl/ComponentDefinitionImpl.java on lines 385..396

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

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

    public String getApply() {
        if (_apply == null)
            return null;

        final StringBuffer sb = new StringBuffer();
zk/src/main/java/org/zkoss/zk/ui/metainfo/ComponentInfo.java on lines 373..384

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

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

    public JSONObject toJSON() {
        JSONObject json = super.toJSON();
        put(json, "condition", _condition);
        putEssential(json, "fromExpr", _fromExpr);
        putEssential(json, "toExpr", _toExpr);
zkbind/src/main/java/org/zkoss/bind/sys/debugger/impl/info/SaveInfo.java on lines 47..57

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

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

/* Td.java

    Purpose:
        
    Description:
Severity: Major
Found in zhtml/src/main/java/org/zkoss/zhtml/Td.java and 1 other location - About 1 hr to fix
zhtml/src/main/java/org/zkoss/zhtml/Output.java on lines 1..89

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

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 Column getColumn() {
        final Grid grid = getGrid();
        if (grid != null) {
            final Columns cs = grid.getColumns();
            if (cs != null) {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Footer.java and 1 other location - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/Listfooter.java on lines 69..81

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

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 Listheader getListheader() {
        final Listbox listbox = getListbox();
        if (listbox != null) {
            final Listhead lcs = listbox.getListhead();
            if (lcs != null) {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Listfooter.java and 1 other location - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/Footer.java on lines 68..80

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

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

/* Output.java

    Purpose:
        
    Description:
Severity: Major
Found in zhtml/src/main/java/org/zkoss/zhtml/Output.java and 1 other location - About 1 hr to fix
zhtml/src/main/java/org/zkoss/zhtml/Td.java on lines 1..76

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

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

    public boolean retainAll(Collection<?> c) {
        boolean modified = false;
        Iterator<E> e = iterator();
        c = createProxyObject(c); // use a proxy object to compare
        while (e.hasNext()) {
zkbind/src/main/java/org/zkoss/bind/proxy/AbstractCollectionProxy.java on lines 202..215
zkbind/src/main/java/org/zkoss/bind/proxy/ListModelSetProxy.java on lines 293..306

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

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