CloneSet445


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
23320.979class_member_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12440
src/Iesi.Collections/SynchronizedSet.cs
22383
src/Iesi.Collections/SynchronizedSet.cs
323129
src/Iesi.Collections/SynchronizedSet.cs
Clone Instance
1
Line Count
24
Source Line
40
Source File
src/Iesi.Collections/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(object 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 c)
                {
                        Set temp;
                        lock (c.SyncRoot)
                        {
                                temp = new HybridSet(c);
                        }

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



Clone Instance
2
Line Count
23
Source Line
83
Source File
src/Iesi.Collections/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(object 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 c)
                {
                        Set temp;
                        lock (c.SyncRoot)
                        {
                                temp = new HybridSet(c);
                        }
                        lock (mSyncRoot)
                        {
                                return mBasisSet.ContainsAll(temp);
                        }
                }



Clone Instance
3
Line Count
23
Source Line
129
Source File
src/Iesi.Collections/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(object 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 c)
                {
                        Set temp;
                        lock (c.SyncRoot)
                        {
                                temp = new HybridSet(c);
                        }
                        lock (mSyncRoot)
                        {
                                return mBasisSet.RemoveAll(temp);
                        }
                }



Clone AbstractionParameter Count: 2Parameter Bindings

/// <summary>
/// Removes the specified element from the set.
/// Returns <see langword="true" /> if this set contains the specified element.
/// Adds the specified element to this set if it is not already present.
/// </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>
/// <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 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 [[#variable584e3460]](object o)
{
   lock (mSyncRoot)
   {
      return mBasisSet. [[#variable584e3460]](o);
   }
}

/// <summary>
/// Remove all the specified elements from this set, if they exist in this set.
/// Returns <see langword="true" /> if the set contains all the elements in the specified collection.
/// Adds all the elements in the specified collection to the set if they are not already present.
/// </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>
/// <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 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 [[#variable6fd11d80]](ICollection c)
{
   Set temp;
   lock (c.SyncRoot)
   {
      temp = new HybridSet(c);
   }
   lock (mSyncRoot)
   {
      return mBasisSet. [[#variable6fd11d80]](temp);
   }
}

 

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