Showing 2,934 of 7,758 total issues

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

  final public void Integer() throws ParseException {
                           /*@bgen(jjtree) Integer */
                            AstInteger jjtn000 = new AstInteger(JJTINTEGER);
                            boolean jjtc000 = true;
                            jjtree.openNodeScope(jjtn000);Token t = null;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 4 other locations - About 1 hr to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 86..101
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 1808..1823
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 1955..1970
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 1997..2012

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

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

    /* package */DataLoader getDataLoader() {
        if (_dataLoader == null) {
            _rod = evalRod();
            final String loadercls = Library.getProperty("org.zkoss.zul.listbox.DataLoader.class");
            try {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Listbox.java and 1 other location - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/Grid.java on lines 1538..1551

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

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

    /*package*/ DataLoader getDataLoader() {
        if (_dataLoader == null) {
            _rod = evalRod();
            final String loadercls = Library.getProperty("org.zkoss.zul.grid.DataLoader.class");
            try {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Grid.java and 1 other location - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 3046..3059

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

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

    function localeWeekdaysShort(m) {
        return m === true
            ? shiftWeekdays(this._weekdaysShort, this._week.dow)
            : m
            ? this._weekdaysShort[m.day()]
Severity: Major
Found in zk/src/main/resources/web/js/zk/ext/moment.js and 1 other location - About 1 hr to fix
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1565..1571

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

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

    function localeWeekdaysMin(m) {
        return m === true
            ? shiftWeekdays(this._weekdaysMin, this._week.dow)
            : m
            ? this._weekdaysMin[m.day()]
Severity: Major
Found in zk/src/main/resources/web/js/zk/ext/moment.js and 1 other location - About 1 hr to fix
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1557..1563

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

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

        if ((a instanceof char[]) && (b instanceof char[])) {
            final char[] as = (char[])a;
            final char[] bs = (char[])b;
            if (as.length != bs.length)
                return false;
Severity: Major
Found in zcommon/src/main/java/org/zkoss/lang/Objects.java and 5 other locations - About 1 hr to fix
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 219..228
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 229..238
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 249..258
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 259..268
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 289..298

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

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

        if ((a instanceof short[]) && (b instanceof short[])) {
            final short[] as = (short[])a;
            final short[] bs = (short[])b;
            if (as.length != bs.length)
                return false;
Severity: Major
Found in zcommon/src/main/java/org/zkoss/lang/Objects.java and 5 other locations - About 1 hr to fix
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 219..228
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 229..238
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 239..248
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 249..258
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 289..298

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

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

        if ((a instanceof byte[]) && (b instanceof byte[])) {
            final byte[] as = (byte[])a;
            final byte[] bs = (byte[])b;
            if (as.length != bs.length)
                return false;
Severity: Major
Found in zcommon/src/main/java/org/zkoss/lang/Objects.java and 5 other locations - About 1 hr to fix
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 219..228
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 239..248
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 249..258
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 259..268
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 289..298

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

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

        if ((a instanceof int[]) && (b instanceof int[])) {
            final int[] as = (int[])a;
            final int[] bs = (int[])b;
            if (as.length != bs.length)
                return false;
Severity: Major
Found in zcommon/src/main/java/org/zkoss/lang/Objects.java and 5 other locations - About 1 hr to fix
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 229..238
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 239..248
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 249..258
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 259..268
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 289..298

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

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

        if ((a instanceof boolean[]) && (b instanceof boolean[])) {
            final boolean[] as = (boolean[])a;
            final boolean[] bs = (boolean[])b;
            if (as.length != bs.length)
                return false;
Severity: Major
Found in zcommon/src/main/java/org/zkoss/lang/Objects.java and 5 other locations - About 1 hr to fix
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 219..228
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 229..238
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 239..248
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 249..258
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 259..268

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

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

        if ((a instanceof long[]) && (b instanceof long[])) {
            final long[] as = (long[])a;
            final long[] bs = (long[])b;
            if (as.length != bs.length)
                return false;
Severity: Major
Found in zcommon/src/main/java/org/zkoss/lang/Objects.java and 5 other locations - About 1 hr to fix
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 219..228
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 229..238
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 239..248
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 259..268
zcommon/src/main/java/org/zkoss/lang/Objects.java on lines 289..298

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

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

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01899ComboboxReloadSelectedItem.java on lines 82..96
zktest/src/main/java/org/zkoss/zktest/bind/issue/B02078.java on lines 163..178

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

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

    public final static String toString(int[] array) {
        if (array == null)
            return "null";

        StringBuffer sb = new StringBuffer(128).append('[');
Severity: Major
Found in zcommon/src/main/java/org/zkoss/util/ArraysX.java and 7 other locations - About 1 hr to fix
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 64..75
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 78..89
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 92..103
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 106..117
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 120..131
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 134..145
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 148..159

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

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

    public final static String toString(float[] array) {
        if (array == null)
            return "null";

        StringBuffer sb = new StringBuffer(128).append('[');
Severity: Major
Found in zcommon/src/main/java/org/zkoss/util/ArraysX.java and 7 other locations - About 1 hr to fix
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 50..61
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 64..75
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 78..89
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 92..103
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 106..117
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 120..131
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 148..159

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

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

    public final static String toString(boolean[] array) {
        if (array == null)
            return "null";

        StringBuffer sb = new StringBuffer(128).append('[');
Severity: Major
Found in zcommon/src/main/java/org/zkoss/util/ArraysX.java and 7 other locations - About 1 hr to fix
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 50..61
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 64..75
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 78..89
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 92..103
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 106..117
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 134..145
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 148..159

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

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

    public final static String toString(long[] array) {
        if (array == null)
            return "null";

        StringBuffer sb = new StringBuffer(128).append('[');
Severity: Major
Found in zcommon/src/main/java/org/zkoss/util/ArraysX.java and 7 other locations - About 1 hr to fix
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 50..61
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 78..89
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 92..103
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 106..117
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 120..131
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 134..145
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 148..159

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

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

    public final static String toString(char[] array) {
        if (array == null)
            return "null";

        StringBuffer sb = new StringBuffer(128).append('[');
Severity: Major
Found in zcommon/src/main/java/org/zkoss/util/ArraysX.java and 7 other locations - About 1 hr to fix
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 50..61
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 64..75
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 78..89
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 92..103
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 120..131
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 134..145
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 148..159

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

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

    private Book initBook(String name, String author, String categories) {
        Book book = new Book();
        book.setName(name);
        book.setAuthor(author);
        String[] cates = categories.split(",");
zktest/src/main/java/org/zkoss/zktest/zats/zuti/vm/FormVM.java on lines 50..63

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

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

    public final static String toString(double[] array) {
        if (array == null)
            return "null";

        StringBuffer sb = new StringBuffer(128).append('[');
Severity: Major
Found in zcommon/src/main/java/org/zkoss/util/ArraysX.java and 7 other locations - About 1 hr to fix
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 50..61
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 64..75
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 78..89
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 92..103
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 106..117
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 120..131
zcommon/src/main/java/org/zkoss/util/ArraysX.java on lines 134..145

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

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

    private Book initBook(String name, String author, String categories) {
        Book book = new Book();
        book.setName(name);
        book.setAuthor(author);
        String[] cates = categories.split(",");
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormProxyDirtyVM.java on lines 65..78

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

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