CloneSet279


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
15220.995statement_list[6]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
115594
src/NHibernate.Test/HQL/HQLFunctions.cs
216645
src/NHibernate.Test/HQL/HQLFunctions.cs
Clone Instance
1
Line Count
15
Source Line
594
Source File
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)));
                                }


Clone Instance
2
Line Count
16
Source Line
645
Source File
src/NHibernate.Test/HQL/HQLFunctions.cs

                                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)));
                                }


Clone AbstractionParameter Count: 2Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#28b99a80]]
"select cast(7+123-5*a.BodyWeight as Double) from Animal a" 
12[[#28b99a80]]
"select cast(7+123-5*a.BodyWeight as Double) from Animal a group by cast(7+123-5*a.BodyWeight as Double)" 
21[[#26ebed80]]
"select cast(cast(a.BodyWeight as string) as Double) from Animal a" 
22[[#26ebed80]]
"select cast(cast(a.BodyWeight as string) as Double) from Animal a group by cast(cast(a.BodyWeight as string) as Double)"