Showing 2,934 of 7,758 total issues

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

        if (this.tbar) {
            out.push('<div id="', uuid, '-tb" class="', this.$s('top'), '">');
            this.tbar.redraw(out);
            out.push('</div>');
        }
Severity: Major
Found in zul/src/main/resources/web/js/zul/wnd/mold/panel.js and 2 other locations - About 1 hr to fix
zul/src/main/resources/web/js/zul/wnd/mold/panel.js on lines 60..64
zul/src/main/resources/web/js/zul/wnd/mold/panel.js on lines 66..70

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

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

        if (this.bbar) {
            out.push('<div id="', uuid, '-bb" class="', this.$s('bottom'), '">');
            this.bbar.redraw(out);
            out.push('</div>');
        }
Severity: Major
Found in zul/src/main/resources/web/js/zul/wnd/mold/panel.js and 2 other locations - About 1 hr to fix
zul/src/main/resources/web/js/zul/wnd/mold/panel.js on lines 51..55
zul/src/main/resources/web/js/zul/wnd/mold/panel.js on lines 66..70

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

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

        if (this.fbar) {
            out.push('<div id="', uuid, '-fb" class="', this.$s('footer'), '">');
            this.fbar.redraw(out);
            out.push('</div>');
        }
Severity: Major
Found in zul/src/main/resources/web/js/zul/wnd/mold/panel.js and 2 other locations - About 1 hr to fix
zul/src/main/resources/web/js/zul/wnd/mold/panel.js on lines 51..55
zul/src/main/resources/web/js/zul/wnd/mold/panel.js on lines 60..64

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

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 (tabscroll) {
            out.push(
                '<div id="', uuid, '-left" class="', /*safe*/ icon, ' ', this.$s('left-scroll'), '">', domIconHTML('left'), '</div>',
                '<div id="', uuid, '-right" class="', /*safe*/ icon, ' ', this.$s('right-scroll'), '">', domIconHTML('right'), '</div>');
        }
Severity: Major
Found in zul/src/main/resources/web/js/zul/tab/mold/tabbox.js and 1 other location - About 1 hr to fix
zul/src/main/resources/web/js/zul/tab/mold/tabbox.js on lines 53..57

Duplicated Code

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

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

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

Tuning

This issue has a mass of 60.

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 (ids = dt._pfDoneIds) {
                if (fetchHeaders) fetchHeaders['ZK-Client-Complete'] = ids;
                if (ws) {
                    zWs.setRequestHeaders('ZK-Client-Complete', ids);
                }
Severity: Major
Found in zk/src/main/resources/web/js/zk/au.ts and 1 other location - About 1 hr to fix
zk/src/main/resources/web/js/zk/au.ts on lines 1069..1075

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

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 (tabscroll) {
                out.push(
                    '<div id="', uuid, '-up" class="', /*safe*/ icon, ' ', this.$s('up-scroll'), '">', domIconHTML('up'), '</div>',
                    '<div id="', uuid, '-down" class="', /*safe*/ icon, ' ', this.$s('down-scroll'), '">', domIconHTML('down'), '</div>');
            }
Severity: Major
Found in zul/src/main/resources/web/js/zul/tab/mold/tabbox.js and 1 other location - About 1 hr to fix
zul/src/main/resources/web/js/zul/tab/mold/tabbox.js on lines 40..44

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

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

            var indicator = this.$n('ver-indicator'),
                whgh = wrapper.offsetHeight,
                ihgh = Math.round(whgh * hgh / shgh),
                ihgh = ihgh > 15 ? ihgh : 15;
Severity: Major
Found in zul/src/main/resources/web/js/zul/Scrollbar.ts and 1 other location - About 1 hr to fix
zul/src/main/resources/web/js/zul/Scrollbar.ts on lines 247..250

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

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

            var indicator = this.$n('hor-indicator'),
                wwdh = wrapper.offsetWidth,
                iwdh = Math.round(wwdh * wdh / swdh),
                iwdh = iwdh > 15 ? iwdh : 15;
Severity: Major
Found in zul/src/main/resources/web/js/zul/Scrollbar.ts and 1 other location - About 1 hr to fix
zul/src/main/resources/web/js/zul/Scrollbar.ts on lines 302..305

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

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 (ids = dt._pfRecvIds) {
                if (fetchHeaders) fetchHeaders['ZK-Client-Receive'] = ids;
                if (ws) {
                    zWs.setRequestHeaders('ZK-Client-Receive', ids);
                }
Severity: Major
Found in zk/src/main/resources/web/js/zk/au.ts and 1 other location - About 1 hr to fix
zk/src/main/resources/web/js/zk/au.ts on lines 1076..1082

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

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

        if (value instanceof int[]) {
            _buf.append('[');
            final int[] ary = (int[]) value;
            for (int j = 0; j < ary.length; ++j) {
                if (j > 0)
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 254..264
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 276..286
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 287..297
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 298..308
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 309..319
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 320..330
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 331..341

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

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

        if (value instanceof char[]) {
            _buf.append('[');
            final char[] ary = (char[]) value;
            for (int j = 0; j < ary.length; ++j) {
                if (j > 0)
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 254..264
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 265..275
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 276..286
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 287..297
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 298..308
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 309..319
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 320..330

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

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

        if (value instanceof long[]) {
            _buf.append('[');
            final long[] ary = (long[]) value;
            for (int j = 0; j < ary.length; ++j) {
                if (j > 0)
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 254..264
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 265..275
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 287..297
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 298..308
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 309..319
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 320..330
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 331..341

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

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

        if (value instanceof short[]) {
            _buf.append('[');
            final short[] ary = (short[]) value;
            for (int j = 0; j < ary.length; ++j) {
                if (j > 0)
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 254..264
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 265..275
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 276..286
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 298..308
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 309..319
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 320..330
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 331..341

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

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

        if (value instanceof double[]) {
            _buf.append('[');
            final double[] ary = (double[]) value;
            for (int j = 0; j < ary.length; ++j) {
                if (j > 0)
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 254..264
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 265..275
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 276..286
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 287..297
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 298..308
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 320..330
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 331..341

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

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

        if (value instanceof byte[]) {
            _buf.append('[');
            final byte[] ary = (byte[]) value;
            for (int j = 0; j < ary.length; ++j) {
                if (j > 0)
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 254..264
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 265..275
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 276..286
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 287..297
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 298..308
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 309..319
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 331..341

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

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

        if (value instanceof Object[]) {
            _buf.append('[');
            final Object[] ary = (Object[]) value;
            for (int j = 0; j < ary.length; ++j) {
                if (j > 0)
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 265..275
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 276..286
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 287..297
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 298..308
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 309..319
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 320..330
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 331..341

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

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

        if (value instanceof float[]) {
            _buf.append('[');
            final float[] ary = (float[]) value;
            for (int j = 0; j < ary.length; ++j) {
                if (j > 0)
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 254..264
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 265..275
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 276..286
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 287..297
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 309..319
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 320..330
zk/src/main/java/org/zkoss/zk/ui/sys/JsContentRenderer.java on lines 331..341

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

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

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

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

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

Refactorings

Further Reading

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

    public static class Person {
        private String name;
        private String type;
        public Person() { }
        public Person(String name, String type) {
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01088FormUpdate.java on lines 33..54
zktest/src/main/java/org/zkoss/zktest/test2/B60_ZK_1007_TreeComposer.java on lines 109..136
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_3149Object.java on lines 3..31
zktest/src/main/java/org/zkoss/zktest/test2/B95_ZK_4685VM.java on lines 72..99
zktest/src/main/java/org/zkoss/zktest/test2/B95_ZK_4686_1VM.java on lines 68..95

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

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

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

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

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

Refactorings

Further Reading

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

    public static class FormModel {
        private String template;
        private ContentModel formContent;

        public FormModel() {
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00911FormNotifyChange.java on lines 33..57
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01088FormUpdate.java on lines 33..54
zktest/src/main/java/org/zkoss/zktest/test2/B60_ZK_1007_TreeComposer.java on lines 109..136
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_3149Object.java on lines 3..31
zktest/src/main/java/org/zkoss/zktest/test2/B95_ZK_4685VM.java on lines 72..99

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

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

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

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

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

Refactorings

Further Reading

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

    public class FileInfo {
        private String path;
        private String description;

        public FileInfo() {
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00911FormNotifyChange.java on lines 33..57
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01088FormUpdate.java on lines 33..54
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_3149Object.java on lines 3..31
zktest/src/main/java/org/zkoss/zktest/test2/B95_ZK_4685VM.java on lines 72..99
zktest/src/main/java/org/zkoss/zktest/test2/B95_ZK_4686_1VM.java on lines 68..95

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

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