Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
35 | 3 | 1 | 0.952 | statement_list[31] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 39 | 750 | src/NHibernate.Test/Criteria/CriteriaQueryTest.cs |
2 | 35 | 934 | src/NHibernate.Test/Criteria/CriteriaQueryTest.cs |
3 | 35 | 1109 | src/NHibernate.Test/Criteria/CriteriaQueryTest.cs |
| ||||
Course course = new Course(); course.CourseCode = "HIB"; course.Description = "Hibernate Training"; s.Save(course); Student gavin = new Student(); gavin.Name = "Gavin King"; gavin.StudentNumber = 667; s.Save(gavin); Student xam = new Student(); xam.Name = "Max Rydahl Andersen"; xam.StudentNumber = 101; s.Save(xam); Enrolment enrolment = new Enrolment(); enrolment.Course = course; enrolment.CourseCode = course.CourseCode; enrolment.Semester = 1; enrolment.Year = 1999; enrolment.Student = xam; enrolment.StudentNumber = xam.StudentNumber; xam.Enrolments.Add(enrolment); s.Save(enrolment); enrolment = new Enrolment(); enrolment.Course = course; enrolment.CourseCode = course.CourseCode; enrolment.Semester = 3; enrolment.Year = 1998; enrolment.Student = gavin; enrolment.StudentNumber = gavin.StudentNumber; gavin.Enrolments.Add(enrolment); s.Save(enrolment); //s.flush(); ICriteria criteriaToBeCloned = s.CreateCriteria( typeof(Enrolment)). SetProjection (Projections.Count("StudentNumber").SetDistinct()); |
| ||||
Course course = new Course(); course.CourseCode = "HIB"; course.Description = "Hibernate Training"; s.Save(course); Student gavin = new Student(); gavin.Name = "Gavin King"; gavin.StudentNumber = 667; s.Save(gavin); Student xam = new Student(); xam.Name = "Max Rydahl Andersen"; xam.StudentNumber = 101; s.Save(xam); Enrolment enrolment = new Enrolment(); enrolment.Course = course; enrolment.CourseCode = course.CourseCode; enrolment.Semester = 1; enrolment.Year = 1999; enrolment.Student = xam; enrolment.StudentNumber = xam.StudentNumber; xam.Enrolments.Add(enrolment); s.Save(enrolment); enrolment = new Enrolment(); enrolment.Course = course; enrolment.CourseCode = course.CourseCode; enrolment.Semester = 3; enrolment.Year = 1998; enrolment.Student = gavin; enrolment.StudentNumber = gavin.StudentNumber; gavin.Enrolments.Add(enrolment); s.Save(enrolment); s.Flush(); |
| ||||
Course course = new Course(); course.CourseCode = "HIB"; course.Description = "Hibernate Training"; s.Save(course); Student gavin = new Student(); gavin.Name = "Gavin King"; gavin.StudentNumber = 667; s.Save(gavin); Student xam = new Student(); xam.Name = "Max Rydahl Andersen"; xam.StudentNumber = 101; s.Save(xam); Enrolment enrolment = new Enrolment(); enrolment.Course = course; enrolment.CourseCode = course.CourseCode; enrolment.Semester = 1; enrolment.Year = 1999; enrolment.Student = xam; enrolment.StudentNumber = xam.StudentNumber; xam.Enrolments.Add(enrolment); s.Save(enrolment); enrolment = new Enrolment(); enrolment.Course = course; enrolment.CourseCode = course.CourseCode; enrolment.Semester = 3; enrolment.Year = 1998; enrolment.Student = gavin; enrolment.StudentNumber = gavin.StudentNumber; gavin.Enrolments.Add(enrolment); s.Save(enrolment); s.Flush(); |
| |||
Course course = new Course(); course.CourseCode = "HIB"; course.Description = "Hibernate Training"; s.Save(course); Student gavin = new Student(); gavin.Name = "Gavin King"; gavin.StudentNumber = 667; s.Save(gavin); Student xam = new Student(); xam.Name = "Max Rydahl Andersen"; xam.StudentNumber = 101; s.Save(xam); Enrolment enrolment = new Enrolment(); enrolment.Course = course; enrolment.CourseCode = course.CourseCode; enrolment.Semester = 1; enrolment.Year = 1999; enrolment.Student = xam; enrolment.StudentNumber = xam.StudentNumber; xam.Enrolments.Add(enrolment); s.Save(enrolment); enrolment = new Enrolment(); enrolment.Course = course; enrolment.CourseCode = course.CourseCode; enrolment.Semester = 3; enrolment.Year = 1998; enrolment.Student = gavin; enrolment.StudentNumber = gavin.StudentNumber; gavin.Enrolments.Add(enrolment); s.Save(enrolment); [[#variable45c49ac0]] |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#45c49ac0]] | s.Flush(); |
1 | 2 | [[#45c49ac0]] | //s.flush(); ICriteria criteriaToBeCloned = s.CreateCriteria( typeof(Enrolment)).SetProjection(Projections.Count("StudentNumber").SetDistinct()); |
1 | 3 | [[#45c49ac0]] | s.Flush(); |