Showing 2,934 of 7,758 total issues

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

    @Command @NotifyChange("person")
    public void addMorePerson(){
        if(person != null && person.size()>0){
            person.add(new Person());
        }else{
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01185CollectionBindingNPE.java on lines 42..50

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

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

    void doInit(Component comp, BindingKey bkey) {
        final List<InitPropertyBinding> initBindings = _initBindings.get(bkey);
        if (initBindings != null) {
            for (InitPropertyBinding binding : initBindings) {
                doLoadBinding(comp, binding, null, null);
zkbind/src/main/java/org/zkoss/bind/impl/PropertyBindingHandler.java on lines 345..352

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

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

        _properties.put("_loadedChildren", new BooleanPropertyAccess() {
            public void setValue(Component cmp, Boolean loadedChildren) {
                ((Treeitem) cmp).setLoaded(loadedChildren != null && loadedChildren);
            }

Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Treeitem.java and 1 other location - About 40 mins to fix
zul/src/main/java/org/zkoss/zul/Treeitem.java on lines 668..676

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

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

  arc.innerRadius = function(v) {
    if (!arguments.length) return innerRadius;
    innerRadius = d3.functor(v);
    return arc;
  };
Severity: Major
Found in zktest/src/main/webapp/js/d3.js and 11 other locations - About 40 mins to fix
zktest/src/main/webapp/js/d3.js on lines 2760..2764
zktest/src/main/webapp/js/d3.js on lines 2766..2770
zktest/src/main/webapp/js/d3.js on lines 2772..2776
zktest/src/main/webapp/js/d3.js on lines 3390..3394
zktest/src/main/webapp/js/d3.js on lines 3396..3400
zktest/src/main/webapp/js/d3.js on lines 3402..3406
zktest/src/main/webapp/js/d3.js on lines 3408..3412
zktest/src/main/webapp/js/d3.js on lines 3414..3418
zktest/src/main/webapp/js/d3.js on lines 3456..3460
zktest/src/main/webapp/js/d3.js on lines 3462..3466
zktest/src/main/webapp/js/d3.layout.js on lines 354..358

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

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

  arc.endAngle = function(v) {
    if (!arguments.length) return endAngle;
    endAngle = d3.functor(v);
    return arc;
  };
Severity: Major
Found in zktest/src/main/webapp/js/d3.js and 11 other locations - About 40 mins to fix
zktest/src/main/webapp/js/d3.js on lines 2754..2758
zktest/src/main/webapp/js/d3.js on lines 2760..2764
zktest/src/main/webapp/js/d3.js on lines 2766..2770
zktest/src/main/webapp/js/d3.js on lines 3390..3394
zktest/src/main/webapp/js/d3.js on lines 3396..3400
zktest/src/main/webapp/js/d3.js on lines 3402..3406
zktest/src/main/webapp/js/d3.js on lines 3408..3412
zktest/src/main/webapp/js/d3.js on lines 3414..3418
zktest/src/main/webapp/js/d3.js on lines 3456..3460
zktest/src/main/webapp/js/d3.js on lines 3462..3466
zktest/src/main/webapp/js/d3.layout.js on lines 354..358

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

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

  chord.source = function(v) {
    if (!arguments.length) return source;
    source = d3.functor(v);
    return chord;
  };
Severity: Major
Found in zktest/src/main/webapp/js/d3.js and 11 other locations - About 40 mins to fix
zktest/src/main/webapp/js/d3.js on lines 2754..2758
zktest/src/main/webapp/js/d3.js on lines 2760..2764
zktest/src/main/webapp/js/d3.js on lines 2766..2770
zktest/src/main/webapp/js/d3.js on lines 2772..2776
zktest/src/main/webapp/js/d3.js on lines 3390..3394
zktest/src/main/webapp/js/d3.js on lines 3402..3406
zktest/src/main/webapp/js/d3.js on lines 3408..3412
zktest/src/main/webapp/js/d3.js on lines 3414..3418
zktest/src/main/webapp/js/d3.js on lines 3456..3460
zktest/src/main/webapp/js/d3.js on lines 3462..3466
zktest/src/main/webapp/js/d3.layout.js on lines 354..358

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

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

  chord.target = function(v) {
    if (!arguments.length) return target;
    target = d3.functor(v);
    return chord;
  };
Severity: Major
Found in zktest/src/main/webapp/js/d3.js and 11 other locations - About 40 mins to fix
zktest/src/main/webapp/js/d3.js on lines 2754..2758
zktest/src/main/webapp/js/d3.js on lines 2760..2764
zktest/src/main/webapp/js/d3.js on lines 2766..2770
zktest/src/main/webapp/js/d3.js on lines 2772..2776
zktest/src/main/webapp/js/d3.js on lines 3390..3394
zktest/src/main/webapp/js/d3.js on lines 3396..3400
zktest/src/main/webapp/js/d3.js on lines 3408..3412
zktest/src/main/webapp/js/d3.js on lines 3414..3418
zktest/src/main/webapp/js/d3.js on lines 3456..3460
zktest/src/main/webapp/js/d3.js on lines 3462..3466
zktest/src/main/webapp/js/d3.layout.js on lines 354..358

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

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

  chord.startAngle = function(v) {
    if (!arguments.length) return startAngle;
    startAngle = d3.functor(v);
    return chord;
  };
Severity: Major
Found in zktest/src/main/webapp/js/d3.js and 11 other locations - About 40 mins to fix
zktest/src/main/webapp/js/d3.js on lines 2754..2758
zktest/src/main/webapp/js/d3.js on lines 2760..2764
zktest/src/main/webapp/js/d3.js on lines 2766..2770
zktest/src/main/webapp/js/d3.js on lines 2772..2776
zktest/src/main/webapp/js/d3.js on lines 3390..3394
zktest/src/main/webapp/js/d3.js on lines 3396..3400
zktest/src/main/webapp/js/d3.js on lines 3402..3406
zktest/src/main/webapp/js/d3.js on lines 3414..3418
zktest/src/main/webapp/js/d3.js on lines 3456..3460
zktest/src/main/webapp/js/d3.js on lines 3462..3466
zktest/src/main/webapp/js/d3.layout.js on lines 354..358

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

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

  chord.endAngle = function(v) {
    if (!arguments.length) return endAngle;
    endAngle = d3.functor(v);
    return chord;
  };
Severity: Major
Found in zktest/src/main/webapp/js/d3.js and 11 other locations - About 40 mins to fix
zktest/src/main/webapp/js/d3.js on lines 2754..2758
zktest/src/main/webapp/js/d3.js on lines 2760..2764
zktest/src/main/webapp/js/d3.js on lines 2766..2770
zktest/src/main/webapp/js/d3.js on lines 2772..2776
zktest/src/main/webapp/js/d3.js on lines 3390..3394
zktest/src/main/webapp/js/d3.js on lines 3396..3400
zktest/src/main/webapp/js/d3.js on lines 3402..3406
zktest/src/main/webapp/js/d3.js on lines 3408..3412
zktest/src/main/webapp/js/d3.js on lines 3456..3460
zktest/src/main/webapp/js/d3.js on lines 3462..3466
zktest/src/main/webapp/js/d3.layout.js on lines 354..358

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

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

  diagonal.target = function(x) {
    if (!arguments.length) return target;
    target = d3.functor(x);
    return diagonal;
  };
Severity: Major
Found in zktest/src/main/webapp/js/d3.js and 11 other locations - About 40 mins to fix
zktest/src/main/webapp/js/d3.js on lines 2754..2758
zktest/src/main/webapp/js/d3.js on lines 2760..2764
zktest/src/main/webapp/js/d3.js on lines 2766..2770
zktest/src/main/webapp/js/d3.js on lines 2772..2776
zktest/src/main/webapp/js/d3.js on lines 3390..3394
zktest/src/main/webapp/js/d3.js on lines 3396..3400
zktest/src/main/webapp/js/d3.js on lines 3402..3406
zktest/src/main/webapp/js/d3.js on lines 3408..3412
zktest/src/main/webapp/js/d3.js on lines 3414..3418
zktest/src/main/webapp/js/d3.js on lines 3456..3460
zktest/src/main/webapp/js/d3.layout.js on lines 354..358

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

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

  chord.radius = function(v) {
    if (!arguments.length) return radius;
    radius = d3.functor(v);
    return chord;
  };
Severity: Major
Found in zktest/src/main/webapp/js/d3.js and 11 other locations - About 40 mins to fix
zktest/src/main/webapp/js/d3.js on lines 2754..2758
zktest/src/main/webapp/js/d3.js on lines 2760..2764
zktest/src/main/webapp/js/d3.js on lines 2766..2770
zktest/src/main/webapp/js/d3.js on lines 2772..2776
zktest/src/main/webapp/js/d3.js on lines 3396..3400
zktest/src/main/webapp/js/d3.js on lines 3402..3406
zktest/src/main/webapp/js/d3.js on lines 3408..3412
zktest/src/main/webapp/js/d3.js on lines 3414..3418
zktest/src/main/webapp/js/d3.js on lines 3456..3460
zktest/src/main/webapp/js/d3.js on lines 3462..3466
zktest/src/main/webapp/js/d3.layout.js on lines 354..358

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

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

  force.linkStrength = function(x) {
    if (!arguments.length) return linkStrength;
    linkStrength = d3.functor(x);
    return force;
  };
Severity: Major
Found in zktest/src/main/webapp/js/d3.layout.js and 11 other locations - About 40 mins to fix
zktest/src/main/webapp/js/d3.js on lines 2754..2758
zktest/src/main/webapp/js/d3.js on lines 2760..2764
zktest/src/main/webapp/js/d3.js on lines 2766..2770
zktest/src/main/webapp/js/d3.js on lines 2772..2776
zktest/src/main/webapp/js/d3.js on lines 3390..3394
zktest/src/main/webapp/js/d3.js on lines 3396..3400
zktest/src/main/webapp/js/d3.js on lines 3402..3406
zktest/src/main/webapp/js/d3.js on lines 3408..3412
zktest/src/main/webapp/js/d3.js on lines 3414..3418
zktest/src/main/webapp/js/d3.js on lines 3456..3460
zktest/src/main/webapp/js/d3.js on lines 3462..3466

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

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

  diagonal.source = function(x) {
    if (!arguments.length) return source;
    source = d3.functor(x);
    return diagonal;
  };
Severity: Major
Found in zktest/src/main/webapp/js/d3.js and 11 other locations - About 40 mins to fix
zktest/src/main/webapp/js/d3.js on lines 2754..2758
zktest/src/main/webapp/js/d3.js on lines 2760..2764
zktest/src/main/webapp/js/d3.js on lines 2766..2770
zktest/src/main/webapp/js/d3.js on lines 2772..2776
zktest/src/main/webapp/js/d3.js on lines 3390..3394
zktest/src/main/webapp/js/d3.js on lines 3396..3400
zktest/src/main/webapp/js/d3.js on lines 3402..3406
zktest/src/main/webapp/js/d3.js on lines 3408..3412
zktest/src/main/webapp/js/d3.js on lines 3414..3418
zktest/src/main/webapp/js/d3.js on lines 3462..3466
zktest/src/main/webapp/js/d3.layout.js on lines 354..358

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

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

  arc.outerRadius = function(v) {
    if (!arguments.length) return outerRadius;
    outerRadius = d3.functor(v);
    return arc;
  };
Severity: Major
Found in zktest/src/main/webapp/js/d3.js and 11 other locations - About 40 mins to fix
zktest/src/main/webapp/js/d3.js on lines 2754..2758
zktest/src/main/webapp/js/d3.js on lines 2766..2770
zktest/src/main/webapp/js/d3.js on lines 2772..2776
zktest/src/main/webapp/js/d3.js on lines 3390..3394
zktest/src/main/webapp/js/d3.js on lines 3396..3400
zktest/src/main/webapp/js/d3.js on lines 3402..3406
zktest/src/main/webapp/js/d3.js on lines 3408..3412
zktest/src/main/webapp/js/d3.js on lines 3414..3418
zktest/src/main/webapp/js/d3.js on lines 3456..3460
zktest/src/main/webapp/js/d3.js on lines 3462..3466
zktest/src/main/webapp/js/d3.layout.js on lines 354..358

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

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

  arc.startAngle = function(v) {
    if (!arguments.length) return startAngle;
    startAngle = d3.functor(v);
    return arc;
  };
Severity: Major
Found in zktest/src/main/webapp/js/d3.js and 11 other locations - About 40 mins to fix
zktest/src/main/webapp/js/d3.js on lines 2754..2758
zktest/src/main/webapp/js/d3.js on lines 2760..2764
zktest/src/main/webapp/js/d3.js on lines 2772..2776
zktest/src/main/webapp/js/d3.js on lines 3390..3394
zktest/src/main/webapp/js/d3.js on lines 3396..3400
zktest/src/main/webapp/js/d3.js on lines 3402..3406
zktest/src/main/webapp/js/d3.js on lines 3408..3412
zktest/src/main/webapp/js/d3.js on lines 3414..3418
zktest/src/main/webapp/js/d3.js on lines 3456..3460
zktest/src/main/webapp/js/d3.js on lines 3462..3466
zktest/src/main/webapp/js/d3.layout.js on lines 354..358

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

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

            for ( i = 0, l = srcElements.length; i < l; i++ ) {
                fixInput( srcElements[ i ], destElements[ i ] );
            }
Severity: Minor
Found in zk/src/main/resources/web/js/zk/ext/jquery.js and 1 other location - About 40 mins to fix
zk/src/main/resources/web/js/zk/ext/jquery.js on lines 6505..6507

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

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

                case 0:
                    k =
                        30 * this._intval(l / 3) + this._intval((g - 1) / 3);
                    break;
Severity: Minor
Found in zktest/src/main/webapp/test2/js/zk-3913-PDF417lib.js and 1 other location - About 40 mins to fix
zktest/src/main/webapp/test2/js/zk-3913-PDF417lib.js on lines 983..985

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

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

        try {
            zk.enableESC();
        } catch (ex) {
            zk.debugLog((ex as Error).message ?? ex);
        }
Severity: Minor
Found in zk/src/main/resources/web/js/zk/pkg.ts and 1 other location - About 40 mins to fix
zk/src/main/resources/web/js/zk/dom.ts on lines 109..113

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

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

                for ( i = 0, l = srcElements.length; i < l; i++ ) {
                    cloneCopyEvent( srcElements[ i ], destElements[ i ] );
                }
Severity: Minor
Found in zk/src/main/resources/web/js/zk/ext/jquery.js and 1 other location - About 40 mins to fix
zk/src/main/resources/web/js/zk/ext/jquery.js on lines 6494..6496

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

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

                for (var c in code as Record<number | string, string>)
                    zAu.setPushErrorURI(parseInt(c), code[c] as string);
Severity: Minor
Found in zk/src/main/resources/web/js/zk/au.ts and 1 other location - About 40 mins to fix
zk/src/main/resources/web/js/zk/au.ts on lines 510..511

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

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