Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
15 | 2 | 2 | 0.995 | statement_list[6] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 15 | 594 | src/NHibernate.Test/HQL/HQLFunctions.cs |
2 | 16 | 645 | src/NHibernate.Test/HQL/HQLFunctions.cs |
| ||||
Assert.That(l[0], Is.TypeOf( typeof( double))); // Rendered in SELECT using a property in an operation with costant hql = "select cast(7+123-5*a.BodyWeight as Double) from Animal a"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); Assert.AreEqual(magicResult, (double)l[0], 0.00001); // Rendered in SELECT using a property and nested functions if ( !(Dialect is Oracle8iDialect)) { hql = "select cast(cast(a.BodyWeight as string) as Double) from Animal a"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); Assert.That(l[0], Is.TypeOf( typeof(double))); } |
| ||||
Assert.That(l[0], Is.TypeOf( typeof(double))); // Rendered in GROUP BY using a property in an operation with costant hql = "select cast(7+123-5*a.BodyWeight as Double) from Animal a group by cast(7+123-5*a.BodyWeight as Double)"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); Assert.AreEqual(magicResult, (double)l[0], 0.00001); // Rendered in GROUP BY using a property and nested functions if ( !(Dialect is Oracle8iDialect)) { hql = "select cast(cast(a.BodyWeight as string) as Double) from Animal a group by cast(cast(a.BodyWeight as string) as Double)"; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); Assert.That(l[0], Is.TypeOf( typeof(double))); } |
| |||
Assert.That(l[0], Is.TypeOf( typeof(double))); // Rendered in SELECT using a property in an operation with costant // Rendered in GROUP BY using a property in an operation with costant hql = [[#variable28b99a80]]; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); Assert.AreEqual(magicResult, (double)l[0], 0.00001); // Rendered in SELECT using a property and nested functions // Rendered in GROUP BY using a property and nested functions if ( !(Dialect is Oracle8iDialect)) { hql = [[#variable26ebed80]]; l = s.CreateQuery(hql).List(); Assert.AreEqual(1, l.Count); Assert.That(l[0], Is.TypeOf( typeof(double))); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#28b99a80]] | "select cast(7+123-5*a.BodyWeight as Double) from Animal a" |
1 | 2 | [[#28b99a80]] | "select cast(7+123-5*a.BodyWeight as Double) from Animal a group by cast(7+123-5*a.BodyWeight as Double)" |
2 | 1 | [[#26ebed80]] | "select cast(cast(a.BodyWeight as string) as Double) from Animal a" |
2 | 2 | [[#26ebed80]] | "select cast(cast(a.BodyWeight as string) as Double) from Animal a group by cast(cast(a.BodyWeight as string) as Double)" |