File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java | |||
Method name: void AbstractCollectionPersister(Collection, CollectionRegionAccessStrategy, Configuration, SessionFactoryImplementor)
|
Method name: void AbstractCollectionPersister(Collection, CollectionRegionAccessStrategy, Configuration, SessionFactoryImplementor)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if ( collection.getCustomSQLInsert() == null ) {↵ | 1 | if ( collection.getCustomSQLUpdate() == null ) {↵ | |
2 | sqlInsertRowString = generateInsertRowString();↵ | 2 | sqlUpdateRowString = generateUpdateRowString();↵ | |
3 | insertCallable = false;↵ | 3 | updateCallable = false;↵ | |
4 | insertCheckStyle = ExecuteUpdateResultCheckStyle.COUNT;↵ | 4 | updateCheckStyle = ExecuteUpdateResultCheckStyle.COUNT;↵ | |
5 | }↵ | 5 | }↵ | |
6 | else {↵ | 6 | else {↵ | |
7 | sqlInsertRowString = collection.getCustomSQLInsert();↵ | 7 | sqlUpdateRowString = collection.getCustomSQLUpdate();↵ | |
8 | insertCallable = collection.isCustomInsertCallable();↵ | 8 | updateCallable = collection.isCustomUpdateCallable();↵ | |
9 | insertCheckStyle = collection.getCustomSQLInsertCheckStyle() == null↵ | 9 | updateCheckStyle = collection.getCustomSQLUpdateCheckStyle() == null↵ | |
10 | ? ExecuteUpdateResultCheckStyle.determineDefault( collection.getCustomSQLInsert(), insertCallable )↵ | 10 | ? ExecuteUpdateResultCheckStyle.determineDefault( collection.getCustomSQLUpdate(), insertCallable )↵ | |
11 | : collection.getCustomSQLInsertCheckStyle();↵ | 11 | : collection.getCustomSQLUpdateCheckStyle();↵ | |
12 | } | 12 |
| |
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 40 |
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) | 37.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
140 | if (collection.getCustomSQLInsert() == null) |
| 147 | if (collection.getCustomSQLUpdate() == null) | |||||||||||||||||||||||||
141 | sqlInsertRowString = generateInsertRowString(); |
| 148 | sqlUpdateRowString = generateUpdateRowString(); | |||||||||||||||||||||||||
142 | insertCallable = false; |
| 149 | updateCallable = false; | |||||||||||||||||||||||||
143 | insertCheckStyle = ExecuteUpdateResultCheckStyle.COUNT; |
| 150 | updateCheckStyle = ExecuteUpdateResultCheckStyle.COUNT; | |||||||||||||||||||||||||
else | else | ||||||||||||||||||||||||||||
144 | sqlInsertRowString = collection.getCustomSQLInsert(); |
| 151 | sqlUpdateRowString = collection.getCustomSQLUpdate(); | |||||||||||||||||||||||||
145 | insertCallable = collection.isCustomInsertCallable(); |
| 152 | updateCallable = collection.isCustomUpdateCallable(); | |||||||||||||||||||||||||
146 | insertCheckStyle = collection.getCustomSQLInsertCheckStyle() == null ? ExecuteUpdateResultCheckStyle.determineDefault(collection.getCustomSQLInsert(), insertCallable) : collection.getCustomSQLInsertCheckStyle(); |
| 153 | updateCheckStyle = collection.getCustomSQLUpdateCheckStyle() == null ? ExecuteUpdateResultCheckStyle.determineDefault(collection.getCustomSQLUpdate(), insertCallable) : collection.getCustomSQLUpdateCheckStyle(); |
Row | Violation |
---|---|
1 | Expression insertCallable is a field being modified, and thus it cannot be parameterized |
2 | Expression updateCallable is a field being modified, and thus it cannot be parameterized |
3 | Expression collection.getCustomSQLInsert() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression collection.getCustomSQLUpdate() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression insertCallable is a field being modified, and thus it cannot be parameterized |
6 | Expression updateCallable is a field being modified, and thus it cannot be parameterized |
7 | Expression collection.isCustomInsertCallable() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression collection.isCustomUpdateCallable() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression collection.getCustomSQLInsertCheckStyle() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression collection.getCustomSQLUpdateCheckStyle() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression collection.getCustomSQLInsert() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression collection.getCustomSQLUpdate() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression collection.getCustomSQLInsertCheckStyle() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression collection.getCustomSQLUpdateCheckStyle() cannot be parameterized, because it has dependencies to/from statements that will be extracted |