CloneSet428


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
22220.987class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
122631
src/NHibernate.Test/Operations/MergeFixture.cs
222655
src/NHibernate.Test/Operations/MergeFixture.cs
Clone Instance
1
Line Count
22
Source Line
631
Source File
src/NHibernate.Test/Operations/MergeFixture.cs

                [Test]
                public void PersistThenMergeInSameTxnWithTimestamp()
                {
                        ISession s = OpenSession();
                        ITransaction tx = s.BeginTransaction();
                        var entity = new TimestampedEntity { Id = "test", Name = "test"
                                                           } ;
                        s.Persist(entity);
                        s.Merge(new TimestampedEntity { Id = "test", Name = "test-2"
                                                      } );
                        try
                        {
                                // control operation...
                                s.SaveOrUpdate(new TimestampedEntity { Id = "test", Name = "test-3"
                                                                     } );
                                Assert.Fail("saveOrUpdate() should fail here");
                        }
                        catch (NonUniqueObjectException)
                        {
                                // expected behavior
                        }
                        tx.Commit();
                        s.Close();
                }



Clone Instance
2
Line Count
22
Source Line
655
Source File
src/NHibernate.Test/Operations/MergeFixture.cs

                [Test]
                public void PersistThenMergeInSameTxnWithVersion()
                {
                        ISession s = OpenSession();
                        ITransaction tx = s.BeginTransaction();
                        var entity = new VersionedEntity { Id = "test", Name = "test"
                                                         } ;
                        s.Persist(entity);
                        s.Merge(new VersionedEntity { Id = "test", Name = "test-2"
                                                    } );
                        try
                        {
                                // control operation...
                                s.SaveOrUpdate(new VersionedEntity { Id = "test", Name = "test-3"
                                                                   } );
                                Assert.Fail("saveOrUpdate() should fail here");
                        }
                        catch (NonUniqueObjectException)
                        {
                                // expected behavior
                        }
                        tx.Commit();
                        s.Close();
                }



Clone AbstractionParameter Count: 2Parameter Bindings

[Test]
public void [[#variable529211e0]]()
{
   ISession s = OpenSession();
   ITransaction tx = s.BeginTransaction();
   var entity = new [[#variable4facb5a0]]{
                                            Id = "test", Name = "test"
                                         } ;
   s.Persist(entity);
   s.Merge(new [[#variable4facb5a0]]{
                                       Id = "test", Name = "test-2"
                                    } );
   try
   {
      // control operation...
      s.SaveOrUpdate(new [[#variable4facb5a0]]{
                                                 Id = "test", Name = "test-3"
                                              } );
      Assert.Fail("saveOrUpdate() should fail here");
   }
   catch (NonUniqueObjectException)
   {
   // expected behavior
   }
   tx.Commit();
   s.Close();
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#529211e0]]
PersistThenMergeInSameTxnWithTimestamp 
12[[#529211e0]]
PersistThenMergeInSameTxnWithVersion 
21[[#4facb5a0]]
TimestampedEntity 
22[[#4facb5a0]]
VersionedEntity