Showing 2,935 of 7,775 total issues

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

        jq(arrow1)
            .off('mousedown', self.proxy(self._mouseDown))
            .off('mouseup', self.proxy(self._mouseUp));
Severity: Major
Found in zul/src/main/resources/web/js/zul/Scrollbar.ts and 6 other locations - About 40 mins to fix
zul/src/main/resources/web/js/zul/Scrollbar.ts on lines 513..515
zul/src/main/resources/web/js/zul/Scrollbar.ts on lines 516..518
zul/src/main/resources/web/js/zul/Scrollbar.ts on lines 519..521
zul/src/main/resources/web/js/zul/Scrollbar.ts on lines 543..545
zul/src/main/resources/web/js/zul/Scrollbar.ts on lines 549..551
zul/src/main/resources/web/js/zul/Scrollbar.ts on lines 608..610

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

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

    meta: {
        type: 'problem',
        docs: {
            description: 'Use undefined instead of null.',
            recommended: 'error',
Severity: Major
Found in eslint-plugin-zk/src/rules/noNull.ts and 5 other locations - About 40 mins to fix
eslint-plugin-zk/src/rules/noAccessModifier.ts on lines 17..28
eslint-plugin-zk/src/rules/noTopLevelScopingIIFE.ts on lines 6..17
eslint-plugin-zk/src/rules/preferNativeClass.ts on lines 8..19
eslint-plugin-zk/src/rules/preferNativeInstanceof.ts on lines 6..17
eslint-plugin-zk/src/rules/preferStrictBooleanType.ts on lines 17..28

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

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

            if (wgt) {
                var wevt = new zk.Event(wgt, 'onRightClick', evt.mouseData(), {}, evt);
                _doEvt(wevt);
                if (wevt.domStopped)
                    return false;
Severity: Minor
Found in zk/src/main/resources/web/js/zk/mount.ts and 1 other location - About 40 mins to fix
zk/src/main/resources/web/js/zk/mount.ts on lines 865..870

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

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

        pos[1] = zkpOffset[1] + zkp.sumStyles('t', jq.paddings) + zkp.sumStyles('t', jq.borders);
Severity: Minor
Found in zk/src/main/resources/web/js/zk/flex.ts and 1 other location - About 40 mins to fix
zk/src/main/resources/web/js/zk/flex.ts on lines 53..53

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

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

            if (wgt && evt.which == 1) {
                var wevt = new zk.Event(wgt, 'onDoubleClick', evt.mouseData(), {}, evt);
                _doEvt(wevt);
                if (wevt.domStopped)
                    return false;
Severity: Minor
Found in zk/src/main/resources/web/js/zk/mount.ts and 1 other location - About 40 mins to fix
zk/src/main/resources/web/js/zk/mount.ts on lines 792..797

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

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

        pos[0] = zkpOffset[0] + zkp.sumStyles('l', jq.paddings) + zkp.sumStyles('l', jq.borders);
Severity: Minor
Found in zk/src/main/resources/web/js/zk/flex.ts and 1 other location - About 40 mins to fix
zk/src/main/resources/web/js/zk/flex.ts on lines 54..54

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

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

                for (let args = arguments, j = 1; j < args.length; ++j)
                    window.zkx_(args[j] as never, fn);
Severity: Minor
Found in zk/src/main/resources/web/js/zk/au.ts and 1 other location - About 40 mins to fix
zk/src/main/resources/web/js/zk/au.ts on lines 2131..2132

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

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

                    for (let args = arguments, j = 1; j < args.length; ++j)
                        window.zkx_(args[j] as never, fn);
Severity: Minor
Found in zk/src/main/resources/web/js/zk/au.ts and 1 other location - About 40 mins to fix
zk/src/main/resources/web/js/zk/au.ts on lines 2099..2100

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

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 static class MyGroupsModelArray extends GroupsModelArray {
        public MyGroupsModelArray(Object[] data, Comparator cmpr) {
            super(data, cmpr);
        }

zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModel.java on lines 36..50
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListbox.java on lines 59..73
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModel.java on lines 26..40
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListbox.java on lines 49..63
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListboxMultiple.java on lines 62..76
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2534Group.java on lines 70..84

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

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 static class MyGroupsModelArray extends GroupsModelArray {
        public MyGroupsModelArray(Object[] data, Comparator cmpr) {
            super(data, cmpr);
        }

zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModel.java on lines 36..50
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListbox.java on lines 59..73
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListboxMultiple.java on lines 72..86
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModel.java on lines 26..40
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListboxMultiple.java on lines 62..76
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2534Group.java on lines 70..84

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

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 static class MyGroupsModelArray extends GroupsModelArray {
        public MyGroupsModelArray(Object[] data, Comparator cmpr) {
            super(data, cmpr);
        }

zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModel.java on lines 36..50
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListbox.java on lines 59..73
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListboxMultiple.java on lines 72..86
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModel.java on lines 26..40
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListbox.java on lines 49..63
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListboxMultiple.java on lines 62..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 51.

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 static class MyGroupsModelArray extends GroupsModelArray {
        public MyGroupsModelArray(Object[] data, Comparator cmpr) {
            super(data, cmpr);
        }

zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModel.java on lines 36..50
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListbox.java on lines 59..73
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListboxMultiple.java on lines 72..86
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListbox.java on lines 49..63
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListboxMultiple.java on lines 62..76
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2534Group.java on lines 70..84

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

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 static class MyGroupsModelArray extends GroupsModelArray {
        public MyGroupsModelArray(Object[] data, Comparator cmpr) {
            super(data, cmpr);
        }

zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListbox.java on lines 59..73
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListboxMultiple.java on lines 72..86
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModel.java on lines 26..40
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListbox.java on lines 49..63
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListboxMultiple.java on lines 62..76
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2534Group.java on lines 70..84

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

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 static class MyGroupsModelArray extends GroupsModelArray {
        public MyGroupsModelArray(Object[] data, Comparator cmpr) {
            super(data, cmpr);
        }

zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModel.java on lines 36..50
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListboxMultiple.java on lines 72..86
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModel.java on lines 26..40
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListbox.java on lines 49..63
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListboxMultiple.java on lines 62..76
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2534Group.java on lines 70..84

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

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 static class MyGroupsModelArray extends GroupsModelArray {
        public MyGroupsModelArray(Object[] data, Comparator cmpr) {
            super(data, cmpr);
        }

zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModel.java on lines 36..50
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListbox.java on lines 59..73
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00807GroupModelListboxMultiple.java on lines 72..86
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModel.java on lines 26..40
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00967GroupModelListbox.java on lines 49..63
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2534Group.java on lines 70..84

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    public void clear() {
        int i2 = _set.size() - 1;
        if (i2 < 0) {
            return;
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/ListModelSet.java and 4 other locations - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/ListModelList.java on lines 212..220
zul/src/main/java/org/zkoss/zul/ListModelMap.java on lines 218..226
zul/src/main/java/org/zkoss/zul/ListModelMap.java on lines 536..544
zul/src/main/java/org/zkoss/zul/ListModelMap.java on lines 742..750

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        public void clear() {
            int i2 = _col.size() - 1;
            if (i2 < 0) {
                return;
            }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/ListModelMap.java and 4 other locations - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/ListModelList.java on lines 212..220
zul/src/main/java/org/zkoss/zul/ListModelMap.java on lines 218..226
zul/src/main/java/org/zkoss/zul/ListModelMap.java on lines 536..544
zul/src/main/java/org/zkoss/zul/ListModelSet.java on lines 216..224

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

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

  private boolean jj_3R_29() {
    if (jj_3R_34()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 12 other locations - About 40 mins to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2103..2111
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2129..2137
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2194..2202
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2204..2212
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2214..2222
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2390..2398
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2425..2433
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2480..2488
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2587..2595
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2642..2650
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2706..2714
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2790..2798

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

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

  private boolean jj_3R_39() {
    if (jj_3R_38()) return true;
    Token xsp;
    while (true) {
      xsp = jj_scanpos;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 12 other locations - About 40 mins to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2103..2111
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2129..2137
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2168..2176
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2204..2212
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2214..2222
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2390..2398
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2425..2433
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2480..2488
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2587..2595
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2642..2650
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2706..2714
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2790..2798

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

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 String getEncodedHref() {
        final Desktop dt = getDesktop();
        return _auxinf != null && _auxinf.href != null && dt != null ? dt.getExecution().encodeURL(_auxinf.href) : null;
        //if desktop is null, it doesn't belong to any execution
    }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Menuitem.java and 2 other locations - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/A.java on lines 173..177
zul/src/main/java/org/zkoss/zul/Button.java on lines 245..249

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

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