Showing 2,934 of 7,758 total issues

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

    /*package*/ boolean isAutosort() {
        String attr = "org.zkoss.zul.grid.autoSort";
        Object val = getAttribute(attr, true);
        if (val == null)
            val = Library.getProperty(attr);
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Grid.java and 2 other locations - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 3426..3433
zul/src/main/java/org/zkoss/zul/Tree.java on lines 2726..2733

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

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 List<String> addProperty(String key, String value) {
        if (key == null) throw new NullPointerException();
        if (key.length() == 0) throw new IllegalArgumentException();

        synchronized (_props) {
Severity: Major
Found in zcommon/src/main/java/org/zkoss/lang/Library.java and 1 other location - About 1 hr to fix
zcommon/src/main/java/org/zkoss/lang/Library.java on lines 169..180

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

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

    public Treecol getTreecol() {
        final Tree tree = getTree();
        if (tree != null) {
            final Treecols cs = tree.getTreecols();
            if (cs != null) {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Treefooter.java and 2 other locations - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/Listcell.java on lines 70..82
zul/src/main/java/org/zkoss/zul/Treecell.java on lines 61..73

Duplicated Code

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

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

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

Tuning

This issue has a mass of 83.

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

    public String get1x(final Object n){
        Wrap r = new Wrap(n);
        Integer c = counts1x.get(r);
        if(c==null){
            counts1x.put(r, c = 0);
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 40..50
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 62..72
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 73..83
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 53..63
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 64..74
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 75..85
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 86..96

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

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

    public void setFrameBgColor1(String color) {
        if (Objects.equals(color, _bgColor1)) {
            return;
        }
        _bgColor1 = color;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/DialModel.java and 5 other locations - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 175..187
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 209..221
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 277..289
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 344..356
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 440..452

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

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

    public void setNeedleColor(String color) {
        if (Objects.equals(color, _needleColor)) {
            return;
        }
        _needleColor = color;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/DialModelScale.java and 5 other locations - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 175..187
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 209..221
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 243..255
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 277..289
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 344..356

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

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

    public String get1(final Object n){
        Wrap r = new Wrap(n);
        Integer c = counts1.get(r);
        if(c==null){
            counts1.put(r, c = 0);
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 51..61
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 62..72
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 73..83
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 53..63
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 64..74
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 75..85
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 86..96

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

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

    public String get3(final Object n){
        Wrap r = new Wrap(n);
        Integer c = counts3.get(r);
        if(c==null){
            counts3.put(r, c = 0);
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 40..50
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 51..61
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 62..72
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 73..83
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 53..63
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 64..74
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 75..85

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

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

    public void setFrameBgColor(String color) {
        if (Objects.equals(color, _bgColor)) {
            return;
        }
        _bgColor = color;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/DialModel.java and 5 other locations - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 209..221
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 243..255
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 277..289
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 344..356
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 440..452

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

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

    public void setTickColor(String color) {
        if (Objects.equals(color, _tickColor)) {
            return;
        }
        _tickColor = color;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/DialModelScale.java and 5 other locations - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 175..187
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 209..221
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 243..255
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 277..289
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 440..452

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

            if (desktop != null) { //recycle
                final Page page = Utils.getMainPage(desktop);
                if (page != null) {
                    final Execution exec = new ExecutionImpl(ctx, request, response, desktop, page);
                    WebManager.setDesktop(request, desktop);
zk/src/main/java/org/zkoss/zk/ui/http/RichletFilter.java on lines 162..171

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

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 class Element {

        private final int id;
        private final String label;

zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_1987.java on lines 66..87

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

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

    public String get1(final Object n){
        Wrap r = new Wrap(n);
        Integer c = counts1.get(r);
        if(c==null){
            counts1.put(r, c = 0);
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 40..50
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 51..61
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 62..72
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 73..83
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 64..74
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 75..85
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 86..96

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

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

    public String get2(final Object n){
        Wrap r = new Wrap(n);
        Integer c = counts2.get(r);
        if(c==null){
            counts2.put(r, c = 0);
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 40..50
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 51..61
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 73..83
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 53..63
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 64..74
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 75..85
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 86..96

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

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

    public void setFrameBgColor2(String color) {
        if (Objects.equals(color, _bgColor2)) {
            return;
        }
        _bgColor2 = color;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/DialModel.java and 5 other locations - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 175..187
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 209..221
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 243..255
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 344..356
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 440..452

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

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

    public String get1x(final Object n){
        Wrap r = new Wrap(n);
        Integer c = counts1x.get(r);
        if(c==null){
            counts1x.put(r, c = 0);
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 40..50
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 51..61
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 62..72
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 73..83
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 53..63
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 75..85
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 86..96

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

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

    public String get2(final Object n){
        Wrap r = new Wrap(n);
        Integer c = counts2.get(r);
        if(c==null){
            counts2.put(r, c = 0);
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 40..50
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 51..61
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 62..72
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 73..83
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 53..63
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 64..74
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 86..96

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

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

    public void setFrameFgColor(String color) {
        if (Objects.equals(color, _fgColor)) {
            return;
        }
        _fgColor = color;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/DialModel.java and 5 other locations - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 175..187
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 243..255
zul/src/main/java/org/zkoss/zul/DialModel.java on lines 277..289
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 344..356
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 440..452

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

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

    public String get3(final Object n){
        Wrap r = new Wrap(n);
        Integer c = counts3.get(r);
        if(c==null){
            counts3.put(r, c = 0);
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 40..50
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 51..61
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeCase.java on lines 62..72
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 53..63
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 64..74
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 75..85
zktest/src/main/java/org/zkoss/zktest/bind/issue/B01787NotifyChangeTreeCase.java on lines 86..96

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        public static class Element {
            private final int id;
            private final String label;

            public Element(final int id, final String label) {
zktest/src/main/java/org/zkoss/zktest/test2/B80_ZK_1987VM.java on lines 73..96

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

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