File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/type/CompositeCustomType.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/type/CustomCollectionType.java | |||
Method name: void CompositeCustomType(Class, Properties)
|
Method name: void CustomCollectionType(Class, String, String, boolean)
|
|||
Number of AST nodes: 2 | Number of AST nodes: 2 | |||
1 | try {↵ | 1 | try {↵ | |
2 | userType = (CompositeUserType) userTypeClass.newInstance();↵ | 2 | userType = ( UserCollectionType ) userTypeClass.newInstance();↵ | |
3 | }↵ | 3 | }↵ | |
4 | catch (InstantiationException ie) {↵ | 4 | catch ( InstantiationException ie ) {↵ | |
5 | throw new MappingException( ↵ | 5 | throw new MappingException( ↵ | |
6 | "Cannot instantiate custom type: " + ↵ | 6 | "Cannot instantiate custom type: " + ↵ | |
7 | userTypeClass.getName() ↵ | 7 | userTypeClass.getName() ↵ | |
8 | );↵ | 8 | );↵ | |
9 | }↵ | 9 | }↵ | |
10 | catch (IllegalAccessException iae) {↵ | 10 | catch ( IllegalAccessException iae ) {↵ | |
11 | throw new MappingException( ↵ | 11 | throw new MappingException( ↵ | |
12 | "IllegalAccessException trying to instantiate custom type: " + ↵ | 12 | "IllegalAccessException trying to instantiate custom type: " + ↵ | |
13 | userTypeClass.getName() ↵ | 13 | userTypeClass.getName() ↵ | |
14 | );↵ | 14 | );↵ | |
15 | } | 15 |
| |
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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 4 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
4 | try | 4 | try | |||||
|
| 5 | userType = (UserCollectionType)userTypeClass.newInstance(); | |||||
5 | userType = (CompositeUserType)userTypeClass.newInstance(); |
| |
Row | Violation |
---|---|
1 | Unmatched statement userType=(UserCollectionType)userTypeClass.newInstance(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement userType=(UserCollectionType)userTypeClass.newInstance(); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
3 | Unmatched statement userType=(CompositeUserType)userTypeClass.newInstance(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement userType=(CompositeUserType)userTypeClass.newInstance(); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |