CloneSet545


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
24220.984class_member_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12486
src/Iesi.Collections/Set.cs
225246
src/Iesi.Collections/Set.cs
Clone Instance
1
Line Count
24
Source Line
86
Source File
src/Iesi.Collections/Set.cs

                /// <summary>
                /// Performs a "union" of two sets, where all the elements
                /// in both are present.  That is, the element is included if it is in either <c>a</c> or <c>b</c>.
                /// The return value is a clone of one of the sets (<c>a</c> if it is not <see langword="null" />) with elements of the other set
                /// added in.  Neither of the input sets is modified by the operation.
                /// </summary>
                /// <param name="a">A set of elements.</param>
                /// <param name="b">A set of elements.</param>
                /// <returns>A set containing the union of the input sets.  <see langword="null" /> if both sets are <see langword="null" />.</returns>
                public static ISet Union(ISet a, ISet b)
                {
                        if (a == null && b == null)
                                return null;
                        else if (a == null)
                                return (ISet) b.Clone();
                             else
                             if (b == null)
                                return (ISet) a.Clone();
                             else
                                return a.Union(b);
                }

                /// <summary>
                /// Performs a "union" of two sets, where all the elements
                /// in both are present.  That is, the element is included if it is in either <c>a</c> or <c>b</c>.
                /// The return value is a clone of one of the sets (<c>a</c> if it is not <see langword="null" />) with elements of the other set
                /// added in.  Neither of the input sets is modified by the operation.
                /// </summary>
                /// <param name="a">A set of elements.</param>
                /// <param name="b">A set of elements.</param>
                /// <returns>A set containing the union of the input sets.  <see langword="null" /> if both sets are <see langword="null" />.</returns>
                public static Set operator | (Set a, Set b)
                {
                        return (Set) Union(a, b);
                }



Clone Instance
2
Line Count
25
Source Line
246
Source File
src/Iesi.Collections/Set.cs

                /// <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 one of the sets
                /// (<c>a</c> if it is not <see langword="null" />) containing
                /// the elements from the exclusive-or operation.
                /// </summary>
                /// <param name="a">A set of elements.</param>
                /// <param name="b">A set of elements.</param>
                /// <returns>A set containing the result of <c>a ^ b</c>.  <see langword="null" /> if both sets are <see langword="null" />.</returns>
                public static ISet ExclusiveOr(ISet a, ISet b)
                {
                        if (a == null && b == null)
                                return null;
                        else if (a == null)
                                return (ISet) b.Clone();
                             else
                             if (b == null)
                                return (ISet) a.Clone();
                             else
                                return a.ExclusiveOr(b);
                }

                /// <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 one of the sets
                /// (<c>a</c> if it is not <see langword="null" />) containing
                /// the elements from the exclusive-or operation.
                /// </summary>
                /// <param name="a">A set of elements.</param>
                /// <param name="b">A set of elements.</param>
                /// <returns>A set containing the result of <c>a ^ b</c>.  <see langword="null" /> if both sets are <see langword="null" />.</returns>
                public static Set operator ^ (Set a, Set b)
                {
                        return (Set) ExclusiveOr(a, b);
                }



Clone AbstractionParameter Count: 2Parameter Bindings

/// <summary>
/// Performs a "union" of two sets, where all the elements
/// in both are present.  That is, the element is included if it is in either <c>a</c> or <c>b</c>.
/// The return value is a clone of one of the sets (<c>a</c> if it is not <see langword="null" />) with elements of the other set
/// added in.  Neither of the input sets is modified by the operation.
/// 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 one of the sets
/// (<c>a</c> if it is not <see langword="null" />) containing
/// the elements from the exclusive-or operation.
/// </summary>
/// <param name="a">A set of elements.</param>
/// <param name="b">A set of elements.</param>
/// <returns>A set containing the union of the input sets.  <see langword="null" /> if both sets are <see langword="null" />.</returns>
/// <returns>A set containing the result of <c>a ^ b</c>.  <see langword="null" /> if both sets are <see langword="null" />.</returns>
public static ISet [[#variable47098980]](ISet a, ISet b)
{
   if (a == null && b == null)
      return null;
   else
      if (a == null)
         return (ISet)b.Clone();
      else
         if (b == null)
            return (ISet)a.Clone();
         else
            return a. [[#variable47098980]](b);
}

/// <summary>
/// Performs a "union" of two sets, where all the elements
/// in both are present.  That is, the element is included if it is in either <c>a</c> or <c>b</c>.
/// The return value is a clone of one of the sets (<c>a</c> if it is not <see langword="null" />) with elements of the other set
/// added in.  Neither of the input sets is modified by the operation.
/// 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 one of the sets
/// (<c>a</c> if it is not <see langword="null" />) containing
/// the elements from the exclusive-or operation.
/// </summary>
/// <param name="a">A set of elements.</param>
/// <param name="b">A set of elements.</param>
/// <returns>A set containing the union of the input sets.  <see langword="null" /> if both sets are <see langword="null" />.</returns>
/// <returns>A set containing the result of <c>a ^ b</c>.  <see langword="null" /> if both sets are <see langword="null" />.</returns>
public static Set operator [[#variable47098900]](Set a, Set b)
{
   return (Set) [[#variable47098980]](a, b);
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#47098980]]
Union 
12[[#47098980]]
ExclusiveOr 
21[[#47098900]]
| 
22[[#47098900]]
^