Showing 2,934 of 7,758 total issues

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

    public static class Item implements Serializable {

        private String name;
        private Tag mainTag;
        private List<Tag> tags;
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithList.java on lines 174..213
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithMap.java on lines 177..216
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithSet.java on lines 176..215
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 126..166
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelMapVM.java on lines 157..196
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 158..199

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

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

    public static class Item  implements Serializable {

        private String name;
        private Tag mainTag;
        private Map<String, Tag> tags;
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithList.java on lines 174..213
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithSet.java on lines 176..215
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 126..166
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 154..195
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelMapVM.java on lines 157..196
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 158..199

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

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

    public static class Item implements Serializable {

        private String name;
        private Tag mainTag;
        private Set<Tag> tags;
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithList.java on lines 174..213
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithMap.java on lines 177..216
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/form/FormWithSet.java on lines 176..215
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 126..166
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 154..195
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelMapVM.java on lines 157..196

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

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

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

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

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

Refactorings

Further Reading

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

    public static final String outDeviceStyleSheets(ServletContext ctx, HttpServletRequest request,
            HttpServletResponse response, String deviceType) {
        Execution old = Executions.getCurrent();
        Execution exec = new ExecutionImpl(ctx, request, response, null, null);
        ExecutionsCtrl.setCurrent(exec);
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/fn/JspFns.java and 2 other locations - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/fn/JspFns.java on lines 64..77
zk/src/main/java/org/zkoss/zk/fn/JspFns.java on lines 128..141

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

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

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

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

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

Refactorings

Further Reading

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

    public static final String outDeviceJavaScripts(ServletContext ctx, HttpServletRequest request,
            HttpServletResponse response, String deviceType) {
        Execution old = Executions.getCurrent();
        Execution exec = new ExecutionImpl(ctx, request, response, null, null);
        ExecutionsCtrl.setCurrent(exec);
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/fn/JspFns.java and 2 other locations - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/fn/JspFns.java on lines 64..77
zk/src/main/java/org/zkoss/zk/fn/JspFns.java on lines 109..122

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

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

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

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

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

Refactorings

Further Reading

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

    public static String outZkHtmlTags(ServletContext ctx, HttpServletRequest request, HttpServletResponse response,
            String deviceType) {
        Execution old = Executions.getCurrent();
        Execution exec = new ExecutionImpl(ctx, request, response, null, null);
        ExecutionsCtrl.setCurrent(exec);
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/fn/JspFns.java and 2 other locations - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/fn/JspFns.java on lines 109..122
zk/src/main/java/org/zkoss/zk/fn/JspFns.java on lines 128..141

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

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 int jjMoveStringLiteralDfa9_2(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return jjStartNfa_2(7, old0);
   try { curChar = input_stream.readChar(); }
zel/src/main/java/org/zkoss/zel/impl/parser/ELParserTokenManager.java on lines 1463..1482

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

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 void fixClone() {
        if (_sortAsc instanceof TreeitemComparator) {
            final TreeitemComparator c = (TreeitemComparator) _sortAsc;
            if (c.getTreecol() == this && c.isAscending())
                _sortAsc = new TreeitemComparator(this, true, c.shallIgnoreCase());
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Treecol.java and 1 other location - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/Listheader.java on lines 773..784

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

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 UiException wrap(Throwable t, int code) {
            t = Exceptions.unwrap(t);
            boolean skipWrapping = false;
            if (t instanceof Expectable)
                skipWrapping = true;
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/UiException.java and 1 other location - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/UiException.java on lines 58..71

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

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 void fixClone() {
        if (_sortAsc instanceof ListitemComparator) {
            final ListitemComparator c = (ListitemComparator) _sortAsc;
            if (c.getListheader() == this && c.isAscending())
                _sortAsc = new ListitemComparator(this, true, c.shallIgnoreCase());
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Listheader.java and 1 other location - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/Treecol.java on lines 510..521

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

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 UiException wrap(Throwable t, String msg) {
            t = Exceptions.unwrap(t);
            boolean skipWrapping = false;
            if (t instanceof Expectable)
                skipWrapping = true;
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/UiException.java and 1 other location - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/UiException.java on lines 113..125

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

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 int jjMoveStringLiteralDfa9_1(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return jjStartNfa_1(7, old0);
   try { curChar = input_stream.readChar(); }
zel/src/main/java/org/zkoss/zel/impl/parser/ELParserTokenManager.java on lines 670..689

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

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

    private Class<?>[] getTypesFromValues(Object[] values) {
        if (values == null) {
            return null;
        }
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/AstValue.java and 1 other location - About 1 hr to fix
zel/src/main/java/org/zkoss/zel/Util.java on lines 506..520

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

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

    private static Class<?>[] getTypesFromValues(Object[] values) {
        if (values == null) {
            return null;
        }
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/Util.java and 1 other location - About 1 hr to fix
zel/src/main/java/org/zkoss/zel/impl/parser/AstValue.java on lines 344..358

Duplicated Code

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

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

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

Tuning

This issue has a mass of 104.

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

            try {
                try {
                    _renderer.render(item, value, index);
                } catch (AbstractMethodError ex) {
                    final Method m = _renderer.getClass().getMethod("render",
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Listbox.java and 1 other location - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/Combobox.java on lines 635..647

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

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 if (hasGroup()) {
            int index = newItem.getIndex();
            final int[] g = getGroupsInfoAt(index);
            if (g != null) {
                g[1]++;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Rows.java and 1 other location - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 2190..2198

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

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 if (!_groupsInfo.isEmpty()) {
            int index = newItem.getIndex();
            final int[] g = getGroupsInfoAt(index);
            if (g != null) {
                g[1]++;
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Listbox.java and 1 other location - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/Rows.java on lines 458..467

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

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

            try {
                try {
                    _renderer.render(item, value, index);
                } catch (AbstractMethodError ex) {
                    final Method m = _renderer.getClass().getMethod("render",
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/Combobox.java and 1 other location - About 1 hr to fix
zul/src/main/java/org/zkoss/zul/Listbox.java on lines 2760..2772

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

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

/* Embed.java

    Purpose:
        
    Description:
Severity: Major
Found in zhtml/src/main/java/org/zkoss/zhtml/Embed.java and 1 other location - About 1 hr to fix
zhtml/src/main/java/org/zkoss/zhtml/Meta.java on lines 1..92

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

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

/* Meta.java

    Purpose:
        
    Description:
Severity: Major
Found in zhtml/src/main/java/org/zkoss/zhtml/Meta.java and 1 other location - About 1 hr to fix
zhtml/src/main/java/org/zkoss/zhtml/Embed.java on lines 1..91

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

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