Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
16 | 2 | 4 | 0.975 | statement_list[13] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 16 | 67 | src/NHibernate.Test/NHSpecificTest/NH295/SubclassFixture.cs |
2 | 16 | 85 | src/NHibernate.Test/NHSpecificTest/NH295/SubclassFixture.cs |
| ||||
criteria1.Add(Expression.Eq("Name", "User1")); Assert.AreEqual(1, criteria1.List().Count); s.Transaction.Commit(); s.Close(); s = OpenSession(); s.BeginTransaction(); //Load group with USER NAME: ICriteria criteria2 = s.CreateCriteria( typeof(UserGroup)); criteria2.Add(Expression.Eq("Name", "User1")); Assert.AreEqual(0, criteria2.List().Count); s.Transaction.Commit(); s.Close(); s = OpenSession(); s.BeginTransaction(); |
| ||||
criteria3.Add(Expression.Eq("Name", "Group1")); Assert.AreEqual(1, criteria3.List().Count); s.Transaction.Commit(); s.Close(); s = OpenSession(); s.BeginTransaction(); //Load user with GROUP NAME ICriteria criteria4 = s.CreateCriteria( typeof(User)); criteria4.Add(Expression.Eq("Name", "Group1")); Assert.AreEqual(0, criteria4.List().Count); s.Transaction.Commit(); s.Close(); s = OpenSession(); s.BeginTransaction(); |
| |||
[[#variable6fd094c0]].Add(Expression.Eq("Name", [[#variable70b8e260]])); Assert.AreEqual(1, [[#variable6fd094c0]].List().Count); s.Transaction.Commit(); s.Close(); s = OpenSession(); s.BeginTransaction(); //Load group with USER NAME: //Load user with GROUP NAME ICriteria [[#variable6fd93a80]]= s.CreateCriteria( typeof( [[#variable6fd937c0]])); [[#variable6fd93a80]].Add(Expression.Eq("Name", [[#variable70b8e260]])); Assert.AreEqual(0, [[#variable6fd93a80]].List().Count); s.Transaction.Commit(); s.Close(); s = OpenSession(); s.BeginTransaction(); |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6fd094c0]] | criteria1 |
1 | 2 | [[#6fd094c0]] | criteria3 |
2 | 1 | [[#70b8e260]] | "User1" |
2 | 2 | [[#70b8e260]] | "Group1" |
3 | 1 | [[#6fd93a80]] | criteria2 |
3 | 2 | [[#6fd93a80]] | criteria4 |
4 | 1 | [[#6fd937c0]] | UserGroup |
4 | 2 | [[#6fd937c0]] | User |