CloneSet432


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
19340.975class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11919
src/NHibernate.Test/QueryTest/NamedParametersFixture.cs
21918
src/NHibernate.Test/QueryTest/PositionalParametersFixture.cs
31940
src/NHibernate.Test/QueryTest/PositionalParametersFixture.cs
Clone Instance
1
Line Count
19
Source Line
19
Source File
src/NHibernate.Test/QueryTest/NamedParametersFixture.cs

                [Test]
                public void TestMissingHQLParameters()
                {
                        ISession s = OpenSession();
                        ITransaction t = s.BeginTransaction();

                        try
                        {
                                IQuery q = s.CreateQuery("from s in class Simple where s.Name=:Name and s.Count=:Count");
                                // Just set the Name property not the count
                                q.SetAnsiString("Name", "Fred");

                                // Try to execute it
                                Assert.Throws<QueryException> (() => q.List());
                        }
                        finally
                        {
                                t.Rollback();
                                s.Close();
                        }
                }



Clone Instance
2
Line Count
19
Source Line
18
Source File
src/NHibernate.Test/QueryTest/PositionalParametersFixture.cs

                [Test]
                public void TestMissingHQLParameters()
                {
                        ISession s = OpenSession();
                        ITransaction t = s.BeginTransaction();

                        try
                        {
                                IQuery q = s.CreateQuery("from s in class Simple where s.Name=? and s.Count=?");
                                // Set the first property, but not the second
                                q.SetParameter(0, "Fred");

                                // Try to execute it
                                Assert.Throws<QueryException> (() => q.List());
                        }
                        finally
                        {
                                t.Rollback();
                                s.Close();
                        }
                }



Clone Instance
3
Line Count
19
Source Line
40
Source File
src/NHibernate.Test/QueryTest/PositionalParametersFixture.cs

                [Test]
                public void TestMissingHQLParameters2()
                {
                        ISession s = OpenSession();
                        ITransaction t = s.BeginTransaction();

                        try
                        {
                                IQuery q = s.CreateQuery("from s in class Simple where s.Name=? and s.Count=?");
                                // Set the second property, but not the first - should give a nice not found at position xxx error
                                q.SetParameter(1, "Fred");

                                // Try to execute it
                                Assert.Throws<QueryException> (() => q.List());
                        }
                        finally
                        {
                                t.Rollback();
                                s.Close();
                        }
                }



Clone AbstractionParameter Count: 4Parameter Bindings

[Test]
public void [[#variable66319c60]]()
{
   ISession s = OpenSession();
   ITransaction t = s.BeginTransaction();
   try
   {
      IQuery q = s.CreateQuery( [[#variable66318a60]]);
      // Set the first property, but not the second
      // Set the second property, but not the first - should give a nice not found at position xxx error
      // Just set the Name property not the count
      q. [[#variable66319c00]]( [[#variable66319bc0]], "Fred");
      // Try to execute it
      Assert.Throws<QueryException> (() => q.List());
   }
   finally
   {
      t.Rollback();
      s.Close();
   }
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#66319c60]]
TestMissingHQLParameters 
12[[#66319c60]]
TestMissingHQLParameters2 
13[[#66319c60]]
TestMissingHQLParameters 
21[[#66318a60]]
"from s in class Simple where s.Name=? and s.Count=?" 
22[[#66318a60]]
"from s in class Simple where s.Name=? and s.Count=?" 
23[[#66318a60]]
"from s in class Simple where s.Name=:Name and s.Count=:Count" 
31[[#66319c00]]
SetParameter 
32[[#66319c00]]
SetParameter 
33[[#66319c00]]
SetAnsiString 
41[[#66319bc0]]
0 
42[[#66319bc0]]
1 
43[[#66319bc0]]
"Name"