Showing 2,934 of 7,758 total issues

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

/* North.java

    Purpose:
        
    Description:
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/North.java and 3 other locations - About 55 mins to fix
zul/src/main/java/org/zkoss/zul/East.java on lines 1..68
zul/src/main/java/org/zkoss/zul/South.java on lines 1..68
zul/src/main/java/org/zkoss/zul/West.java on lines 1..68

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

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 void beforeChildAdded(Component child, Component refChild) {
        if (child instanceof Caption) {
            if (_caption != null && _caption != child)
                throw new UiException("Only one caption is allowed: " + this);
        } else if (refChild instanceof Caption) {
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Groupbox.java and 1 other location - About 55 mins to fix
zul/src/main/java/org/zkoss/zul/Window.java on lines 905..913

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

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

    static {
        if (IS_SECURITY_ENABLED) {
            COERCE_NULL_TO_NULL = AccessController.doPrivileged(
                    new PrivilegedAction<Boolean>(){
                        public Boolean run() {
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 2 other locations - About 55 mins to fix
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 100..118
zel/src/main/java/org/zkoss/zel/impl/util/Validation.java on lines 41..58

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

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

/* South.java

    Purpose:
        
    Description:
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/South.java and 3 other locations - About 55 mins to fix
zul/src/main/java/org/zkoss/zul/East.java on lines 1..68
zul/src/main/java/org/zkoss/zul/North.java on lines 1..67
zul/src/main/java/org/zkoss/zul/West.java on lines 1..68

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

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

    static {
        if (IS_SECURITY_ENABLED) {
            SKIP_IDENTIFIER_CHECK = AccessController.doPrivileged(
                    new PrivilegedAction<Boolean>(){
                        
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/util/Validation.java and 2 other locations - About 55 mins to fix
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 76..93
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 100..118

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

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

    protected Page getPage() {
        if (_self != null) {
            final Page page = _self.getPage();
            if (page != null)
                return page;
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/select/SelectorComposer.java and 1 other location - About 55 mins to fix
zk/src/main/java/org/zkoss/zk/ui/Components.java on lines 591..600

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

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 Page getCurrentPage(Component comp) {
        if (comp != null) {
            Page page = comp.getPage();
            if (page != null)
                return page;
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/Components.java and 1 other location - About 55 mins to fix
zk/src/main/java/org/zkoss/zk/ui/select/SelectorComposer.java on lines 132..140

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

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 CollectionTemplateDependenceVM() {
        items = new ArrayList<Item>();
        items.add(new Item("A"));
        items.add(new Item("B"));
        items.add(new Item("C"));
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00743_1.java on lines 38..45

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

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 F00743_1() {
        items = new ArrayList<Item>();
        items.add(new Item("A"));
        items.add(new Item("B"));
        items.add(new Item("C"));
Severity: Minor
Found in zktest/src/main/java/org/zkoss/zktest/bind/issue/F00743_1.java and 1 other location - About 55 mins to fix
zktest/src/main/java/org/zkoss/zktest/bind/basic/CollectionTemplateDependenceVM.java on lines 33..40

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

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

    public AVideo(File file) {
        if (file == null)
            throw new IllegalArgumentException("file cannot be null");
        _name = file.getName();
        _file = file;
Severity: Major
Found in zcommon/src/main/java/org/zkoss/video/AVideo.java and 3 other locations - About 50 mins to fix
zcommon/src/main/java/org/zkoss/sound/AAudio.java on lines 107..115
zcommon/src/main/java/org/zkoss/sound/AAudio.java on lines 118..126
zcommon/src/main/java/org/zkoss/video/AVideo.java on lines 110..118

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

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 (element instanceof Character)
                v = ((Character)element).charValue();
            else if (element instanceof String && ((String)element).length() > 0)
                v = ((String)element).charAt(0);
            else
Severity: Minor
Found in zcommon/src/main/java/org/zkoss/xel/fn/CommonFns.java and 1 other location - About 50 mins to fix
zcommon/src/main/java/org/zkoss/xel/fn/CommonFns.java on lines 238..243

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

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 (args != null && !args.isEmpty()) {
            _args = new LinkedHashMap<String, ExValue>();
            for (Map.Entry<String, String> me : args.entrySet())
                _args.put(me.getKey(), new ExValue(me.getValue(), Object.class));
        } else
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/ArgumentInfo.java and 1 other location - About 50 mins to fix
zk/src/main/java/org/zkoss/zk/ui/metainfo/TemplateInfo.java on lines 49..54

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

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

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

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

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

Refactorings

Further Reading

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

                        for (int childIndex = 0, childSize = model
                                .getChildCount(i); childIndex < childSize; childIndex++) {
                            Object child = model.getChild(i, childIndex);
                            if (isSelectable((E) child)) {
                                all.add((E) child);
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/AbstractGroupsModel.java and 1 other location - About 50 mins to fix
zul/src/main/java/org/zkoss/zul/AbstractGroupsModel.java on lines 274..280

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

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

                        } else {
                            Component cc = cell.getFirstChild();
                            if (cc instanceof Label) {
                                String val = ((Label) cc).getValue();
                                group = new Group(val);
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Column.java and 1 other location - About 50 mins to fix
zul/src/main/java/org/zkoss/zul/Listheader.java on lines 573..581

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

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

    protected class ExtraCtrl extends Textbox.ExtraCtrl implements Blockable {
        public boolean shallBlock(AuRequest request) {
            // B50-3316103: special case of readonly component: do not block onChange and onSelect
            final String cmd = request.getCommand();
            if (Events.ON_OPEN.equals(cmd))
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Combobox.java and 1 other location - About 50 mins to fix
zul/src/main/java/org/zkoss/zul/Datebox.java on lines 875..884

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

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

    private Listgroupfoot newListgroupfoot(ListitemRenderer renderer) {
        Listgroupfoot groupfoot = null;
        if (renderer instanceof ListgroupRendererExt)
            groupfoot = ((ListgroupRendererExt) renderer).newListgroupfoot(_listbox);
        if (groupfoot == null) {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/impl/ListboxDataLoader.java and 2 other locations - About 50 mins to fix
zul/src/main/java/org/zkoss/zul/impl/ListboxDataLoader.java on lines 241..250
zul/src/main/java/org/zkoss/zul/impl/ListboxDataLoader.java on lines 252..261

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

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

    public AVideo(URL url) {
        if (url == null)
            throw new IllegalArgumentException("url cannot be null");
        _name = getName(url);
        _url = url;
Severity: Major
Found in zcommon/src/main/java/org/zkoss/video/AVideo.java and 3 other locations - About 50 mins to fix
zcommon/src/main/java/org/zkoss/sound/AAudio.java on lines 107..115
zcommon/src/main/java/org/zkoss/sound/AAudio.java on lines 118..126
zcommon/src/main/java/org/zkoss/video/AVideo.java on lines 123..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 62.

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 (exec != null && exec != curr) {
                    Object val = exec instanceof ExecutionCtrl ? ((ExecutionCtrl) exec).getExtraXelVariable(name)
                            : null;
                    if (val != null)
                        return val;
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/scripting/bsh/BSHInterpreter.java and 1 other location - About 50 mins to fix
zk/src/main/java/org/zkoss/zk/scripting/bsh/BSHInterpreter.java on lines 464..472

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

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

            try {
                if (_log.isDebugEnabled()) {
                    _log.debug(debugInfo);
                }
                doPrePhase(Phase.LOAD_BINDING, ctx);
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java and 3 other locations - About 50 mins to fix
zkbind/src/main/java/org/zkoss/bind/impl/ChildrenBindingHandler.java on lines 92..102
zkbind/src/main/java/org/zkoss/bind/impl/FormBindingHandler.java on lines 109..119
zkbind/src/main/java/org/zkoss/bind/impl/PropertyBindingHandler.java on lines 110..120

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

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 (c == null && name.indexOf('.') > 0) { //might be a class path
            try {
                c = (Converter) Classes.newInstanceByThread(name);
                set(name, c); //assume state-less
            } catch (Exception e) {
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/impl/SystemConverters.java and 1 other location - About 50 mins to fix
zkbind/src/main/java/org/zkoss/bind/impl/SystemValidators.java on lines 72..79

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

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