CloneSet204


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
40260.964class_member_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
14016
src/NHibernate.Test/NHSpecificTest/NH372/Fixture.cs
240116
src/NHibernate.Test/NHSpecificTest/NH372/Fixture.cs
Clone Instance
1
Line Count
40
Source Line
16
Source File
src/NHibernate.Test/NHSpecificTest/NH372/Fixture.cs

                private void ComponentFieldNotInserted_Generic(System.Type type)
                {
                        int id;

                        using (ISession session = OpenSession())
                        using (ITransaction tx = session.BeginTransaction())
                        {
                                BaseParent p = (BaseParent) Activator.CreateInstance(type);
                                p.Component.FieldNotInserted = 10;
                                session.Save(p);

                                tx.Commit();

                                id = p.Id;
                        }

                        using (ISession session = OpenSession())
                        using (ITransaction tx = session.BeginTransaction())
                        {
                                BaseParent p = (BaseParent) session.Get(type, id);

                                Assert.AreEqual(0, p.Component.FieldNotInserted,
                                                "Field should not have been inserted.");

                                tx.Commit();
                        }
                }

                [Test]
                public void ComponentFieldNotInserted()
                {
                        isDynamic = false;
                        ComponentFieldNotInserted_Generic( typeof(Parent));
                }

                [Test]
                public void ComponentFieldNotInserted_Dynamic()
                {
                        isDynamic = true;
                        ComponentFieldNotInserted_Generic( typeof(DynamicParent));
                }



Clone Instance
2
Line Count
40
Source Line
116
Source File
src/NHibernate.Test/NHSpecificTest/NH372/Fixture.cs

                private void SubComponentFieldNotInserted_Generic(System.Type type)
                {
                        int id;

                        using (ISession session = OpenSession())
                        using (ITransaction tx = session.BeginTransaction())
                        {
                                BaseParent p = (BaseParent) Activator.CreateInstance(type);
                                p.Component.SubComponent.FieldNotInserted = 10;
                                session.Save(p);

                                tx.Commit();

                                id = p.Id;
                        }

                        using (ISession session = OpenSession())
                        using (ITransaction tx = session.BeginTransaction())
                        {
                                BaseParent p = (BaseParent) session.Get(type, id);

                                Assert.AreEqual(0, p.Component.SubComponent.FieldNotInserted,
                                                "Field should not have been inserted.");

                                tx.Commit();
                        }
                }

                [Test]
                public void SubComponentFieldNotInserted()
                {
                        isDynamic = false;
                        SubComponentFieldNotInserted_Generic( typeof(Parent));
                }

                [Test]
                public void SubComponentFieldNotInserted_Dynamic()
                {
                        isDynamic = false;
                        SubComponentFieldNotInserted_Generic( typeof(DynamicParent));
                }



Clone AbstractionParameter Count: 6Parameter Bindings

private void [[#variable6c7899a0]](System.Type type)
{
   int id;
   using (ISession session = OpenSession())
      using (ITransaction tx = session.BeginTransaction())
      {
         BaseParent p = (BaseParent)Activator.CreateInstance(type);
          [[#variable6c789a00]]. [[#variable6c789a20]].FieldNotInserted = 10;
         session.Save(p);
         tx.Commit();
         id = p.Id;
      }
   using (ISession session = OpenSession())
      using (ITransaction tx = session.BeginTransaction())
      {
         BaseParent p = (BaseParent)session.Get(type, id);
         Assert.AreEqual(0, [[#variable6c789a00]]. [[#variable6c789a20]].FieldNotInserted, "Field should not have been inserted.");
         tx.Commit();
      }
}

[Test]
public void [[#variable54ba1420]]()
{
   isDynamic = false;
    [[#variable6c7899a0]]( typeof(Parent));
}

[Test]
public void [[#variable6c789900]]()
{
   isDynamic = [[#variable6c7898c0]];
    [[#variable6c7899a0]]( typeof(DynamicParent));
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6c7899a0]]
ComponentFieldNotInserted_Generic 
12[[#6c7899a0]]
SubComponentFieldNotInserted_Generic 
21[[#6c789a00]]
p 
22[[#6c789a00]]
p.Component 
31[[#6c789a20]]
Component 
32[[#6c789a20]]
SubComponent 
41[[#54ba1420]]
ComponentFieldNotInserted 
42[[#54ba1420]]
SubComponentFieldNotInserted 
51[[#6c789900]]
ComponentFieldNotInserted_Dynamic 
52[[#6c789900]]
SubComponentFieldNotInserted_Dynamic 
61[[#6c7898c0]]
true 
62[[#6c7898c0]]
false