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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 52 |
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) | 6.0 |
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 sqlInsertRowString is a field being modified, and thus it cannot be parameterized |
2 | Expression sqlUpdateRowString is a field being modified, and thus it cannot be parameterized |
3 | Expression insertCallable is a field being modified, and thus it cannot be parameterized |
4 | Expression updateCallable is a field being modified, and thus it cannot be parameterized |
5 | Expression insertCheckStyle is a field being modified, and thus it cannot be parameterized |
6 | Expression updateCheckStyle is a field being modified, and thus it cannot be parameterized |
7 | Expression sqlInsertRowString is a field being modified, and thus it cannot be parameterized |
8 | Expression sqlUpdateRowString is a field being modified, and thus it cannot be parameterized |
9 | Expression insertCallable is a field being modified, and thus it cannot be parameterized |
10 | Expression updateCallable is a field being modified, and thus it cannot be parameterized |
11 | Expression insertCheckStyle is a field being modified, and thus it cannot be parameterized |
12 | Expression updateCheckStyle is a field being modified, and thus it cannot be parameterized |