CloneSet499


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
13340.978class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
113386
src/NHibernate.Test/HQL/HQLFunctions.cs
212402
src/NHibernate.Test/HQL/HQLFunctions.cs
313796
src/NHibernate.Test/HQL/HQLFunctions.cs
Clone Instance
1
Line Count
13
Source Line
386
Source File
src/NHibernate.Test/HQL/HQLFunctions.cs

                [Test]
                public void Bit_length()
                {
                        IgnoreIfNotSupported("bit_length");

                        // test only the parser
                        using (ISession s = OpenSession())
                        {
                                string hql = "from Animal a where bit_length(a.Description) = 24";
                                IList result = s.CreateQuery(hql).List();

                                hql = "select bit_length(a.Description) from Animal a";
                                result = s.CreateQuery(hql).List();
                        }
                }



Clone Instance
2
Line Count
12
Source Line
402
Source File
src/NHibernate.Test/HQL/HQLFunctions.cs

                [Test]
                public void Coalesce()
                {
                        IgnoreIfNotSupported("coalesce");
                        // test only the parser and render
                        using (ISession s = OpenSession())
                        {
                                string hql = "select coalesce(h.NickName, h.Name.First, h.Name.Last) from Human h";
                                IList result = s.CreateQuery(hql).List();

                                hql = "from Human h where coalesce(h.NickName, h.Name.First, h.Name.Last) = 'max'";
                                result = s.CreateQuery(hql).List();
                        }
                }



Clone Instance
3
Line Count
13
Source Line
796
Source File
src/NHibernate.Test/HQL/HQLFunctions.cs

                [Test]
                public void Extract()
                {
                        IgnoreIfNotSupported("extract");

                        // test only the parser and render
                        using (ISession s = OpenSession())
                        {
                                string hql = "select extract(second from current_timestamp()), extract(minute from current_timestamp()), extract(hour from current_timestamp()) from Animal";
                                IList result = s.CreateQuery(hql).List();

                                hql = "from Animal where extract(day from cast(current_timestamp() as Date))>0";
                                result = s.CreateQuery(hql).List();
                        }
                }



Clone AbstractionParameter Count: 4Parameter Bindings

[Test]
public void [[#variable2d0eb620]]()
{
   IgnoreIfNotSupported( [[#variable2d0eb5c0]]);
   // test only the parser
   // test only the parser and render
   using (ISession s = OpenSession())
   {
      string hql = [[#variable2d0eb560]];
      IList result = s.CreateQuery(hql).List();
      hql = [[#variable2d0eb4e0]];
      result = s.CreateQuery(hql).List();
   }
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#2d0eb620]]
Bit_length 
12[[#2d0eb620]]
Coalesce 
13[[#2d0eb620]]
Extract 
21[[#2d0eb5c0]]
"bit_length" 
22[[#2d0eb5c0]]
"coalesce" 
23[[#2d0eb5c0]]
"extract" 
31[[#2d0eb560]]
"from Animal a where bit_length(a.Description) = 24" 
32[[#2d0eb560]]
"select coalesce(h.NickName, h.Name.First, h.Name.Last) from Human h" 
33[[#2d0eb560]]
"select extract(second from current_timestamp()), extract(minute from current_timestamp()), extract(hour from current_timestamp()) from Animal" 
41[[#2d0eb4e0]]
"select bit_length(a.Description) from Animal a" 
42[[#2d0eb4e0]]
"from Human h where coalesce(h.NickName, h.Name.First, h.Name.Last) = 'max'" 
43[[#2d0eb4e0]]
"from Animal where extract(day from cast(current_timestamp() as Date))>0"