Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
3 | 12 | 6 | 0.965 | statement_list[3] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 3 | 87 | src/NHibernate.Test/Join/JoinTest.cs |
2 | 3 | 129 | src/NHibernate.Test/Join/JoinTest.cs |
3 | 9 | 93 | src/NHibernate.Test/Legacy/MultiTableTest.cs |
4 | 6 | 317 | src/NHibernate.Test/Legacy/MultiTableTest.cs |
5 | 3 | 325 | src/NHibernate.Test/Legacy/MultiTableTest.cs |
6 | 3 | 441 | src/NHibernate.Test/Legacy/MultiTableTest.cs |
7 | 9 | 371 | src/NHibernate.Test/Legacy/ParentChildTest.cs |
8 | 5 | 380 | src/NHibernate.Test/Legacy/ParentChildTest.cs |
9 | 9 | 52 | src/NHibernate.Test/Legacy/SQLFunctionsTest.cs |
10 | 6 | 472 | src/NHibernate.Test/Legacy/SQLFunctionsTest.cs |
11 | 3 | 298 | src/NHibernate.Test/Unionsubclass/UnionSubclassFixture.cs |
12 | 3 | 55 | src/NHibernate.Test/Unionsubclass2/UnionSubclassFixture.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); |
| ||||
//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); |
| ||||
// 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); |
| ||||
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); |
| ||||
//} 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); |
| ||||
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); |
| ||||
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); |
| ||||
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); |
| ||||
// 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); |
| ||||
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); |
| ||||
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); |
| ||||
// 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); |
| |||
// 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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#70b64c80]] | 3 |
1 | 2 | [[#70b64c80]] | 2 |
1 | 3 | [[#70b64c80]] | 3 |
1 | 4 | [[#70b64c80]] | 3 |
1 | 5 | [[#70b64c80]] | 2 |
1 | 6 | [[#70b64c80]] | 1 |
1 | 7 | [[#70b64c80]] | 1 |
1 | 8 | [[#70b64c80]] | 1 |
1 | 9 | [[#70b64c80]] | 1 |
1 | 10 | [[#70b64c80]] | 2 |
1 | 11 | [[#70b64c80]] | 1 |
1 | 12 | [[#70b64c80]] | 2 |
2 | 1 | [[#70b64b60]] | "from Person" |
2 | 2 | [[#70b64b60]] | "from m in class Multi" |
2 | 3 | [[#70b64b60]] | "from Person" |
2 | 4 | [[#70b64b60]] | "from s in class Top" |
2 | 5 | [[#70b64b60]] | "from Being" |
2 | 6 | [[#70b64b60]] | "select new S(s.Count, s.Address) from s in class Simple" |
2 | 7 | [[#70b64b60]] | "from s in class Simple where upper( s.Other.Name )='SIMPLE 2'" |
2 | 8 | [[#70b64b60]] | "select c from c in class ContainerX, s in class Simple where c.OneToMany[2] = s" |
2 | 9 | [[#70b64b60]] | "select c from c in class ContainerX, s in class Simple where s = c.ManyToMany[2]" |
2 | 10 | [[#70b64b60]] | "select s from SubMulti as sm join sm.Children as s where s.Amount>-1 and s.Name is null" |
2 | 11 | [[#70b64b60]] | "from Person" |
2 | 12 | [[#70b64b60]] | "from m in class Multi" |
3 | 1 | [[#70b64aa0]] | 1 |
3 | 2 | [[#70b64aa0]] | 1 |
3 | 3 | [[#70b64aa0]] | 1 |
3 | 4 | [[#70b64aa0]] | 0 |
3 | 5 | [[#70b64aa0]] | 1 |
3 | 6 | [[#70b64aa0]] | 1 |
3 | 7 | [[#70b64aa0]] | 0 |
3 | 8 | [[#70b64aa0]] | 1 |
3 | 9 | [[#70b64aa0]] | 1 |
3 | 10 | [[#70b64aa0]] | 2 |
3 | 11 | [[#70b64aa0]] | 0 |
3 | 12 | [[#70b64aa0]] | 3 |
4 | 1 | [[#70b64ae0]] | "from Person p where p.class = Customer" |
4 | 2 | [[#70b64ae0]] | "from m in class Multi where m.class = SubMulti" |
4 | 3 | [[#70b64ae0]] | "from Person p where p.class is null" |
4 | 4 | [[#70b64ae0]] | "from ls in class Lower" |
4 | 5 | [[#70b64ae0]] | "from Being b where b.class = Alien" |
4 | 6 | [[#70b64ae0]] | "select max(s.Count) from s in class Simple" |
4 | 7 | [[#70b64ae0]] | "from s in class Simple where not (upper(s.Other.Name)='SIMPLE 2')" |
4 | 8 | [[#70b64ae0]] | "select c from c in class ContainerX, s in class Simple where c.ManyToMany[2] = s" |
4 | 9 | [[#70b64ae0]] | "select c from c in class ContainerX where c.OneToMany[0].Name = 's'" |
4 | 10 | [[#70b64ae0]] | "select elements(sm.Children) from SubMulti as sm" |
4 | 11 | [[#70b64ae0]] | "from Person p where p.class is null" |
4 | 12 | [[#70b64ae0]] | "from s in class Top" |
5 | 1 | [[#6e3a7ca0]] | 1 |
5 | 2 | [[#6e3a7ca0]] | 1 |
5 | 3 | [[#6e3a7ca0]] | 1 |
5 | 4 | [[#6e3a7ca0]] | 1 |
5 | 5 | [[#6e3a7ca0]] | 1 |
5 | 6 | [[#6e3a7ca0]] | 1 |
5 | 7 | [[#6e3a7ca0]] | 1 |
5 | 8 | [[#6e3a7ca0]] | 1 |
5 | 9 | [[#6e3a7ca0]] | 1 |
5 | 10 | [[#6e3a7ca0]] | 1 |
5 | 11 | [[#6e3a7ca0]] | 1 |
5 | 12 | [[#6e3a7ca0]] | 0 |
6 | 1 | [[#70b64b00]] | "from Person p where p.class = Person" |
6 | 2 | [[#70b64b00]] | "from m in class Top where m.class = Multi" |
6 | 3 | [[#70b64b00]] | "from Person p where p.class = Customer" |
6 | 4 | [[#70b64b00]] | "from sm in class SubMulti" |
6 | 5 | [[#70b64b00]] | "from Alien" |
6 | 6 | [[#70b64b00]] | "select count(*) from s in class Simple" |
6 | 7 | [[#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" |
6 | 8 | [[#70b64b00]] | "select c from c in class ContainerX, s in class Simple where s = c.OneToMany[2]" |
6 | 9 | [[#70b64b00]] | "select c from c in class ContainerX where c.ManyToMany[0].Name = 's'" |
6 | 10 | [[#70b64b00]] | "select distinct sm from SubMulti as sm join sm.Children as s where s.Amount>-1 and s.Name is null" |
6 | 11 | [[#70b64b00]] | "from Person p where p.class = User" |
6 | 12 | [[#70b64b00]] | "from s in class Lower" |