CloneSet1262


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
16220.986statement_list[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1162742
src/NHibernate.Test/Legacy/FooBarTest.cs
2132763
src/NHibernate.Test/Legacy/FooBarTest.cs
Clone Instance
1
Line Count
16
Source Line
2742
Source File
src/NHibernate.Test/Legacy/FooBarTest.cs

                                if (IsClassicParser)
                                {
                                        list =
                                                        s.CreateQuery(
                                                                        "select foo from foo in class NHibernate.DomainModel.Foo, baz in class NHibernate.DomainModel.Baz where foo in baz.FooArray.elements and 3 = some baz.IntArray.elements and 4 > all baz.IntArray.indices").
                                                                         List();
                                }
                                else
                                {
                                        list =
                                                s.CreateQuery(
                                                        "select foo from foo in class NHibernate.DomainModel.Foo, baz in class NHibernate.DomainModel.Baz where foo in elements(baz.FooArray) and 3 = some elements(baz.IntArray) and 4 > all indices(baz.IntArray)").
                                                         List();
                                }

                                Assert.AreEqual(2, list.Count, "collection.elements find");


Clone Instance
2
Line Count
13
Source Line
2763
Source File
src/NHibernate.Test/Legacy/FooBarTest.cs

                        // sapdb doesn't like distinct with binary type
                        //if( !(dialect is Dialect.SAPDBDialect) ) 
                        //{
                        if (IsClassicParser)
                        {
                                list =
                                                s.CreateQuery("select distinct foo from baz in class NHibernate.DomainModel.Baz, foo in baz.FooArray.elements").List();
                        }
                        else

                        {
                                list =
                                        s.CreateQuery("select distinct foo from baz in class NHibernate.DomainModel.Baz, foo in elements(baz.FooArray)").
                                                List();
                        }
                        Assert.AreEqual(2, list.Count, "collection.elements find");


Clone AbstractionParameter Count: 2Parameter Bindings

// sapdb doesn't like distinct with binary type
//if( !(dialect is Dialect.SAPDBDialect) ) 
//{
if (IsClassicParser)
{
   list = s.CreateQuery( [[#variable58708580]]).List();
}
else
{
   list = s.CreateQuery( [[#variable587093e0]]).List();
}
Assert.AreEqual(2, list.Count, "collection.elements find");
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#58708580]]
"select foo from foo in class NHibernate.DomainModel.Foo, baz in class NHibernate.DomainModel.Baz where foo in baz.FooArray.elements and 3 = some baz.IntArray.elements and 4 > all baz.IntArray.indices" 
12[[#58708580]]
"select distinct foo from baz in class NHibernate.DomainModel.Baz, foo in baz.FooArray.elements" 
21[[#587093e0]]
"select foo from foo in class NHibernate.DomainModel.Foo, baz in class NHibernate.DomainModel.Baz where foo in elements(baz.FooArray) and 3 = some elements(baz.IntArray) and 4 > all indices(baz.IntArray)" 
22[[#587093e0]]
"select distinct foo from baz in class NHibernate.DomainModel.Baz, foo in elements(baz.FooArray)"