CloneSet1092


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
33220.958compilation_unit
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1332
src/Iesi.Collections/Generic/HashedSet.cs
2311
src/Iesi.Collections/Generic/OrderedSet.cs
Clone Instance
1
Line Count
33
Source Line
2
Source File
src/Iesi.Collections/Generic/HashedSet.cs

/* Copyright © 2002-2004 by Aidant Systems, Inc., and by Jason Smith. */
using System;
using System.Collections.Generic;

namespace Iesi.Collections.Generic
{
        /// <summary>
        /// Implements a <c>Set</c> based on a Dictionary (which is equivalent of 
        /// non-genric <c>HashTable</c>) This will give the best lookup, add, and remove
        /// performance for very large data-sets, but iteration will occur in no particular order.
        /// </summary>
        [Serializable]
        public class HashedSet<T> : DictionarySet<T>
        {
                /// <summary>
                /// Creates a new set instance based on a Dictinary.
                /// </summary>
                public HashedSet()
                {
                        InternalDictionary = new Dictionary<T, object> ();
                }

                /// <summary>
                /// Creates a new set instance based on a Dictinary and
                /// initializes it based on a collection of elements.
                /// </summary>
                /// <param name="initialValues">A collection of elements that defines the initial set contents.</param>
                public HashedSet(ICollection<T> initialValues) : this()
                {
                        this.AddAll(initialValues);
                }

        }
}


Clone Instance
2
Line Count
31
Source Line
1
Source File
src/Iesi.Collections/Generic/OrderedSet.cs

using System;
using System.Collections.Generic;

namespace Iesi.Collections.Generic
{
        /// <summary>
        /// Implements an ordered <c>Set</c> based on a dictionary.
        /// </summary>
        [Serializable]
        public class OrderedSet<T> : DictionarySet<T>
        {
                /// <summary>
                /// Initializes a new instance of the <see cref="OrderedSet{T}" /> class.
                /// </summary>
                public OrderedSet()
                {
                        InternalDictionary = new Dictionary<T, object> ();
                }

                /// <summary>
                /// Initializes a new instance of the <see cref="OrderedSet{T}"/> class.
                /// </summary>
                /// <param name="initialValues">A collection of elements that defines the initial set contents.</param>
                public OrderedSet(ICollection<T> initialValues)
                        : this()
                {
                        AddAll(initialValues);
                }

        }
}


Clone AbstractionParameter Count: 2Parameter Bindings

/* Copyright © 2002-2004 by Aidant Systems, Inc., and by Jason Smith. */
using System;
using System.Collections.Generic;
namespace Iesi.Collections.Generic
{
   /// <summary>
   /// Implements a <c>Set</c> based on a Dictionary (which is equivalent of 
   /// non-genric <c>HashTable</c>) This will give the best lookup, add, and remove
   /// performance for very large data-sets, but iteration will occur in no particular order.
   /// Implements an ordered <c>Set</c> based on a dictionary.
   /// </summary>
   [Serializable]
   public class [[#variable6af71f60]]<T>: DictionarySet<T>
   {
      /// <summary>
      /// Creates a new set instance based on a Dictinary.
      /// Initializes a new instance of the <see cref="OrderedSet{T}" /> class.
      /// </summary>
      public [[#variable6af71f60]]()
      {
         InternalDictionary = new Dictionary<T, object> ();
      }

      /// <summary>
      /// Creates a new set instance based on a Dictinary and
      /// initializes it based on a collection of elements.
      /// Initializes a new instance of the <see cref="OrderedSet{T}"/> class.
      /// </summary>
      /// <param name="initialValues">A collection of elements that defines the initial set contents.</param>
      public [[#variable6af71f60]](ICollection<T> initialValues): this()
      {
          [[#variable6af71f00]](initialValues);
      }

   }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6af71f60]]
HashedSet 
12[[#6af71f60]]
OrderedSet 
21[[#6af71f00]]
this.AddAll 
22[[#6af71f00]]
AddAll