File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/action/EntityInsertAction.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/action/EntityUpdateAction.java | |||
Method name: void execute()
|
Method name: void execute()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | if ( persister.hasInsertGeneratedProperties() ) {↵ | 1 | if ( persister.hasUpdateGeneratedProperties() ) {↵ | |
2 | persister.processInsert↵ | 2 | // this entity defines proeprty generation, so process those generated↵ | |
3 | // values...↵ | |||
3 | GeneratedProperties( id, instance, state, session );↵ | 4 | persister.processUpdateGeneratedProperties( id, instance, state, session );↵ | |
4 | if ( persister.isVersionPropertyGenerated() ) {↵ | 5 | if ( persister.isVersionPropertyGenerated() ) {↵ | |
5 | version = Versioning.getVersion(state, persister);↵ | 6 | nextVersion = Versioning.getVersion( state, persister );↵ | |
6 | }↵ | 7 | }↵ | |
7 | entry.postUpdate(instance, state, version);↵ | 8 | ↵ | |
8 | } | 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 | 11 |
Number of mapped statements | 4 |
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) | 0.9 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12 | if (persister.hasInsertGeneratedProperties()) |
| 22 | if (persister.hasUpdateGeneratedProperties()) | ||||||||||||
13 | persister.processInsertGeneratedProperties(id, instance, state, session); |
| 23 | persister.processUpdateGeneratedProperties(id, instance, state, session); | ||||||||||||
14 | if (persister.isVersionPropertyGenerated()) | 24 | if (persister.isVersionPropertyGenerated()) | |||||||||||||
15 | version = Versioning.getVersion(state, persister); |
| 25 | nextVersion = Versioning.getVersion(state, persister); | ||||||||||||
16 | entry.postUpdate(instance, state, version); | |
Row | Violation |
---|---|
1 | Expression persister.processInsertGeneratedProperties(id,instance,state,session) is a void method call, and thus it cannot be parameterized |
2 | Expression persister.processUpdateGeneratedProperties(id,instance,state,session) is a void method call, and thus it cannot be parameterized |
3 | Expression version is a field being modified, and thus it cannot be parameterized |
4 | Expression nextVersion is a field being modified, and thus it cannot be parameterized |