CloneSet60


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
31260.965statement_list[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1387
src/NHibernate.Test/Join/JoinTest.cs
23129
src/NHibernate.Test/Join/JoinTest.cs
3993
src/NHibernate.Test/Legacy/MultiTableTest.cs
46317
src/NHibernate.Test/Legacy/MultiTableTest.cs
53325
src/NHibernate.Test/Legacy/MultiTableTest.cs
63441
src/NHibernate.Test/Legacy/MultiTableTest.cs
79371
src/NHibernate.Test/Legacy/ParentChildTest.cs
85380
src/NHibernate.Test/Legacy/ParentChildTest.cs
9952
src/NHibernate.Test/Legacy/SQLFunctionsTest.cs
106472
src/NHibernate.Test/Legacy/SQLFunctionsTest.cs
113298
src/NHibernate.Test/Unionsubclass/UnionSubclassFixture.cs
12355
src/NHibernate.Test/Unionsubclass2/UnionSubclassFixture.cs
Clone Instance
1
Line Count
3
Source Line
87
Source File
src/NHibernate.Test/Join/JoinTest.cs

                                // Copied from H3.  Don't really know what it is testing
                                //Assert.AreEqual(0, s.CreateQuery("from System.Serializable").List().Count);

                                Assert.AreEqual(3, s.CreateQuery("from Person").List().Count);
                                Assert.AreEqual(1, s.CreateQuery("from Person p where p.class is null").List().Count);
                                Assert.AreEqual(1, s.CreateQuery("from Person p where p.class = Customer").List().Count);


Clone Instance
2
Line Count
3
Source Line
129
Source File
src/NHibernate.Test/Join/JoinTest.cs

                                //objectsNeedDeleting.Add(jesus);

                                Assert.AreEqual(1, s.CreateQuery("from Person").List().Count);
                                Assert.AreEqual(0, s.CreateQuery("from Person p where p.class is null").List().Count);
                                Assert.AreEqual(1, s.CreateQuery("from Person p where p.class = User").List().Count);


Clone Instance
3
Line Count
9
Source Line
93
Source File
src/NHibernate.Test/Legacy/MultiTableTest.cs

                        // TODO: I don't understand why h2.0.3/h2.1 issues a select statement here

                        Assert.AreEqual(2,
                                        s.CreateQuery(
                                                "select s from SubMulti as sm join sm.Children as s where s.Amount>-1 and s.Name is null").List().
                                                Count);
                        Assert.AreEqual(2, s.CreateQuery("select elements(sm.Children) from SubMulti as sm").List().Count);
                        Assert.AreEqual(1,
                                        s.CreateQuery(
                                                "select distinct sm from SubMulti as sm join sm.Children as s where s.Amount>-1 and s.Name is null").
                                                 List().Count);


Clone Instance
4
Line Count
6
Source Line
317
Source File
src/NHibernate.Test/Legacy/MultiTableTest.cs

                        Assert.AreEqual(2, s.CreateQuery("from m in class Multi").List().Count);

                        //if( !(dialect is Dialect.HSQLDialect) ) 
                        //{
                        Assert.AreEqual(1, s.CreateQuery("from m in class Multi where m.class = SubMulti").List().Count);
                        Assert.AreEqual(1, s.CreateQuery("from m in class Top where m.class = Multi").List().Count);


Clone Instance
5
Line Count
3
Source Line
325
Source File
src/NHibernate.Test/Legacy/MultiTableTest.cs

                        //}

                        Assert.AreEqual(3, s.CreateQuery("from s in class Top").List().Count);
                        Assert.AreEqual(0, s.CreateQuery("from ls in class Lower").List().Count);
                        Assert.AreEqual(1, s.CreateQuery("from sm in class SubMulti").List().Count);


Clone Instance
6
Line Count
3
Source Line
441
Source File
src/NHibernate.Test/Legacy/MultiTableTest.cs

                        Assert.AreEqual(2, s.CreateQuery("from m in class Multi").List().Count);
                        Assert.AreEqual(3, s.CreateQuery("from s in class Top").List().Count);
                        Assert.AreEqual(0, s.CreateQuery("from s in class Lower").List().Count);


Clone Instance
7
Line Count
9
Source Line
371
Source File
src/NHibernate.Test/Legacy/ParentChildTest.cs

                        Assert.AreEqual(1,
                                        s.CreateQuery("select c from c in class ContainerX, s in class Simple where c.OneToMany[2] = s").List().
                                                   Count);
                        Assert.AreEqual(1,
                                        s.CreateQuery("select c from c in class ContainerX, s in class Simple where c.ManyToMany[2] = s").
                                                List().Count);
                        Assert.AreEqual(1,
                                        s.CreateQuery("select c from c in class ContainerX, s in class Simple where s = c.OneToMany[2]").List().
                                                   Count);


Clone Instance
8
Line Count
5
Source Line
380
Source File
src/NHibernate.Test/Legacy/ParentChildTest.cs

                        Assert.AreEqual(1,
                                        s.CreateQuery("select c from c in class ContainerX, s in class Simple where s = c.ManyToMany[2]").
                                                List().Count);
                        Assert.AreEqual(1, s.CreateQuery("select c from c in class ContainerX where c.OneToMany[0].Name = 's'").List().Count);
                        Assert.AreEqual(1, s.CreateQuery("select c from c in class ContainerX where c.ManyToMany[0].Name = 's'").List().Count);


Clone Instance
9
Line Count
9
Source Line
52
Source File
src/NHibernate.Test/Legacy/SQLFunctionsTest.cs

                        // Test to make sure allocating an specified object operates correctly.
                        Assert.AreEqual(1,
                                        s.CreateQuery("select new S(s.Count, s.Address) from s in class Simple").List().
                                                 Count);

                        // Quick check the base dialect functions operate correctly
                        Assert.AreEqual(1,
                                        s.CreateQuery("select max(s.Count) from s in class Simple").List().Count);
                        Assert.AreEqual(1,
                                        s.CreateQuery("select count(*) from s in class Simple").List().Count);


Clone Instance
10
Line Count
6
Source Line
472
Source File
src/NHibernate.Test/Legacy/SQLFunctionsTest.cs

                                Assert.AreEqual(1, s.CreateQuery("from s in class Simple where upper( s.Other.Name )='SIMPLE 2'").List().Count);
                                Assert.AreEqual(0, s.CreateQuery("from s in class Simple where not (upper(s.Other.Name)='SIMPLE 2')").List().Count);
                                Assert.AreEqual(1,
                                                s.CreateQuery(
                                                        "select distinct s from s in class Simple where ( ( s.Other.Count + 3) = (15*2)/2 and s.Count = 69) or ( (s.Other.Count + 2) / 7 ) = 2").
                                                         List().Count);


Clone Instance
11
Line Count
3
Source Line
298
Source File
src/NHibernate.Test/Unionsubclass/UnionSubclassFixture.cs

                                Assert.AreEqual(2, s.CreateQuery("from Being").List().Count);
                                Assert.AreEqual(1, s.CreateQuery("from Being b where b.class = Alien").List().Count);
                                Assert.AreEqual(1, s.CreateQuery("from Alien").List().Count);


Clone Instance
12
Line Count
3
Source Line
55
Source File
src/NHibernate.Test/Unionsubclass2/UnionSubclassFixture.cs

                                // TODO NH : This line is present in H3.2.5 test; ReadCommitted ?
                                //Assert.AreEqual(0, s.CreateQuery("from System.Object").List().Count);

                                Assert.AreEqual(3, s.CreateQuery("from Person").List().Count);
                                Assert.AreEqual(1, s.CreateQuery("from Person p where p.class = Customer").List().Count);
                                Assert.AreEqual(1, s.CreateQuery("from Person p where p.class = Person").List().Count);


Clone AbstractionParameter Count: 6Parameter Bindings

// TODO NH : This line is present in H3.2.5 test; ReadCommitted ?
//Assert.AreEqual(0, s.CreateQuery("from System.Object").List().Count);
// Copied from H3.  Don't really know what it is testing
//Assert.AreEqual(0, s.CreateQuery("from System.Serializable").List().Count);
//}
// Test to make sure allocating an specified object operates correctly.
// TODO: I don't understand why h2.0.3/h2.1 issues a select statement here
//objectsNeedDeleting.Add(jesus);
Assert.AreEqual( [[#variable70b64c80]], s.CreateQuery( [[#variable70b64b60]]).List().Count);
//if( !(dialect is Dialect.HSQLDialect) ) 
//{
// Quick check the base dialect functions operate correctly
Assert.AreEqual( [[#variable70b64aa0]], s.CreateQuery( [[#variable70b64ae0]]).List().Count);
Assert.AreEqual( [[#variable6e3a7ca0]], s.CreateQuery( [[#variable70b64b00]]).List().Count);
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#70b64c80]]
3 
12[[#70b64c80]]
2 
13[[#70b64c80]]
3 
14[[#70b64c80]]
3 
15[[#70b64c80]]
2 
16[[#70b64c80]]
1 
17[[#70b64c80]]
1 
18[[#70b64c80]]
1 
19[[#70b64c80]]
1 
110[[#70b64c80]]
2 
111[[#70b64c80]]
1 
112[[#70b64c80]]
2 
21[[#70b64b60]]
"from Person" 
22[[#70b64b60]]
"from m in class Multi" 
23[[#70b64b60]]
"from Person" 
24[[#70b64b60]]
"from s in class Top" 
25[[#70b64b60]]
"from Being" 
26[[#70b64b60]]
"select new S(s.Count, s.Address) from s in class Simple" 
27[[#70b64b60]]
"from s in class Simple where upper( s.Other.Name )='SIMPLE 2'" 
28[[#70b64b60]]
"select c from c in class ContainerX, s in class Simple where c.OneToMany[2] = s" 
29[[#70b64b60]]
"select c from c in class ContainerX, s in class Simple where s = c.ManyToMany[2]" 
210[[#70b64b60]]
"select s from SubMulti as sm join sm.Children as s where s.Amount>-1 and s.Name is null" 
211[[#70b64b60]]
"from Person" 
212[[#70b64b60]]
"from m in class Multi" 
31[[#70b64aa0]]
1 
32[[#70b64aa0]]
1 
33[[#70b64aa0]]
1 
34[[#70b64aa0]]
0 
35[[#70b64aa0]]
1 
36[[#70b64aa0]]
1 
37[[#70b64aa0]]
0 
38[[#70b64aa0]]
1 
39[[#70b64aa0]]
1 
310[[#70b64aa0]]
2 
311[[#70b64aa0]]
0 
312[[#70b64aa0]]
3 
41[[#70b64ae0]]
"from Person p where p.class = Customer" 
42[[#70b64ae0]]
"from m in class Multi where m.class = SubMulti" 
43[[#70b64ae0]]
"from Person p where p.class is null" 
44[[#70b64ae0]]
"from ls in class Lower" 
45[[#70b64ae0]]
"from Being b where b.class = Alien" 
46[[#70b64ae0]]
"select max(s.Count) from s in class Simple" 
47[[#70b64ae0]]
"from s in class Simple where not (upper(s.Other.Name)='SIMPLE 2')" 
48[[#70b64ae0]]
"select c from c in class ContainerX, s in class Simple where c.ManyToMany[2] = s" 
49[[#70b64ae0]]
"select c from c in class ContainerX where c.OneToMany[0].Name = 's'" 
410[[#70b64ae0]]
"select elements(sm.Children) from SubMulti as sm" 
411[[#70b64ae0]]
"from Person p where p.class is null" 
412[[#70b64ae0]]
"from s in class Top" 
51[[#6e3a7ca0]]
1 
52[[#6e3a7ca0]]
1 
53[[#6e3a7ca0]]
1 
54[[#6e3a7ca0]]
1 
55[[#6e3a7ca0]]
1 
56[[#6e3a7ca0]]
1 
57[[#6e3a7ca0]]
1 
58[[#6e3a7ca0]]
1 
59[[#6e3a7ca0]]
1 
510[[#6e3a7ca0]]
1 
511[[#6e3a7ca0]]
1 
512[[#6e3a7ca0]]
0 
61[[#70b64b00]]
"from Person p where p.class = Person" 
62[[#70b64b00]]
"from m in class Top where m.class = Multi" 
63[[#70b64b00]]
"from Person p where p.class = Customer" 
64[[#70b64b00]]
"from sm in class SubMulti" 
65[[#70b64b00]]
"from Alien" 
66[[#70b64b00]]
"select count(*) from s in class Simple" 
67[[#70b64b00]]
"select distinct s from s in class Simple where ( ( s.Other.Count + 3) = (15*2)/2 and s.Count = 69) or ( (s.Other.Count + 2) / 7 ) = 2" 
68[[#70b64b00]]
"select c from c in class ContainerX, s in class Simple where s = c.OneToMany[2]" 
69[[#70b64b00]]
"select c from c in class ContainerX where c.ManyToMany[0].Name = 's'" 
610[[#70b64b00]]
"select distinct sm from SubMulti as sm join sm.Children as s where s.Amount>-1 and s.Name is null" 
611[[#70b64b00]]
"from Person p where p.class = User" 
612[[#70b64b00]]
"from s in class Lower"