File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/extendshbm/ExtendsTest.java | File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/extendshbm/ExtendsTest.java | |||
Method name: void testEntityNamesWithPackage()
|
Method name: void testJoinedSubclassAndEntityNamesOnly()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | Configuration cfg = new Configuration();↵ | 1 | Configuration cfg = new Configuration();↵ | |
2 | try {↵ | 2 | try {↵ | |
3 | cfg.addResource( getBaseForMappings() + "extendshbm/packageentitynames.hbm.xml" );↵ | 3 | cfg.addResource( getBaseForMappings() + "extendshbm/entitynames.hbm.xml" );↵ | |
4 | cfg.buildMappings();↵ | 4 | cfg.buildMappings();↵ | |
5 | assertNotNull( cfg.getClassMapping( "EntityHasName" ) );↵ | 5 | assertNotNull( cfg.getClassMapping( "EntityHasName" ) );↵ | |
6 | assertNotNull( cfg.getClassMapping( "EntityCompany" ) );↵ | 6 | assertNotNull( cfg.getClassMapping( "EntityCompany" ) );↵ | |
7 | }↵ | 7 | }↵ | |
8 | catch ( HibernateException e ) {↵ | 8 | catch ( HibernateException e ) {↵ | |
9 | e.printStackTrace();↵ | 9 | e.printStackTrace();↵ | |
10 | fail( "should not fail with exception! " + e );↵ | 10 | fail( "should not fail with exception! " + e );↵ | |
11 | } | 11 |
| |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 26 |
Number of mapped statements | 6 |
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) | 1.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Configuration cfg = new Configuration(); | 1 | Configuration cfg = new Configuration(); | |||||||||||
2 | try | 2 | try | |||||||||||
3 | cfg.addResource(getBaseForMappings() + "extendshbm/packageentitynames.hbm.xml"); |
| 3 | cfg.addResource(getBaseForMappings() + "extendshbm/entitynames.hbm.xml"); | ||||||||||
4 | cfg.buildMappings(); | 4 | cfg.buildMappings(); | |||||||||||
5 | assertNotNull(cfg.getClassMapping("EntityHasName")); | 5 | assertNotNull(cfg.getClassMapping("EntityHasName")); | |||||||||||
6 | assertNotNull(cfg.getClassMapping("EntityCompany")); | 6 | assertNotNull(cfg.getClassMapping("EntityCompany")); |
Row | Violation |
---|