File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/subclassfilter/JoinedSubclassFilterTest.java | File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/subclassfilter/UnionSubclassFilterTest.java | |||
Method name: void prepareTestData(Session)
|
Method name: void prepareTestData(Session)
|
|||
Number of AST nodes: 30 | Number of AST nodes: 30 | |||
1 | Employee john = new Employee("John Doe");↵ | 1 | Employee john = new Employee( "John Doe" );↵ | |
2 | john.setCompany( "JBoss" );↵ | 2 | john.setCompany( "JBoss" );↵ | |
3 | john.setDepartment( "hr" );↵ | 3 | john.setDepartment( "hr" );↵ | |
4 | john.setTitle( "hr guru" );↵ | 4 | john.setTitle( "hr guru" );↵ | |
5 | john.setRegion( "US" );↵ | 5 | john.setRegion( "US" );↵ | |
6 | Employee polli = new Employee("Polli Wog");↵ | 6 | Employee polli = new Employee( "Polli Wog" );↵ | |
7 | polli.setCompany( "JBoss" );↵ | 7 | polli.setCompany( "JBoss" );↵ | |
8 | polli.setDepartment( "hr" );↵ | 8 | polli.setDepartment( "hr" );↵ | |
9 | polli.setTitle( "hr novice" );↵ | 9 | polli.setTitle( "hr novice" );↵ | |
10 | polli.setRegion( "US" );↵ | 10 | polli.setRegion( "US" );↵ | |
11 | polli.setManager( john );↵ | 11 | polli.setManager( john );↵ | |
12 | john.getMinions().add( polli );↵ | 12 | john.getMinions().add( polli );↵ | |
13 | Employee suzie = new Employee( "Suzie Q" );↵ | 13 | Employee suzie = new Employee( "Suzie Q" );↵ | |
14 | suzie.setCompany( "JBoss" );↵ | 14 | suzie.setCompany( "JBoss" );↵ | |
15 | suzie.setDepartment( "hr" );↵ | 15 | suzie.setDepartment( "hr" );↵ | |
16 | suzie.setTitle( "hr novice" );↵ | 16 | suzie.setTitle( "hr novice" );↵ | |
17 | suzie.setRegion( "EMEA" );↵ | 17 | suzie.setRegion( "EMEA" );↵ | |
18 | suzie.setManager( john );↵ | 18 | suzie.setManager( john );↵ | |
19 | john.getMinions().add( suzie );↵ | 19 | john.getMinions().add( suzie );↵ | |
20 | Customer cust = new Customer( "John Q Public" );↵ | 20 | Customer cust = new Customer( "John Q Public" );↵ | |
21 | cust.setCompany( "Acme" );↵ | 21 | cust.setCompany( "Acme" );↵ | |
22 | cust.setRegion( "US" );↵ | 22 | cust.setRegion( "US" );↵ | |
23 | cust.setContactOwner( john );↵ | 23 | cust.setContactOwner( john );↵ | |
24 | Person ups = new Person( "UPS guy" );↵ | 24 | Person ups = new Person( "UPS guy" );↵ | |
25 | ups.setCompany( "UPS" );↵ | 25 | ups.setCompany( "UPS" );↵ | |
26 | ups.setRegion( "US" );↵ | 26 | ups.setRegion( "US" );↵ | |
27 | s.save( john );↵ | 27 | s.save( john );↵ | |
28 | s.save( cust );↵ | 28 | s.save( cust );↵ | |
29 | s.save( ups );↵ | 29 | s.save( ups );↵ | |
30 | s.flush(); | 30 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 385 |
Number of mapped statements | 30 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | Employee john = new Employee("John Doe"); | 1 | Employee john = new Employee("John Doe"); | |
2 | john.setCompany("JBoss"); | 2 | john.setCompany("JBoss"); | |
3 | john.setDepartment("hr"); | 3 | john.setDepartment("hr"); | |
4 | john.setTitle("hr guru"); | 4 | john.setTitle("hr guru"); | |
5 | john.setRegion("US"); | 5 | john.setRegion("US"); | |
6 | Employee polli = new Employee("Polli Wog"); | 6 | Employee polli = new Employee("Polli Wog"); | |
7 | polli.setCompany("JBoss"); | 7 | polli.setCompany("JBoss"); | |
8 | polli.setDepartment("hr"); | 8 | polli.setDepartment("hr"); | |
9 | polli.setTitle("hr novice"); | 9 | polli.setTitle("hr novice"); | |
10 | polli.setRegion("US"); | 10 | polli.setRegion("US"); | |
11 | polli.setManager(john); | 11 | polli.setManager(john); | |
12 | john.getMinions().add(polli); | 12 | john.getMinions().add(polli); | |
13 | Employee suzie = new Employee("Suzie Q"); | 13 | Employee suzie = new Employee("Suzie Q"); | |
14 | suzie.setCompany("JBoss"); | 14 | suzie.setCompany("JBoss"); | |
15 | suzie.setDepartment("hr"); | 15 | suzie.setDepartment("hr"); | |
16 | suzie.setTitle("hr novice"); | 16 | suzie.setTitle("hr novice"); | |
17 | suzie.setRegion("EMEA"); | 17 | suzie.setRegion("EMEA"); | |
18 | suzie.setManager(john); | 18 | suzie.setManager(john); | |
19 | john.getMinions().add(suzie); | 19 | john.getMinions().add(suzie); | |
20 | Customer cust = new Customer("John Q Public"); | 20 | Customer cust = new Customer("John Q Public"); | |
21 | cust.setCompany("Acme"); | 21 | cust.setCompany("Acme"); | |
22 | cust.setRegion("US"); | 22 | cust.setRegion("US"); | |
23 | cust.setContactOwner(john); | 23 | cust.setContactOwner(john); | |
24 | Person ups = new Person("UPS guy"); | 24 | Person ups = new Person("UPS guy"); | |
25 | ups.setCompany("UPS"); | 25 | ups.setCompany("UPS"); | |
26 | ups.setRegion("US"); | 26 | ups.setRegion("US"); | |
27 | s.save(john); | 27 | s.save(john); | |
28 | s.save(cust); | 28 | s.save(cust); | |
29 | s.save(ups); | 29 | s.save(ups); | |
30 | s.flush(); | 30 | s.flush(); |
Row | Violation |
---|