try {
for( int i=0; i<size; i++ ) {
final List currentResults = loaders[i].list(this);
currentResults.addAll(results);
results = currentResults;
}
success = true;
}
finally {
dontFlushFromFind--;
afterOperation(success);
}
try {
for( int i=0; i<size; i++ ) {
final List currentResults = loaders[i].list(this);
currentResults.addAll(results);
results = currentResults;
}
success = true;
}
finally {
afterOperation(success);
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/SessionImpl.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java
|
Method name: List list(CriteriaImpl)
|
|
Method name: List list(CriteriaImpl)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | try {↵ | | 1 | try {↵
|
2 | for( int i=0; i<size; i++ ) {↵ | | 2 | for( int i=0; i<size; i++ ) {↵
|
3 | final List currentResults = loaders[i].list(this);↵ | | 3 | final List currentResults = loaders[i].list(this);↵
|
4 | currentResults.addAll(results);↵ | | 4 | currentResults.addAll(results);↵
|
5 | results = currentResults;↵ | | 5 | results = currentResults;↵
|
6 | }↵ | | 6 | }↵
|
7 | success = true;↵ | | 7 | success = true;↵
|
8 | }↵ | | 8 | }↵
|
9 | finally {↵ | | 9 | finally {↵
|
10 | dontFlushFromFind--;↵ | | 10 | ↵
|
11 | afterOperation(success);↵ | | 11 | afterOperation(success);↵
|
12 | } | | 12 | }
|
See real code fragment |
|
See real code fragment |
Summary
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 | 18 |
-
{Refactorable}
Mapping Summary
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) | 1.1 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
15 | for (int i = 0; i < size; i++) | | 10 | for (int i = 0; i < size; i++) |
16 | final List currentResults = loaders[i].list(this); | | 11 | final List currentResults = loaders[i].list(this); |
17 | currentResults.addAll(results); | | 12 | currentResults.addAll(results); |
18 | results = currentResults; | | 13 | results = currentResults; |
Precondition Violations (0)
Row |
Violation |