CloneSet166


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
23260.970statement_list[19]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
123138
src/NHibernate.Test/UtilityTest/TypeNameParserFixture.cs
223171
src/NHibernate.Test/UtilityTest/TypeNameParserFixture.cs
Clone Instance
1
Line Count
23
Source Line
138
Source File
src/NHibernate.Test/UtilityTest/TypeNameParserFixture.cs

                        string defaultassembly = "SomeAssembly";
                        string defaultNamespace = "SomeAssembly.MyNS";
                        string expectedType = "SomeAssembly.MyNS.TName`1[[SomeAssembly.MyNS.PartialName, SomeAssembly]]";
                        string expectedAssembly = "SomeAssembly";

                        AssemblyQualifiedTypeName tn = TypeNameParser.Parse(fullSpec, defaultNamespace, defaultassembly);
                        Assert.AreEqual(expectedType, tn.Type, "Type name should match");
                        Assert.AreEqual(expectedAssembly, tn.Assembly, "Assembly name should match");

                        fullSpec = "TName`1[[PartialName]]";
                        defaultassembly = "SomeAssembly";
                        defaultNamespace = "SomeAssembly.MyNS";
                        expectedType = "SomeAssembly.MyNS.TName`1[[SomeAssembly.MyNS.PartialName, SomeAssembly]]";
                        expectedAssembly = "SomeAssembly";

                        tn = TypeNameParser.Parse(fullSpec, defaultNamespace, defaultassembly);
                        Assert.AreEqual(expectedType, tn.Type, "Type name should match");
                        Assert.AreEqual(expectedAssembly, tn.Assembly, "Assembly name should match");

                        fullSpec = "TName`2[[PartialName],[OtherPartialName]]";
                        defaultassembly = "SomeAssembly";
                        defaultNamespace = "SomeAssembly.MyNS";
                        expectedType = "SomeAssembly.MyNS.TName`2[[SomeAssembly.MyNS.PartialName, SomeAssembly],[SomeAssembly.MyNS.OtherPartialName, SomeAssembly]]";


Clone Instance
2
Line Count
23
Source Line
171
Source File
src/NHibernate.Test/UtilityTest/TypeNameParserFixture.cs

                        string defaultassembly = "SomeAssembly";
                        string defaultNamespace = "SomeAssembly.MyNS";
                        string expectedType = "SomeAssembly.MyNS.TName`1[[SomeAssembly.MyOtherNS.PartialName, SomeAssembly]]";
                        string expectedAssembly = "SomeAssembly";

                        AssemblyQualifiedTypeName tn = TypeNameParser.Parse(fullSpec, defaultNamespace, defaultassembly);
                        Assert.AreEqual(expectedType, tn.Type, "Type name should match");
                        Assert.AreEqual(expectedAssembly, tn.Assembly, "Assembly name should match");

                        fullSpec = "SomeType`1[System.Int32]";
                        defaultassembly = "SomeAssembly";
                        defaultNamespace = null;
                        expectedType = "SomeType`1[[System.Int32]]";
                        expectedAssembly = "SomeAssembly";

                        tn = TypeNameParser.Parse(fullSpec, defaultNamespace, defaultassembly);
                        Assert.AreEqual(expectedType, tn.Type, "Type name should match");
                        Assert.AreEqual(expectedAssembly, tn.Assembly, "Assembly name should match");

                        fullSpec = typeof(MyGClass<int> ).AssemblyQualifiedName;
                        defaultassembly = "SomeAssembly";
                        defaultNamespace = "SomeAssembly.MyNS";
                        expectedType = typeof(MyGClass<int> ).AssemblyQualifiedName;


Clone AbstractionParameter Count: 6Parameter Bindings

string defaultassembly = "SomeAssembly";
string defaultNamespace = "SomeAssembly.MyNS";
string expectedType = [[#variable49dbf920]];
string expectedAssembly = "SomeAssembly";
AssemblyQualifiedTypeName tn = TypeNameParser.Parse(fullSpec, defaultNamespace, defaultassembly);
Assert.AreEqual(expectedType, tn.Type, "Type name should match");
Assert.AreEqual(expectedAssembly, tn.Assembly, "Assembly name should match");
fullSpec = [[#variable49dbf880]];
defaultassembly = "SomeAssembly";
defaultNamespace = [[#variable49dbf820]];
expectedType = [[#variable49dbf740]];
expectedAssembly = "SomeAssembly";
tn = TypeNameParser.Parse(fullSpec, defaultNamespace, defaultassembly);
Assert.AreEqual(expectedType, tn.Type, "Type name should match");
Assert.AreEqual(expectedAssembly, tn.Assembly, "Assembly name should match");
fullSpec = [[#variable49dbf3a0]];
defaultassembly = "SomeAssembly";
defaultNamespace = "SomeAssembly.MyNS";
expectedType = [[#variable49dbf240]];
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#49dbf920]]
"SomeAssembly.MyNS.TName`1[[SomeAssembly.MyOtherNS.PartialName, SomeAssembly]]" 
12[[#49dbf920]]
"SomeAssembly.MyNS.TName`1[[SomeAssembly.MyNS.PartialName, SomeAssembly]]" 
21[[#49dbf880]]
"SomeType`1[System.Int32]" 
22[[#49dbf880]]
"TName`1[[PartialName]]" 
31[[#49dbf820]]
null 
32[[#49dbf820]]
"SomeAssembly.MyNS" 
41[[#49dbf740]]
"SomeType`1[[System.Int32]]" 
42[[#49dbf740]]
"SomeAssembly.MyNS.TName`1[[SomeAssembly.MyNS.PartialName, SomeAssembly]]" 
51[[#49dbf3a0]]
typeof(MyGClass<int> ).AssemblyQualifiedName 
52[[#49dbf3a0]]
"TName`2[[PartialName],[OtherPartialName]]" 
61[[#49dbf240]]
typeof(MyGClass<int> ).AssemblyQualifiedName 
62[[#49dbf240]]
"SomeAssembly.MyNS.TName`2[[SomeAssembly.MyNS.PartialName, SomeAssembly],[SomeAssembly.MyNS.OtherPartialName, SomeAssembly]]"