Showing 2,936 of 7,765 total issues

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

function treefooter$mold$(out) {
    out.push('<td', this.domAttrs_(), '><div id="', this.uuid,
        '-cave" class="', this.$s('content'), '">', this.domContent_());
    for (var w = this.firstChild; w; w = w.nextSibling)
        w.redraw(out);
Severity: Major
Found in zul/src/main/resources/web/js/zul/sel/mold/treefooter.js and 1 other location - About 3 hrs to fix
zul/src/main/resources/web/js/zul/sel/mold/listfooter.js on lines 15..21

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

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 log1(HtmlShadowElement se, JSONObject data) {
        String name = se.toString();
        int index = name.lastIndexOf("->");
        if (index > 0)
            name = name.substring(index + 2);
zktest/src/main/java/org/zkoss/zktest/zats/zuti/composer/DebuggerComposer.java on lines 257..276

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

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 log1(HtmlShadowElement se, JSONObject data) {
        String name = se.toString();
        int index = name.lastIndexOf("->");
        if (index > 0)
            name = name.substring(index + 2);
zktest/src/main/java/org/zkoss/zktest/zats/zuti/composer/ShadowComposer.java on lines 67..86

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

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

      case LE1:
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case LE0:
          jj_consume_token(LE0);
          break;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 7 other locations - About 3 hrs to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 658..695
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 697..734
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 768..805
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 807..844
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 885..922
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 1105..1142
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 1144..1181

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

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

      case MOD1:
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case MOD0:
          jj_consume_token(MOD0);
          break;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 7 other locations - About 3 hrs to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 658..695
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 697..734
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 768..805
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 807..844
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 846..883
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 885..922
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 1105..1142

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

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

      case NE1:
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case NE0:
          jj_consume_token(NE0);
          break;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 7 other locations - About 3 hrs to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 658..695
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 768..805
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 807..844
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 846..883
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 885..922
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 1105..1142
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 1144..1181

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

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

      case EQ1:
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case EQ0:
          jj_consume_token(EQ0);
          break;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 7 other locations - About 3 hrs to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 697..734
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 768..805
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 807..844
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 846..883
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 885..922
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 1105..1142
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 1144..1181

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

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

      case GE1:
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case GE0:
          jj_consume_token(GE0);
          break;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 7 other locations - About 3 hrs to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 658..695
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 697..734
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 768..805
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 807..844
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 846..883
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 1105..1142
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 1144..1181

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

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

      case DIV1:
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case DIV0:
          jj_consume_token(DIV0);
          break;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 7 other locations - About 3 hrs to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 658..695
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 697..734
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 768..805
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 807..844
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 846..883
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 885..922
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 1144..1181

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

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

      case GT1:
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case GT0:
          jj_consume_token(GT0);
          break;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 7 other locations - About 3 hrs to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 658..695
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 697..734
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 768..805
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 846..883
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 885..922
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 1105..1142
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 1144..1181

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

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

      case LT1:
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case LT0:
          jj_consume_token(LT0);
          break;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 7 other locations - About 3 hrs to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 658..695
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 697..734
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 807..844
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 846..883
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 885..922
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 1105..1142
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 1144..1181

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

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 Validator getValidator1(){
        return new Validator() {
            public void validate(ValidationContext ctx) {
                Boolean v1 = (Boolean)ctx.getBindContext().getBindingArg("v1");
                Boolean v2 = (Boolean)ctx.getBindContext().getBindingArg("v2");
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00634.java on lines 62..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 209.

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 class MapForCache<K, V> extends ListModelMap<K, V> {
        private transient Set<Map.Entry<K, V>> _entrySetProxy = null;
        private transient Set<K> _keySetProxy = null;

        public MapForCache() {
zkbind/src/main/java/org/zkoss/bind/proxy/MapProxy.java on lines 236..273

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

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 Validator getValidator1(){
        return new Validator() {
            public void validate(ValidationContext ctx) {
                Boolean v1 = (Boolean)ctx.getBindContext().getBindingArg("v1");
                Boolean v2 = (Boolean)ctx.getBindContext().getBindingArg("v2");
Severity: Major
Found in zktest/src/main/java/org/zkoss/zktest/bind/issue/B00634.java and 1 other location - About 3 hrs to fix
zktest/src/main/java/org/zkoss/zktest/bind/basic/LoadSavePromptCommandValidation.java on lines 62..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 209.

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

    @Init
    public void init() {
        dataList_l = new ArrayList<Person>();
        for (int i = 0; i < 5; i++) {
            dataList_l.add(new Person("Person#" + i, "Addr#" + i));
zktest/src/main/java/org/zkoss/zktest/bind/issue/F02545ChildrenBindingSupportListModelVM.java on lines 107..126

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

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 class MapForCache<K, V> extends LinkedHashMap {
        private transient Set<Map.Entry<K, V>> _entrySetProxy = null;
        private transient Set<K> _keySetProxy = null;
        public MapForCache() {
            super();
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/proxy/MapProxy.java and 1 other location - About 3 hrs to fix
zkbind/src/main/java/org/zkoss/bind/proxy/ListModelMapProxy.java on lines 419..461

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

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

    @Init
    public void init() {
        nodes_l = new ArrayList<Node>();
        for (int i = 0; i < 5; i++) {
            nodes_l.add(new Node("" + i, "Node#" + i));
zktest/src/main/java/org/zkoss/zktest/zats/zuti/vm/ForEachListModelVM.java on lines 104..123

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

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

    offsetHeightDoubleValue(): number {
        const n = this.jq[0],
            height = n.getBoundingClientRect().height,
            diff = Math.abs(n.offsetHeight - height);
        if (diff > 0 && diff <= 1) {
Severity: Major
Found in zk/src/main/resources/web/js/zk/dom.ts and 1 other location - About 3 hrs to fix
zk/src/main/resources/web/js/zk/dom.ts on lines 1247..1255

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

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

    offsetWidthDoubleValue(): number {
        const n = this.jq[0],
            width = n.getBoundingClientRect().width,
            diff = Math.abs(n.offsetWidth - width);
        if (diff > 0 && diff <= 1) {
Severity: Major
Found in zk/src/main/resources/web/js/zk/dom.ts and 1 other location - About 3 hrs to fix
zk/src/main/resources/web/js/zk/dom.ts on lines 1260..1268

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

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

        for (int j = firstDayOfWeek, k = 0; k < 7; ++k) {
            cal.set(Calendar.DAY_OF_WEEK, j);
            sdow[k] = df.format(cal.getTime());
            if (++j > Calendar.SATURDAY)
                j = Calendar.SUNDAY;
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/http/Wpds.java and 1 other location - About 3 hrs to fix
zul/src/main/java/org/zkoss/zul/Datebox.java on lines 650..663

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

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