CloneSet49


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
46240.954class_member_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
146185
src/Iesi.Collections.Test/Generic/SetFixture.cs
246147
src/Iesi.Collections.Test/SetFixture.cs
Clone Instance
1
Line Count
46
Source Line
185
Source File
src/Iesi.Collections.Test/Generic/SetFixture.cs

                [Test]
                public void Contains()
                {
                        Assert.IsTrue(_set.Contains(one), "does contain one");
                        Assert.IsFalse(_set.Contains("four"), "does not contain 'four'");
                }

                [Test]
                public void ContainsAll()
                {
                        List<string> all = new List<string> (2);
                        all.Add("one");
                        all.Add("two");

                        Assert.IsTrue(_set.ContainsAll(all), "should contain 'one' and 'two'");

                        all.Add("not in there");
                        Assert.IsFalse(_set.ContainsAll(all), "should not contain the just added 'not in there'");
                }

                [Test]
                public void ExclusiveOr()
                {
                        ISet<string> a = CreateInstance(_aInitValues);
                        ISet<string> b = CreateInstance(_bInitValues);

                        ISet<string> ab = Set<string>.ExclusiveOr(a, b);

                        Assert.AreEqual(3, ab.Count, "contains 3 elements - 'zero', 'one', and 'four'");
                        Assert.IsTrue(ab.Contains("zero"), "should contain 'zero'");
                        Assert.IsTrue(ab.Contains("one"), "should contain 'one'");
                        Assert.IsTrue(ab.Contains("four"), "should contain 'four'");

                        Assert.IsTrue(a.ContainsAll(_aInitValues), "should not have modified a");
                        Assert.IsTrue(b.ContainsAll(_bInitValues), "should not have modified b");

                        ISet<string> aNull = Set<string>.ExclusiveOr(a, null);
                        Assert.AreEqual(_aInitValues.Count, aNull.Count, "count still same");
                        Assert.IsTrue(aNull.ContainsAll(_aInitValues), "all A elements kept");

                        ISet<string> bNull = Set<string>.ExclusiveOr(null, b);
                        Assert.AreEqual(_bInitValues.Count, bNull.Count, "count still same");
                        Assert.IsTrue(bNull.ContainsAll(_bInitValues), "all B elements kept");

                        ISet<string> bothNull = Set<string>.ExclusiveOr(null, null);
                        Assert.AreEqual(null, bothNull, "two null sets return null set");
                }



Clone Instance
2
Line Count
46
Source Line
147
Source File
src/Iesi.Collections.Test/SetFixture.cs

                [Test]
                public void Contains()
                {
                        Assert.IsTrue(_set.Contains(one), "does contain one");
                        Assert.IsFalse(_set.Contains("four"), "does not contain 'four'");
                }

                [Test]
                public void ContainsAll()
                {
                        ArrayList all = new ArrayList(2);
                        all.Add("one");
                        all.Add("two");

                        Assert.IsTrue(_set.ContainsAll(all), "should contain 'one' and 'two'");

                        all.Add("not in there");
                        Assert.IsFalse(_set.ContainsAll(all), "should not contain the just added 'not in there'");
                }

                [Test]
                public void ExclusiveOr()
                {
                        ISet a = CreateInstance(_aInitValues);
                        ISet b = CreateInstance(_bInitValues);

                        ISet ab = Set.ExclusiveOr(a, b);

                        Assert.AreEqual(3, ab.Count, "contains 3 elements - 'zero', 'one', and 'four'");
                        Assert.IsTrue(ab.Contains("zero"), "should contain 'zero'");
                        Assert.IsTrue(ab.Contains("one"), "should contain 'one'");
                        Assert.IsTrue(ab.Contains("four"), "should contain 'four'");

                        Assert.IsTrue(a.ContainsAll(_aInitValues), "should not have modified a");
                        Assert.IsTrue(b.ContainsAll(_bInitValues), "should not have modified b");

                        ISet aNull = Set.ExclusiveOr(a, null);
                        Assert.AreEqual(_aInitValues.Count, aNull.Count, "count still same");
                        Assert.IsTrue(aNull.ContainsAll(_aInitValues), "all A elements kept");

                        ISet bNull = Set.ExclusiveOr(null, b);
                        Assert.AreEqual(_bInitValues.Count, bNull.Count, "count still same");
                        Assert.IsTrue(bNull.ContainsAll(_bInitValues), "all B elements kept");

                        ISet bothNull = Set.ExclusiveOr(null, null);
                        Assert.AreEqual(null, bothNull, "two null sets return null set");
                }



Clone AbstractionParameter Count: 4Parameter Bindings

[Test]
public void Contains()
{
   Assert.IsTrue(_set.Contains(one), "does contain one");
   Assert.IsFalse(_set.Contains("four"), "does not contain 'four'");
}

[Test]
public void ContainsAll()
{
    [[#variable6f2006c0]]all = new [[#variable6e584660]](2);
   all.Add("one");
   all.Add("two");
   Assert.IsTrue(_set.ContainsAll(all), "should contain 'one' and 'two'");
   all.Add("not in there");
   Assert.IsFalse(_set.ContainsAll(all), "should not contain the just added 'not in there'");
}

[Test]
public void ExclusiveOr()
{
    [[#variable6f523d40]]a = CreateInstance(_aInitValues);
    [[#variable6f523d40]]b = CreateInstance(_bInitValues);
    [[#variable6f523d40]]ab = [[#variable6f200620]].ExclusiveOr(a, b);
   Assert.AreEqual(3, ab.Count, "contains 3 elements - 'zero', 'one', and 'four'");
   Assert.IsTrue(ab.Contains("zero"), "should contain 'zero'");
   Assert.IsTrue(ab.Contains("one"), "should contain 'one'");
   Assert.IsTrue(ab.Contains("four"), "should contain 'four'");
   Assert.IsTrue(a.ContainsAll(_aInitValues), "should not have modified a");
   Assert.IsTrue(b.ContainsAll(_bInitValues), "should not have modified b");
    [[#variable6f523d40]]aNull = [[#variable6f200620]].ExclusiveOr(a, null);
   Assert.AreEqual(_aInitValues.Count, aNull.Count, "count still same");
   Assert.IsTrue(aNull.ContainsAll(_aInitValues), "all A elements kept");
    [[#variable6f523d40]]bNull = [[#variable6f200620]].ExclusiveOr(null, b);
   Assert.AreEqual(_bInitValues.Count, bNull.Count, "count still same");
   Assert.IsTrue(bNull.ContainsAll(_bInitValues), "all B elements kept");
    [[#variable6f523d40]]bothNull = [[#variable6f200620]].ExclusiveOr(null, null);
   Assert.AreEqual(null, bothNull, "two null sets return null set");
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6f2006c0]]
List<string> 
12[[#6f2006c0]]
ArrayList 
21[[#6e584660]]
List<string> 
22[[#6e584660]]
ArrayList 
31[[#6f523d40]]
ISet<string> 
32[[#6f523d40]]
ISet 
41[[#6f200620]]
Set<string> 
42[[#6f200620]]
Set