CloneSet62


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
35310.952statement_list[31]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
139750
src/NHibernate.Test/Criteria/CriteriaQueryTest.cs
235934
src/NHibernate.Test/Criteria/CriteriaQueryTest.cs
3351109
src/NHibernate.Test/Criteria/CriteriaQueryTest.cs
Clone Instance
1
Line Count
39
Source Line
750
Source File
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());


Clone Instance
2
Line Count
35
Source Line
934
Source File
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();


Clone Instance
3
Line Count
35
Source Line
1109
Source File
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();


Clone AbstractionParameter Count: 1Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#45c49ac0]]
s.Flush(); 
12[[#45c49ac0]]
//s.flush();
ICriteria criteriaToBeCloned = s.CreateCriteria( typeof(Enrolment)).SetProjection(Projections.Count("StudentNumber").SetDistinct()); 
13[[#45c49ac0]]
s.Flush();