zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java

Summary

Maintainability
F
1 wk
Test Coverage

File WeakIdentityMap.java has 619 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* WeakIdentityMap.java

    Purpose:
        
    Description:
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 1 day to fix

    Method entrySet has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
    Open

        public Set<Map.Entry<K, V>> entrySet() {
            if (this.entrySet == null) {
                this.entrySet = new AbstractSet<Map.Entry<K, V>>() {
                    public Iterator<Map.Entry<K, V>> iterator() {
                        return createHashIterator(ENTRIES);
    Severity: Minor
    Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 7 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method containsValue has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
    Open

        public boolean containsValue(Object value) {
            Entry[] tab = this.table;
    
            if (value == null) {
                for (int i = tab.length; i-- > 0;) {
    Severity: Minor
    Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 5 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    WeakIdentityMap has 38 methods (exceeds 20 allowed). Consider refactoring.
    Open

    @SuppressWarnings("unchecked")
    public class WeakIdentityMap<K, V> extends AbstractMap<K, V> implements Map<K, V> {
        // Types of Iterators
        static final int KEYS = 0;
        static final int VALUES = 1;
    Severity: Minor
    Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 5 hrs to fix

      Method entrySet has 78 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public Set<Map.Entry<K, V>> entrySet() {
              if (this.entrySet == null) {
                  this.entrySet = new AbstractSet<Map.Entry<K, V>>() {
                      public Iterator<Map.Entry<K, V>> iterator() {
                          return createHashIterator(ENTRIES);
      Severity: Major
      Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 3 hrs to fix

        Method remove has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

            public V remove(Object key) {
                if (key == null) {
                    key = KeyFactory.NULL;
                }
        
        
        Severity: Minor
        Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Method remove has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

                        public boolean remove(Object o) {
                            if (!(o instanceof Map.Entry)) {
                                return false;
                            }
                            Map.Entry entry = (Map.Entry) o;
        Severity: Minor
        Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Method keySet has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

            public Set<K> keySet() {
                if (this.keySet == null) {
                    this.keySet = new AbstractSet<K>() {
                        public Iterator iterator() {
                            return createHashIterator(KEYS);
        Severity: Minor
        Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Method containsValue has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public boolean containsValue(Object value) {
                Entry[] tab = this.table;
        
                if (value == null) {
                    for (int i = tab.length; i-- > 0;) {
        Severity: Minor
        Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 1 hr to fix

          Method keySet has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public Set<K> keySet() {
                  if (this.keySet == null) {
                      this.keySet = new AbstractSet<K>() {
                          public Iterator iterator() {
                              return createHashIterator(KEYS);
          Severity: Minor
          Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 1 hr to fix

            Method get has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
            Open

                public V get(Object key) {
                    if (key == null) {
                        key = KeyFactory.NULL;
                    }
            
            
            Severity: Minor
            Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 1 hr to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Method put has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
            Open

                public V put(K key, V value) {
                    if (key == null) {
                        key = (K) KeyFactory.NULL;
                    }
            
            
            Severity: Minor
            Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 1 hr to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Method cleanup has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
            Open

                private void cleanup() {
                    // Cleanup after cleared References.
                    Entry[] tab = this.table;
                    ReferenceQueue queue = this.queue;
                    Reference ref;
            Severity: Minor
            Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 1 hr to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Method put has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public V put(K key, V value) {
                    if (key == null) {
                        key = (K) KeyFactory.NULL;
                    }
            
            
            Severity: Minor
            Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 1 hr to fix

              Method remove has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public V remove(Object key) {
                      if (key == null) {
                          key = KeyFactory.NULL;
                      }
              
              
              Severity: Minor
              Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 1 hr to fix

                Method contains has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                                public boolean contains(Object o) {
                                    if (!(o instanceof Map.Entry)) {
                                        return false;
                                    }
                                    Map.Entry entry = (Map.Entry) o;
                Severity: Minor
                Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 1 hr to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Method containsKey has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                    public boolean containsKey(Object key) {
                        if (key == null) {
                            key = KeyFactory.NULL;
                        }
                
                
                Severity: Minor
                Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 1 hr to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Method rehash has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                Open

                    private void rehash() {
                        int oldCapacity = this.table.length;
                        Entry[] oldMap = this.table;
                
                        int newCapacity = oldCapacity * 2 + 1;
                Severity: Minor
                Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 1 hr to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Method hasNext has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                        public boolean hasNext() {
                            while (this.entry == null || (this.entryKey = this.entry.get()) == null) {
                                if (this.entry != null) {
                                    // Clean up after a cleared Reference.
                                    remove(this.entry);
                Severity: Minor
                Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 55 mins to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Method remove has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                        private void remove(Entry toRemove) {
                            Entry[] tab = this.table;
                            int index = (toRemove.hash & 0x7fffffff) % tab.length;
                
                            for (Entry e = tab[index], prev = null; e != null; e = e.next) {
                Severity: Minor
                Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 45 mins to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Avoid deeply nested control flow statements.
                Open

                                        if (prev != null) {
                                            prev.next = e.next;
                                        } else {
                                            tab[i] = e.next;
                                        }
                Severity: Major
                Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 45 mins to fix

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

                                          if (entryKey == null) {
                                              // Clean up after a cleared Reference.
                                              WeakIdentityMap.this.modCount.incrementAndGet();
                                              if (prev != null) {
                                                  prev.next = e.next;
                  Severity: Minor
                  Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java and 1 other location - About 50 mins to fix
                  zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 609..618

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

                  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 (e.get() == null) {
                                              // Clean up after a cleared Reference.
                                              WeakIdentityMap.this.modCount.incrementAndGet();
                                              if (prev != null) {
                                                  prev.next = e.next;
                  Severity: Minor
                  Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java and 1 other location - About 50 mins to fix
                  zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java on lines 579..588

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

                  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

                              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 (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

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

                                      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

                                      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

                  There are no issues that match your filters.

                  Category
                  Status