Showing 2,934 of 7,758 total issues

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

    public List<EventThreadInit> newEventThreadInits(Component comp, Event evt) throws UiException {
        final Class<?>[] ary = _evtInits.toArray();
        if (ary.length == 0)
            return null;

Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java and 1 other location - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 692..710

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

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 List<EventThreadResume> newEventThreadResumes(Component comp, Event evt) throws UiException {
        final Class<?>[] ary = _evtResus.toArray();
        if (ary.length == 0)
            return null;

Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java and 1 other location - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 484..502

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

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

/* IllegalSyntaxException.java


    Purpose: 
    Description: 
zcommon/src/main/java/org/zkoss/lang/OperationException.java on lines 1..55
zcommon/src/main/java/org/zkoss/lang/PotentialDeadLockException.java on lines 1..64
zk/src/main/java/org/zkoss/zk/ui/ActivationTimeoutException.java on lines 1..64
zk/src/main/java/org/zkoss/zk/ui/ComponentNotFoundException.java on lines 1..63
zk/src/main/java/org/zkoss/zk/ui/DesktopUnavailableException.java on lines 1..68
zk/src/main/java/org/zkoss/zk/ui/OperationException.java on lines 1..66
zk/src/main/java/org/zkoss/zk/ui/SuspendNotAllowedException.java on lines 1..70
zk/src/main/java/org/zkoss/zk/ui/metainfo/DefinitionNotFoundException.java on lines 1..65
zk/src/main/java/org/zkoss/zk/ui/metainfo/PropertyNotFoundException.java on lines 1..65

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

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

/* SuspendNotAllowedException.java

    Purpose:
        
    Description:
zcommon/src/main/java/org/zkoss/lang/OperationException.java on lines 1..55
zcommon/src/main/java/org/zkoss/lang/PotentialDeadLockException.java on lines 1..64
zcommon/src/main/java/org/zkoss/util/IllegalSyntaxException.java on lines 1..58
zk/src/main/java/org/zkoss/zk/ui/ActivationTimeoutException.java on lines 1..64
zk/src/main/java/org/zkoss/zk/ui/ComponentNotFoundException.java on lines 1..63
zk/src/main/java/org/zkoss/zk/ui/DesktopUnavailableException.java on lines 1..68
zk/src/main/java/org/zkoss/zk/ui/OperationException.java on lines 1..66
zk/src/main/java/org/zkoss/zk/ui/metainfo/DefinitionNotFoundException.java on lines 1..65
zk/src/main/java/org/zkoss/zk/ui/metainfo/PropertyNotFoundException.java on lines 1..65

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

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

/* ActivationTimeoutException.java

    Purpose:
        
    Description:
zcommon/src/main/java/org/zkoss/lang/OperationException.java on lines 1..55
zcommon/src/main/java/org/zkoss/lang/PotentialDeadLockException.java on lines 1..64
zcommon/src/main/java/org/zkoss/util/IllegalSyntaxException.java on lines 1..58
zk/src/main/java/org/zkoss/zk/ui/ComponentNotFoundException.java on lines 1..63
zk/src/main/java/org/zkoss/zk/ui/DesktopUnavailableException.java on lines 1..68
zk/src/main/java/org/zkoss/zk/ui/OperationException.java on lines 1..66
zk/src/main/java/org/zkoss/zk/ui/SuspendNotAllowedException.java on lines 1..70
zk/src/main/java/org/zkoss/zk/ui/metainfo/DefinitionNotFoundException.java on lines 1..65
zk/src/main/java/org/zkoss/zk/ui/metainfo/PropertyNotFoundException.java on lines 1..65

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

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 final String paramString(Class<?>[] types) {
        if (types != null) {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < types.length; i++) {
                if (types[i] == null) {
zel/src/main/java/org/zkoss/zel/Util.java on lines 365..381

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

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

/* PotentialDeadLockException.java

    Purpose:
        
    Description:
zcommon/src/main/java/org/zkoss/lang/OperationException.java on lines 1..55
zcommon/src/main/java/org/zkoss/util/IllegalSyntaxException.java on lines 1..58
zk/src/main/java/org/zkoss/zk/ui/ActivationTimeoutException.java on lines 1..64
zk/src/main/java/org/zkoss/zk/ui/ComponentNotFoundException.java on lines 1..63
zk/src/main/java/org/zkoss/zk/ui/DesktopUnavailableException.java on lines 1..68
zk/src/main/java/org/zkoss/zk/ui/OperationException.java on lines 1..66
zk/src/main/java/org/zkoss/zk/ui/SuspendNotAllowedException.java on lines 1..70
zk/src/main/java/org/zkoss/zk/ui/metainfo/DefinitionNotFoundException.java on lines 1..65
zk/src/main/java/org/zkoss/zk/ui/metainfo/PropertyNotFoundException.java on lines 1..65

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

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

/* ComponentNotFoundException.java

    Purpose:
        
    Description:
zcommon/src/main/java/org/zkoss/lang/OperationException.java on lines 1..55
zcommon/src/main/java/org/zkoss/lang/PotentialDeadLockException.java on lines 1..64
zcommon/src/main/java/org/zkoss/util/IllegalSyntaxException.java on lines 1..58
zk/src/main/java/org/zkoss/zk/ui/ActivationTimeoutException.java on lines 1..64
zk/src/main/java/org/zkoss/zk/ui/DesktopUnavailableException.java on lines 1..68
zk/src/main/java/org/zkoss/zk/ui/OperationException.java on lines 1..66
zk/src/main/java/org/zkoss/zk/ui/SuspendNotAllowedException.java on lines 1..70
zk/src/main/java/org/zkoss/zk/ui/metainfo/DefinitionNotFoundException.java on lines 1..65
zk/src/main/java/org/zkoss/zk/ui/metainfo/PropertyNotFoundException.java on lines 1..65

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

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

/* OperationException.java

    Purpose:
        
    Description:
zcommon/src/main/java/org/zkoss/lang/PotentialDeadLockException.java on lines 1..64
zcommon/src/main/java/org/zkoss/util/IllegalSyntaxException.java on lines 1..58
zk/src/main/java/org/zkoss/zk/ui/ActivationTimeoutException.java on lines 1..64
zk/src/main/java/org/zkoss/zk/ui/ComponentNotFoundException.java on lines 1..63
zk/src/main/java/org/zkoss/zk/ui/DesktopUnavailableException.java on lines 1..68
zk/src/main/java/org/zkoss/zk/ui/OperationException.java on lines 1..66
zk/src/main/java/org/zkoss/zk/ui/SuspendNotAllowedException.java on lines 1..70
zk/src/main/java/org/zkoss/zk/ui/metainfo/DefinitionNotFoundException.java on lines 1..65
zk/src/main/java/org/zkoss/zk/ui/metainfo/PropertyNotFoundException.java on lines 1..65

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

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

/* PropertyNotFoundException.java

    Purpose:
        
    Description:
zcommon/src/main/java/org/zkoss/lang/OperationException.java on lines 1..55
zcommon/src/main/java/org/zkoss/lang/PotentialDeadLockException.java on lines 1..64
zcommon/src/main/java/org/zkoss/util/IllegalSyntaxException.java on lines 1..58
zk/src/main/java/org/zkoss/zk/ui/ActivationTimeoutException.java on lines 1..64
zk/src/main/java/org/zkoss/zk/ui/ComponentNotFoundException.java on lines 1..63
zk/src/main/java/org/zkoss/zk/ui/DesktopUnavailableException.java on lines 1..68
zk/src/main/java/org/zkoss/zk/ui/OperationException.java on lines 1..66
zk/src/main/java/org/zkoss/zk/ui/SuspendNotAllowedException.java on lines 1..70
zk/src/main/java/org/zkoss/zk/ui/metainfo/DefinitionNotFoundException.java on lines 1..65

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

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 final String paramString(Class<?>[] types) {
        if (types != null) {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < types.length; i++) {
                if (types[i] == 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/util/ReflectionUtil.java on lines 452..468

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

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

/* OperationException.java

    Purpose:
        
    Description:
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/OperationException.java and 9 other locations - About 1 hr to fix
zcommon/src/main/java/org/zkoss/lang/OperationException.java on lines 1..55
zcommon/src/main/java/org/zkoss/lang/PotentialDeadLockException.java on lines 1..64
zcommon/src/main/java/org/zkoss/util/IllegalSyntaxException.java on lines 1..58
zk/src/main/java/org/zkoss/zk/ui/ActivationTimeoutException.java on lines 1..64
zk/src/main/java/org/zkoss/zk/ui/ComponentNotFoundException.java on lines 1..63
zk/src/main/java/org/zkoss/zk/ui/DesktopUnavailableException.java on lines 1..68
zk/src/main/java/org/zkoss/zk/ui/SuspendNotAllowedException.java on lines 1..70
zk/src/main/java/org/zkoss/zk/ui/metainfo/DefinitionNotFoundException.java on lines 1..65
zk/src/main/java/org/zkoss/zk/ui/metainfo/PropertyNotFoundException.java on lines 1..65

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

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

/* DesktopUnavailableException.java

    Purpose:
        
    Description:
zcommon/src/main/java/org/zkoss/lang/OperationException.java on lines 1..55
zcommon/src/main/java/org/zkoss/lang/PotentialDeadLockException.java on lines 1..64
zcommon/src/main/java/org/zkoss/util/IllegalSyntaxException.java on lines 1..58
zk/src/main/java/org/zkoss/zk/ui/ActivationTimeoutException.java on lines 1..64
zk/src/main/java/org/zkoss/zk/ui/ComponentNotFoundException.java on lines 1..63
zk/src/main/java/org/zkoss/zk/ui/OperationException.java on lines 1..66
zk/src/main/java/org/zkoss/zk/ui/SuspendNotAllowedException.java on lines 1..70
zk/src/main/java/org/zkoss/zk/ui/metainfo/DefinitionNotFoundException.java on lines 1..65
zk/src/main/java/org/zkoss/zk/ui/metainfo/PropertyNotFoundException.java on lines 1..65

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

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

/* DefinitionNotFoundException.java

    Purpose:
        
    Description:
zcommon/src/main/java/org/zkoss/lang/OperationException.java on lines 1..55
zcommon/src/main/java/org/zkoss/lang/PotentialDeadLockException.java on lines 1..64
zcommon/src/main/java/org/zkoss/util/IllegalSyntaxException.java on lines 1..58
zk/src/main/java/org/zkoss/zk/ui/ActivationTimeoutException.java on lines 1..64
zk/src/main/java/org/zkoss/zk/ui/ComponentNotFoundException.java on lines 1..63
zk/src/main/java/org/zkoss/zk/ui/DesktopUnavailableException.java on lines 1..68
zk/src/main/java/org/zkoss/zk/ui/OperationException.java on lines 1..66
zk/src/main/java/org/zkoss/zk/ui/SuspendNotAllowedException.java on lines 1..70
zk/src/main/java/org/zkoss/zk/ui/metainfo/PropertyNotFoundException.java on lines 1..65

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

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 triggerBeforeHostChildRemoved(Component child) {
        if (isDisabledHostChanged()) return;
        List<ShadowElement> shadowRoots = getShadowRoots();
        if (!shadowRoots.isEmpty()) {
            Map<Component, Integer> indexCacheMap = getIndexCacheMap(this);
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.java and 1 other location - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.java on lines 4151..4172

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

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 triggerAfterHostChildAdded(Component child) {
        if (isDisabledHostChanged()) return;
        List<ShadowElement> shadowRoots = getShadowRoots();
        if (!shadowRoots.isEmpty()) {
            Map<Component, Integer> indexCacheMap = getIndexCacheMap(this);
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.java and 1 other location - About 1 hr to fix
zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.java on lines 4087..4108

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

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

    public void doDeserialize0(Window win, Label msg) throws Exception{
        ByteArrayInputStream oaos = new ByteArrayInputStream(_bytes);
        ObjectInputStream oos = new ObjectInputStream(oaos);
        
        Window newwin = (Window) oos.readObject();
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 111..124
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 138..152
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 143..156

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

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

    public void doDeserialize0(Window win, Label msg) throws Exception {
        ByteArrayInputStream oaos = new ByteArrayInputStream(_bytes);
        ObjectInputStream oos = new ObjectInputStream(oaos);
        Window newwin = (Window) oos.readObject();
        Component parent = win.getParent();
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 111..124
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 138..152
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelMapVM.java on lines 141..155

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

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

    public void doDeserialize0(Window win, Label msg) throws Exception {
        ByteArrayInputStream oaos = new ByteArrayInputStream(_bytes);
        ObjectInputStream oos = new ObjectInputStream(oaos);
        Window newwin = (Window) oos.readObject();
        Component parent = win.getParent();
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelListVM.java on lines 138..152
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelMapVM.java on lines 141..155
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 143..156

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

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

    public void doDeserialize0(Window win, Label msg) throws Exception {
        ByteArrayInputStream oaos = new ByteArrayInputStream(_bytes);
        ObjectInputStream oos = new ObjectInputStream(oaos);

        Window newwin = (Window) oos.readObject();
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelArrayVM.java on lines 111..124
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelMapVM.java on lines 141..155
zktest/src/main/java/org/zkoss/zktest/test2/F96_ZK_4394_ListModelSetVM.java on lines 143..156

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

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