CloneSet90


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
90250.964class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
190385
src/NHibernate/Util/LinkedHashMap.cs
290474
src/NHibernate/Util/LinkedHashMap.cs
Clone Instance
1
Line Count
90
Source Line
385
Source File
src/NHibernate/Util/LinkedHashMap.cs

                #endregion
                private class KeyCollection : ICollection<TKey>
                {
                        private readonly LinkedHashMap<TKey, TValue> dictionary;

                        public KeyCollection(LinkedHashMap<TKey, TValue> dictionary)
                        {
                                this.dictionary = dictionary;
                        }

                        #region ICollection<TKey> Members

                        void ICollection<TKey>.Add(TKey item)
                        {
                                throw new NotSupportedException("LinkedHashMap KeyCollection is readonly.");
                        }

                        void ICollection<TKey>.Clear()
                        {
                                throw new NotSupportedException("LinkedHashMap KeyCollection is readonly.");
                        }

                        bool ICollection<TKey>.Contains(TKey item)
                        {
                                foreach (TKey key in this )
                                {
                                        if (key.Equals(item))
                                                return true;
                                }
                                return false;
                        }

                        public void CopyTo(TKey[] array, int arrayIndex)
                        {
                                foreach (TKey key in this )
                                        array.SetValue(key, arrayIndex++);
                        }

                        bool ICollection<TKey>.Remove(TKey item)
                        {
                                throw new NotSupportedException("LinkedHashMap KeyCollection is readonly.");
                        }

                        public int Count
                        {
                                get { return dictionary.Count;
                                    }
                        }

                        bool ICollection<TKey>.IsReadOnly
                        {
                                get { return true;
                                    }
                        }

                        #endregion
                        #region IEnumerable<TKey> Members
                        IEnumerator<TKey> IEnumerable<TKey>.GetEnumerator()
                        {
                                return new Enumerator(dictionary);
                        }

                        #endregion

                        #region IEnumerable Members

                        IEnumerator IEnumerable.GetEnumerator()
                        {
                                return ((IEnumerable<TKey> )this ).GetEnumerator();
                        }

                        #endregion

                        private class Enumerator : ForwardEnumerator<TKey>
                        {
                                public Enumerator(LinkedHashMap<TKey, TValue> dictionary) : base(dictionary) {
                                                                                                             }

                                public override TKey Current
                                {
                                        get
                                        {
                                                if (dictionary.version != version)
                                                        throw new InvalidOperationException("Enumerator was modified");

                                                return current.Key;
                                        }
                                }

                        }

                }



Clone Instance
2
Line Count
90
Source Line
474
Source File
src/NHibernate/Util/LinkedHashMap.cs

                private class ValuesCollection : ICollection<TValue>
                {
                        private readonly LinkedHashMap<TKey, TValue> dictionary;

                        public ValuesCollection(LinkedHashMap<TKey, TValue> dictionary)
                        {
                                this.dictionary = dictionary;
                        }

                        #region ICollection<TValue> Members

                        void ICollection<TValue>.Add(TValue item)
                        {
                                throw new NotSupportedException("LinkedHashMap ValuesCollection is readonly.");
                        }

                        void ICollection<TValue>.Clear()
                        {
                                throw new NotSupportedException("LinkedHashMap ValuesCollection is readonly.");
                        }

                        bool ICollection<TValue>.Contains(TValue item)
                        {
                                foreach (TValue value in this )
                                {
                                        if (value.Equals(item))
                                                return true;
                                }
                                return false;
                        }

                        public void CopyTo(TValue[] array, int arrayIndex)
                        {
                                foreach (TValue value in this )
                                        array.SetValue(value, arrayIndex++);
                        }

                        bool ICollection<TValue>.Remove(TValue item)
                        {
                                throw new NotSupportedException("LinkedHashMap ValuesCollection is readonly.");
                        }

                        public int Count
                        {
                                get { return dictionary.Count;
                                    }
                        }

                        bool ICollection<TValue>.IsReadOnly
                        {
                                get { return true;
                                    }
                        }

                        #endregion
                        #region IEnumerable<TKey> Members
                        IEnumerator<TValue> IEnumerable<TValue>.GetEnumerator()
                        {
                                return new Enumerator(dictionary);
                        }

                        #endregion

                        #region IEnumerable Members

                        IEnumerator IEnumerable.GetEnumerator()
                        {
                                return ((IEnumerable<TValue> )this ).GetEnumerator();
                        }

                        #endregion

                        private class Enumerator : ForwardEnumerator<TValue>
                        {
                                public Enumerator(LinkedHashMap<TKey, TValue> dictionary) : base(dictionary) {
                                                                                                             }

                                public override TValue Current
                                {
                                        get
                                        {
                                                if (dictionary.version != version)
                                                        throw new InvalidOperationException("Enumerator was modified");

                                                return current.Value;
                                        }
                                }

                        }

                }



Clone AbstractionParameter Count: 5Parameter Bindings

#endregion
private class [[#variable55365ae0]]: ICollection< [[#variable55365a60]]>
{
   private readonly LinkedHashMap<TKey, TValue> dictionary;

   public [[#variable55365ae0]](LinkedHashMap<TKey, TValue> dictionary)
   {
      this.dictionary = dictionary;
   }

   #region ICollection<TKey> Members
   #region ICollection<TValue> Members
   void ICollection< [[#variable55365a60]]>.Add( [[#variable55365a60]]item)
   {
      throw new NotSupportedException( [[#variable553659e0]]);
   }

   void ICollection< [[#variable55365a60]]>.Clear()
   {
      throw new NotSupportedException( [[#variable553659e0]]);
   }

   bool ICollection< [[#variable55365a60]]>.Contains( [[#variable55365a60]]item)
   {
      foreach ( [[#variable55365a60]] [[#variable55365980]]in this )
      {
         if ( [[#variable55365980]].Equals(item))
            return true;
      }
      return false;
   }

   public void CopyTo( [[#variable55365a60]][] array, int arrayIndex)
   {
      foreach ( [[#variable55365a60]] [[#variable55365980]]in this )
         array.SetValue( [[#variable55365980]], arrayIndex++);
   }

   bool ICollection< [[#variable55365a60]]>.Remove( [[#variable55365a60]]item)
   {
      throw new NotSupportedException( [[#variable553659e0]]);
   }

   public int Count
   {
      get
      {
         return dictionary.Count;
      }
   }

   bool ICollection< [[#variable55365a60]]>.IsReadOnly
   {
      get
      {
         return true;
      }
   }

   #endregion
   #region IEnumerable<TKey> Members
   IEnumerator< [[#variable55365a60]]> IEnumerable< [[#variable55365a60]]>.GetEnumerator()
   {
      return new Enumerator(dictionary);
   }

   #endregion
   #region IEnumerable Members
   IEnumerator IEnumerable.GetEnumerator()
   {
      return ((IEnumerable< [[#variable55365a60]]> )this ).GetEnumerator();
   }

   #endregion
   private class Enumerator: ForwardEnumerator< [[#variable55365a60]]>
   {
      public Enumerator(LinkedHashMap<TKey, TValue> dictionary): base(dictionary)
      {
      }

      public override [[#variable55365a60]]Current
      {
         get
         {
            if (dictionary.version != version)
               throw new InvalidOperationException("Enumerator was modified");
            return current. [[#variable55365860]];
         }
      }

   }

}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#55365ae0]]
KeyCollection 
12[[#55365ae0]]
ValuesCollection 
21[[#55365a60]]
TKey 
22[[#55365a60]]
TValue 
31[[#553659e0]]
"LinkedHashMap KeyCollection is readonly." 
32[[#553659e0]]
"LinkedHashMap ValuesCollection is readonly." 
41[[#55365980]]
key 
42[[#55365980]]
value 
51[[#55365860]]
Key 
52[[#55365860]]
Value