File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/action/EntityIdentityInsertAction.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/action/EntityInsertAction.java | |||
Method name: void postCommitInsert()
|
Method name: void postInsert()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (postListeners.length>0) {↵ | 1 | if ( postListeners.length > 0 ) {↵ | |
2 | PostInsertEvent postEvent = new PostInsertEvent(↵ | 2 | PostInsertEvent postEvent = new PostInsertEvent(↵ | |
3 | getInstance(),↵ | 3 | getInstance(),↵ | |
4 | generatedId,↵ | 4 | getId(),↵ | |
5 | state,↵ | 5 | state,↵ | |
6 | getPersister(),↵ | 6 | getPersister(),↵ | |
7 | (EventSource) getSession() ↵ | 7 | (EventSource) getSession()↵ | |
8 | );↵ | 8 | );↵ | |
9 | for ( int i = 0; i < postListeners.length; i++ ) {↵ | 9 | for ( int i = 0; i < postListeners.length; i++ ) {↵ | |
10 | postListeners[i].onPostInsert(postEvent);↵ | 10 | postListeners[i].onPostInsert(postEvent);↵ | |
11 | }↵ | 11 | }↵ | |
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) | 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) | 161.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | if (postListeners.length > 0) | 2 | if (postListeners.length > 0) | ||||||||||||
3 | PostInsertEvent postEvent = new PostInsertEvent(getInstance(), generatedId, state, getPersister(), (EventSource)getSession()); |
| 3 | PostInsertEvent postEvent = new PostInsertEvent(getInstance(), getId(), state, getPersister(), (EventSource)getSession()); | |||||||||||
4 | for (int i = 0; i < postListeners.length; i++) | 4 | for (int i = 0; i < postListeners.length; i++) | ||||||||||||
5 | postListeners[i].onPostInsert(postEvent); | 5 | postListeners[i].onPostInsert(postEvent); |
Row | Violation |
---|---|
1 | Expression getId() cannot be parameterized, because it has dependencies to/from statements that will be extracted |