Showing 7,775 of 7,775 total issues

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

    public static ForEach getInstance(EvaluatorRef evalr, Page page, String expr, String begin, String end) {
        if (expr == null || expr.length() == 0)
            return null;
        return new ForEachImpl(evalr, page, expr, begin, end);
    }
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/util/ForEachImpl.java and 1 other location - About 35 mins to fix
zk/src/main/java/org/zkoss/zk/ui/util/ForEachImpl.java on lines 135..139

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

                if(val!=null && Integer.parseInt(val.toString())>10){
                    setLastMessage1(null);
                }else{
                    ctx.setInvalid();
                    setLastMessage1("value 1 have to large than 10");
Severity: Minor
Found in zktest/src/main/java/org/zkoss/zktest/bind/issue/B0004.java and 1 other location - About 35 mins to fix
zktest/src/main/java/org/zkoss/zktest/bind/issue/B0004.java on lines 108..113

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

    public void fireEvent(int evtType, int[] path, int indexFrom, int indexTo, int[] affectedPath) {
        final TreeDataEvent evt = new TreeDataEvent(this, evtType, path, indexFrom, indexTo, affectedPath);
        for (TreeDataListener l : _listeners)
            l.onChange(evt);
    }
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/AbstractTreeModel.java and 1 other location - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/AbstractTreeModel.java on lines 204..208

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

            else {
                final ShadowElement se = this;
                ((ComponentCtrl) prevhost).addCallback(AFTER_PAGE_DETACHED, new Callback<Component>() {
                    public void call(Component host) {
                        host.getDesktop().getWebApp().getConfiguration().afterShadowDetached(se, host);
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/HtmlShadowElement.java and 1 other location - About 35 mins to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlShadowElement.java on lines 301..308

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

    public void setLowerBound(double lower) {
        if (Double.compare(_lower, lower) != 0) {
            _lower = lower;
            _scale.fireEvent(ChartDataEvent.CHANGED, DialChartDataEvent.LOWER_BOUND, lower);
        }
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/DialModelRange.java and 1 other location - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/DialModelRange.java on lines 160..165

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

        } else {
            final ShadowElement se = this;
            ((ComponentCtrl) host).addCallback(AFTER_PAGE_ATTACHED, new Callback<Component>() {
                public void call(Component host) {
                    host.getDesktop().getWebApp().getConfiguration().afterShadowAttached(se, host);
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/HtmlShadowElement.java and 1 other location - About 35 mins to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlShadowElement.java on lines 326..333

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

            if (node != null) {
                try {
                    ShadowElementsCtrl.setCurrentInfo(node);
                    asShadow(node).afterHostChildAdded(child, indexOfChild);
                } finally {
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/HtmlShadowElement.java and 1 other location - About 35 mins to fix
zk/src/main/java/org/zkoss/zk/ui/HtmlShadowElement.java on lines 876..883

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

        if (BIGDECIMAL.matches(obj0, obj1))
            delegate = BIGDECIMAL;
        else if (BIGINTEGER.matches(obj0, obj1))
            delegate = BIGDECIMAL;
        else
Severity: Minor
Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELArithmetic.java and 1 other location - About 35 mins to fix
zel/src/main/java/org/zkoss/zel/impl/lang/ELArithmetic.java on lines 272..277

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

    private static void parseSubZScriptConfig(Element root) {
        for (Iterator it = root.getElements("zscript-config").iterator(); it.hasNext();) {
            final Element el = (Element) it.next();
            Interpreters.add(el);
            //Note: zscript-config is applied to the whole system, not just langdef
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/sys/ConfigParser.java and 1 other location - About 35 mins to fix
zk/src/main/java/org/zkoss/zk/ui/sys/ConfigParser.java on lines 221..226

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

        if (!Objects.equals(_auxinf != null ? _auxinf.dir : "normal", dir)) {
            initAuxInfoForA().dir = dir;
            smartUpdate("dir", getDir());
        }
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/A.java and 1 other location - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/Menuitem.java on lines 155..158

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

    public void setXsize(int xsize) {
        if (xsize != _xsize) {
            _xsize = xsize;
            fireEvent(ChartDataEvent.CHANGED, null, null, -1, -1, null);
        }
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/WaferMapModel.java and 1 other location - About 35 mins to fix
zul/src/main/java/org/zkoss/zul/WaferMapModel.java on lines 95..100

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

        DIGITS_LOWER = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/sys/DigestUtilsHelper.java and 1 other location - About 35 mins to fix
zk/src/main/java/org/zkoss/zk/ui/sys/DigestUtilsHelper.java on lines 197..197

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

    static public class Item {
        String name;

        public Item(String name) {
            this.name = name;
zktest/src/main/java/org/zkoss/zktest/bind/basic/CollectionIndexDefaultComposer.java on lines 41..54
zktest/src/main/java/org/zkoss/zktest/bind/basic/ComboboxModelSelectionVM.java on lines 61..75
zktest/src/main/java/org/zkoss/zktest/bind/basic/ComponentSwitch.java on lines 32..47
zktest/src/main/java/org/zkoss/zktest/bind/basic/ImmutableVM.java on lines 118..133
zktest/src/main/java/org/zkoss/zktest/bind/basic/SelectboxModelSelectionVM.java on lines 60..74
zktest/src/main/java/org/zkoss/zktest/bind/comp/BiglistboxVM.java on lines 137..149
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00821SelectedIndex.java on lines 76..90
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00892ChildBindingUnderListbox.java on lines 44..58
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01299RefNPE.java on lines 91..102
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00823RadiogroupModel1.java on lines 66..80
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00823RadiogroupModel2.java on lines 58..72
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00843SelectboxSelectedItem.java on lines 78..92
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00901ReferenceBinding.java on lines 90..107
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2463_Column.java on lines 3..17
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_2763_VM.java on lines 24..37
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_2880ViewModel.java on lines 57..71
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_3611VM.java on lines 34..45
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4832VM.java on lines 43..57
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4845VM.java on lines 31..45
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4892VM.java on lines 135..150
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3684VM.java on lines 31..47
zktest/src/main/java/org/zkoss/zktest/test2/F90_ZK_4392BeanModel.java on lines 67..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 43.

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

    public static class Field {
        String value;
        public Field(String value){
            this.value = value;
        }
zktest/src/main/java/org/zkoss/zktest/bind/advance/BindingParamVM.java on lines 54..68
zktest/src/main/java/org/zkoss/zktest/bind/basic/CollectionIndexDefaultComposer.java on lines 41..54
zktest/src/main/java/org/zkoss/zktest/bind/basic/ComboboxModelSelectionVM.java on lines 61..75
zktest/src/main/java/org/zkoss/zktest/bind/basic/ComponentSwitch.java on lines 32..47
zktest/src/main/java/org/zkoss/zktest/bind/basic/ImmutableVM.java on lines 118..133
zktest/src/main/java/org/zkoss/zktest/bind/basic/SelectboxModelSelectionVM.java on lines 60..74
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00821SelectedIndex.java on lines 76..90
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00892ChildBindingUnderListbox.java on lines 44..58
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01299RefNPE.java on lines 91..102
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00823RadiogroupModel1.java on lines 66..80
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00823RadiogroupModel2.java on lines 58..72
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00843SelectboxSelectedItem.java on lines 78..92
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00901ReferenceBinding.java on lines 90..107
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2463_Column.java on lines 3..17
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_2763_VM.java on lines 24..37
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_2880ViewModel.java on lines 57..71
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_3611VM.java on lines 34..45
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4832VM.java on lines 43..57
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4845VM.java on lines 31..45
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4892VM.java on lines 135..150
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3684VM.java on lines 31..47
zktest/src/main/java/org/zkoss/zktest/test2/F90_ZK_4392BeanModel.java on lines 67..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 43.

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

    static public class Item {
        String name;
        
        public Item(String name) {
            this.name = name;
zktest/src/main/java/org/zkoss/zktest/bind/advance/BindingParamVM.java on lines 54..68
zktest/src/main/java/org/zkoss/zktest/bind/basic/CollectionIndexDefaultComposer.java on lines 41..54
zktest/src/main/java/org/zkoss/zktest/bind/basic/ComponentSwitch.java on lines 32..47
zktest/src/main/java/org/zkoss/zktest/bind/basic/ImmutableVM.java on lines 118..133
zktest/src/main/java/org/zkoss/zktest/bind/basic/SelectboxModelSelectionVM.java on lines 60..74
zktest/src/main/java/org/zkoss/zktest/bind/comp/BiglistboxVM.java on lines 137..149
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00821SelectedIndex.java on lines 76..90
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00892ChildBindingUnderListbox.java on lines 44..58
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01299RefNPE.java on lines 91..102
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00823RadiogroupModel1.java on lines 66..80
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00823RadiogroupModel2.java on lines 58..72
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00843SelectboxSelectedItem.java on lines 78..92
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00901ReferenceBinding.java on lines 90..107
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2463_Column.java on lines 3..17
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_2763_VM.java on lines 24..37
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_2880ViewModel.java on lines 57..71
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_3611VM.java on lines 34..45
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4832VM.java on lines 43..57
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4845VM.java on lines 31..45
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4892VM.java on lines 135..150
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3684VM.java on lines 31..47
zktest/src/main/java/org/zkoss/zktest/test2/F90_ZK_4392BeanModel.java on lines 67..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 43.

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

    static public class Item {
        String name;
        
        public Item(String name) {
            this.name = name;
zktest/src/main/java/org/zkoss/zktest/bind/advance/BindingParamVM.java on lines 54..68
zktest/src/main/java/org/zkoss/zktest/bind/basic/CollectionIndexDefaultComposer.java on lines 41..54
zktest/src/main/java/org/zkoss/zktest/bind/basic/ComboboxModelSelectionVM.java on lines 61..75
zktest/src/main/java/org/zkoss/zktest/bind/basic/ComponentSwitch.java on lines 32..47
zktest/src/main/java/org/zkoss/zktest/bind/basic/ImmutableVM.java on lines 118..133
zktest/src/main/java/org/zkoss/zktest/bind/comp/BiglistboxVM.java on lines 137..149
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00821SelectedIndex.java on lines 76..90
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00892ChildBindingUnderListbox.java on lines 44..58
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01299RefNPE.java on lines 91..102
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00823RadiogroupModel1.java on lines 66..80
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00823RadiogroupModel2.java on lines 58..72
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00843SelectboxSelectedItem.java on lines 78..92
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00901ReferenceBinding.java on lines 90..107
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2463_Column.java on lines 3..17
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_2763_VM.java on lines 24..37
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_2880ViewModel.java on lines 57..71
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_3611VM.java on lines 34..45
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4832VM.java on lines 43..57
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4845VM.java on lines 31..45
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4892VM.java on lines 135..150
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3684VM.java on lines 31..47
zktest/src/main/java/org/zkoss/zktest/test2/F90_ZK_4392BeanModel.java on lines 67..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 43.

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

    static public class Item {
        String name;
        public Item(String name) {
            this.name = name;
        }
zktest/src/main/java/org/zkoss/zktest/bind/advance/BindingParamVM.java on lines 54..68
zktest/src/main/java/org/zkoss/zktest/bind/basic/ComboboxModelSelectionVM.java on lines 61..75
zktest/src/main/java/org/zkoss/zktest/bind/basic/ComponentSwitch.java on lines 32..47
zktest/src/main/java/org/zkoss/zktest/bind/basic/ImmutableVM.java on lines 118..133
zktest/src/main/java/org/zkoss/zktest/bind/basic/SelectboxModelSelectionVM.java on lines 60..74
zktest/src/main/java/org/zkoss/zktest/bind/comp/BiglistboxVM.java on lines 137..149
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00821SelectedIndex.java on lines 76..90
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00892ChildBindingUnderListbox.java on lines 44..58
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01299RefNPE.java on lines 91..102
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00823RadiogroupModel1.java on lines 66..80
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00823RadiogroupModel2.java on lines 58..72
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00843SelectboxSelectedItem.java on lines 78..92
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00901ReferenceBinding.java on lines 90..107
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2463_Column.java on lines 3..17
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_2763_VM.java on lines 24..37
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_2880ViewModel.java on lines 57..71
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_3611VM.java on lines 34..45
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4832VM.java on lines 43..57
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4845VM.java on lines 31..45
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4892VM.java on lines 135..150
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3684VM.java on lines 31..47
zktest/src/main/java/org/zkoss/zktest/test2/F90_ZK_4392BeanModel.java on lines 67..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 43.

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

    static public class Item {
        String name;

        public Item(String name) {
            this.name = name;
zktest/src/main/java/org/zkoss/zktest/bind/advance/BindingParamVM.java on lines 54..68
zktest/src/main/java/org/zkoss/zktest/bind/basic/CollectionIndexDefaultComposer.java on lines 41..54
zktest/src/main/java/org/zkoss/zktest/bind/basic/ComboboxModelSelectionVM.java on lines 61..75
zktest/src/main/java/org/zkoss/zktest/bind/basic/ImmutableVM.java on lines 118..133
zktest/src/main/java/org/zkoss/zktest/bind/basic/SelectboxModelSelectionVM.java on lines 60..74
zktest/src/main/java/org/zkoss/zktest/bind/comp/BiglistboxVM.java on lines 137..149
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00821SelectedIndex.java on lines 76..90
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00892ChildBindingUnderListbox.java on lines 44..58
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01299RefNPE.java on lines 91..102
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00823RadiogroupModel1.java on lines 66..80
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00823RadiogroupModel2.java on lines 58..72
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00843SelectboxSelectedItem.java on lines 78..92
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00901ReferenceBinding.java on lines 90..107
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2463_Column.java on lines 3..17
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_2763_VM.java on lines 24..37
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_2880ViewModel.java on lines 57..71
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_3611VM.java on lines 34..45
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4832VM.java on lines 43..57
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4845VM.java on lines 31..45
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4892VM.java on lines 135..150
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3684VM.java on lines 31..47
zktest/src/main/java/org/zkoss/zktest/test2/F90_ZK_4392BeanModel.java on lines 67..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 43.

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

    static public class Option {
        String name;

        public Option(String name) {
            this.name = name;
zktest/src/main/java/org/zkoss/zktest/bind/advance/BindingParamVM.java on lines 54..68
zktest/src/main/java/org/zkoss/zktest/bind/basic/CollectionIndexDefaultComposer.java on lines 41..54
zktest/src/main/java/org/zkoss/zktest/bind/basic/ComboboxModelSelectionVM.java on lines 61..75
zktest/src/main/java/org/zkoss/zktest/bind/basic/ComponentSwitch.java on lines 32..47
zktest/src/main/java/org/zkoss/zktest/bind/basic/ImmutableVM.java on lines 118..133
zktest/src/main/java/org/zkoss/zktest/bind/basic/SelectboxModelSelectionVM.java on lines 60..74
zktest/src/main/java/org/zkoss/zktest/bind/comp/BiglistboxVM.java on lines 137..149
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00821SelectedIndex.java on lines 76..90
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00892ChildBindingUnderListbox.java on lines 44..58
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01299RefNPE.java on lines 91..102
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00823RadiogroupModel1.java on lines 66..80
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00823RadiogroupModel2.java on lines 58..72
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00901ReferenceBinding.java on lines 90..107
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2463_Column.java on lines 3..17
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_2763_VM.java on lines 24..37
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_2880ViewModel.java on lines 57..71
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_3611VM.java on lines 34..45
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4832VM.java on lines 43..57
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4845VM.java on lines 31..45
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4892VM.java on lines 135..150
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3684VM.java on lines 31..47
zktest/src/main/java/org/zkoss/zktest/test2/F90_ZK_4392BeanModel.java on lines 67..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 43.

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

    public class ListElement {
        private String name;

        public ListElement(String name) {
            this.name = name;
zktest/src/main/java/org/zkoss/zktest/bind/advance/BindingParamVM.java on lines 54..68
zktest/src/main/java/org/zkoss/zktest/bind/basic/CollectionIndexDefaultComposer.java on lines 41..54
zktest/src/main/java/org/zkoss/zktest/bind/basic/ComboboxModelSelectionVM.java on lines 61..75
zktest/src/main/java/org/zkoss/zktest/bind/basic/ComponentSwitch.java on lines 32..47
zktest/src/main/java/org/zkoss/zktest/bind/basic/ImmutableVM.java on lines 118..133
zktest/src/main/java/org/zkoss/zktest/bind/basic/SelectboxModelSelectionVM.java on lines 60..74
zktest/src/main/java/org/zkoss/zktest/bind/comp/BiglistboxVM.java on lines 137..149
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00821SelectedIndex.java on lines 76..90
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00892ChildBindingUnderListbox.java on lines 44..58
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01299RefNPE.java on lines 91..102
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00823RadiogroupModel1.java on lines 66..80
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00823RadiogroupModel2.java on lines 58..72
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00843SelectboxSelectedItem.java on lines 78..92
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00901ReferenceBinding.java on lines 90..107
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2463_Column.java on lines 3..17
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_2763_VM.java on lines 24..37
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_3611VM.java on lines 34..45
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4832VM.java on lines 43..57
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4845VM.java on lines 31..45
zktest/src/main/java/org/zkoss/zktest/test2/B96_ZK_4892VM.java on lines 135..150
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3684VM.java on lines 31..47
zktest/src/main/java/org/zkoss/zktest/test2/F90_ZK_4392BeanModel.java on lines 67..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 43.

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