CloneSet364


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
24320.982class_member_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12437
src/Iesi.Collections/Generic/SynchronizedSet.cs
22380
src/Iesi.Collections/Generic/SynchronizedSet.cs
323126
src/Iesi.Collections/Generic/SynchronizedSet.cs
Clone Instance
1
Line Count
24
Source Line
37
Source File
src/Iesi.Collections/Generic/SynchronizedSet.cs

                /// <summary>
                /// Adds the specified element to this set if it is not already present.
                /// </summary>
                /// <param name="o">The object to add to the set.</param>
                /// <returns><see langword="true" /> is the object was added, <see langword="false" /> if it was already present.</returns>
                public override sealed bool Add(T o)
                {
                        lock (mSyncRoot)
                        {
                                return mBasisSet.Add(o);
                        }
                }

                /// <summary>
                /// Adds all the elements in the specified collection to the set if they are not already present.
                /// </summary>
                /// <param name="c">A collection of objects to add to the set.</param>
                /// <returns><see langword="true" /> is the set changed as a result of this operation, <see langword="false" /> if not.</returns>
                public override sealed bool AddAll(ICollection<T> c)
                {
                        Set<T> temp;
                        lock (((ICollection) c).SyncRoot)
                        {
                                temp = new HashedSet<T> (c);
                        }

                        lock (mSyncRoot)
                        {
                                return mBasisSet.AddAll(temp);
                        }
                }



Clone Instance
2
Line Count
23
Source Line
80
Source File
src/Iesi.Collections/Generic/SynchronizedSet.cs

                /// <summary>
                /// Returns <see langword="true" /> if this set contains the specified element.
                /// </summary>
                /// <param name="o">The element to look for.</param>
                /// <returns><see langword="true" /> if this set contains the specified element, <see langword="false" /> otherwise.</returns>
                public override sealed bool Contains(T o)
                {
                        lock (mSyncRoot)
                        {
                                return mBasisSet.Contains(o);
                        }
                }

                /// <summary>
                /// Returns <see langword="true" /> if the set contains all the elements in the specified collection.
                /// </summary>
                /// <param name="c">A collection of objects.</param>
                /// <returns><see langword="true" /> if the set contains all the elements in the specified collection, <see langword="false" /> otherwise.</returns>
                public override sealed bool ContainsAll(ICollection<T> c)
                {
                        Set<T> temp;
                        lock (((ICollection) c).SyncRoot)
                        {
                                temp = new HashedSet<T> (c);
                        }
                        lock (mSyncRoot)
                        {
                                return mBasisSet.ContainsAll(temp);
                        }
                }



Clone Instance
3
Line Count
23
Source Line
126
Source File
src/Iesi.Collections/Generic/SynchronizedSet.cs

                /// <summary>
                /// Removes the specified element from the set.
                /// </summary>
                /// <param name="o">The element to be removed.</param>
                /// <returns><see langword="true" /> if the set contained the specified element, <see langword="false" /> otherwise.</returns>
                public override sealed bool Remove(T o)
                {
                        lock (mSyncRoot)
                        {
                                return mBasisSet.Remove(o);
                        }
                }

                /// <summary>
                /// Remove all the specified elements from this set, if they exist in this set.
                /// </summary>
                /// <param name="c">A collection of elements to remove.</param>
                /// <returns><see langword="true" /> if the set was modified as a result of this operation.</returns>
                public override sealed bool RemoveAll(ICollection<T> c)
                {
                        Set<T> temp;
                        lock (((ICollection) c).SyncRoot)
                        {
                                temp = new HashedSet<T> (c);
                        }
                        lock (mSyncRoot)
                        {
                                return mBasisSet.RemoveAll(temp);
                        }
                }



Clone AbstractionParameter Count: 2Parameter Bindings

/// <summary>
/// Adds the specified element to this set if it is not already present.
/// Returns <see langword="true" /> if this set contains the specified element.
/// Removes the specified element from the set.
/// </summary>
/// <param name="o">The object to add to the set.</param>
/// <returns><see langword="true" /> is the object was added, <see langword="false" /> if it was already present.</returns>
/// <param name="o">The element to look for.</param>
/// <returns><see langword="true" /> if this set contains the specified element, <see langword="false" /> otherwise.</returns>
/// <param name="o">The element to be removed.</param>
/// <returns><see langword="true" /> if the set contained the specified element, <see langword="false" /> otherwise.</returns>
public override sealed bool [[#variable6e09ae80]](T o)
{
   lock (mSyncRoot)
   {
      return mBasisSet. [[#variable6e09ae80]](o);
   }
}

/// <summary>
/// Adds all the elements in the specified collection to the set if they are not already present.
/// Returns <see langword="true" /> if the set contains all the elements in the specified collection.
/// Remove all the specified elements from this set, if they exist in this set.
/// </summary>
/// <param name="c">A collection of objects to add to the set.</param>
/// <returns><see langword="true" /> is the set changed as a result of this operation, <see langword="false" /> if not.</returns>
/// <param name="c">A collection of objects.</param>
/// <returns><see langword="true" /> if the set contains all the elements in the specified collection, <see langword="false" /> otherwise.</returns>
/// <param name="c">A collection of elements to remove.</param>
/// <returns><see langword="true" /> if the set was modified as a result of this operation.</returns>
public override sealed bool [[#variable6e09ae40]](ICollection<T> c)
{
   Set<T> temp;
   lock (((ICollection)c).SyncRoot)
   {
      temp = new HashedSet<T> (c);
   }
   lock (mSyncRoot)
   {
      return mBasisSet. [[#variable6e09ae40]](temp);
   }
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6e09ae80]]
Add 
12[[#6e09ae80]]
Contains 
13[[#6e09ae80]]
Remove 
21[[#6e09ae40]]
AddAll 
22[[#6e09ae40]]
ContainsAll 
23[[#6e09ae40]]
RemoveAll