Showing 7,775 of 7,775 total issues

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

    public String toString() {
        final StringBuffer sb = new StringBuffer(40).append("[custom-attributes:");
        if (_attrs != null)
            for (String name : _attrs.keySet())
                sb.append(' ').append(name);
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/AttributesInfo.java and 1 other location - About 45 mins to fix
zk/src/main/java/org/zkoss/zk/ui/metainfo/VariablesInfo.java on lines 129..135

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

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

    @AfterCompose
    public void init(@SelectorParam("#l14") Label l4,
            @SelectorParam("label") List<Label> labels) {
        for (int i = 0; i < labels.size(); i++) {
            labels.get(i).setValue("Init " + i);
zktest/src/main/java/org/zkoss/zktest/bind/basic/SelectorParamVM.java on lines 25..33

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

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 Object evaluate(Evaluator eval, Page page, String expr, Class<?> expectedClass) {
        if (expr != null && expr.indexOf("${") >= 0) {
            return eval.evaluate(page, eval.parseExpression(expr, expectedClass));
        } else {
            return Classes.coerce(expectedClass, expr);
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/xel/Evaluators.java and 1 other location - About 45 mins to fix
zk/src/main/java/org/zkoss/zk/xel/Evaluators.java on lines 35..41

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

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 B00869Serialization() {
        items = new ArrayList<Item>();
        items.add(selected = new Item("A"));
        items.add(new Item("B"));
        items.add(new Item("C"));
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00690ClusterEnv.java on lines 46..52

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

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 class BigList extends AbstractList<Integer> {
        private int size;
        public BigList(int sz) {
            if (sz < 0)
                throw new IllegalArgumentException("Negative not allowed: " + sz);
zktest/src/main/java/org/zkoss/zktest/test2/B60_ZK_1512_BigList.java on lines 5..21

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

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

    @NotifyChange("*")
    @Command
    public void cmd1(@SelectorParam("label") LinkedList<Label> labels,
            @SelectorParam("#l13") Label l3) {
        for (int i = 0; i < labels.size(); i++) {
zktest/src/main/java/org/zkoss/zktest/bind/basic/SelectorParamVM.java on lines 16..23

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

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 B00690ClusterEnv() {
        items = new ArrayList<Item>();
        items.add(selected = new Item("A"));
        items.add(new Item("B"));
        items.add(new Item("C"));
zktest/src/main/java/org/zkoss/zktest/bind/issue/B00869Serialization.java on lines 50..57

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

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

    public class NonNegativeValidator implements Validator {

        public void validate(ValidationContext ctx) {
            
            if (ctx.getProperty().getValue() instanceof Integer){
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/collection/C1.java on lines 66..80
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va01.java on lines 39..53
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va02.java on lines 38..52
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va05.java on lines 38..52
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va07.java on lines 34..48
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va11.java on lines 68..82

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

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

    public class NonNegativeValidator implements Validator {

        public void validate(ValidationContext ctx) {
            
            if (ctx.getProperty().getValue() instanceof Integer){
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/collection/C1.java on lines 66..80
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va01.java on lines 39..53
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va02.java on lines 38..52
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va07.java on lines 34..48
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va10.java on lines 101..115
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va11.java on lines 68..82

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

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

                    if (e.get() == null) {
                        // Clean up after a cleared Reference.
                        this.modCount.incrementAndGet();
                        if (prev != null) {
                            prev.next = e.next;
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java and 6 other locations - About 45 mins to fix
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 215..224
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 248..257
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 279..288
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 308..316
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 372..381
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 418..427

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

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

            if (entryKey == null) {
                // Clean up after a cleared Reference.
                this.modCount.incrementAndGet();
                if (prev != null) {
                    prev.next = e.next;
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java and 6 other locations - About 45 mins to fix
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 215..224
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 196..205
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 248..257
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 279..288
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 308..316
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 372..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 56.

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

    public class NonNegativeValidator implements Validator {

        public void validate(ValidationContext ctx) {
            
            if (ctx.getProperty().getValue() instanceof Integer){
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va01.java on lines 39..53
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va02.java on lines 38..52
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va05.java on lines 38..52
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va07.java on lines 34..48
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va10.java on lines 101..115
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va11.java on lines 68..82

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

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

                    if (e.get() == null) {
                        // Clean up after a cleared Reference.
                        this.modCount.incrementAndGet();
                        if (prev != null) {
                            prev.next = e.next;
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java and 6 other locations - About 45 mins to fix
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 196..205
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 248..257
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 279..288
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 308..316
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 372..381
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 418..427

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

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

    public class NonNegativeValidator implements Validator {

        public void validate(ValidationContext ctx) {
            
            if (ctx.getProperty().getValue() instanceof Integer){
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/collection/C1.java on lines 66..80
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va02.java on lines 38..52
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va05.java on lines 38..52
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va07.java on lines 34..48
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va10.java on lines 101..115
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va11.java on lines 68..82

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

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

                if (e.get() == null) {
                    this.modCount.incrementAndGet();
                    if (prev != null) {
                        prev.next = e.next;
                    } else {
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java and 6 other locations - About 45 mins to fix
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 215..224
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 196..205
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 248..257
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 279..288
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 372..381
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 418..427

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

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

    public class NonNegativeValidator implements Validator {

        public void validate(ValidationContext ctx) {
            
            if (ctx.getProperty().getValue() instanceof Integer){
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/collection/C1.java on lines 66..80
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va01.java on lines 39..53
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va02.java on lines 38..52
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va05.java on lines 38..52
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va07.java on lines 34..48
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va10.java on lines 101..115

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

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

            if (entryKey == null) {
                // Clean up after a cleared Reference.
                this.modCount.incrementAndGet();
                if (prev != null) {
                    prev.next = e.next;
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java and 6 other locations - About 45 mins to fix
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 215..224
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 196..205
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 248..257
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 279..288
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 308..316
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 418..427

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

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

            if (entryKey == null) {
                // Clean up after a cleared Reference.
                this.modCount.incrementAndGet();
                if (prev != null) {
                    prev.next = e.next;
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java and 6 other locations - About 45 mins to fix
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 215..224
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 196..205
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 248..257
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 308..316
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 372..381
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 418..427

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

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

            if (entryKey == null) {
                // Clean up after a cleared Reference.
                this.modCount.incrementAndGet();
                if (prev != null) {
                    prev.next = e.next;
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java and 6 other locations - About 45 mins to fix
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 215..224
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 196..205
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 279..288
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 308..316
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 372..381
zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 418..427

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

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

    public class NonNegativeValidator implements Validator {

        public void validate(ValidationContext ctx) {
            
            if (ctx.getProperty().getValue() instanceof Integer){
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/collection/C1.java on lines 66..80
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va01.java on lines 39..53
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va05.java on lines 38..52
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va07.java on lines 34..48
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va10.java on lines 101..115
zktest/src/main/java/org/zkoss/zktest/bind/viewmodel/validator/Va11.java on lines 68..82

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

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