Showing 2,934 of 7,758 total issues

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

            if (Document.this._root != null && (newItem instanceof Element) 
            && (!replace || !(other instanceof Element)))
                throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,
                    "Only one root element is allowed, when adding "+newItem, getLocator());
Severity: Minor
Found in zcommon/src/main/java/org/zkoss/idom/Document.java and 1 other location - About 45 mins to fix
zcommon/src/main/java/org/zkoss/idom/Document.java on lines 278..281

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

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

        } else if (i >= children.length) {
            Node c[] = new Node[i + 1];
            System.arraycopy(children, 0, c, 0, children.length);
            children = c;
        }
Severity: Minor
Found in zel/src/main/java/org/zkoss/zel/impl/parser/SimpleNode.java and 1 other location - About 45 mins to fix
zcommon/src/main/java/org/zkoss/json/parser/Yylex.java on lines 337..342

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

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

    private void saveCurrentItem() {
        dbItemName = currentItem.getName();
        dbMainTagValue = currentItem.getMainTag().getValue();
        dbTagValues.clear();
        for (Tag tag : currentItem.getTags()) {
Severity: Major
Found in zktest/src/main/java/org/zkoss/zktest/bind/issue/B02078.java and 5 other locations - About 45 mins to fix
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithList.java on lines 119..126
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithSet.java on lines 122..129
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 71..78
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 98..105
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 103..110

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

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

    private void saveCurrentItem() {
        dbItemName = currentItem.getName();
        dbMainTagValue = currentItem.getMainTag().getValue();
        dbTagValues.clear();
        for (Tag tag : currentItem.getTags()) {
zktest/src/main/java/org/zkoss/zktest/bind/issue/B02078.java on lines 91..98
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithList.java on lines 119..126
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithSet.java on lines 122..129
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 71..78
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 103..110

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

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

    private void saveCurrentItem() {
        dbItemName = currentItem.getName();
        dbMainTagValue = currentItem.getMainTag().getValue();
        dbTagValues.clear();
        for (Tag tag : currentItem.getTags()) {
zktest/src/main/java/org/zkoss/zktest/bind/issue/B02078.java on lines 91..98
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithList.java on lines 119..126
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithSet.java on lines 122..129
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 98..105
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 103..110

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

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

    private void saveCurrentItem() {
        dbItemName = currentItem.getName();
        dbMainTagValue = currentItem.getMainTag().getValue();
        dbTagValues.clear();
        for (Tag tag : currentItem.getTags()) {
zktest/src/main/java/org/zkoss/zktest/bind/issue/B02078.java on lines 91..98
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithList.java on lines 119..126
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 71..78
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 98..105
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 103..110

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

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

    private void saveCurrentItem() {
        dbItemName = currentItem.getName();
        dbMainTagValue = currentItem.getMainTag().getValue();
        dbTagValues.clear();
        for (Tag tag : currentItem.getTags()) {
zktest/src/main/java/org/zkoss/zktest/bind/issue/B02078.java on lines 91..98
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithSet.java on lines 122..129
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 71..78
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 98..105
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 103..110

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

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

    private void saveCurrentItem() {
        dbItemName = currentItem.getName();
        dbMainTagValue = currentItem.getMainTag().getValue();
        dbTagValues.clear();
        for (Tag tag : currentItem.getTags()) {
zktest/src/main/java/org/zkoss/zktest/bind/issue/B02078.java on lines 91..98
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithList.java on lines 119..126
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithSet.java on lines 122..129
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 71..78
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 98..105

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

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

    @Init
    public void init() {
        loadCurrentItem();
        bunchTags = new LinkedHashMap<String, Tag>(3);
        bunchTags.put("addAll1", new Tag("addAll1"));
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelMapVM.java on lines 37..44

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

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

    void doSaveAfter(Component comp, String command, Event evt, Set<Property> notifys) {
        final List<SaveFormBinding> bindings = _saveFormAfterBindings.get(command);
        if (bindings != null) {
            for (SaveFormBinding binding : bindings) {
                doSaveBinding(comp, binding, command, evt, notifys);
zkbind/src/main/java/org/zkoss/bind/impl/FormBindingHandler.java on lines 92..99
zkbind/src/main/java/org/zkoss/bind/impl/PropertyBindingHandler.java on lines 277..284
zkbind/src/main/java/org/zkoss/bind/impl/PropertyBindingHandler.java on lines 286..294

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

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

  private boolean jj_3R_33() {
    if (jj_scan_token(LPAREN)) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_39()) jj_scanpos = xsp;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 3 other locations - About 45 mins to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2154..2161
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2185..2192
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2229..2236

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

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

    void doSaveBefore(Component comp, String command, Event evt, Set<Property> notifys) {
        final List<SavePropertyBinding> bindings = _saveBeforeBindings.get(command);
        if (bindings != null) {
            for (SavePropertyBinding binding : bindings) {
                doSaveBinding(comp, binding, command, evt, notifys);
zkbind/src/main/java/org/zkoss/bind/impl/FormBindingHandler.java on lines 92..99
zkbind/src/main/java/org/zkoss/bind/impl/FormBindingHandler.java on lines 154..161
zkbind/src/main/java/org/zkoss/bind/impl/PropertyBindingHandler.java on lines 286..294

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

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

    void doSaveAfter(Component comp, String command, Event evt, Set<Property> notifys) {
        //        final BindEvaluatorX eval = getEvaluatorX(); 
        final List<SavePropertyBinding> bindings = _saveAfterBindings.get(command);
        if (bindings != null) {
            for (SavePropertyBinding binding : bindings) {
zkbind/src/main/java/org/zkoss/bind/impl/FormBindingHandler.java on lines 92..99
zkbind/src/main/java/org/zkoss/bind/impl/FormBindingHandler.java on lines 154..161
zkbind/src/main/java/org/zkoss/bind/impl/PropertyBindingHandler.java on lines 277..284

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

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

    @Init
    public void init() {
        loadCurrentItem();
        bunchTags = new ListModelMap<>(3);
        bunchTags.put("addAll1", new Tag("addAll1"));
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithMap.java on lines 56..63

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

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

  private boolean jj_3R_25() {
    if (jj_scan_token(START_SET_OR_MAP)) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_31()) jj_scanpos = xsp;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 3 other locations - About 45 mins to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2154..2161
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2185..2192
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2258..2265

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

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

    void doSaveBefore(Component comp, String command, Event evt, Set<Property> notifys) {
        final List<SaveFormBinding> bindings = _saveFormBeforeBindings.get(command);
        if (bindings != null) {
            for (SaveFormBinding binding : bindings) {
                doSaveBinding(comp, binding, command, evt, notifys);
zkbind/src/main/java/org/zkoss/bind/impl/FormBindingHandler.java on lines 154..161
zkbind/src/main/java/org/zkoss/bind/impl/PropertyBindingHandler.java on lines 277..284
zkbind/src/main/java/org/zkoss/bind/impl/PropertyBindingHandler.java on lines 286..294

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

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

  private boolean jj_3R_98() {
    if (jj_scan_token(LBRACK)) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_104()) jj_scanpos = xsp;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 3 other locations - About 45 mins to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2154..2161
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2229..2236
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2258..2265

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

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 void stop() throws InterruptedException {
        final Desktop desktop = Executions.getCurrent().getDesktop();
        if (desktop.isServerPushEnabled()) {
            desktop.enableServerPush(false);
            desktop.setAttribute("sp.ceased", Boolean.TRUE);
Severity: Minor
Found in zktest/src/main/java/org/zkoss/zktest/test2/B2202620.java and 1 other location - About 45 mins to fix
zktest/src/main/java/org/zkoss/zktest/test2/ServerPush.java on lines 53..61

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

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

  private boolean jj_3R_99() {
    if (jj_scan_token(START_SET_OR_MAP)) return true;
    Token xsp;
    xsp = jj_scanpos;
    if (jj_3R_105()) jj_scanpos = xsp;
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java and 3 other locations - About 45 mins to fix
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2185..2192
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2229..2236
zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java on lines 2258..2265

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

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 void stop() throws InterruptedException {
        final Desktop desktop = Executions.getCurrent().getDesktop();
        if (desktop.isServerPushEnabled()) {
            desktop.enableServerPush(false);
            desktop.setAttribute("sp.ceased", Boolean.TRUE);
Severity: Minor
Found in zktest/src/main/java/org/zkoss/zktest/test2/ServerPush.java and 1 other location - About 45 mins to fix
zktest/src/main/java/org/zkoss/zktest/test2/B2202620.java on lines 43..51

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

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