Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
23 | 3 | 2 | 0.979 | class_member_declarations[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 24 | 40 | src/Iesi.Collections/SynchronizedSet.cs |
2 | 23 | 83 | src/Iesi.Collections/SynchronizedSet.cs |
3 | 23 | 129 | 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); } } |
| ||||
/// <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); } } |
| ||||
/// <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); } } |
| |||
/// <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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#584e3460]] | Remove |
1 | 2 | [[#584e3460]] | Contains |
1 | 3 | [[#584e3460]] | Add |
2 | 1 | [[#6fd11d80]] | RemoveAll |
2 | 2 | [[#6fd11d80]] | ContainsAll |
2 | 3 | [[#6fd11d80]] | AddAll |