Showing 7,775 of 7,775 total issues

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

    @Override
    public void doAfterCompose(Component comp) throws Exception {
        super.doAfterCompose(comp);
        treeModel = new DefaultTreeModel<String>(newNode("root", level1Nodes()));

Severity: Major
Found in zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2764_3.java and 3 other locations - About 30 mins to fix
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2764.java on lines 45..51
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2764_1.java on lines 45..51
zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2764_2.java on lines 44..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 42.

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

        if (ProxyFactory.isProxyClass(type)) {
            type = type.getSuperclass();
            if (obj != null && type.isAssignableFrom(obj.getClass()))
                return obj;
        }
Severity: Minor
Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 2 other locations - About 30 mins to fix
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 524..528
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 688..692

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

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

        if (ProxyFactory.isProxyClass(type)) {
            type = type.getSuperclass();
            if (obj != null && type.isAssignableFrom(obj.getClass()))
                return obj;
        }
Severity: Minor
Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 2 other locations - About 30 mins to fix
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 524..528
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 590..594

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

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 void setValueRadius(double radius) {
        if (Double.compare(_valueRadius, radius) != 0) {
            _valueRadius = radius;
            fireEvent(ChartDataEvent.CHANGED, DialChartDataEvent.VALUE_RADIUS, radius);
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/DialModelScale.java and 6 other locations - About 30 mins to fix
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 88..93
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 144..149
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 201..206
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 314..319
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 333..338
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 474..479

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

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 void setTickRadius(double radius) {
        if (Double.compare(_tickRadius, radius) != 0) {
            _tickRadius = radius;
            fireEvent(ChartDataEvent.CHANGED, DialChartDataEvent.TICK_RADIUS, radius);
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/DialModelScale.java and 6 other locations - About 30 mins to fix
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 88..93
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 144..149
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 182..187
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 201..206
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 333..338
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 474..479

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

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

    public void addVariableResolverInfo(VariableResolverInfo resolver) {
        if (resolver == null)
            throw new IllegalArgumentException("null");

        if (_resolvdefs == null)
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java and 4 other locations - About 30 mins to fix
zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java on lines 378..385
zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java on lines 422..429
zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java on lines 546..553
zweb/src/main/java/org/zkoss/web/servlet/dsp/impl/Node.java on lines 40..46

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

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 void setTextRadius(double radius) {
        if (Double.compare(_textRadius, radius) != 0) {
            _textRadius = radius;
            fireEvent(ChartDataEvent.CHANGED, DialChartDataEvent.TEXT_RADIUS, radius);
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/DialModelScale.java and 6 other locations - About 30 mins to fix
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 88..93
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 182..187
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 201..206
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 314..319
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 333..338
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 474..479

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

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 void setNeedleRadius(double radius) {
        if (Double.compare(_needleRadius, radius) != 0) {
            _needleRadius = radius;
            fireEvent(ChartDataEvent.CHANGED, DialChartDataEvent.NEEDLE_RADIUS, radius);
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/DialModelScale.java and 6 other locations - About 30 mins to fix
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 88..93
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 144..149
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 182..187
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 201..206
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 314..319
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 333..338

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

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

    void addChild(Node node) {
        if (node == null)
            throw new IllegalArgumentException("null");
        if (_children == null)
            _children = new LinkedList<Node>();
Severity: Major
Found in zweb/src/main/java/org/zkoss/web/servlet/dsp/impl/Node.java and 4 other locations - About 30 mins to fix
zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java on lines 378..385
zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java on lines 410..417
zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java on lines 422..429
zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java on lines 546..553

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

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 void setTickLabelOffset(double tickLabelOffset) {
        if (Double.compare(_tickLabelOffset, tickLabelOffset) != 0) {
            _tickLabelOffset = tickLabelOffset;
            fireEvent(ChartDataEvent.CHANGED, DialChartDataEvent.TICK_LABEL_OFFSET, tickLabelOffset);
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/DialModelScale.java and 6 other locations - About 30 mins to fix
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 88..93
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 144..149
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 182..187
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 201..206
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 314..319
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 474..479

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

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

    public void addInitiatorInfo(InitiatorInfo init) {
        if (init == null)
            throw new IllegalArgumentException("null");

        if (_initdefs == null)
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java and 4 other locations - About 30 mins to fix
zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java on lines 410..417
zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java on lines 422..429
zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java on lines 546..553
zweb/src/main/java/org/zkoss/web/servlet/dsp/impl/Node.java on lines 40..46

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

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 void setValue(double val) {
        if (Double.compare(_value, val) != 0) {
            _value = val;
            fireEvent(ChartDataEvent.CHANGED, DialChartDataEvent.SCALE_VALUE, val);
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/DialModelScale.java and 6 other locations - About 30 mins to fix
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 144..149
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 182..187
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 201..206
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 314..319
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 333..338
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 474..479

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

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 void setValueAngle(double angle) {
        if (Double.compare(_valueAngle, angle) != 0) {
            _valueAngle = angle;
            fireEvent(ChartDataEvent.CHANGED, DialChartDataEvent.VALUE_ANGLE, angle);
        }
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/DialModelScale.java and 6 other locations - About 30 mins to fix
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 88..93
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 144..149
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 182..187
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 314..319
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 333..338
zul/src/main/java/org/zkoss/zul/DialModelScale.java on lines 474..479

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

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

    public void addFunctionMapperInfo(FunctionMapperInfo mapper) {
        if (mapper == null)
            throw new IllegalArgumentException("null");

        if (_mapperdefs == null)
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java and 4 other locations - About 30 mins to fix
zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java on lines 378..385
zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java on lines 410..417
zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java on lines 546..553
zweb/src/main/java/org/zkoss/web/servlet/dsp/impl/Node.java on lines 40..46

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

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

    public void addForwardInfo(ForwardInfo forward) {
        if (forward == null)
            throw new IllegalArgumentException("null");

        if (_forwdefs == null)
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java and 4 other locations - About 30 mins to fix
zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java on lines 378..385
zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java on lines 410..417
zk/src/main/java/org/zkoss/zk/ui/metainfo/PageDefinition.java on lines 422..429
zweb/src/main/java/org/zkoss/web/servlet/dsp/impl/Node.java on lines 40..46

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

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

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

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

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

Refactorings

Further Reading

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

    public void setSeltype(String seltype) throws WrongValueException {
        if ("single".equals(seltype))
            setMultiple(false);
        else if ("multiple".equals(seltype))
            setMultiple(true);
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Listbox.java and 1 other location - About 30 mins to fix
zul/src/main/java/org/zkoss/zul/Tree.java on lines 951..958

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

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

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

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

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

Refactorings

Further Reading

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

                    if (init instanceof InitiatorExt) {
                        if (comps == null)
                            comps = new Component[0];
                        ((InitiatorExt) init).doAfterCompose(page, comps);
                    }
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/impl/Initiators.java and 1 other location - About 30 mins to fix
zk/src/main/java/org/zkoss/zk/ui/impl/Initiators.java on lines 124..128

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

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 synchronized void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
        s.defaultWriteObject();

        willSerialize(_model);
        Serializables.smartWrite(s, _model);
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Tabbox.java and 1 other location - About 30 mins to fix
zul/src/main/java/org/zkoss/zul/Tree.java on lines 1549..1556

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

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

    @NotifyChange("selItem")
    public void doTest(String bb, int sa, long tt) {
        label += "1";
        Clients.log("do test!!" + bb + "," + sa + "," + tt);
    }
zktest/src/main/java/org/zkoss/zktest/test2/F95_ZK_4552SyntaxVM.java on lines 46..50

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

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

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

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

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

Refactorings

Further Reading

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

            if(reg){
                Matcher matcher = pattern.matcher(name);
                return matcher.matches();
            }else{
                return name.toUpperCase().indexOf(str.toUpperCase())>=0;
Severity: Minor
Found in zktest/src/main/java/org/zkoss/zktest/test2/MainWindow.java and 1 other location - About 30 mins to fix
zktest/src/main/java/org/zkoss/zktest/test2/MainLayout.java on lines 411..416

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

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