File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/action/CollectionRecreateAction.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/action/CollectionUpdateAction.java | |||
Method name: void postRecreate()
|
Method name: void postUpdate()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (postListeners.length > 0) {↵ | 1 | if (postListeners.length > 0) {↵ | |
2 | PostCollectionRecreateEvent postEvent = new PostCollectionRecreateEvent(↵ | 2 | PostCollectionUpdateEvent postEvent = new PostCollectionUpdateEvent(↵ | |
3 | getPersister(), getCollection(), ( EventSource ) getSession() );↵ | 3 | getPersister(), getCollection(), ( EventSource ) getSession() );↵ | |
4 | for ( int i = 0; i < postListeners.length; i++ ) {↵ | 4 | for ( int i = 0; i < postListeners.length; i++ ) {↵ | |
5 | postListeners[i].onPostRecreateCollection( postEvent );↵ | 5 | postListeners[i].onPostUpdateCollection( postEvent );↵ | |
6 | }↵ | 6 | }↵ | |
7 | } | 7 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 8 |
Number of mapped statements | 4 |
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) | 25.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | if (postListeners.length > 0) |
| 2 | if (postListeners.length > 0) | |||||||||||||||||||||
3 | PostCollectionRecreateEvent postEvent = new PostCollectionRecreateEvent(getPersister(), getCollection(), (EventSource)getSession()); |
| 3 | PostCollectionUpdateEvent postEvent = new PostCollectionUpdateEvent(getPersister(), getCollection(), (EventSource)getSession()); | |||||||||||||||||||||
4 | for (int i = 0; i < postListeners.length; i++) |
| 4 | for (int i = 0; i < postListeners.length; i++) | |||||||||||||||||||||
5 | postListeners[i].onPostRecreateCollection(postEvent); |
| 5 | postListeners[i].onPostUpdateCollection(postEvent); |
Row | Violation |
---|---|
1 | Type int of variable postListeners.length does not match with type int of variable postListeners.length |
2 | Type int of variable postListeners.length does not match with type int of variable postListeners.length |
3 | Expression postListeners[i].onPostRecreateCollection(postEvent) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression postListeners[i].onPostUpdateCollection(postEvent) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression postListeners[i].onPostRecreateCollection(postEvent) is a void method call, and thus it cannot be parameterized |
6 | Expression postListeners[i].onPostUpdateCollection(postEvent) is a void method call, and thus it cannot be parameterized |
7 | Type org.hibernate.event.PostCollectionRecreateEventListener[] of variable postListeners does not match with type org.hibernate.event.PostCollectionUpdateEventListener[] of variable postListeners |