Showing 2,934 of 7,758 total issues

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

    toJSON(): unknown {
        return this.$toString() == String(this.$toNumber()) ? this.$toNumber() : this.$toString();
    }
Severity: Major
Found in zk/src/main/resources/web/js/zk/math.ts and 1 other location - About 1 hr to fix
zk/src/main/resources/web/js/zk/math.ts on lines 108..110

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

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

            } case 5: {//HALF_DOWN
                const r = compareHalf(valStr, ri);
                valStr = r != null && r > 0 ? up(valStr, ri) : down(valStr, ri);
                break;
            } case 6: //HALF_EVEN
Severity: Major
Found in zk/src/main/resources/web/js/zk/fmt/numfmt.ts and 1 other location - About 1 hr to fix
zk/src/main/resources/web/js/zk/fmt/numfmt.ts on lines 156..160

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

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 ( isFunction( value ) ) {
            return this.each( function( j ) {
                jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
            } );
        }
Severity: Major
Found in zk/src/main/resources/web/js/zk/ext/jquery.js and 1 other location - About 1 hr to fix
zk/src/main/resources/web/js/zk/ext/jquery.js on lines 8589..8593

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

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

            case 4: {//HALF_UP
                const r = compareHalf(valStr, ri);
                valStr = r != null && r < 0 ? down(valStr, ri) : up(valStr, ri);
                break;
            } case 5: {//HALF_DOWN
Severity: Major
Found in zk/src/main/resources/web/js/zk/fmt/numfmt.ts and 1 other location - About 1 hr to fix
zk/src/main/resources/web/js/zk/fmt/numfmt.ts on lines 160..164

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

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

    toJSON(): unknown {
        return this.$toString() == String(this.$toNumber()) ? this.$toNumber() : this.$toString();
    }
Severity: Major
Found in zk/src/main/resources/web/js/zk/math.ts and 1 other location - About 1 hr to fix
zk/src/main/resources/web/js/zk/math.ts on lines 175..177

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

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 void setPath(String property, ProxyNode parent) {
        if (property == null && _node != null) { // means update
            _node.setParent(parent);
        } else {
            _node = new ProxyNodeImpl(property, parent);
zkbind/src/main/java/org/zkoss/bind/proxy/AbstractCollectionProxy.java on lines 283..293
zkbind/src/main/java/org/zkoss/bind/proxy/ListModelListProxy.java on lines 469..479

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

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 void setPath(String property, ProxyNode parent) {
        if (property == null && _node != null) { // means update
            _node.setParent(parent);
        } else {
            _node = new ProxyNodeImpl(property, parent);
zkbind/src/main/java/org/zkoss/bind/proxy/AbstractCollectionProxy.java on lines 283..293
zkbind/src/main/java/org/zkoss/bind/proxy/ListModelSetProxy.java on lines 399..409

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

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 class InnerModel {
        public boolean _show;
        public String _text;
        
        InnerModel(boolean show, String text) {
zktest/src/main/java/org/zkoss/zktest/test2/B85_ZK_3871VM.java on lines 50..72
zktest/src/main/java/org/zkoss/zktest/test2/B85_ZK_shadowTestVM.java on lines 51..73

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

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

    public void doSerialize0(Window win,Label msg) throws Exception{
        Page pg = win.getPage();
        ((ComponentCtrl)win).sessionWillPassivate(pg);//simulate
        ByteArrayOutputStream oaos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(oaos);
zktest/src/main/java/org/zkoss/zktest/bind/issue/F02545ChildrenBindingSupportListModelVM.java on lines 139..148
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithList.java on lines 145..154
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithMap.java on lines 149..158
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithSet.java on lines 148..157
zktest/src/main/java/org/zkoss/zktest/test2/F80_ZK_2831.java on lines 99..108
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3816VM.java on lines 77..86
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 100..109
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 127..136
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelMapVM.java on lines 130..139
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 132..141
zktest/src/main/java/org/zkoss/zktest/zats/zuti/vm/ForEachListModelVM.java on lines 135..144

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

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

    public void doSerialize0(Window win, Label msg) throws Exception{
        Page pg = win.getPage();
        ((ComponentCtrl)win).sessionWillPassivate(pg);//simulate
        ByteArrayOutputStream oaos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(oaos);
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00869Serialization.java on lines 117..126
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithList.java on lines 145..154
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithMap.java on lines 149..158
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithSet.java on lines 148..157
zktest/src/main/java/org/zkoss/zktest/test2/F80_ZK_2831.java on lines 99..108
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3816VM.java on lines 77..86
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 100..109
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 127..136
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelMapVM.java on lines 130..139
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 132..141
zktest/src/main/java/org/zkoss/zktest/zats/zuti/vm/ForEachListModelVM.java on lines 135..144

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

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 class InnerModel {
        public boolean _show;
        public String _text;
        
        InnerModel(boolean show, String text) {
zktest/src/main/java/org/zkoss/zktest/test2/B85_ZK_3881VM.java on lines 52..74
zktest/src/main/java/org/zkoss/zktest/test2/B85_ZK_shadowTestVM.java on lines 51..73

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

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

    public void doSerialize0(Window win, Label msg) throws Exception {
        Page pg = win.getPage();
        ((ComponentCtrl) win).sessionWillPassivate(pg);//simulate
        ByteArrayOutputStream oaos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(oaos);
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00869Serialization.java on lines 117..126
zktest/src/main/java/org/zkoss/zktest/bind/issue/F02545ChildrenBindingSupportListModelVM.java on lines 139..148
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithList.java on lines 145..154
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithMap.java on lines 149..158
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithSet.java on lines 148..157
zktest/src/main/java/org/zkoss/zktest/test2/F80_ZK_2831.java on lines 99..108
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3816VM.java on lines 77..86
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 127..136
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelMapVM.java on lines 130..139
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 132..141
zktest/src/main/java/org/zkoss/zktest/zats/zuti/vm/ForEachListModelVM.java on lines 135..144

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

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 class InnerModel {
        public boolean _show;
        public String _text;

        InnerModel(boolean show, String text) {
zktest/src/main/java/org/zkoss/zktest/test2/B85_ZK_3871VM.java on lines 50..72
zktest/src/main/java/org/zkoss/zktest/test2/B85_ZK_3881VM.java on lines 52..74

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

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

    public void doSerialize0(Window win,Label msg) throws Exception{
        Page pg = win.getPage();
        ((ComponentCtrl)win).sessionWillPassivate(pg);//simulate
        ByteArrayOutputStream oaos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(oaos);
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00869Serialization.java on lines 117..126
zktest/src/main/java/org/zkoss/zktest/bind/issue/F02545ChildrenBindingSupportListModelVM.java on lines 139..148
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithList.java on lines 145..154
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithMap.java on lines 149..158
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithSet.java on lines 148..157
zktest/src/main/java/org/zkoss/zktest/test2/F80_ZK_2831.java on lines 99..108
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3816VM.java on lines 77..86
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 100..109
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 127..136
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 132..141
zktest/src/main/java/org/zkoss/zktest/zats/zuti/vm/ForEachListModelVM.java on lines 135..144

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

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

    public void doSerialize0(Window win, Label msg) throws Exception{
        Page pg = win.getPage();
        ((ComponentCtrl)win).sessionWillPassivate(pg);//simulate
        ByteArrayOutputStream oaos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(oaos);
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00869Serialization.java on lines 117..126
zktest/src/main/java/org/zkoss/zktest/bind/issue/F02545ChildrenBindingSupportListModelVM.java on lines 139..148
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithList.java on lines 145..154
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithMap.java on lines 149..158
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithSet.java on lines 148..157
zktest/src/main/java/org/zkoss/zktest/test2/F80_ZK_2831.java on lines 99..108
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3816VM.java on lines 77..86
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 100..109
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 127..136
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelMapVM.java on lines 130..139
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 132..141

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

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

    public void doSerialize0(Window win,Label msg) throws Exception{
        Page pg = win.getPage();
        ((ComponentCtrl)win).sessionWillPassivate(pg);//simulate
        ByteArrayOutputStream oaos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(oaos);
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00869Serialization.java on lines 117..126
zktest/src/main/java/org/zkoss/zktest/bind/issue/F02545ChildrenBindingSupportListModelVM.java on lines 139..148
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithMap.java on lines 149..158
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithSet.java on lines 148..157
zktest/src/main/java/org/zkoss/zktest/test2/F80_ZK_2831.java on lines 99..108
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3816VM.java on lines 77..86
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 100..109
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 127..136
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelMapVM.java on lines 130..139
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 132..141
zktest/src/main/java/org/zkoss/zktest/zats/zuti/vm/ForEachListModelVM.java on lines 135..144

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

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

    public void doSerialize0(Window win, Label msg) throws Exception {
        Page pg = win.getPage();
        ((ComponentCtrl) win).sessionWillPassivate(pg);//simulate
        ByteArrayOutputStream oaos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(oaos);
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00869Serialization.java on lines 117..126
zktest/src/main/java/org/zkoss/zktest/bind/issue/F02545ChildrenBindingSupportListModelVM.java on lines 139..148
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithList.java on lines 145..154
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithMap.java on lines 149..158
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithSet.java on lines 148..157
zktest/src/main/java/org/zkoss/zktest/test2/F80_ZK_2831.java on lines 99..108
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3816VM.java on lines 77..86
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 100..109
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 127..136
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelMapVM.java on lines 130..139
zktest/src/main/java/org/zkoss/zktest/zats/zuti/vm/ForEachListModelVM.java on lines 135..144

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

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

    public void doSerialize0(Window win, Label msg) throws Exception {
        Page pg = win.getPage();
        ((ComponentCtrl) win).sessionWillPassivate(pg);//simulate
        ByteArrayOutputStream oaos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(oaos);
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00869Serialization.java on lines 117..126
zktest/src/main/java/org/zkoss/zktest/bind/issue/F02545ChildrenBindingSupportListModelVM.java on lines 139..148
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithList.java on lines 145..154
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithMap.java on lines 149..158
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithSet.java on lines 148..157
zktest/src/main/java/org/zkoss/zktest/test2/F80_ZK_2831.java on lines 99..108
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3816VM.java on lines 77..86
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 100..109
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelMapVM.java on lines 130..139
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 132..141
zktest/src/main/java/org/zkoss/zktest/zats/zuti/vm/ForEachListModelVM.java on lines 135..144

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

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 void setPath(String property, ProxyNode parent) {
        if (property == null && _node != null) { // means update
            _node.setParent(parent);
        } else {
            _node = new ProxyNodeImpl(property, parent);
zkbind/src/main/java/org/zkoss/bind/proxy/ListModelListProxy.java on lines 469..479
zkbind/src/main/java/org/zkoss/bind/proxy/ListModelSetProxy.java on lines 399..409

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

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

    public void doSerialize0(Window win,Label msg) throws Exception{
        Page pg = win.getPage();
        ((ComponentCtrl)win).sessionWillPassivate(pg);//simulate
        ByteArrayOutputStream oaos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(oaos);
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00869Serialization.java on lines 117..126
zktest/src/main/java/org/zkoss/zktest/bind/issue/F02545ChildrenBindingSupportListModelVM.java on lines 139..148
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithList.java on lines 145..154
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithMap.java on lines 149..158
zktest/src/main/java/org/zkoss/zktest/test2/F80_ZK_2831.java on lines 99..108
zktest/src/main/java/org/zkoss/zktest/test2/F85_ZK_3816VM.java on lines 77..86
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 100..109
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 127..136
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelMapVM.java on lines 130..139
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 132..141
zktest/src/main/java/org/zkoss/zktest/zats/zuti/vm/ForEachListModelVM.java on lines 135..144

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

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