Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
23 | 2 | 6 | 0.970 | statement_list[19] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 23 | 138 | src/NHibernate.Test/UtilityTest/TypeNameParserFixture.cs |
2 | 23 | 171 | 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]]"; |
| ||||
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; |
| |||
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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#49dbf920]] | "SomeAssembly.MyNS.TName`1[[SomeAssembly.MyOtherNS.PartialName, SomeAssembly]]" |
1 | 2 | [[#49dbf920]] | "SomeAssembly.MyNS.TName`1[[SomeAssembly.MyNS.PartialName, SomeAssembly]]" |
2 | 1 | [[#49dbf880]] | "SomeType`1[System.Int32]" |
2 | 2 | [[#49dbf880]] | "TName`1[[PartialName]]" |
3 | 1 | [[#49dbf820]] | null |
3 | 2 | [[#49dbf820]] | "SomeAssembly.MyNS" |
4 | 1 | [[#49dbf740]] | "SomeType`1[[System.Int32]]" |
4 | 2 | [[#49dbf740]] | "SomeAssembly.MyNS.TName`1[[SomeAssembly.MyNS.PartialName, SomeAssembly]]" |
5 | 1 | [[#49dbf3a0]] | typeof(MyGClass<int> ).AssemblyQualifiedName |
5 | 2 | [[#49dbf3a0]] | "TName`2[[PartialName],[OtherPartialName]]" |
6 | 1 | [[#49dbf240]] | typeof(MyGClass<int> ).AssemblyQualifiedName |
6 | 2 | [[#49dbf240]] | "SomeAssembly.MyNS.TName`2[[SomeAssembly.MyNS.PartialName, SomeAssembly],[SomeAssembly.MyNS.OtherPartialName, SomeAssembly]]" |