Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
8 | 2 | 6 | 0.963 | non_pp_embedded_statement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 8 | 39 | src/NHibernate.Test/NHSpecificTest/GetTest.cs |
2 | 8 | 49 | src/NHibernate.Test/NHSpecificTest/GetTest.cs |
| ||||
using (ISession s = OpenSession()) { A loadedA = (A) s.Load( typeof(A), a.Id); Assert.IsFalse(NHibernateUtil.IsInitialized(loadedA), "Load should not initialize the object"); Assert.IsNotNull(s.Load( typeof(A), (a.Id + 1)), "Loading non-existent object should not return null"); } |
| ||||
using (ISession s = OpenSession()) { A gotA = (A) s.Get( typeof(A), a.Id); Assert.IsTrue(NHibernateUtil.IsInitialized(gotA), "Get should initialize the object"); Assert.IsNull(s.Get( typeof(A), (a.Id + 1)), "Getting non-existent object should return null"); } |
| |||
using (ISession s = OpenSession()) { A [[#variable70e62aa0]]= (A)s. [[#variable70e62a00]]( typeof(A), a.Id); Assert. [[#variable70e62940]](NHibernateUtil.IsInitialized( [[#variable70e62aa0]]), [[#variable70e628c0]]); Assert. [[#variable70e62840]](s. [[#variable70e62a00]]( typeof(A), (a.Id + 1)), [[#variable70e627e0]]); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#70e62aa0]] | loadedA |
1 | 2 | [[#70e62aa0]] | gotA |
2 | 1 | [[#70e62a00]] | Load |
2 | 2 | [[#70e62a00]] | Get |
3 | 1 | [[#70e62940]] | IsFalse |
3 | 2 | [[#70e62940]] | IsTrue |
4 | 1 | [[#70e628c0]] | "Load should not initialize the object" |
4 | 2 | [[#70e628c0]] | "Get should initialize the object" |
5 | 1 | [[#70e62840]] | IsNotNull |
5 | 2 | [[#70e62840]] | IsNull |
6 | 1 | [[#70e627e0]] | "Loading non-existent object should not return null" |
6 | 2 | [[#70e627e0]] | "Getting non-existent object should return null" |