CloneSet536


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
18240.984class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11811
src/NHibernate.Test/MappingExceptions/DuplicateMappingFixture.cs
21932
src/NHibernate.Test/MappingExceptions/DuplicateMappingFixture.cs
Clone Instance
1
Line Count
18
Source Line
11
Source File
src/NHibernate.Test/MappingExceptions/DuplicateMappingFixture.cs

                [Test]
                public void MappingTheSameClassTwiceShouldThrowException()
                {
                        Configuration cfg = new Configuration();
                        string resource = "NHibernate.Test.MappingExceptions.DuplicateClassMapping.hbm.xml";
                        try
                        {
                                cfg.AddResource(resource, this.GetType().Assembly);
                                cfg.BuildSessionFactory();
                                Assert.Fail("Should have thrown exception when we mapped the same class twice");
                        }
                        catch (MappingException me)
                        {
                                Assert.AreEqual(
                                        "Could not compile the mapping document: NHibernate.Test.MappingExceptions.DuplicateClassMapping.hbm.xml",
                                        me.Message);
                                Assert.IsTrue(me.InnerException.GetType() == typeof(DuplicateMappingException));
                                Assert.AreEqual("Duplicate class/entity mapping NHibernate.Test.MappingExceptions.A", me.InnerException.Message);
                        }
                }



Clone Instance
2
Line Count
19
Source Line
32
Source File
src/NHibernate.Test/MappingExceptions/DuplicateMappingFixture.cs

                [Test]
                public void MappingSameCollectionTwiceShouldThrow()
                {
                        Configuration cfg = new Configuration();
                        string resource = "NHibernate.Test.MappingExceptions.DuplicateCollectionMapping.hbm.xml";
                        try
                        {
                                cfg.AddResource(resource, this.GetType().Assembly);
                                cfg.BuildSessionFactory();
                                Assert.Fail("Should have thrown exception when we mapped the same class twice");
                        }
                        catch (MappingException me)
                        {
                                Assert.AreEqual(
                                        "Could not compile the mapping document: NHibernate.Test.MappingExceptions.DuplicateCollectionMapping.hbm.xml",
                                        me.Message);
                                Assert.IsTrue(me.InnerException.GetType() == typeof(DuplicateMappingException));
                                Assert.AreEqual("Duplicate collection role mapping NHibernate.Test.MappingExceptions.A.Children",
                                                me.InnerException.Message);
                        }
                }



Clone AbstractionParameter Count: 4Parameter Bindings

[Test]
public void [[#variable66359520]]()
{
   Configuration cfg = new Configuration();
   string resource = [[#variable66359500]];
   try
   {
      cfg.AddResource(resource, this.GetType().Assembly);
      cfg.BuildSessionFactory();
      Assert.Fail("Should have thrown exception when we mapped the same class twice");
   }
   catch (MappingException me)
   {
      Assert.AreEqual( [[#variable66358da0]], me.Message);
      Assert.IsTrue(me.InnerException.GetType() == typeof(DuplicateMappingException));
      Assert.AreEqual( [[#variable66359ee0]], me.InnerException.Message);
   }
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#66359520]]
MappingTheSameClassTwiceShouldThrowException 
12[[#66359520]]
MappingSameCollectionTwiceShouldThrow 
21[[#66359500]]
"NHibernate.Test.MappingExceptions.DuplicateClassMapping.hbm.xml" 
22[[#66359500]]
"NHibernate.Test.MappingExceptions.DuplicateCollectionMapping.hbm.xml" 
31[[#66358da0]]
"Could not compile the mapping document: NHibernate.Test.MappingExceptions.DuplicateClassMapping.hbm.xml" 
32[[#66358da0]]
"Could not compile the mapping document: NHibernate.Test.MappingExceptions.DuplicateCollectionMapping.hbm.xml" 
41[[#66359ee0]]
"Duplicate class/entity mapping NHibernate.Test.MappingExceptions.A" 
42[[#66359ee0]]
"Duplicate collection role mapping NHibernate.Test.MappingExceptions.A.Children"