File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/component/ComponentTuplizerFactory.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/entity/EntityTuplizerFactory.java | |||
Method name: Constructor getProperConstructor(Class)
|
Method name: Constructor getProperConstructor(Class)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | Constructor ctor = null;↵ | 1 | Constructor ctor = null;↵ | |
2 | try {↵ | 2 | try {↵ | |
3 | ctor = clazz.getDeclaredConstructor( COMPONENT_TUP_CTOR_SIG );↵ | 3 | ctor = clazz.getDeclaredConstructor( ENTITY_TUP_CTOR_SIG );↵ | |
4 | if ( ! ReflectHelper.isPublic( ctor ) ) {↵ | 4 | if ( ! ReflectHelper.isPublic( ctor ) ) {↵ | |
5 | try {↵ | 5 | try {↵ | |
6 | // found a ctor, but it was not publicly accessible so try to request accessibility↵ | 6 | // found a ctor, but it was not publicly accessible so try to request accessibility↵ | |
7 | ctor.setAccessible( true );↵ | 7 | ctor.setAccessible( true );↵ | |
8 | }↵ | 8 | }↵ | |
9 | catch ( SecurityException e ) {↵ | 9 | catch ( SecurityException e ) {↵ | |
10 | ctor = null;↵ | 10 | ctor = null;↵ | |
11 | }↵ | 11 | }↵ | |
12 | }↵ | 12 | }↵ | |
13 | }↵ | 13 | }↵ | |
14 | catch ( NoSuchMethodException ignore ) {↵ | 14 | catch ( NoSuchMethodException ignore ) {↵ | |
15 | }↵ | 15 | }↵ | |
16 | return ctor; | 16 |
| |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 13 |
Number of mapped statements | 7 |
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 | Constructor ctor = null; | 1 | Constructor ctor = null; | |||||||||||
2 | try | 2 | try | |||||||||||
3 | ctor = clazz.getDeclaredConstructor(COMPONENT_TUP_CTOR_SIG); |
| 3 | ctor = clazz.getDeclaredConstructor(ENTITY_TUP_CTOR_SIG); | ||||||||||
4 | if (!ReflectHelper.isPublic(ctor)) | 4 | if (!ReflectHelper.isPublic(ctor)) | |||||||||||
5 | try | 5 | try | |||||||||||
6 | ctor.setAccessible(true); | 6 | ctor.setAccessible(true); | |||||||||||
7 | return ctor; | 7 | return ctor; |
Row | Violation |
---|