Showing 7,775 of 7,775 total issues

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

    void doLoadBefore(Component comp, String command) {
        final List<LoadPropertyBinding> bindings = _loadBeforeBindings.get(command);
        if (bindings != null) {
            for (LoadPropertyBinding binding : bindings) {
                doLoadBinding(comp, binding, command, null);
zkbind/src/main/java/org/zkoss/bind/impl/PropertyBindingHandler.java on lines 302..309

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

    @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 doLoadAfter(Component comp, String command) {
        final List<LoadPropertyBinding> bindings = _loadAfterBindings.get(command);
        if (bindings != null) {
            for (LoadPropertyBinding binding : bindings) {
                doLoadBinding(comp, binding, command, null);
zkbind/src/main/java/org/zkoss/bind/impl/PropertyBindingHandler.java on lines 293..300

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

    public static final <M>
    Collection<M> combine(Collection<M> first, Collection<M> second) {
        if (first == second) //we don't use equals to have better performance
            return first;

Severity: Minor
Found in zcommon/src/main/java/org/zkoss/util/DualCollection.java and 1 other location - About 40 mins to fix
zcommon/src/main/java/org/zkoss/xel/util/DualFunctionMapper.java on lines 41..53

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

    @Command @NotifyChange("URL")
    public void addMore(){
        if(URL != null && URL.size()>0){
            URL.add(new URL());
        }else{
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01185CollectionBindingNPE.java on lines 57..65

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

        private InputStream getResourceAsStream() {
            return _prtctx != null ? _prtctx.getResourceAsStream(_uri)
                    : _svlctx != null ? _svlctx.getResourceAsStream(_uri)
                            : _extctx != null ? _extctx.getResourceAsStream(_uri) : null;
        }
Severity: Minor
Found in zweb/src/main/java/org/zkoss/web/portlet/Portlets.java and 1 other location - About 40 mins to fix
zweb/src/main/java/org/zkoss/web/portlet/Portlets.java on lines 156..159

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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("_loaded", new BooleanPropertyAccess() {
            public void setValue(Component cmp, Boolean rendered) {
                ((Treeitem) cmp).setRendered(rendered != null && rendered);
            }

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 659..667

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

        private URL getResource() throws MalformedURLException {
            return _prtctx != null ? _prtctx.getResource(_uri)
                    : _svlctx != null ? _svlctx.getResource(_uri) : _extctx != null ? _extctx.getResource(_uri) : null;
        }
Severity: Minor
Found in zweb/src/main/java/org/zkoss/web/portlet/Portlets.java and 1 other location - About 40 mins to fix
zweb/src/main/java/org/zkoss/web/portlet/Portlets.java on lines 161..165

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 doLoad(Component comp, BindingKey bkey) {
        final List<LoadPropertyBinding> propBindings = _loadPromptBindings.get(bkey);
        if (propBindings != null) {
            for (LoadPropertyBinding binding : propBindings) {
                doLoadBinding(comp, binding, null, null);
zkbind/src/main/java/org/zkoss/bind/impl/PropertyBindingHandler.java on lines 351..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 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.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

  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

  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

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

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

  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

  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

Severity
Category
Status
Source
Language