Showing 2,936 of 7,765 total issues

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

    private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
        s.defaultReadObject();

        boolean b = s.readBoolean();
        if (b) {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Treecol.java and 1 other location - About 2 hrs to fix
zul/src/main/java/org/zkoss/zul/Listheader.java on lines 834..856

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

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

    public static void updateInfo(Component info, Textbox tb, String postfix) {
        Integer i = (Integer)info.getAttribute("count");
        int v = i == null ? 0: i.intValue() + 1;
        if (info.getChildren().size() >= 10) {
            ((Component)info.getChildren().get(0)).detach();
Severity: Major
Found in zktest/src/main/java/org/zkoss/zktest/test2/ServerPush2.java and 1 other location - About 2 hrs to fix
zktest/src/main/java/org/zkoss/zktest/test2/ServerPush.java on lines 62..73

Duplicated Code

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

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

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

Tuning

This issue has a mass of 142.

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 void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
        s.defaultReadObject();

        boolean b = s.readBoolean();
        if (b) {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Listheader.java and 1 other location - About 2 hrs to fix
zul/src/main/java/org/zkoss/zul/Treecol.java on lines 571..593

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

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

    public static void updateInfo(Component info, Textbox tb, String postfix) {
        Integer i = (Integer)info.getAttribute("count");
        int v = i == null ? 0: i.intValue() + 1;
        if (info.getChildren().size() >= 10) {
            ((Component)info.getChildren().get(0)).detach();
Severity: Major
Found in zktest/src/main/java/org/zkoss/zktest/test2/ServerPush.java and 1 other location - About 2 hrs to fix
zktest/src/main/java/org/zkoss/zktest/test2/ServerPush2.java on lines 79..90

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

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 (beforeCmds != null && beforeCmds.length > 0) {
                for (String cmd : beforeCmds) {
                    LoadChildrenBindingImpl binding = new LoadChildrenBindingImpl(this, comp, loadExpr,
                            ConditionType.BEFORE_COMMAND, cmd, bindingArgs, converterExpr, converterArgs);
                    addBinding(comp, CHILDREN_ATTR, binding);
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java and 1 other location - About 2 hrs to fix
zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 1483..1499

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

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 (afterCmds != null && afterCmds.length > 0) {
                for (String cmd : afterCmds) {
                    LoadChildrenBindingImpl binding = new LoadChildrenBindingImpl(this, comp, loadExpr,
                            ConditionType.AFTER_COMMAND, cmd, bindingArgs, converterExpr, converterArgs);
                    addBinding(comp, CHILDREN_ATTR, binding);
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java and 1 other location - About 2 hrs to fix
zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java on lines 1466..1482

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

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

function anchorchildren$mold$(out) {
    out.push('<div', this.domAttrs_(), '>');
        for (var w = this.firstChild; w; w = w.nextSibling)
            w.redraw(out);
    out.push('</div>');
zul/src/main/resources/web/js/zul/grid/mold/rows.js on lines 15..20
zul/src/main/resources/web/js/zul/inp/mold/bandpopup.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/borderlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/listitem.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/treerow.js on lines 15..20
zul/src/main/resources/web/js/zul/tab/mold/tabpanels.js on lines 17..22
zul/src/main/resources/web/js/zul/wgt/mold/radiogroup.js on lines 15..20
zul/src/main/resources/web/js/zul/wgt/mold/span.js on lines 15..20
zul/src/main/resources/web/js/zul/wnd/mold/panelchildren.js on lines 15..20

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

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

function rows$mold$(out) {
    out.push('<tbody', this.domAttrs_(), ' role="rowgroup">');
    for (var w = this.firstChild; w; w = w.nextSibling)
        w.redraw(out);
    out.push('</tbody>');
Severity: Major
Found in zul/src/main/resources/web/js/zul/grid/mold/rows.js and 10 other locations - About 2 hrs to fix
zul/src/main/resources/web/js/zul/inp/mold/bandpopup.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorchildren.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/borderlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/listitem.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/treerow.js on lines 15..20
zul/src/main/resources/web/js/zul/tab/mold/tabpanels.js on lines 17..22
zul/src/main/resources/web/js/zul/wgt/mold/radiogroup.js on lines 15..20
zul/src/main/resources/web/js/zul/wgt/mold/span.js on lines 15..20
zul/src/main/resources/web/js/zul/wnd/mold/panelchildren.js on lines 15..20

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

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

function borderlayout$mold$(out) {
    out.push('<div', this.domAttrs_(), '>');
    for (var w = this.firstChild; w; w = w.nextSibling)
        w.redraw(out);
    out.push('</div>');
zul/src/main/resources/web/js/zul/grid/mold/rows.js on lines 15..20
zul/src/main/resources/web/js/zul/inp/mold/bandpopup.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorchildren.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/listitem.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/treerow.js on lines 15..20
zul/src/main/resources/web/js/zul/tab/mold/tabpanels.js on lines 17..22
zul/src/main/resources/web/js/zul/wgt/mold/radiogroup.js on lines 15..20
zul/src/main/resources/web/js/zul/wgt/mold/span.js on lines 15..20
zul/src/main/resources/web/js/zul/wnd/mold/panelchildren.js on lines 15..20

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

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 prototypeMin = deprecate(
            'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
            function () {
                var other = createLocal.apply(null, arguments);
                if (this.isValid() && other.isValid()) {
Severity: Major
Found in zk/src/main/resources/web/js/zk/ext/moment.js and 1 other location - About 2 hrs to fix
zk/src/main/resources/web/js/zk/ext/moment.js on lines 3055..3065

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

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

function anchorlayout$mold$(out) {
    out.push('<div', this.domAttrs_(), '>');
    for (var w = this.firstChild; w; w = w.nextSibling)
        w.redraw(out);
    out.push('</div>');
zul/src/main/resources/web/js/zul/grid/mold/rows.js on lines 15..20
zul/src/main/resources/web/js/zul/inp/mold/bandpopup.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorchildren.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/borderlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/listitem.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/treerow.js on lines 15..20
zul/src/main/resources/web/js/zul/tab/mold/tabpanels.js on lines 17..22
zul/src/main/resources/web/js/zul/wgt/mold/radiogroup.js on lines 15..20
zul/src/main/resources/web/js/zul/wgt/mold/span.js on lines 15..20
zul/src/main/resources/web/js/zul/wnd/mold/panelchildren.js on lines 15..20

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

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

function span$mold$(out) {
    out.push('<span', this.domAttrs_(), '>');
    for (var w = this.firstChild; w; w = w.nextSibling)
        w.redraw(out);
    out.push('</span>');
Severity: Major
Found in zul/src/main/resources/web/js/zul/wgt/mold/span.js and 10 other locations - About 2 hrs to fix
zul/src/main/resources/web/js/zul/grid/mold/rows.js on lines 15..20
zul/src/main/resources/web/js/zul/inp/mold/bandpopup.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorchildren.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/borderlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/listitem.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/treerow.js on lines 15..20
zul/src/main/resources/web/js/zul/tab/mold/tabpanels.js on lines 17..22
zul/src/main/resources/web/js/zul/wgt/mold/radiogroup.js on lines 15..20
zul/src/main/resources/web/js/zul/wnd/mold/panelchildren.js on lines 15..20

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

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

function tabpanels$mold$(out) {
    out.push('<div', this.domAttrs_(), '>');
    for (var w = this.firstChild; w; w = w.nextSibling)
        w.redraw(out);
    out.push('</div>');
Severity: Major
Found in zul/src/main/resources/web/js/zul/tab/mold/tabpanels.js and 10 other locations - About 2 hrs to fix
zul/src/main/resources/web/js/zul/grid/mold/rows.js on lines 15..20
zul/src/main/resources/web/js/zul/inp/mold/bandpopup.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorchildren.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/borderlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/listitem.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/treerow.js on lines 15..20
zul/src/main/resources/web/js/zul/wgt/mold/radiogroup.js on lines 15..20
zul/src/main/resources/web/js/zul/wgt/mold/span.js on lines 15..20
zul/src/main/resources/web/js/zul/wnd/mold/panelchildren.js on lines 15..20

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

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

function treerow$mold$(out) {
    out.push('<tr', this.domAttrs_(), '>');
    for (var w = this.firstChild; w; w = w.nextSibling)
        w.redraw(out);
    out.push('</tr>');
Severity: Major
Found in zul/src/main/resources/web/js/zul/sel/mold/treerow.js and 10 other locations - About 2 hrs to fix
zul/src/main/resources/web/js/zul/grid/mold/rows.js on lines 15..20
zul/src/main/resources/web/js/zul/inp/mold/bandpopup.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorchildren.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/borderlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/listitem.js on lines 15..20
zul/src/main/resources/web/js/zul/tab/mold/tabpanels.js on lines 17..22
zul/src/main/resources/web/js/zul/wgt/mold/radiogroup.js on lines 15..20
zul/src/main/resources/web/js/zul/wgt/mold/span.js on lines 15..20
zul/src/main/resources/web/js/zul/wnd/mold/panelchildren.js on lines 15..20

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

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

        prototypeMax = deprecate(
            'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
            function () {
                var other = createLocal.apply(null, arguments);
                if (this.isValid() && other.isValid()) {
Severity: Major
Found in zk/src/main/resources/web/js/zk/ext/moment.js and 1 other location - About 2 hrs to fix
zk/src/main/resources/web/js/zk/ext/moment.js on lines 3044..3054

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

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

function listitem$mold$(out) {
    out.push('<tr', this.domAttrs_(), '>');
    for (var w = this.firstChild; w; w = w.nextSibling)
        w.redraw(out);
    out.push('</tr>');
Severity: Major
Found in zul/src/main/resources/web/js/zul/sel/mold/listitem.js and 10 other locations - About 2 hrs to fix
zul/src/main/resources/web/js/zul/grid/mold/rows.js on lines 15..20
zul/src/main/resources/web/js/zul/inp/mold/bandpopup.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorchildren.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/borderlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/treerow.js on lines 15..20
zul/src/main/resources/web/js/zul/tab/mold/tabpanels.js on lines 17..22
zul/src/main/resources/web/js/zul/wgt/mold/radiogroup.js on lines 15..20
zul/src/main/resources/web/js/zul/wgt/mold/span.js on lines 15..20
zul/src/main/resources/web/js/zul/wnd/mold/panelchildren.js on lines 15..20

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

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

function bandpopup$mold$(out) {
    out.push('<div', this.domAttrs_(), '>');
    for (var w = this.firstChild; w; w = w.nextSibling)
        w.redraw(out);
    out.push('</div>');
Severity: Major
Found in zul/src/main/resources/web/js/zul/inp/mold/bandpopup.js and 10 other locations - About 2 hrs to fix
zul/src/main/resources/web/js/zul/grid/mold/rows.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorchildren.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/borderlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/listitem.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/treerow.js on lines 15..20
zul/src/main/resources/web/js/zul/tab/mold/tabpanels.js on lines 17..22
zul/src/main/resources/web/js/zul/wgt/mold/radiogroup.js on lines 15..20
zul/src/main/resources/web/js/zul/wgt/mold/span.js on lines 15..20
zul/src/main/resources/web/js/zul/wnd/mold/panelchildren.js on lines 15..20

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

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

function panelchildren$mold$(out) {
    out.push('<div', this.domAttrs_(), '>');
    for (var w = this.firstChild; w; w = w.nextSibling)
        w.redraw(out);
    out.push('</div>');
zul/src/main/resources/web/js/zul/grid/mold/rows.js on lines 15..20
zul/src/main/resources/web/js/zul/inp/mold/bandpopup.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorchildren.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/borderlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/listitem.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/treerow.js on lines 15..20
zul/src/main/resources/web/js/zul/tab/mold/tabpanels.js on lines 17..22
zul/src/main/resources/web/js/zul/wgt/mold/radiogroup.js on lines 15..20
zul/src/main/resources/web/js/zul/wgt/mold/span.js on lines 15..20

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

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

function radiogroup$mold$(out) {
    out.push('<span', this.domAttrs_(), ' role="radiogroup">');
    for (var w = this.firstChild; w; w = w.nextSibling)
        w.redraw(out);
    out.push('</span>');
Severity: Major
Found in zul/src/main/resources/web/js/zul/wgt/mold/radiogroup.js and 10 other locations - About 2 hrs to fix
zul/src/main/resources/web/js/zul/grid/mold/rows.js on lines 15..20
zul/src/main/resources/web/js/zul/inp/mold/bandpopup.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorchildren.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/anchorlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/layout/mold/borderlayout.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/listitem.js on lines 15..20
zul/src/main/resources/web/js/zul/sel/mold/treerow.js on lines 15..20
zul/src/main/resources/web/js/zul/tab/mold/tabpanels.js on lines 17..22
zul/src/main/resources/web/js/zul/wgt/mold/span.js on lines 15..20
zul/src/main/resources/web/js/zul/wnd/mold/panelchildren.js on lines 15..20

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

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

            var anchor = opts ? opts.anchor || 't' : 't',
                prop = ['top', 'left', 'position', 'border', 'margin', 'padding'],
                anima: Record<string, string> = {},
                css: Record<string, string> = {},
                dims = this.dimension();
Severity: Major
Found in zk/src/main/resources/web/js/zk/anima.ts and 1 other location - About 2 hrs to fix
zk/src/main/resources/web/js/zk/anima.ts on lines 345..349

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

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