File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/proxy/pojo/cglib/CGLIBLazyInitializer.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/proxy/pojo/javassist/JavassistLazyInitializer.java | |||
Method name: Object invoke(Object, Method, Object[])
|
Method name: Object invoke(Object, Method, Method, Object[])
|
|||
Number of AST nodes: 10 | Number of AST nodes: 9 | |||
1 | try {↵ | 1 | try {↵ | |
2 | final Object returnValue;↵ | 2 | ↵ | |
3 | if ( ReflectHelper.isPublic( persistentClass, method ) ) {↵ | 3 | if ( ReflectHelper.isPublic( persistentClass, thisMethod ) ) {↵ | |
4 | if ( !method.getDeclaringClass().isInstance( target ) ) {↵ | 4 | if ( !thisMethod.getDeclaringClass().isInstance( target ) ) {↵ | |
5 | throw new ClassCastException( target.getClass().getName() );↵ | 5 | throw new ClassCastException( target.getClass().getName() );↵ | |
6 | }↵ | 6 | }↵ | |
7 | returnValue = method.invoke( target, args );↵ | 7 | returnValue = thisMethod.invoke( target, args );↵ | |
8 | }↵ | 8 | }↵ | |
9 | else {↵ | 9 | else {↵ | |
10 | if ( !method.isAccessible() ) {↵ | 10 | if ( !thisMethod.isAccessible() ) {↵ | |
11 | method.setAccessible( true );↵ | 11 | thisMethod.setAccessible( true );↵ | |
12 | }↵ | 12 | }↵ | |
13 | returnValue = method.invoke( target, args );↵ | 13 | returnValue = thisMethod.invoke( target, args );↵ | |
14 | }↵ | 14 | }↵ | |
15 | return returnValue == target ? proxy : returnValue;↵ | 15 | return returnValue == target ? proxy : returnValue;↵ | |
16 | }↵ | 16 | }↵ | |
17 | catch ( InvocationTargetException ite ) {↵ | 17 | catch ( InvocationTargetException ite ) {↵ | |
18 | throw ite.getTargetException();↵ | 18 | throw ite.getTargetException();↵ | |
19 | } | 19 |
| |
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.7 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 29 |
Number of mapped statements | 9 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.6 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | try | 8 | try | |||||||||||
6 | final Object returnValue; | | ||||||||||||
7 | if (ReflectHelper.isPublic(persistentClass, method)) |
| 9 | if (ReflectHelper.isPublic(persistentClass, thisMethod)) | ||||||||||
8 | if (!method.getDeclaringClass().isInstance(target)) |
| 10 | if (!thisMethod.getDeclaringClass().isInstance(target)) | ||||||||||
9 | throw new ClassCastException(target.getClass().getName()); | 11 | throw new ClassCastException(target.getClass().getName()); | |||||||||||
10 | returnValue = method.invoke(target, args); |
| 12 | returnValue = thisMethod.invoke(target, args); | ||||||||||
else | else | |||||||||||||
11 | if (!method.isAccessible()) |
| 13 | if (!thisMethod.isAccessible()) | ||||||||||
12 | method.setAccessible(true); |
| 14 | thisMethod.setAccessible(true); | ||||||||||
13 | returnValue = method.invoke(target, args); |
| 15 | returnValue = thisMethod.invoke(target, args); | ||||||||||
14 | return returnValue == target ? proxy : returnValue; | 16 | return returnValue == target ? proxy : returnValue; |
Row | Violation |
---|