Showing 2,934 of 7,758 total issues

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/JSCumulativeContentRenderer.java on lines 159..169
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 170..180
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 181..191
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 203..213
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 214..224
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 225..235
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 236..246

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

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/JSCumulativeContentRenderer.java on lines 159..169
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 170..180
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 181..191
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 192..202
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 203..213
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 214..224
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 236..246

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

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/JSCumulativeContentRenderer.java on lines 159..169
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 170..180
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 181..191
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 192..202
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 214..224
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 225..235
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 236..246

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

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/JSCumulativeContentRenderer.java on lines 159..169
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 170..180
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 181..191
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 192..202
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 203..213
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 214..224
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 225..235

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

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/JSCumulativeContentRenderer.java on lines 159..169
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 170..180
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 192..202
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 203..213
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 214..224
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 225..235
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 236..246

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

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/JSCumulativeContentRenderer.java on lines 170..180
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 181..191
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 192..202
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 203..213
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 214..224
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 225..235
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 236..246

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

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/JSCumulativeContentRenderer.java on lines 159..169
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 181..191
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 192..202
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 203..213
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 214..224
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 225..235
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 236..246

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

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/JSCumulativeContentRenderer.java on lines 159..169
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 170..180
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 181..191
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 192..202
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 203..213
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 225..235
zk/src/main/java/org/zkoss/zk/ui/sys/JSCumulativeContentRenderer.java on lines 236..246

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

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 addDependsOnTrackings(List<String> srcpath, String basepath, String[] props) {
        if (srcpath != null) {
            final String src = BindELContext.pathToString(srcpath);
            if (_doneDependsOn != null && _doneDependsOn.contains(src)) { //this method has already done @DependsOn in this binding
                return;
zkbind/src/main/java/org/zkoss/bind/impl/LoadFormBindingImpl.java on lines 166..177
zkbind/src/main/java/org/zkoss/bind/impl/LoadPropertyBindingImpl.java on lines 135..146

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

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 addDependsOnTrackings(List<String> srcpath, String basepath, String[] props) {
        if (srcpath != null) {
            final String src = BindELContext.pathToString(srcpath);
            if (_doneDependsOn != null && _doneDependsOn.contains(src)) { //this method has already done @DependsOn in this binding
                return;
zkbind/src/main/java/org/zkoss/bind/impl/LoadChildrenBindingImpl.java on lines 167..179
zkbind/src/main/java/org/zkoss/bind/impl/LoadPropertyBindingImpl.java on lines 135..146

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

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 addDependsOnTrackings(List<String> srcpath, String basepath, String[] props) {
        if (srcpath != null) {
            final String src = BindELContext.pathToString(srcpath);
            if (_doneDependsOn != null && _doneDependsOn.contains(src)) { //this method has already done @DependsOn in this binding
                return;
zkbind/src/main/java/org/zkoss/bind/impl/LoadChildrenBindingImpl.java on lines 167..179
zkbind/src/main/java/org/zkoss/bind/impl/LoadFormBindingImpl.java on lines 166..177

Duplicated Code

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

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

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

Tuning

This issue has a mass of 88.

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

            if (method != null) {

                BindingExecutionInfoCollector collector = getBindingExecutionInfoCollector();
                if (collector != null) {
                    collector.addInfo(new CommandInfo(CommandInfo.EXECUTE_GLOBAL, comp, null, null, command,
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java and 1 other location - About 1 hr to fix
zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 2125..2138

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

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

        if (isBigIntegerOp(obj0, obj1)) {
            BigInteger bi0 = (BigInteger) coerceToNumber(obj0, BigInteger.class);
            BigInteger bi1 = (BigInteger) coerceToNumber(obj1, BigInteger.class);
            if (bi0 == null) {
                return (bi1 == null) ? 0 : -1;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 3 other locations - About 1 hr to fix
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 155..164
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 165..174
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 185..194

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

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

        } catch (Throwable ex) {
            final List<Throwable> errs = new LinkedList<Throwable>();
            errs.add(ex);

            desktopCtrl.invokeExecutionCleanups(exec, null, errs);
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java and 1 other location - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java on lines 1361..1374

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

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

        } catch (Throwable ex) {
            final List<Throwable> errs = new LinkedList<Throwable>();
            errs.add(ex);

            desktopCtrl.invokeExecutionCleanups(exec, null, errs);
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java and 1 other location - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java on lines 1237..1250

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

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

        if (isDoubleOp(obj0, obj1)) {
            Double d0 = (Double) coerceToNumber(obj0, Double.class);
            Double d1 = (Double) coerceToNumber(obj1, Double.class);
            if (d0 == null) {
                return (d1 == null) ? 0 : -1;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 3 other locations - About 1 hr to fix
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 155..164
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 175..184
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 185..194

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

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

            if (tm == null) {
                Treecell tc = new Treecell(Objects.toString(node));
                Treerow tr = null;
                ti.setValue(node);
                if (ti.getTreerow() == null) {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Tree.java and 1 other location - About 1 hr to fix
zkbind/src/main/java/org/zkoss/bind/impl/BindTreeitemRenderer.java on lines 46..58

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

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

        if (isLongOp(obj0, obj1)) {
            Long l0 = (Long) coerceToNumber(obj0, Long.class);
            Long l1 = (Long) coerceToNumber(obj1, Long.class);
            if (l0 == null) {
                return (l1 == null) ? 0 : -1;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 3 other locations - About 1 hr to fix
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 155..164
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 165..174
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 175..184

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

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

        if (isBigDecimalOp(obj0, obj1)) {
            BigDecimal bd0 = (BigDecimal) coerceToNumber(obj0, BigDecimal.class);
            BigDecimal bd1 = (BigDecimal) coerceToNumber(obj1, BigDecimal.class);
            if (bd0 == null) {
                return (bd1 == null) ? 0 : -1;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 3 other locations - About 1 hr to fix
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 165..174
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 175..184
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 185..194

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

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

        if (tm == null) {
            Treecell tc = new Treecell(Objects.toString(data));
            Treerow tr = null;
            item.setValue(data);
            if (item.getTreerow() == null) {
zul/src/main/java/org/zkoss/zul/Tree.java on lines 2227..2239

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

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