Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
14 | 2 | 2 | 0.995 | statement_list[7] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 14 | 639 | src/NHibernate.Test/Criteria/CriteriaQueryTest.cs |
2 | 14 | 1014 | src/NHibernate.Test/Criteria/CriteriaQueryTest.cs |
| ||||
Assert.AreEqual(course.CourseCode, m1["cCode"]); resultWithMaps = s.CreateCriteria( typeof(Enrolment)). SetProjection(Projections.Property("StudentNumber").As("stNumber")). AddOrder(Order.Desc("stNumber")). SetResultTransformer(CriteriaSpecification.AliasToEntityMap). List (); Assert.AreEqual(2, resultWithMaps.Count); IDictionary m0 = (IDictionary)resultWithMaps[0]; m1 = (IDictionary)resultWithMaps[1]; Assert.AreEqual(101L, m1["stNumber"]); Assert.AreEqual(667L, m0["stNumber"]); |
| ||||
Assert.AreEqual(course.CourseCode, m1["cCode"]); resultWithMaps = s.CreateCriteria( typeof(Enrolment)). SetProjection(Property.ForName("StudentNumber").As("stNumber")). AddOrder(Order.Desc("stNumber")). SetResultTransformer(CriteriaSpecification.AliasToEntityMap). List (); Assert.AreEqual(2, resultWithMaps.Count); IDictionary m0 = (IDictionary)resultWithMaps[0]; m1 = (IDictionary)resultWithMaps[1]; Assert.AreEqual(101L, m1["stNumber"]); Assert.AreEqual(667L, m0["stNumber"]); |
| |||
Assert.AreEqual(course.CourseCode, m1["cCode"]); resultWithMaps = s.CreateCriteria( typeof(Enrolment)).SetProjection( [[#variable6f4ab600]]. [[#variable6f4ab580]]("StudentNumber").As("stNumber")).AddOrder(Order.Desc("stNumber")).SetResultTransformer(CriteriaSpecification.AliasToEntityMap).List(); Assert.AreEqual(2, resultWithMaps.Count); IDictionary m0 = (IDictionary)resultWithMaps[0]; m1 = (IDictionary)resultWithMaps[1]; Assert.AreEqual(101L, m1["stNumber"]); Assert.AreEqual(667L, m0["stNumber"]); |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6f4ab600]] | Projections |
1 | 2 | [[#6f4ab600]] | Property |
2 | 1 | [[#6f4ab580]] | Property |
2 | 2 | [[#6f4ab580]] | ForName |