Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
11 | 2 | 2 | 0.987 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 11 | 453 | src/Iesi.Collections/Generic/Set.cs |
2 | 11 | 223 | src/Iesi.Collections/Set.cs |
| ||||
/// <summary> /// Performs ExclusiveOr when called trhough non-generic ISet interface /// </summary> /// <param name="a"></param> /// <returns></returns> protected virtual ISet NonGenericExclusiveOr(ISet a) { ISet resultSet = (ISet) this.Clone(); foreach (object element in a) { if (resultSet.Contains(element)) resultSet.Remove(element); else resultSet.Add(element); } return resultSet; } |
| ||||
/// <summary> /// Performs an "exclusive-or" of the two sets, keeping only the elements that /// are in one of the sets, but not in both. The original sets are not modified /// during this operation. The result set is a clone of this set containing /// the elements from the exclusive-or operation. /// </summary> /// <param name="a">A set of elements.</param> /// <returns>A set containing the result of <c>a ^ b</c>.</returns> public virtual ISet ExclusiveOr(ISet a) { ISet resultSet = (ISet) this.Clone(); foreach (object element in a) { if (resultSet.Contains(element)) resultSet.Remove(element); else resultSet.Add(element); } return resultSet; } |
| |||
[[#variable6e0bf440]]virtual ISet [[#variable26fa0860]](ISet a) { ISet resultSet = (ISet)this.Clone(); foreach (object element in a) { if (resultSet.Contains(element)) resultSet.Remove(element); else resultSet.Add(element); } return resultSet; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6e0bf440]] | /// <summary> /// Performs an "exclusive-or" of the two sets, keeping only the elements that /// are in one of the sets, but not in both. The original sets are not modified /// during this operation. The result set is a clone of this set containing /// the elements from the exclusive-or operation. /// </summary> /// <param name="a">A set of elements.</param> /// <returns>A set containing the result of <c>a ^ b</c>.</returns> public |
1 | 2 | [[#6e0bf440]] | /// <summary> /// Performs ExclusiveOr when called trhough non-generic ISet interface /// </summary> /// <param name="a"></param> /// <returns></returns> protected |
2 | 1 | [[#26fa0860]] | ExclusiveOr |
2 | 2 | [[#26fa0860]] | NonGenericExclusiveOr |