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: 7 | Number of AST nodes: 7 | |||
1 | if ( ReflectHelper.isPublic( persistentClass, method ) ) {↵ | 1 | if ( ReflectHelper.isPublic( persistentClass, thisMethod ) ) {↵ | |
2 | if ( !method.getDeclaringClass().isInstance( target ) ) {↵ | 2 | if ( !thisMethod.getDeclaringClass().isInstance( target ) ) {↵ | |
3 | throw new ClassCastException( target.getClass().getName() );↵ | 3 | throw new ClassCastException( target.getClass().getName() );↵ | |
4 | }↵ | 4 | }↵ | |
5 | returnValue = method.invoke( target, args );↵ | 5 | returnValue = thisMethod.invoke( target, args );↵ | |
6 | }↵ | 6 | }↵ | |
7 | else {↵ | 7 | else {↵ | |
8 | if ( !method.isAccessible() ) {↵ | 8 | if ( !thisMethod.isAccessible() ) {↵ | |
9 | method.setAccessible( true );↵ | 9 | thisMethod.setAccessible( true );↵ | |
10 | }↵ | 10 | }↵ | |
11 | returnValue = method.invoke( target, args );↵ | 11 | returnValue = thisMethod.invoke( target, args );↵ | |
12 | } | 12 |
| |
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) | 1.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 23 |
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) | 11.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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); |
Row | Violation |
---|