Showing 2,934 of 7,758 total issues

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

        for (int j = 0; j < _data.length; ++j) {
            Object d = _data[j];
            if (d instanceof DeferredValue)
                d = ((DeferredValue) d).getValue();
            if (d instanceof Component)
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/au/AuResponse.java and 1 other location - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/au/out/AuSetAttributes.java on lines 51..60

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

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

            while ((p = p.getParent()) != null) { //don't check p in _attached
                if (outs.contains(p)) //checked
                    break;
                if (ins.contains(p) || _invalidated.contains(p) || _attached.contains(p)) {
                    it.remove();
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiVisualizer.java and 1 other location - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/impl/UiVisualizer.java on lines 950..959

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

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

package org.zkoss.zktest.test2.cardlayout;

public class ValueObject {
    private String image;
    private String title;
zktest/src/main/java/org/zkoss/zktest/bind/databinding/bean/Person.java on lines 1..44
zktest/src/main/java/org/zkoss/zktest/test2/F86_ZK_3962VM.java on lines 1..35

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

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

/* Person.java
    Purpose:

    Description:

zktest/src/main/java/org/zkoss/zktest/test2/F86_ZK_3962VM.java on lines 1..35
zktest/src/main/java/org/zkoss/zktest/test2/cardlayout/ValueObject.java on lines 1..26

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

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

package org.zkoss.zktest.test2;

public class F86_ZK_3962VM {

    private int width;
zktest/src/main/java/org/zkoss/zktest/bind/databinding/bean/Person.java on lines 1..44
zktest/src/main/java/org/zkoss/zktest/test2/cardlayout/ValueObject.java on lines 1..26

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

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 static Map<Component, ShadowInfo> getShadowInfos(boolean autoCreate) {
        Execution exec = Executions.getCurrent();
        if (exec == null)
            return null;

Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/impl/Utils.java and 1 other location - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/impl/Utils.java on lines 112..123

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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 class User {
        String name;
        Profile profile;

        public User(String name){
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00901ReferenceBinding.java on lines 62..88

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

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 class Profile {
        String number;

        Address address;
        
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00901ReferenceBinding.java on lines 35..60

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

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 static Map<Component, ComponentInfo> getComponentInfos(boolean autoCreate) {
        Execution exec = Executions.getCurrent();
        if (exec == null)
            return null;

Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/impl/Utils.java and 1 other location - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/impl/Utils.java on lines 137..148

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

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 afterShadowAttached(ShadowElement shadow, Component host) {
        final UiLifeCycle[] ary = _uiCycles.toArray();
        for (int j = 0; j < ary.length; ++j) {
            try {
                ary[j].afterShadowAttached(shadow, host);
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java and 5 other locations - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1141..1150
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1156..1165
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1223..1232
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1253..1262
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1268..1277

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

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 afterComponentAttached(Component comp, Page page) {
        final UiLifeCycle[] ary = _uiCycles.toArray();
        for (int j = 0; j < ary.length; ++j) {
            try {
                ary[j].afterComponentAttached(comp, page);
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java and 5 other locations - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1156..1165
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1208..1217
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1223..1232
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1253..1262
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1268..1277

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

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 afterPageDetached(Page page, Desktop prevdesktop) {
        final UiLifeCycle[] ary = _uiCycles.toArray();
        for (int j = 0; j < ary.length; ++j) {
            try {
                ary[j].afterPageDetached(page, prevdesktop);
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java and 5 other locations - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1141..1150
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1156..1165
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1208..1217
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1223..1232
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1253..1262

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

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 afterShadowDetached(ShadowElement shadow, Component prevhost) {
        final UiLifeCycle[] ary = _uiCycles.toArray();
        for (int j = 0; j < ary.length; ++j) {
            try {
                ary[j].afterShadowDetached(shadow, prevhost);
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java and 5 other locations - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1141..1150
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1156..1165
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1208..1217
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1253..1262
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1268..1277

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

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 afterComponentDetached(Component comp, Page prevpage) {
        final UiLifeCycle[] ary = _uiCycles.toArray();
        for (int j = 0; j < ary.length; ++j) {
            try {
                ary[j].afterComponentDetached(comp, prevpage);
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java and 5 other locations - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1141..1150
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1208..1217
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1223..1232
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1253..1262
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1268..1277

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

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 afterPageAttached(Page page, Desktop desktop) {
        final UiLifeCycle[] ary = _uiCycles.toArray();
        for (int j = 0; j < ary.length; ++j) {
            try {
                ary[j].afterPageAttached(page, desktop);
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java and 5 other locations - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1141..1150
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1156..1165
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1208..1217
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1223..1232
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1268..1277

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

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 MyFilenameFilter(String pattern, boolean reg) {
            if (pattern == null)
                pattern = "";
            pattern = pattern.trim();
            this.str = pattern;
Severity: Major
Found in zktest/src/main/java/org/zkoss/zktest/test2/MainLayout.java and 1 other location - About 1 hr to fix
zktest/src/main/java/org/zkoss/zktest/test2/MainWindow.java on lines 156..164

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

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 String getLabel() {
        final Component cell = getFirstChild();
        if (cell != null) {
            if (cell instanceof Label)
                return ((Label) cell).getValue();
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Groupfoot.java and 1 other location - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/Group.java on lines 211..222

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

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 MyFilenameFilter(String pattern,boolean reg){
            if(pattern==null) pattern="";
            pattern = pattern.trim();
            this.str = pattern;
            this.reg = reg;
Severity: Major
Found in zktest/src/main/java/org/zkoss/zktest/test2/MainWindow.java and 1 other location - About 1 hr to fix
zktest/src/main/java/org/zkoss/zktest/test2/MainLayout.java on lines 383..392

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

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 void addAddon(Locator locator, URL url) {
        if (locator == null || url == null)
            throw new IllegalArgumentException("null");

        if (_loaded) {
zk/src/main/java/org/zkoss/zk/ui/metainfo/DefinitionLoaders.java on lines 120..131

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

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

/* B86_ZK_4017RowRenderer.java

    Purpose:
        
    Description:
zktest/src/main/java/org/zkoss/zktest/test2/B86_ZK_4017ListitemRenderer.java on lines 1..30

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

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