Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
9 | 2 | 2 | 0.990 | non_pp_embedded_statement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 9 | 58 | src/NHibernate.Test/Criteria/CriteriaQueryTest.cs |
2 | 9 | 69 | src/NHibernate.Test/Criteria/CriteriaQueryTest.cs |
| ||||
using (ISession session = OpenSession()) { // finds all courses which have a description equal to '%1' Course example = new Course(); example.Description = "&%1"; IList result = session.CreateCriteria( typeof(Course)).Add( Example.Create(example).IgnoreCase().EnableLike().SetEscapeCharacter('&')).List(); Assert.AreEqual(1, result.Count); } |
| ||||
using (ISession session = OpenSession()) { // finds all courses which contain '%' as the first char in the description Course example = new Course(); example.Description = "&%%"; IList result = session.CreateCriteria( typeof(Course)).Add( Example.Create(example).IgnoreCase().EnableLike().SetEscapeCharacter('&')).List(); Assert.AreEqual(2, result.Count); } |
| |||
using (ISession session = OpenSession()) { // finds all courses which have a description equal to '%1' // finds all courses which contain '%' as the first char in the description Course example = new Course(); example.Description = [[#variable501d5300]]; IList result = session.CreateCriteria( typeof(Course)).Add(Example.Create(example).IgnoreCase().EnableLike().SetEscapeCharacter('&')).List(); Assert.AreEqual( [[#variable501d5260]], result.Count); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#501d5300]] | "&%1" |
1 | 2 | [[#501d5300]] | "&%%" |
2 | 1 | [[#501d5260]] | 1 |
2 | 2 | [[#501d5260]] | 2 |