| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 19 | 3 | 2 | 0.991 | class_member_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 19 | 21 | src/NHibernate.ByteCode.Castle.Tests/ProxyInterface/CastleProxyFixture.cs |
| 2 | 19 | 69 | src/NHibernate.ByteCode.LinFu.Tests/ProxyInterface/ProxyFixture.cs |
| 3 | 19 | 35 | src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/ProxyFixture.cs |
| ||||
[Test]
public void Proxy()
{
ISession s = OpenSession();
CastleProxy ap = new CastleProxyImpl { Id = 1, Name = "first proxy"
} ;
s.Save(ap);
s.Flush();
s.Close();
s = OpenSession();
ap = (CastleProxy) s.Load( typeof( CastleProxyImpl), ap.Id);
Assert.IsFalse(NHibernateUtil.IsInitialized(ap));
int id = ap.Id;
Assert.IsFalse(NHibernateUtil.IsInitialized(ap), "get id should not have initialized it.");
string name = ap.Name;
Assert.IsTrue(NHibernateUtil.IsInitialized(ap), "get name should have initialized it.");
s.Delete(ap);
s.Flush();
s.Close();
}
|
| ||||
[Test]
public void Proxy()
{
ISession s = OpenSession();
IMyProxy ap = new MyProxyImpl { Id = 1, Name = "first proxy"
} ;
s.Save(ap);
s.Flush();
s.Close();
s = OpenSession();
ap = (IMyProxy) s.Load( typeof( MyProxyImpl), ap.Id);
Assert.IsFalse(NHibernateUtil.IsInitialized(ap));
int id = ap.Id;
Assert.IsFalse(NHibernateUtil.IsInitialized(ap), "get id should not have initialized it.");
string name = ap.Name;
Assert.IsTrue(NHibernateUtil.IsInitialized(ap), "get name should have initialized it.");
s.Delete(ap);
s.Flush();
s.Close();
}
|
| ||||
[Test]
public void Proxy()
{
ISession s = OpenSession();
IMyProxy ap = new MyProxyImpl { Id = 1, Name = "first proxy"
} ;
s.Save(ap);
s.Flush();
s.Close();
s = OpenSession();
ap = (IMyProxy) s.Load( typeof( MyProxyImpl), ap.Id);
Assert.IsFalse(NHibernateUtil.IsInitialized(ap));
int id = ap.Id;
Assert.IsFalse(NHibernateUtil.IsInitialized(ap), "get id should not have initialized it.");
string name = ap.Name;
Assert.IsTrue(NHibernateUtil.IsInitialized(ap), "get name should have initialized it.");
s.Delete(ap);
s.Flush();
s.Close();
}
|
| |||
[Test]
public void Proxy()
{
ISession s = OpenSession();
[[#variable2b7aa320]]ap = new [[#variable2b7aa300]]{
Id = 1, Name = "first proxy"
} ;
s.Save(ap);
s.Flush();
s.Close();
s = OpenSession();
ap = ( [[#variable2b7aa320]])s.Load( typeof( [[#variable2b7aa300]]), ap.Id);
Assert.IsFalse(NHibernateUtil.IsInitialized(ap));
int id = ap.Id;
Assert.IsFalse(NHibernateUtil.IsInitialized(ap), "get id should not have initialized it.");
string name = ap.Name;
Assert.IsTrue(NHibernateUtil.IsInitialized(ap), "get name should have initialized it.");
s.Delete(ap);
s.Flush();
s.Close();
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#2b7aa320]] | IMyProxy |
| 1 | 2 | [[#2b7aa320]] | CastleProxy |
| 1 | 3 | [[#2b7aa320]] | IMyProxy |
| 2 | 1 | [[#2b7aa300]] | MyProxyImpl |
| 2 | 2 | [[#2b7aa300]] | CastleProxyImpl |
| 2 | 3 | [[#2b7aa300]] | MyProxyImpl |