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: 5 | Number of AST nodes: 5 | |||
1 | PostCollectionRecreateEventListener[] postListeners = getSession().getListeners()↵ | 1 | PostCollectionUpdateEventListener[] postListeners = getSession().getListeners()↵ | |
2 | .getPostCollectionRecreateEventListeners();↵ | 2 | .getPostCollectionUpdateEventListeners();↵ | |
3 | if (postListeners.length > 0) {↵ | 3 | if (postListeners.length > 0) {↵ | |
4 | PostCollectionRecreateEvent postEvent = new PostCollectionRecreateEvent(↵ | 4 | PostCollectionUpdateEvent postEvent = new PostCollectionUpdateEvent(↵ | |
5 | getPersister(), getCollection(), ( EventSource ) getSession() );↵ | 5 | getPersister(), getCollection(), ( EventSource ) getSession() );↵ | |
6 | for ( int i = 0; i < postListeners.length; i++ ) {↵ | 6 | for ( int i = 0; i < postListeners.length; i++ ) {↵ | |
7 | postListeners[i].onPostRecreateCollection( postEvent );↵ | 7 | postListeners[i].onPostUpdateCollection( postEvent );↵ | |
8 | }↵ | 8 | }↵ | |
9 | } | 9 |
| |
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 | 9 |
Number of mapped statements | 5 |
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.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | PostCollectionRecreateEventListener[] postListeners = getSession().getListeners().getPostCollectionRecreateEventListeners(); |
| 1 | PostCollectionUpdateEventListener[] postListeners = getSession().getListeners().getPostCollectionUpdateEventListeners(); | |||||||||||||||||
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 | Expression postListeners[i].onPostRecreateCollection(postEvent) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression postListeners[i].onPostUpdateCollection(postEvent) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression postListeners[i].onPostRecreateCollection(postEvent) is a void method call, and thus it cannot be parameterized |
4 | Expression postListeners[i].onPostUpdateCollection(postEvent) is a void method call, and thus it cannot be parameterized |