Showing 7,775 of 7,775 total issues

Function _removeEventFunction has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

function _removeEventFunction(elem: Element, type: string, fn: CallableFunction): boolean {
    var eventFuncs = jq.data(elem, 'zk_eventFuncs') as Record<string, CallableFunction[]>,
        funcs: CallableFunction[];

    if (eventFuncs && (funcs = eventFuncs[type])) {
Severity: Minor
Found in zk/src/main/resources/web/js/zk/domtouch.ts - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function $toLocaleString has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    $toLocaleString(): string { //toLocaleString is reserved keyword for IE
        if (this._value.length == 0) return '';
        var j = this._value.length - this._precision;
        if (j <= 0) {
            var valFixed = '';
Severity: Minor
Found in zk/src/main/resources/web/js/zk/math.ts - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function _dblTapEnd has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    _dblTapEnd(evt: JQuery.TouchEndEvent) {
        var tevt = evt.originalEvent as TouchEvent;
        if (tevt.touches.length > 1) return;
        if (this._dbTap) {
            this._dbTap = this._tapValid = false;
Severity: Minor
Found in zk/src/main/resources/web/js/zk/domtouch.ts - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function scrollbarWidth has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    scrollbarWidth(): number {
        var devicePixelRatio = zUtl.getDevicePixelRatio(),
            body = document.body;
        if (this['_lastDevicePixelRatio'] != devicePixelRatio) {
            this['_lastDevicePixelRatio'] = devicePixelRatio;
Severity: Minor
Found in zk/src/main/resources/web/js/zk/dom.ts - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

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/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/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/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_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_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/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

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

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/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(Div 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/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/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_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/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

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

Severity
Category
Status
Source
Language